summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2013-10-29 17:27:51 +0200
committerGarren Smith <garren.smith@gmail.com>2013-10-29 17:27:51 +0200
commit9abd128cb548a43535ff5e3f32f6c588e9ab2d06 (patch)
treeeeb4d98c90306ddeeb89b004e27f2dc6fa61a38d
parentb7c5531583df21b729cec2b7b054454d79e02e37 (diff)
downloadcouchdb-9abd128cb548a43535ff5e3f32f6c588e9ab2d06.tar.gz
working replacement
-rw-r--r--src/fauxton/app/config.js3
-rw-r--r--src/fauxton/app/modules/documents/views.js82
-rw-r--r--src/fauxton/app/modules/fauxton/components.js68
-rw-r--r--src/fauxton/app/templates/documents/doc.html2
-rw-r--r--src/fauxton/app/templates/documents/view_editor.html8
-rw-r--r--src/fauxton/assets/js/libs/ace/ace.js117
-rw-r--r--src/fauxton/assets/js/libs/ace/anchor.js242
-rw-r--r--src/fauxton/assets/js/libs/ace/anchor_test.js188
-rw-r--r--src/fauxton/assets/js/libs/ace/autocomplete.js350
-rw-r--r--src/fauxton/assets/js/libs/ace/autocomplete/popup.js316
-rw-r--r--src/fauxton/assets/js/libs/ace/autocomplete/text_completer.js78
-rw-r--r--src/fauxton/assets/js/libs/ace/autocomplete/util.js74
-rw-r--r--src/fauxton/assets/js/libs/ace/background_tokenizer.js255
-rw-r--r--src/fauxton/assets/js/libs/ace/background_tokenizer_test.js85
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/command_manager.js112
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/command_manager_test.js199
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/default_commands.js490
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/incremental_search_commands.js180
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/multi_select_commands.js97
-rw-r--r--src/fauxton/assets/js/libs/ace/commands/occur_commands.js110
-rw-r--r--src/fauxton/assets/js/libs/ace/config.js295
-rw-r--r--src/fauxton/assets/js/libs/ace/config_test.js128
-rw-r--r--src/fauxton/assets/js/libs/ace/css/codefolding-fold-button-states.pngbin0 -> 759 bytes
-rw-r--r--src/fauxton/assets/js/libs/ace/css/editor.css447
-rw-r--r--src/fauxton/assets/js/libs/ace/css/expand-marker.pngbin0 -> 290 bytes
-rw-r--r--src/fauxton/assets/js/libs/ace/document.js642
-rw-r--r--src/fauxton/assets/js/libs/ace/document_test.js306
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session.js2505
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session/bracket_match.js219
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session/fold.js140
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session/fold_line.js268
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session/folding.js799
-rw-r--r--src/fauxton/assets/js/libs/ace/edit_session_test.js1075
-rw-r--r--src/fauxton/assets/js/libs/ace/editor.js2423
-rw-r--r--src/fauxton/assets/js/libs/ace/editor_change_document_test.js188
-rw-r--r--src/fauxton/assets/js/libs/ace/editor_highlight_selected_word_test.js223
-rw-r--r--src/fauxton/assets/js/libs/ace/editor_navigation_test.js164
-rw-r--r--src/fauxton/assets/js/libs/ace/editor_text_edit_test.js557
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/chromevox.js980
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/elastic_tabstops_lite.js319
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/emmet.js415
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/keybinding_menu.js86
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/language_tools.js129
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/add_editor_menu_options.js103
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/element_generator.js148
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/generate_settings_menu.js258
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js100
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/get_set_functions.js141
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/overlay_page.js116
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/menu_tools/settings_menu.css48
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/modelist.js174
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/old_ie.js108
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/old_ie_test.js77
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/searchbox.css157
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/searchbox.js286
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/settings_menu.js76
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/spellcheck.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/split.js40
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/static.css23
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/static_highlight.js180
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/static_highlight_test.js89
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/statusbar.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/textarea.js547
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/themelist.js79
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/themelist_utils/themes.js36
-rw-r--r--src/fauxton/assets/js/libs/ace/ext/whitespace.js212
-rw-r--r--src/fauxton/assets/js/libs/ace/incremental_search.js259
-rw-r--r--src/fauxton/assets/js/libs/ace/incremental_search_test.js208
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/emacs.js599
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/emacs_test.js73
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/hash_handler.js195
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/keybinding.js136
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/keybinding_test.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/state_handler.js249
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/textinput.js503
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim.js195
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/commands.js613
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/maps/aliases.js94
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/maps/motions.js664
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/maps/operators.js195
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/maps/util.js134
-rw-r--r--src/fauxton/assets/js/libs/ace/keyboard/vim/registers.js42
-rw-r--r--src/fauxton/assets/js/libs/ace/layer/cursor.js217
-rw-r--r--src/fauxton/assets/js/libs/ace/layer/gutter.js265
-rw-r--r--src/fauxton/assets/js/libs/ace/layer/marker.js218
-rw-r--r--src/fauxton/assets/js/libs/ace/layer/text.js661
-rw-r--r--src/fauxton/assets/js/libs/ace/layer/text_test.js126
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/dom.js283
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/es5-shim.js1062
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/event.js353
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/event_emitter.js155
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/event_emitter_test.js65
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/fixoldbrowsers.js19
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/keys.js138
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/lang.js212
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/net.js41
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/oop.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/regexp.js113
-rw-r--r--src/fauxton/assets/js/libs/ace/lib/useragent.js103
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/Readme.md9
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/highlight_rules_test.js152
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/package.json8
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_asciidoc.txt111
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_coffee.txt56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_curly.txt9
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_html.txt8
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_javascript.txt86
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_livescript.txt1
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_lucene.txt16
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_markdown.txt22
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_ruby.txt34
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/text_xml.txt7
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_abap.json189
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_actionscript.json263
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_asciidoc.json422
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_assembly_x86.json114
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_autohotkey.json261
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_batchfile.json70
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_c9search.json104
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_c_cpp.json185
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_clojure.json162
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_coffee.json528
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_coldfusion.json26
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_csharp.json31
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_css.json148
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_curly.json56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_dart.json368
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_diff.json398
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_dot.json2254
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_erlang.json166
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_forth.json219
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_ftl.json341
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_glsl.json127
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_golang.json256
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_groovy.json410
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_haml.json174
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_haskell.json156
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_haxe.json143
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_html.json51
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_html_ruby.json247
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_jade.json188
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_java.json95
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_javascript.json592
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_json.json412
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsp.json435
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsx.json51
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_julia.json105
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_latex.json127
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_less.json204
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_liquid.json551
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_lisp.json248
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_livescript.json6
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_logiql.json190
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_lsl.json495
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_lua.json348
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_luapage.json633
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_lucene.json92
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_markdown.json114
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_mushcode.json790
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_objectivec.json792
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_ocaml.json200
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_pascal.json297
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_perl.json227
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_pgsql.json735
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_php.json134
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_powershell.json184
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_prolog.json265
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_properties.json68
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_python.json152
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_r.json235
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_rdoc.json441
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_rhtml.json106
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_ruby.json232
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_rust.json136
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_sass.json229
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_scad.json194
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_scala.json542
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_scheme.json216
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_scss.json123
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_sh.json334
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_snippets.json159
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_sql.json54
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_stylus.json271
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_svg.json684
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_tcl.json385
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_tex.json130
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_text.json29
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_textile.json113
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_toml.json131
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_twig.json288
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_typescript.json559
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_vbscript.json249
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_velocity.json281
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_xml.json43
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_xquery.json44
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/_test/tokens_yaml.json150
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/abap.js77
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/abap_highlight_rules.js134
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/actionscript.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/actionscript_highlight_rules.js141
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ada.js54
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ada_highlight_rules.js93
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/asciidoc.js64
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/asciidoc_highlight_rules.js234
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/assembly_x86.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/assembly_x86_highlight_rules.js114
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/autohotkey.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/autohotkey_highlight_rules.js107
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/batchfile.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/batchfile_highlight_rules.js97
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour.js90
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour/css.js108
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour/cstyle.js365
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour/html.js88
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour/xml.js103
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/behaviour/xquery.js92
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/c9search.js67
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/c9search_highlight_rules.js59
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/c_cpp.js101
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/c_cpp_highlight_rules.js183
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/clojure.js86
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/clojure_highlight_rules.js200
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/cobol.js53
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/cobol_highlight_rules.js100
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee.js114
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/coffee-script.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/helpers.js271
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/lexer.js929
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/nodes.js3080
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/parser.js724
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/parser_test.js88
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/rewriter.js513
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee/scope.js174
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee_highlight_rules.js233
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coffee_worker.js74
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coldfusion.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coldfusion_highlight_rules.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/coldfusion_test.js67
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/csharp.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/csharp_highlight_rules.js96
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css.js100
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css/csslint.js9206
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css_highlight_rules.js179
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css_test.js78
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css_worker.js95
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/css_worker_test.js68
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/curly.js63
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/curly_highlight_rules.js66
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/d.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/d_highlight_rules.js318
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/dart.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/dart_highlight_rules.js182
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/diff.js52
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/diff_highlight_rules.js108
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/django.js116
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/doc_comment_highlight_rules.js73
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/dot.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/dot_highlight_rules.js126
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ejs.js109
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/erlang.js57
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/erlang_highlight_rules.js876
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/asciidoc.js142
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/c9search.js77
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/coffee.js120
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/coffee_test.js101
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/csharp.js138
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/cstyle.js83
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/cstyle_test.js85
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/diff.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/fold_mode.js120
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/html.js79
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/html_test.js162
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/ini.js80
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/latex.js162
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/lua.js163
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/markdown.js125
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/mixed.js83
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/pythonic.js58
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/pythonic_test.js98
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/velocity.js120
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/xml.js254
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/folding/xml_test.js110
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/forth.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/forth_highlight_rules.js164
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ftl.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ftl_highlight_rules.js195
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/glsl.js53
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/glsl_highlight_rules.js81
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/golang.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/golang_highlight_rules.js111
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/groovy.js24
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/groovy_highlight_rules.js173
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haml.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haml_highlight_rules.js132
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/handlebars.js29
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/handlebars_highlight_rules.js72
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haskell.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haskell_highlight_rules.js246
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haxe.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/haxe_highlight_rules.js98
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html.js77
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html_completions.js313
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html_highlight_rules.js123
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html_ruby.js59
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html_ruby_highlight_rules.js84
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/html_test.js67
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ini.js53
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ini_highlight_rules.js112
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jack.js79
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jack_highlight_rules.js142
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jade.js57
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jade_highlight_rules.js341
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/java.js24
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/java_highlight_rules.js131
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript.js116
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript/jshint.js9072
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript_highlight_rules.js362
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript_test.js213
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript_worker.js187
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/javascript_worker_test.js106
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/js_regex_highlight_rules.js94
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/json.js93
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/json/json_parse.js346
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/json_highlight_rules.js100
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/json_worker.js67
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/json_worker_test.js101
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jsoniq.js106
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jsp.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jsp_highlight_rules.js91
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jsx.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/jsx_highlight_rules.js120
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/julia.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/julia_highlight_rules.js170
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/latex.js24
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/latex_highlight_rules.js38
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/less.js84
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/less_highlight_rules.js271
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/liquid.js82
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/liquid_highlight_rules.js131
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lisp.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lisp_highlight_rules.js124
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/livescript.js248
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/logiql.js139
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/logiql_highlight_rules.js119
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/logiql_test.js99
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lsl.js92
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lsl_highlight_rules.js363
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lua.js168
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lua/luaparse.js1989
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lua_highlight_rules.js193
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lua_worker.js71
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/luapage.js21
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/luapage_highlight_rules.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lucene.js16
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/lucene_highlight_rules.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/makefile.js63
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/makefile_highlight_rules.js75
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/markdown.js76
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/markdown_highlight_rules.js219
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/matching_brace_outdent.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/matching_parens_outdent.js74
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/matlab.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/matlab_highlight_rules.js204
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/mushcode.js116
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/mushcode_high_rules.js569
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/mysql.js51
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/mysql_highlight_rules.js122
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/nix.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/nix_highlight_rules.js119
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/objectivec.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/objectivec_highlight_rules.js331
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ocaml.js97
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ocaml_highlight_rules.js337
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/pascal.js67
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/pascal_highlight_rules.js127
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/perl.js90
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/perl_highlight_rules.js165
-rwxr-xr-xsrc/fauxton/assets/js/libs/ace/mode/pgsql.js59
-rwxr-xr-xsrc/fauxton/assets/js/libs/ace/mode/pgsql_highlight_rules.js570
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/php.js135
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/php/php.js5003
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/php_highlight_rules.js1088
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/php_worker.js76
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/plain_text.js55
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/plain_text_test.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/powershell.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/powershell_highlight_rules.js145
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/prolog.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/prolog_highlight_rules.js238
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/properties.js45
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/properties_highlight_rules.js86
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/protobuf.js66
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/protobuf_highlight_rules.js66
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/python.js113
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/python_highlight_rules.js191
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/python_test.js79
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/r.js154
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/r_highlight_rules.js188
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rdoc.js61
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rdoc_highlight_rules.js99
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rhtml.js86
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rhtml_highlight_rules.js46
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ruby.js91
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ruby_highlight_rules.js249
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/ruby_test.js78
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rust.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/rust_highlight_rules.js129
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sass.js52
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sass_highlight_rules.js79
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scad.js99
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scad_highlight_rules.js142
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scala.js25
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scala_highlight_rules.js160
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scheme.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scheme_highlight_rules.js123
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scss.js84
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/scss_highlight_rules.js296
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sh.js112
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sh_highlight_rules.js144
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sjs.js59
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sjs_highlight_rules.js233
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/snippets.js112
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/soy_template.js60
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/soy_template_highlight_rules.js356
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/space.js21
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/space_highlight_rules.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sql.js53
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/sql_highlight_rules.js94
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/stylus.js59
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/stylus_highlight_rules.js165
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/svg.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/svg_highlight_rules.js49
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/tcl.js84
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/tcl_highlight_rules.js172
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/tex.js68
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/tex_highlight_rules.js107
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/text.js384
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/text_highlight_rules.js234
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/text_test.js64
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/textile.js66
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/textile_highlight_rules.js93
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/toml.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/toml_highlight_rules.js103
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/twig.js92
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/twig_highlight_rules.js166
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/typescript.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/typescript_highlight_rules.js98
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/vbscript.js60
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/vbscript_highlight_rules.js276
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/velocity.js59
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/velocity_highlight_rules.js177
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/verilog.js54
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/verilog_highlight_rules.js101
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/vhdl.js52
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/vhdl_highlight_rules.js115
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xml.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xml_highlight_rules.js216
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xml_test.js75
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xml_util.js100
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery.js139
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/JSONParseTreeHandler.js178
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqLexer.js302
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.ebnf544
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.js4205
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/Readme.md6
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/XQueryLexer.js303
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.ebnf1180
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.js33487
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.ebnf543
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.js4205
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery/visitors/SemanticHighlighter.js76
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/xquery_worker.js81
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/yaml.js78
-rw-r--r--src/fauxton/assets/js/libs/ace/mode/yaml_highlight_rules.js116
-rw-r--r--src/fauxton/assets/js/libs/ace/model/editor.js62
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/default_gutter_handler.js161
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/default_handlers.js274
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/dragdrop_handler.js417
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/fold_handler.js93
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/mouse_event.js129
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/mouse_handler.js155
-rw-r--r--src/fauxton/assets/js/libs/ace/mouse/multi_select_handler.js160
-rw-r--r--src/fauxton/assets/js/libs/ace/multi_select.js934
-rw-r--r--src/fauxton/assets/js/libs/ace/multi_select_test.js205
-rw-r--r--src/fauxton/assets/js/libs/ace/occur.js190
-rw-r--r--src/fauxton/assets/js/libs/ace/occur_test.js154
-rw-r--r--src/fauxton/assets/js/libs/ace/placeholder.js269
-rw-r--r--src/fauxton/assets/js/libs/ace/placeholder_test.js156
-rw-r--r--src/fauxton/assets/js/libs/ace/range.js549
-rw-r--r--src/fauxton/assets/js/libs/ace/range_list.js240
-rw-r--r--src/fauxton/assets/js/libs/ace/range_list_test.js182
-rw-r--r--src/fauxton/assets/js/libs/ace/range_test.js191
-rw-r--r--src/fauxton/assets/js/libs/ace/renderloop.js75
-rw-r--r--src/fauxton/assets/js/libs/ace/requirejs/text.js51
-rw-r--r--src/fauxton/assets/js/libs/ace/scrollbar.js204
-rw-r--r--src/fauxton/assets/js/libs/ace/search.js389
-rw-r--r--src/fauxton/assets/js/libs/ace/search_highlight.js82
-rw-r--r--src/fauxton/assets/js/libs/ace/search_test.js461
-rw-r--r--src/fauxton/assets/js/libs/ace/selection.js915
-rw-r--r--src/fauxton/assets/js/libs/ace/selection_test.js480
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets.js844
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/_.snippets240
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/abap.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/abap.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/actionscript.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/actionscript.snippets157
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ada.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ada.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/apache.snippets35
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/asciidoc.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/asciidoc.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/assembly_x86.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/assembly_x86.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/autohotkey.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/autohotkey.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/autoit.snippets66
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/batchfile.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/batchfile.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/c.snippets235
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/c9search.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/c9search.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/c_cpp.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/c_cpp.snippets131
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/chef.snippets204
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/clojure.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/clojure.snippets90
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/cmake.snippets58
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/cobol.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/cobol.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/coffee.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/coffee.snippets95
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/coldfusion.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/coldfusion.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/cs.snippets374
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/csharp.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/csharp.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/css.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/css.snippets967
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/curly.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/curly.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/d.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/d.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/dart.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/dart.snippets83
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/diff.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/diff.snippets11
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/django.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/django.snippets108
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/dot.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/dot.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ejs.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ejs.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/erlang.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/erlang.snippets160
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/eruby.snippets113
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/falcon.snippets71
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/forth.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/forth.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ftl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ftl.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/glsl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/glsl.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/go.snippets201
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/golang.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/golang.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/groovy.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/groovy.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haml.snippets20
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/handlebars.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/handlebars.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haskell.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haskell.snippets82
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haxe.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/haxe.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/html.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/html.snippets828
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/html_ruby.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/html_ruby.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/htmldjango.snippets136
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/htmltornado.snippets55
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ini.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ini.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jade.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jade.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/java.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/java.snippets240
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/javascript-jquery.snippets589
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/javascript.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/javascript.snippets195
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/json.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/json.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsoniq.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsoniq.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsp.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsp.snippets99
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsx.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/jsx.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/julia.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/julia.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/latex.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/latex.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ledger.snippets5
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/less.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/less.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/liquid.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/liquid.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lisp.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lisp.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/livescript.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/livescript.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/logiql.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/logiql.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lsl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lsl.snippets887
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lua.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lua.snippets21
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/luapage.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/luapage.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lucene.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/lucene.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/makefile.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/makefile.snippets4
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mako.snippets54
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/markdown.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/markdown.snippets88
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/matlab.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/matlab.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mushcode.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mushcode.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mysql.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/mysql.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/nix.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/nix.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/objc.snippets247
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/objectivec.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/objectivec.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ocaml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ocaml.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/pascal.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/pascal.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/perl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/perl.snippets347
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/pgsql.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/pgsql.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/php.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/php.snippets377
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/powershell.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/powershell.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/prolog.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/prolog.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/properties.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/properties.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/protobuf.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/python.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/python.snippets158
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/r.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/r.snippets121
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rdoc.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rdoc.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rhtml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rhtml.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rst.snippets22
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ruby.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/ruby.snippets928
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rust.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/rust.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sass.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sass.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scad.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scad.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scala.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scala.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scheme.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scheme.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scss.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/scss.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sh.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sh.snippets83
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/snippets.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/snippets.snippets9
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/soy_template.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/soy_template.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sql.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/sql.snippets26
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/stylus.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/stylus.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/svg.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/svg.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/tcl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/tcl.snippets92
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/tex.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/tex.snippets191
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/text.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/text.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/textile.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/textile.snippets30
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/tmsnippet.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/toml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/toml.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/twig.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/twig.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/typescript.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/typescript.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/vbscript.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/vbscript.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/velocity.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/velocity.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/verilog.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/verilog.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/vhdl.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/vhdl.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/xml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/xml.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/xquery.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/xquery.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/xslt.snippets97
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/yaml.js7
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets/yaml.snippets0
-rw-r--r--src/fauxton/assets/js/libs/ace/snippets_test.js131
-rw-r--r--src/fauxton/assets/js/libs/ace/split.js373
-rw-r--r--src/fauxton/assets/js/libs/ace/test/all.js35
-rw-r--r--src/fauxton/assets/js/libs/ace/test/all_browser.js138
-rw-r--r--src/fauxton/assets/js/libs/ace/test/assertions.js56
-rw-r--r--src/fauxton/assets/js/libs/ace/test/asyncjs/assert.js313
-rw-r--r--src/fauxton/assets/js/libs/ace/test/asyncjs/async.js529
-rw-r--r--src/fauxton/assets/js/libs/ace/test/asyncjs/index.js13
-rw-r--r--src/fauxton/assets/js/libs/ace/test/asyncjs/test.js195
-rw-r--r--src/fauxton/assets/js/libs/ace/test/asyncjs/utils.js65
-rw-r--r--src/fauxton/assets/js/libs/ace/test/benchmark.js78
-rw-r--r--src/fauxton/assets/js/libs/ace/test/mockdom.js10
-rw-r--r--src/fauxton/assets/js/libs/ace/test/mockrenderer.js201
-rw-r--r--src/fauxton/assets/js/libs/ace/test/tests.html46
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/ambiance.css217
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/ambiance.js33
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/chaos.css154
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/chaos.js33
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/chrome.css153
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/chrome.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/clouds.css112
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/clouds.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/clouds_midnight.css113
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/clouds_midnight.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/cobalt.css132
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/cobalt.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/crimson_editor.css143
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/crimson_editor.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/dawn.css125
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/dawn.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/dreamweaver.css171
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/dreamweaver.js38
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/eclipse.css108
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/eclipse.js41
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/github.css119
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/github.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/idle_fingers.css113
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/idle_fingers.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/kr_theme.css123
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/kr_theme.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/merbivore.css110
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/merbivore.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/merbivore_soft.css111
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/merbivore_soft.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/mono_industrial.css126
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/mono_industrial.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/monokai.css122
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/monokai.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.css129
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/solarized_dark.css104
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/solarized_dark.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/solarized_light.css106
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/solarized_light.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/terminal.css132
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/terminal.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/textmate.css154
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/textmate.js40
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow.css124
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night.css124
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.css124
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.css128
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.css127
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/twilight.css126
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/twilight.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/vibrant_ink.css110
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/vibrant_ink.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/xcode.css103
-rw-r--r--src/fauxton/assets/js/libs/ace/theme/xcode.js39
-rw-r--r--src/fauxton/assets/js/libs/ace/token_iterator.js150
-rw-r--r--src/fauxton/assets/js/libs/ace/token_iterator_test.js212
-rw-r--r--src/fauxton/assets/js/libs/ace/tokenizer.js333
-rw-r--r--src/fauxton/assets/js/libs/ace/tokenizer_dev.js183
-rw-r--r--src/fauxton/assets/js/libs/ace/tokenizer_test.js69
-rw-r--r--src/fauxton/assets/js/libs/ace/undomanager.js167
-rw-r--r--src/fauxton/assets/js/libs/ace/unicode.js107
-rw-r--r--src/fauxton/assets/js/libs/ace/virtual_renderer.js1678
-rw-r--r--src/fauxton/assets/js/libs/ace/virtual_renderer_test.js86
-rw-r--r--src/fauxton/assets/js/libs/ace/worker/mirror.js43
-rw-r--r--src/fauxton/assets/js/libs/ace/worker/worker.js178
-rw-r--r--src/fauxton/assets/js/libs/ace/worker/worker_client.js226
-rw-r--r--src/fauxton/assets/js/libs/ace/worker/worker_test.js125
-rw-r--r--src/fauxton/assets/less/fauxton.less14
809 files changed, 186579 insertions, 34 deletions
diff --git a/src/fauxton/app/config.js b/src/fauxton/app/config.js
index 4edeba056..631308f65 100644
--- a/src/fauxton/app/config.js
+++ b/src/fauxton/app/config.js
@@ -31,7 +31,8 @@ require.config({
jshint: "../assets/js/libs/jshint",
spin: "../assets/js/libs/spin.min",
d3: "../assets/js/libs/d3",
- "nv.d3": "../assets/js/libs/nv.d3"
+ "nv.d3": "../assets/js/libs/nv.d3",
+ "ace":"../assets/js/libs/ace"
},
baseUrl: '/',
diff --git a/src/fauxton/app/modules/documents/views.js b/src/fauxton/app/modules/documents/views.js
index f822544a6..08825f891 100644
--- a/src/fauxton/app/modules/documents/views.js
+++ b/src/fauxton/app/modules/documents/views.js
@@ -708,6 +708,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
disableLoader: true,
initialize: function (options) {
this.database = options.database;
+ _.bindAll(this);
},
goback: function(){
window.history.back();
@@ -849,6 +850,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}
json = JSON.parse(this.editor.getValue());
+
this.model.set(json, {validate: true});
if (this.model.validationError) {
return false;
@@ -858,10 +860,11 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
},
hasValidCode: function() {
- return JSHINT(this.editor.getValue()) !== false;
+ var errors = this.editor.getAnnotations();
+ return errors.length === 0;
},
- runJSHint: function() {
+ /*runJSHint: function() {
var json = this.editor.getValue();
var output = JSHint(json);
@@ -884,7 +887,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}, 0);
}, this);
}
- },
+ },*/
serialize: function() {
return {
@@ -909,11 +912,24 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
},
afterRender: function() {
+ var saveDoc = this.saveDoc;
+
+ this.editor = new Components.Editor({
+ editorId: "editor-container",
+ commands: [{
+ name: 'save',
+ bindKey: {win: 'Ctrl-S', mac: 'Ctrl-S'},
+ exec: function(editor) {
+ saveDoc();
+ },
+ readOnly: true // false if this command should not apply in readOnly mode
+ }]
+ });
+ this.editor.render();
this.model.on("sync", this.updateValues, this);
- var that = this;
- if ($('.CodeMirror').length > 0){
- $('.CodeMirror').remove();
- }
+
+ /*var that = this;
+
this.editor = Codemirror.fromTextArea(this.$el.find("textarea.doc-code").get()[0], {
mode: "application/json",
json: false,
@@ -932,7 +948,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
"Ctrl-/": "undo"
}
});
- setTimeout(function(){that.editor.setSize(null,$('#dashboard').outerHeight()-295);},200);
+ */
}
});
@@ -1334,7 +1350,8 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}
},
- updateView: function(event, paramInfo) {
+ // not sure where this is used
+ /*updateView: function(event, paramInfo) {
event.preventDefault();
if (this.newView) { return alert('Please save this new view before querying it.'); }
@@ -1368,7 +1385,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
FauxtonAPI.navigate(fragment, {trigger: false});
FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: this.ddocID, view: this.viewName});
- },
+ },*/
previewView: function(event, paramsInfo) {
var that = this,
@@ -1433,20 +1450,20 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
hasValidCode: function() {
return _.every(["mapEditor", "reduceEditor"], function(editorName) {
var editor = this[editorName];
- if (editorName == "reduceEditor" && ! this.isCustomReduceEnabled()) {
+ if (editorName === "reduceEditor" && ! this.isCustomReduceEnabled()) {
return true;
- } else if (JSHINT(editor.getValue()) !== false) {
- return true;
- } else {
- // By default CouchDB view functions don't pass lint
- return _.every(JSHINT.errors, function(error) {
- return FauxtonAPI.isIgnorableError(error.raw);
- });
- }
+ }
+
+ var errors = editor.getAnnotations();
+ // By default CouchDB view functions don't pass lint
+ return _.every(errors, function(error) {
+ console.log('err', error);
+ return FauxtonAPI.isIgnorableError(error.raw);
+ },this);
}, this);
},
- runJSHint: function(editorName) {
+ /*runJSHint: function(editorName) {
var editor = this[editorName];
var json = editor.getValue();
var output = JSHint(json);
@@ -1472,7 +1489,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
}, 0);
}, this);
}
- },
+ },*/
toggleIndexNav: function (event) {
var $index = this.$('#index'),
$targetId = this.$(event.target).attr('id');
@@ -1543,7 +1560,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
mapFun.val(this.langTemplates[this.defaultLang].map);
reduceFun.val(this.langTemplates[this.defaultLang].reduce);
} else {
- setTimeout(function(){this.$('#index').hide();}, 300);
+ this.$('#index').hide();
this.$('#index-nav').parent().removeClass('active');
}
@@ -1552,7 +1569,24 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
// When in grunt dev mode we load templates asynchronously
// and this can cause a double render which then gives us two
// mapeditors
- if (this.mapViewSet) { return;}
+
+ this.mapEditor = new Components.Editor({
+ editorId: "map-function",
+ mode: "javascript"
+ });
+ this.mapEditor.render();
+ // We can make this better
+ if (this.hasCustomReduce()) {
+ this.reduceEditor = new Components.Editor({
+ editorId: "reduce-function",
+ mode: "javascript"
+ });
+ this.reduceEditor.render();
+ } else {
+ $(".control-group.reduce-function").hide();
+ }
+
+ /*if (this.mapViewSet) { return;}
this.mapViewSet = true;
this.mapEditor = Codemirror.fromTextArea(mapFun.get()[0], {
@@ -1594,7 +1628,7 @@ function(app, FauxtonAPI, Components, Documents, pouchdb, Codemirror, JSHint, re
// So render it first, set the editor, then hide.
if ( ! this.hasCustomReduce()) {
$(".control-group.reduce-function").hide();
- }
+ }*/
if (this.params) {
this.advancedOptions.updateFromParams(this.params);
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js
index 30a57d801..afed6c71b 100644
--- a/src/fauxton/app/modules/fauxton/components.js
+++ b/src/fauxton/app/modules/fauxton/components.js
@@ -11,12 +11,13 @@
// the License.
define([
- "app",
- // Libs
- "api"
+ "app",
+ // Libs
+ "api",
+ "ace/ace"
],
-function(app, FauxtonAPI) {
+function(app, FauxtonAPI, ace) {
var Components = app.module();
Components.Pagination = FauxtonAPI.View.extend({
@@ -175,6 +176,65 @@ function(app, FauxtonAPI) {
}
});
+ Components.Editor = FauxtonAPI.View.extend({
+ initialize: function (options) {
+ this.editorId = options.editorId;
+ this.mode = options.mode || "json";
+ this.commands = options.commands;
+ },
+
+ afterRender: function () {
+ this.editor = ace.edit(this.editorId);
+ this.editor.setTheme("ace/theme/crimson_editor");
+ this.editor.getSession().setMode("ace/mode/" + this.mode);
+ this.editor.setShowPrintMargin(false);
+ this.editor.gotoLine(2);
+ this.addCommands();
+ this.removeIncorrectAnnotations();
+ },
+
+ addCommands: function () {
+ _.each(this.commands, function (command) {
+ var out = this.editor.commands.addCommand(command);
+ console.log(out, 'ou');
+ }, this);
+ },
+
+ removeIncorrectAnnotations: function () {
+ var editor = this.editor;
+
+ this.editor.getSession().on("changeAnnotation", function(){
+ var annotations = editor.getSession().getAnnotations();
+
+ var newAnnotations = _.reduce(annotations, function (annotations, error) {
+ console.log(error);
+ if (!FauxtonAPI.isIgnorableError(error.raw)) {
+ annotations.push(error);
+ }
+ return annotations;
+ }, []);
+
+ if (annotations.length !== newAnnotations.length) {
+ editor.getSession().setAnnotations(newAnnotations);
+ }
+ });
+ },
+
+ setValue: function (data, lineNumber) {
+ lineNumber = lineNumber ? lineNumber : -1;
+ this.editor.setValue(data, lineNumber);
+ },
+
+ getValue: function () {
+ return this.editor.getValue();
+ },
+
+ getAnnotations: function () {
+ return this.editor.getSession().getAnnotations();
+ }
+
+ });
+
return Components;
});
diff --git a/src/fauxton/app/templates/documents/doc.html b/src/fauxton/app/templates/documents/doc.html
index 8c8fc7bc8..f83a1a90f 100644
--- a/src/fauxton/app/templates/documents/doc.html
+++ b/src/fauxton/app/templates/documents/doc.html
@@ -41,7 +41,7 @@ the License.
<div id="duplicate-modal"> </div>
</div>
- <textarea class="doc-code"><%- JSON.stringify(doc.attributes, null, " ") %></textarea>
+ <div id="editor-container" class="doc-code"><%- JSON.stringify(doc.attributes, null, " ") %></div>
<br />
<p>
<button class="save-doc button green btn-success btn-large save fonticon-circle-check" type="button">Save</button>
diff --git a/src/fauxton/app/templates/documents/view_editor.html b/src/fauxton/app/templates/documents/view_editor.html
index 76265e070..8fcd07a77 100644
--- a/src/fauxton/app/templates/documents/view_editor.html
+++ b/src/fauxton/app/templates/documents/view_editor.html
@@ -36,9 +36,9 @@ the License.
<div class="control-group">
<label for="map-function">Map function <a href="<%=getDocUrl('map_functions')%>" target="_blank"><i class="icon-question-sign"></i></a></label>
<% if (newView) { %>
- <textarea class="js-editor" id="map-function"><%= langTemplates.map %></textarea>
+ <div class="js-editor" id="map-function"><%= langTemplates.map %></div>
<% } else { %>
- <textarea class="js-editor" id="map-function"><%= ddoc.get('views')[viewName].map %></textarea>
+ <div class="js-editor" id="map-function"><%= ddoc.get('views')[viewName].map %></div>
<% } %>
</div>
@@ -60,9 +60,9 @@ the License.
<div class="control-group reduce-function">
<label for="reduce-function">Custom Reduce</label>
<% if (newView) { %>
- <textarea class="js-editor" id="reduce-function"><%= langTemplates.reduce %></textarea>
+ <div class="js-editor" id="reduce-function"><%= langTemplates.reduce %></div>
<% } else { %>
- <textarea class="js-editor" id="reduce-function"><%= ddoc.get('views')[viewName].reduce %></textarea>
+ <div class="js-editor" id="reduce-function"><%= ddoc.get('views')[viewName].reduce %></div>
<% } %>
</div>
diff --git a/src/fauxton/assets/js/libs/ace/ace.js b/src/fauxton/assets/js/libs/ace/ace.js
new file mode 100644
index 000000000..773f22790
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ace.js
@@ -0,0 +1,117 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/**
+ * The main class required to set up an Ace instance in the browser.
+ *
+ * @class Ace
+ **/
+
+define(function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+
+var Editor = require("./editor").Editor;
+var EditSession = require("./edit_session").EditSession;
+var UndoManager = require("./undomanager").UndoManager;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+var MultiSelect = require("./multi_select").MultiSelect;
+
+// The following require()s are for inclusion in the built ace file
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./mode/folding/fold_mode");
+require("./theme/textmate");
+
+exports.config = require("./config");
+
+/**
+ * Provides access to require in packed noconflict mode
+ * @param {String} moduleName
+ * @returns {Object}
+ *
+ **/
+exports.require = require;
+
+/**
+ * Embeds the Ace editor into the DOM, at the element provided by `el`.
+ * @param {String | DOMElement} el Either the id of an element, or the element itself
+ *
+ **/
+exports.edit = function(el) {
+ if (typeof(el) == "string") {
+ var _id = el;
+ var el = document.getElementById(_id);
+ if (!el)
+ throw new Error("ace.edit can't find div #" + _id);
+ }
+
+ if (el.env && el.env.editor instanceof Editor)
+ return el.env.editor;
+
+ var doc = exports.createEditSession(dom.getInnerText(el));
+ el.innerHTML = '';
+
+ var editor = new Editor(new Renderer(el));
+ new MultiSelect(editor);
+ editor.setSession(doc);
+
+ var env = {
+ document: doc,
+ editor: editor,
+ onResize: editor.resize.bind(editor, null)
+ };
+ event.addListener(window, "resize", env.onResize);
+ editor.on("destroy", function() {
+ event.removeListener(window, "resize", env.onResize);
+ });
+ el.env = editor.env = env;
+ return editor;
+};
+
+/**
+ * Creates a new [[EditSession]], and returns the associated [[Document]].
+ * @param {Document | String} text {:textParam}
+ * @param {TextMode} mode {:modeParam}
+ *
+ **/
+exports.createEditSession = function(text, mode) {
+ var doc = new EditSession(text, mode);
+ doc.setUndoManager(new UndoManager());
+ return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+});
diff --git a/src/fauxton/assets/js/libs/ace/anchor.js b/src/fauxton/assets/js/libs/ace/anchor.js
new file mode 100644
index 000000000..3a62e6326
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/anchor.js
@@ -0,0 +1,242 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+/**
+ *
+ * Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated.
+ *
+ * @class Anchor
+ **/
+
+/**
+ * Creates a new `Anchor` and associates it with a document.
+ *
+ * @param {Document} doc The document to associate with the anchor
+ * @param {Number} row The starting row position
+ * @param {Number} column The starting column position
+ *
+ * @constructor
+ **/
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ * Returns an object identifying the `row` and `column` position of the current anchor.
+ * @returns {Object}
+ **/
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+
+ /**
+ *
+ * Returns the current document.
+ * @returns {Document}
+ **/
+ this.getDocument = function() {
+ return this.document;
+ };
+
+ /**
+ * experimental: allows anchor to stick to the next on the left
+ */
+ this.$insertRight = false;
+ /**
+ * Fires whenever the anchor position changes.
+ *
+ * Both of these objects have a `row` and `column` property corresponding to the position.
+ *
+ * Events that can trigger this function include [[Anchor.setPosition `setPosition()`]].
+ *
+ * @event change
+ * @param {Object} e An object containing information about the anchor position. It has two properties:
+ * - `old`: An object describing the old Anchor position
+ * - `value`: An object describing the new Anchor position
+ *
+ **/
+ this.onChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+
+ if (range.start.row == range.end.row && range.start.row != this.row)
+ return;
+
+ if (range.start.row > this.row)
+ return;
+
+ if (range.start.row == this.row && range.start.column > this.column)
+ return;
+
+ var row = this.row;
+ var column = this.column;
+ var start = range.start;
+ var end = range.end;
+
+ if (delta.action === "insertText") {
+ if (start.row === row && start.column <= column) {
+ if (start.column === column && this.$insertRight) {
+ // do nothing
+ } else if (start.row === end.row) {
+ column += end.column - start.column;
+ } else {
+ column -= start.column;
+ row += end.row - start.row;
+ }
+ } else if (start.row !== end.row && start.row < row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "insertLines") {
+ if (start.row <= row) {
+ row += end.row - start.row;
+ }
+ } else if (delta.action === "removeText") {
+ if (start.row === row && start.column < column) {
+ if (end.column >= column)
+ column = start.column;
+ else
+ column = Math.max(0, column - (end.column - start.column));
+
+ } else if (start.row !== end.row && start.row < row) {
+ if (end.row === row)
+ column = Math.max(0, column - end.column) + start.column;
+ row -= (end.row - start.row);
+ } else if (end.row === row) {
+ row -= end.row - start.row;
+ column = Math.max(0, column - end.column) + start.column;
+ }
+ } else if (delta.action == "removeLines") {
+ if (start.row <= row) {
+ if (end.row <= row)
+ row -= end.row - start.row;
+ else {
+ row = start.row;
+ column = 0;
+ }
+ }
+ }
+
+ this.setPosition(row, column, true);
+ };
+
+ /**
+ * Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
+ * @param {Number} row The row index to move the anchor to
+ * @param {Number} column The column index to move the anchor to
+ * @param {Boolean} noClip Identifies if you want the position to be clipped
+ *
+ **/
+ this.setPosition = function(row, column, noClip) {
+ var pos;
+ if (noClip) {
+ pos = {
+ row: row,
+ column: column
+ };
+ } else {
+ pos = this.$clipPositionToDocument(row, column);
+ }
+
+ if (this.row == pos.row && this.column == pos.column)
+ return;
+
+ var old = {
+ row: this.row,
+ column: this.column
+ };
+
+ this.row = pos.row;
+ this.column = pos.column;
+ this._emit("change", {
+ old: old,
+ value: pos
+ });
+ };
+
+ /**
+ * When called, the `'change'` event listener is removed.
+ *
+ **/
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("change", this.$onChange);
+ };
+
+ /**
+ * Clips the anchor position to the specified row and column.
+ * @param {Number} row The row index to clip the anchor to
+ * @param {Number} column The column index to clip the anchor to
+ *
+ **/
+ this.$clipPositionToDocument = function(row, column) {
+ var pos = {};
+
+ if (row >= this.document.getLength()) {
+ pos.row = Math.max(0, this.document.getLength() - 1);
+ pos.column = this.document.getLine(pos.row).length;
+ }
+ else if (row < 0) {
+ pos.row = 0;
+ pos.column = 0;
+ }
+ else {
+ pos.row = row;
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
+ }
+
+ if (column < 0)
+ pos.column = 0;
+
+ return pos;
+ };
+
+}).call(Anchor.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/anchor_test.js b/src/fauxton/assets/js/libs/ace/anchor_test.js
new file mode 100644
index 000000000..2d7fcb63d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/anchor_test.js
@@ -0,0 +1,188 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var Document = require("./document").Document;
+var Anchor = require("./anchor").Anchor;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+
+module.exports = {
+
+ "test create anchor" : function() {
+ var doc = new Document("juhu");
+ var anchor = new Anchor(doc, 0, 0);
+
+ assert.position(anchor.getPosition(), 0, 0);
+ assert.equal(anchor.getDocument(), doc);
+ },
+
+ "test insert text in same row before cursor should move anchor column": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.insert({row: 1, column: 1}, "123");
+ assert.position(anchor.getPosition(), 1, 7);
+ },
+
+ "test insert lines before cursor should move anchor row": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.insertLines(1, ["123", "456"]);
+ assert.position(anchor.getPosition(), 3, 4);
+ },
+
+ "test insert new line before cursor should move anchor column": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.insertNewLine({row: 0, column: 0});
+ assert.position(anchor.getPosition(), 2, 4);
+ },
+
+ "test insert new line in anchor line before anchor should move anchor column and row": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.insertNewLine({row: 1, column: 2});
+ assert.position(anchor.getPosition(), 2, 2);
+ },
+
+ "test delete text in anchor line before anchor should move anchor column": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.remove(new Range(1, 1, 1, 3));
+ assert.position(anchor.getPosition(), 1, 2);
+ },
+
+ "test remove range which contains the anchor should move the anchor to the start of the range": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 0, 3);
+
+ doc.remove(new Range(0, 1, 1, 3));
+ assert.position(anchor.getPosition(), 0, 1);
+ },
+
+ "test delete character before the anchor should have no effect": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.remove(new Range(1, 4, 1, 5));
+ assert.position(anchor.getPosition(), 1, 4);
+ },
+
+ "test delete lines in anchor line before anchor should move anchor row": function() {
+ var doc = new Document("juhu\n1\n2\nkinners");
+ var anchor = new Anchor(doc, 3, 4);
+
+ doc.removeLines(1, 2);
+ assert.position(anchor.getPosition(), 1, 4);
+ },
+
+ "test remove new line before the cursor": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.removeNewLine(0);
+ assert.position(anchor.getPosition(), 0, 8);
+ },
+
+ "test delete range which contains the anchor should move anchor to the end of the range": function() {
+ var doc = new Document("juhu\nkinners");
+ var anchor = new Anchor(doc, 1, 4);
+
+ doc.remove(new Range(0, 2, 1, 2));
+ assert.position(anchor.getPosition(), 0, 4);
+ },
+
+ "test delete line which contains the anchor should move anchor to the end of the range": function() {
+ var doc = new Document("juhu\nkinners\n123");
+ var anchor = new Anchor(doc, 1, 5);
+
+ doc.removeLines(1, 1);
+ assert.position(anchor.getPosition(), 1, 0);
+ },
+
+ "test remove after the anchor should have no effect": function() {
+ var doc = new Document("juhu\nkinners\n123");
+ var anchor = new Anchor(doc, 1, 2);
+
+ doc.remove(new Range(1, 4, 2, 2));
+ assert.position(anchor.getPosition(), 1, 2);
+ },
+
+ "test anchor changes triggered by document changes should emit change event": function(next) {
+ var doc = new Document("juhu\nkinners\n123");
+ var anchor = new Anchor(doc, 1, 5);
+
+ anchor.on("change", function(e) {
+ assert.position(anchor.getPosition(), 0, 0);
+ next();
+ });
+
+ doc.remove(new Range(0, 0, 2, 1));
+ },
+
+ "test only fire change event if position changes": function() {
+ var doc = new Document("juhu\nkinners\n123");
+ var anchor = new Anchor(doc, 1, 5);
+
+ anchor.on("change", function(e) {
+ assert.fail();
+ });
+
+ doc.remove(new Range(2, 0, 2, 1));
+ },
+
+ "test insert/remove lines at the end of the document": function() {
+ var doc = new Document("juhu\nkinners\n123");
+ var anchor = new Anchor(doc, 2, 4);
+
+ doc.removeLines(0, 3);
+ assert.position(anchor.getPosition(), 0, 0);
+ doc.insertLines(0, ["a", "b", "c"]);
+ assert.position(anchor.getPosition(), 3, 0);
+ assert.equal(doc.getValue(), "a\nb\nc\n");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/autocomplete.js b/src/fauxton/assets/js/libs/ace/autocomplete.js
new file mode 100644
index 000000000..5b9312f8b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/autocomplete.js
@@ -0,0 +1,350 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var AcePopup = require("./autocomplete/popup").AcePopup;
+var util = require("./autocomplete/util");
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var snippetManager = require("./snippets").snippetManager;
+
+var Autocomplete = function() {
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys(this.commands);
+
+ this.blurListener = this.blurListener.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.mousedownListener = this.mousedownListener.bind(this);
+ this.mousewheelListener = this.mousewheelListener.bind(this);
+
+ this.changeTimer = lang.delayedCall(function() {
+ this.updateCompletions(true);
+ }.bind(this))
+};
+
+(function() {
+ this.$init = function() {
+ this.popup = new AcePopup(document.body || document.documentElement);
+ this.popup.on("click", function(e) {
+ this.insertMatch();
+ e.stop();
+ }.bind(this));
+ };
+
+ this.openPopup = function(editor, prefix, keepPopupPosition) {
+ if (!this.popup)
+ this.$init();
+
+ this.popup.setData(this.completions.filtered);
+
+ var renderer = editor.renderer;
+ if (!keepPopupPosition) {
+ this.popup.setFontSize(editor.getFontSize());
+
+ var lineHeight = renderer.layerConfig.lineHeight;
+
+ var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
+ pos.left -= this.popup.getTextLeftOffset();
+
+ var rect = editor.container.getBoundingClientRect();
+ pos.top += rect.top - renderer.layerConfig.offset;
+ pos.left += rect.left;
+ pos.left += renderer.$gutterLayer.gutterWidth;
+
+ this.popup.show(pos, lineHeight);
+ }
+ };
+
+ this.detach = function() {
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.off("changeSelection", this.changeListener);
+ this.editor.off("blur", this.changeListener);
+ this.editor.off("mousedown", this.mousedownListener);
+ this.editor.off("mousewheel", this.mousewheelListener);
+ this.changeTimer.cancel();
+
+ if (this.popup)
+ this.popup.hide();
+
+ this.activated = false;
+ this.completions = this.base = null;
+ };
+
+ this.changeListener = function(e) {
+ var cursor = this.editor.selection.lead;
+ if (cursor.row != this.base.row || cursor.column < this.base.column) {
+ this.detach();
+ }
+ if (this.activated)
+ this.changeTimer.schedule();
+ else
+ this.detach();
+ };
+
+ this.blurListener = function() {
+ if (document.activeElement != this.editor.textInput.getElement())
+ this.detach();
+ };
+
+ this.mousedownListener = function(e) {
+ this.detach();
+ };
+
+ this.mousewheelListener = function(e) {
+ this.detach();
+ };
+
+ this.goTo = function(where) {
+ var row = this.popup.getRow();
+ var max = this.popup.session.getLength() - 1;
+
+ switch(where) {
+ case "up": row = row < 0 ? max : row - 1; break;
+ case "down": row = row >= max ? -1 : row + 1; break;
+ case "start": row = 0; break;
+ case "end": row = max; break;
+ }
+
+ this.popup.setRow(row);
+ };
+
+ this.insertMatch = function(data) {
+ if (!data)
+ data = this.popup.getData(this.popup.getRow());
+ if (!data)
+ return false;
+ if (data.completer && data.completer.insertMatch) {
+ data.completer.insertMatch(this.editor);
+ } else {
+ if (this.completions.filterText) {
+ var ranges = this.editor.selection.getAllRanges();
+ for (var i = 0, range; range = ranges[i]; i++) {
+ range.start.column -= this.completions.filterText.length;
+ this.editor.session.remove(range);
+ }
+ }
+ if (data.snippet)
+ snippetManager.insertSnippet(this.editor, data.snippet);
+ else
+ this.editor.execCommand("insertstring", data.value || data);
+ }
+ this.detach();
+ };
+
+ this.commands = {
+ "Up": function(editor) { editor.completer.goTo("up"); },
+ "Down": function(editor) { editor.completer.goTo("down"); },
+ "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); },
+ "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
+
+ "Esc": function(editor) { editor.completer.detach(); },
+ "Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
+ "Return": function(editor) { editor.completer.insertMatch(); },
+ "Shift-Return": function(editor) { editor.completer.insertMatch(true); },
+ "Tab": function(editor) { editor.completer.insertMatch(); },
+
+ "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); },
+ "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); }
+ };
+
+ this.gatherCompletions = function(editor, callback) {
+ var session = editor.getSession();
+ var pos = editor.getCursorPosition();
+
+ var line = session.getLine(pos.row);
+ var prefix = util.retrievePrecedingIdentifier(line, pos.column);
+
+ this.base = editor.getCursorPosition();
+ this.base.column -= prefix.length;
+
+ var matches = [];
+ util.parForEach(editor.completers, function(completer, next) {
+ completer.getCompletions(editor, session, pos, prefix, function(err, results) {
+ if (!err)
+ matches = matches.concat(results);
+ next();
+ });
+ }, function() {
+ callback(null, {
+ prefix: prefix,
+ matches: matches
+ });
+ });
+ return true;
+ };
+
+ this.showPopup = function(editor) {
+ if (this.editor)
+ this.detach();
+
+ this.activated = true;
+
+ this.editor = editor;
+ if (editor.completer != this) {
+ if (editor.completer)
+ editor.completer.detach();
+ editor.completer = this;
+ }
+
+ editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ editor.on("changeSelection", this.changeListener);
+ editor.on("blur", this.blurListener);
+ editor.on("mousedown", this.mousedownListener);
+ editor.on("mousewheel", this.mousewheelListener);
+
+ this.updateCompletions();
+ };
+
+ this.updateCompletions = function(keepPopupPosition) {
+ if (keepPopupPosition && this.base && this.completions) {
+ var pos = this.editor.getCursorPosition();
+ var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
+ if (prefix == this.completions.filterText)
+ return;
+ this.completions.setFilter(prefix);
+ if (!this.completions.filtered.length)
+ return this.detach();
+ this.openPopup(this.editor, prefix, keepPopupPosition);
+ return;
+ }
+ this.gatherCompletions(this.editor, function(err, results) {
+ var matches = results && results.matches;
+ if (!matches || !matches.length)
+ return this.detach();
+ // TODO reenable this when we have proper change tracking
+ // if (matches.length == 1)
+ // return this.insertMatch(matches[0]);
+
+ this.completions = new FilteredList(matches);
+ this.completions.setFilter(results.prefix);
+ if (!this.completions.filtered.length)
+ return this.detach();
+ this.openPopup(this.editor, results.prefix, keepPopupPosition);
+ }.bind(this));
+ };
+
+ this.cancelContextMenu = function() {
+ var stop = function(e) {
+ this.editor.off("nativecontextmenu", stop);
+ if (e && e.domEvent)
+ event.stopEvent(e.domEvent);
+ }.bind(this);
+ setTimeout(stop, 10);
+ this.editor.on("nativecontextmenu", stop);
+ };
+
+}).call(Autocomplete.prototype);
+
+Autocomplete.startCommand = {
+ name: "startAutocomplete",
+ exec: function(editor) {
+ if (!editor.completer)
+ editor.completer = new Autocomplete();
+ editor.completer.showPopup(editor);
+ // needed for firefox on mac
+ editor.completer.cancelContextMenu();
+ },
+ bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
+};
+
+var FilteredList = function(array, filterText, mutateData) {
+ this.all = array;
+ this.filtered = array;
+ this.filterText = filterText || "";
+};
+(function(){
+ this.setFilter = function(str) {
+ if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
+ var matches = this.filtered;
+ else
+ var matches = this.all;
+
+ this.filterText = str;
+ matches = this.filterCompletions(matches, this.filterText);
+ matches = matches.sort(function(a, b) {
+ return b.exactMatch - a.exactMatch || b.score - a.score;
+ });
+
+ // make unique
+ var prev = null;
+ matches = matches.filter(function(item){
+ var caption = item.value || item.caption || item.snippet;
+ if (caption === prev) return false;
+ prev = caption;
+ return true;
+ });
+
+ this.filtered = matches;
+ };
+ this.filterCompletions = function(items, needle) {
+ var results = [];
+ var upper = needle.toUpperCase();
+ var lower = needle.toLowerCase();
+ loop: for (var i = 0, item; item = items[i]; i++) {
+ var caption = item.value || item.caption || item.snippet;
+ if (!caption) continue;
+ var lastIndex = -1;
+ var matchMask = 0;
+ var penalty = 0;
+ var index, distance;
+ // caption char iteration is faster in Chrome but slower in Firefox, so lets use indexOf
+ for (var j = 0; j < needle.length; j++) {
+ // TODO add penalty on case mismatch
+ var i1 = caption.indexOf(lower[j], lastIndex + 1);
+ var i2 = caption.indexOf(upper[j], lastIndex + 1);
+ index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
+ if (index < 0)
+ continue loop;
+ distance = index - lastIndex - 1;
+ if (distance > 0) {
+ // first char mismatch should be more sensitive
+ if (lastIndex === -1)
+ penalty += 10;
+ penalty += distance;
+ }
+ matchMask = matchMask | (1 << index);
+ lastIndex = index;
+ }
+ item.matchMask = matchMask;
+ item.exactMatch = penalty ? 0 : 1;
+ item.score = (item.score || 0) - penalty;
+ results.push(item);
+ }
+ return results;
+ };
+}).call(FilteredList.prototype);
+
+exports.Autocomplete = Autocomplete;
+exports.FilteredList = FilteredList;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/autocomplete/popup.js b/src/fauxton/assets/js/libs/ace/autocomplete/popup.js
new file mode 100644
index 000000000..891cf1e8a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/autocomplete/popup.js
@@ -0,0 +1,316 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Renderer = require("../virtual_renderer").VirtualRenderer;
+var Editor = require("../editor").Editor;
+var Range = require("../range").Range;
+var event = require("../lib/event");
+var lang = require("../lib/lang");
+var dom = require("../lib/dom");
+
+var $singleLineEditor = function(el) {
+ var renderer = new Renderer(el);
+
+ renderer.$maxLines = 4;
+
+ var editor = new Editor(renderer);
+
+ editor.setHighlightActiveLine(false);
+ editor.setShowPrintMargin(false);
+ editor.renderer.setShowGutter(false);
+ editor.renderer.setHighlightGutterLine(false);
+
+ editor.$mouseHandler.$focusWaitTimout = 0;
+
+ return editor;
+};
+
+var AcePopup = function(parentNode) {
+ var el = dom.createElement("div");
+ var popup = new $singleLineEditor(el);
+
+ if (parentNode)
+ parentNode.appendChild(el);
+ el.style.display = "none";
+ popup.renderer.content.style.cursor = "default";
+ popup.renderer.setStyle("ace_autocomplete");
+
+ popup.setOption("displayIndentGuides", false);
+
+ var noop = function(){};
+
+ popup.focus = noop;
+ popup.$isFocused = true;
+
+ popup.renderer.$cursorLayer.restartTimer = noop;
+ popup.renderer.$cursorLayer.element.style.opacity = 0;
+
+ popup.renderer.$maxLines = 8;
+ popup.renderer.$keepTextAreaAtCursor = false;
+
+ popup.setHighlightActiveLine(false);
+ // set default highlight color
+ popup.session.highlight("");
+ popup.session.$searchHighlight.clazz = "ace_highlight-marker";
+
+ popup.on("mousedown", function(e) {
+ var pos = e.getDocumentPosition();
+ popup.moveCursorToPosition(pos);
+ popup.selection.clearSelection();
+ selectionMarker.start.row = selectionMarker.end.row = pos.row;
+ e.stop();
+ });
+
+ var lastMouseEvent;
+ var hoverMarker = new Range(-1,0,-1,Infinity);
+ var selectionMarker = new Range(-1,0,-1,Infinity);
+ selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
+ popup.setSelectOnHover = function(val) {
+ if (!val) {
+ hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
+ } else if (hoverMarker.id) {
+ popup.session.removeMarker(hoverMarker.id);
+ hoverMarker.id = null;
+ }
+ }
+ popup.setSelectOnHover(false);
+ popup.on("mousemove", function(e) {
+ if (!lastMouseEvent) {
+ lastMouseEvent = e;
+ return;
+ }
+ if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
+ return;
+ }
+ lastMouseEvent = e;
+ lastMouseEvent.scrollTop = popup.renderer.scrollTop;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (hoverMarker.start.row != row) {
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row);
+ }
+ });
+ popup.renderer.on("beforeRender", function() {
+ if (lastMouseEvent && hoverMarker.start.row != -1) {
+ lastMouseEvent.$pos = null;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row, true);
+ }
+ });
+ popup.renderer.on("afterRender", function() {
+ var row = popup.getRow();
+ var t = popup.renderer.$textLayer;
+ var selected = t.element.childNodes[row - t.config.firstRow];
+ if (selected == t.selectedNode)
+ return;
+ if (t.selectedNode)
+ dom.removeCssClass(t.selectedNode, "ace_selected");
+ t.selectedNode = selected;
+ if (selected)
+ dom.addCssClass(selected, "ace_selected");
+ });
+ var hideHoverMarker = function() { setHoverMarker(-1) };
+ var setHoverMarker = function(row, suppressRedraw) {
+ if (row !== hoverMarker.start.row) {
+ hoverMarker.start.row = hoverMarker.end.row = row;
+ if (!suppressRedraw)
+ popup.session._emit("changeBackMarker");
+ popup._emit("changeHoverMarker");
+ }
+ };
+ popup.getHoveredRow = function() {
+ return hoverMarker.start.row;
+ };
+
+ event.addListener(popup.container, "mouseout", hideHoverMarker);
+ popup.on("hide", hideHoverMarker);
+ popup.on("changeSelection", hideHoverMarker);
+
+ popup.session.doc.getLength = function() {
+ return popup.data.length;
+ };
+ popup.session.doc.getLine = function(i) {
+ var data = popup.data[i];
+ if (typeof data == "string")
+ return data;
+ return (data && data.value) || "";
+ };
+
+ var bgTokenizer = popup.session.bgTokenizer;
+ bgTokenizer.$tokenizeRow = function(i) {
+ var data = popup.data[i];
+ var tokens = [];
+ if (!data)
+ return tokens;
+ if (typeof data == "string")
+ data = {value: data};
+ if (!data.caption)
+ data.caption = data.value;
+
+ var last = -1;
+ var flag, c;
+ for (var i = 0; i < data.caption.length; i++) {
+ c = data.caption[i];
+ flag = data.matchMask & (1 << i) ? 1 : 0;
+ if (last !== flag) {
+ tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c});
+ last = flag;
+ } else {
+ tokens[tokens.length - 1].value += c;
+ }
+ }
+
+ if (data.meta) {
+ var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth;
+ if (data.meta.length + data.caption.length < maxW - 2)
+ tokens.push({type: "rightAlignedText", value: data.meta});
+ }
+ return tokens;
+ };
+ bgTokenizer.$updateOnChange = noop;
+ bgTokenizer.start = noop;
+
+ popup.session.$computeWidth = function() {
+ return this.screenWidth = 0;
+ }
+
+ // public
+ popup.data = [];
+ popup.setData = function(list) {
+ popup.data = list || [];
+ popup.setValue(lang.stringRepeat("\n", list.length), -1);
+ popup.setRow(0);
+ };
+ popup.getData = function(row) {
+ return popup.data[row];
+ };
+
+ popup.getRow = function() {
+ return selectionMarker.start.row;
+ };
+ popup.setRow = function(line) {
+ line = Math.max(-1, Math.min(this.data.length, line));
+ if (selectionMarker.start.row != line) {
+ popup.selection.clearSelection();
+ selectionMarker.start.row = selectionMarker.end.row = line || 0;
+ popup.session._emit("changeBackMarker");
+ popup.moveCursorTo(line || 0, 0);
+ if (popup.isOpen)
+ popup._signal("select");
+ }
+ };
+
+ popup.hide = function() {
+ this.container.style.display = "none";
+ this._signal("hide");
+ popup.isOpen = false;
+ };
+ popup.show = function(pos, lineHeight) {
+ var el = this.container;
+ var screenHeight = window.innerHeight;
+ var renderer = this.renderer;
+ // var maxLines = Math.min(renderer.$maxLines, this.session.getLength());
+ var maxH = renderer.$maxLines * lineHeight * 1.4;
+ var top = pos.top + this.$borderSize;
+ if (top + maxH > screenHeight - lineHeight) {
+ el.style.top = "";
+ el.style.bottom = screenHeight - top + "px";
+ } else {
+ top += lineHeight;
+ el.style.top = top + "px";
+ el.style.bottom = "";
+ }
+
+ el.style.left = pos.left + "px";
+ el.style.display = "";
+ this.renderer.$textLayer.checkForSizeChanges();
+
+ this._signal("show");
+ lastMouseEvent = null;
+ popup.isOpen = true;
+ };
+
+ popup.getTextLeftOffset = function() {
+ return this.$borderSize + this.renderer.$padding + this.$imageSize;
+ };
+
+ popup.$imageSize = 0;
+ popup.$borderSize = 1;
+
+ return popup;
+};
+
+dom.importCssString("\
+.ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {\
+ background-color: #CAD6FA;\
+ z-index: 1;\
+}\
+.ace_autocomplete.ace-tm .ace_line-hover {\
+ border: 1px solid #abbffe;\
+ margin-top: -1px;\
+ background: rgba(233,233,253,0.4);\
+}\
+.ace_autocomplete .ace_line-hover {\
+ position: absolute;\
+ z-index: 2;\
+}\
+.ace_rightAlignedText {\
+ color: gray;\
+ display: inline-block;\
+ position: absolute;\
+ right: 4px;\
+ text-align: right;\
+ z-index: -1;\
+}\
+.ace_autocomplete .ace_completion-highlight{\
+ color: #000;\
+ text-shadow: 0 0 0.01em;\
+}\
+.ace_autocomplete {\
+ width: 280px;\
+ z-index: 200000;\
+ background: #fbfbfb;\
+ color: #444;\
+ border: 1px lightgray solid;\
+ position: fixed;\
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);\
+ line-height: 1.4;\
+}");
+
+exports.AcePopup = AcePopup;
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/autocomplete/text_completer.js b/src/fauxton/assets/js/libs/ace/autocomplete/text_completer.js
new file mode 100644
index 000000000..87a25fb94
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/autocomplete/text_completer.js
@@ -0,0 +1,78 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+ var Range = require("ace/range").Range;
+
+ var splitRegex = /[^a-zA-Z_0-9\$\-]+/;
+
+ function getWordIndex(doc, pos) {
+ var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos));
+ return textBefore.split(splitRegex).length - 1;
+ }
+
+ /**
+ * Does a distance analysis of the word `prefix` at position `pos` in `doc`.
+ * @return Map
+ */
+ function wordDistance(doc, pos) {
+ var prefixPos = getWordIndex(doc, pos);
+ var words = doc.getValue().split(splitRegex);
+ var wordScores = Object.create(null);
+
+ var currentWord = words[prefixPos];
+
+ words.forEach(function(word, idx) {
+ if (!word || word === currentWord) return;
+
+ var distance = Math.abs(prefixPos - idx);
+ var score = words.length - distance;
+ if (wordScores[word]) {
+ wordScores[word] = Math.max(score, wordScores[word]);
+ } else {
+ wordScores[word] = score;
+ }
+ });
+ return wordScores;
+ }
+
+ exports.getCompletions = function(editor, session, pos, prefix, callback) {
+ var wordScore = wordDistance(session, pos, prefix);
+ var wordList = Object.keys(wordScore);
+ callback(null, wordList.map(function(word) {
+ return {
+ name: word,
+ value: word,
+ score: wordScore[word],
+ meta: "local"
+ };
+ }));
+ };
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/autocomplete/util.js b/src/fauxton/assets/js/libs/ace/autocomplete/util.js
new file mode 100644
index 000000000..8b7c11511
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/autocomplete/util.js
@@ -0,0 +1,74 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+exports.parForEach = function(array, fn, callback) {
+ var completed = 0;
+ var arLength = array.length;
+ if (arLength === 0)
+ callback();
+ for (var i = 0; i < arLength; i++) {
+ fn(array[i], function(result, err) {
+ completed++;
+ if (completed === arLength)
+ callback(result, err);
+ });
+ }
+}
+
+var ID_REGEX = /[a-zA-Z_0-9\$-]/;
+
+exports.retrievePrecedingIdentifier = function(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos-1; i >= 0; i--) {
+ if (regex.test(text[i]))
+ buf.push(text[i]);
+ else
+ break;
+ }
+ return buf.reverse().join("");
+}
+
+exports.retrieveFollowingIdentifier = function(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos; i < text.length; i++) {
+ if (regex.test(text[i]))
+ buf.push(text[i]);
+ else
+ break;
+ }
+ return buf;
+}
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/background_tokenizer.js b/src/fauxton/assets/js/libs/ace/background_tokenizer.js
new file mode 100644
index 000000000..217be1b3c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/background_tokenizer.js
@@ -0,0 +1,255 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+
+/**
+ *
+ *
+ * Tokenizes the current [[Document `Document`]] in the background, and caches the tokenized rows for future use.
+ *
+ * If a certain row is changed, everything below that row is re-tokenized.
+ *
+ * @class BackgroundTokenizer
+ **/
+
+/**
+ * Creates a new `BackgroundTokenizer` object.
+ * @param {Tokenizer} tokenizer The tokenizer to use
+ * @param {Editor} editor The editor to associate with
+ *
+ *
+ *
+ * @constructor
+ **/
+
+var BackgroundTokenizer = function(tokenizer, editor) {
+ this.running = false;
+ this.lines = [];
+ this.states = [];
+ this.currentLine = 0;
+ this.tokenizer = tokenizer;
+
+ var self = this;
+
+ this.$worker = function() {
+ if (!self.running) { return; }
+
+ var workerStart = new Date();
+ var currentLine = self.currentLine;
+ var endLine = -1;
+ var doc = self.doc;
+
+ while (self.lines[currentLine])
+ currentLine++;
+
+ var startLine = currentLine;
+
+ var len = doc.getLength();
+ var processedLines = 0;
+ self.running = false;
+ while (currentLine < len) {
+ self.$tokenizeRow(currentLine);
+ endLine = currentLine;
+ do {
+ currentLine++;
+ } while (self.lines[currentLine]);
+
+ // only check every 5 lines
+ processedLines ++;
+ if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) {
+ self.running = setTimeout(self.$worker, 20);
+ self.currentLine = currentLine;
+ return;
+ }
+ }
+ self.currentLine = currentLine;
+
+ if (startLine <= endLine)
+ self.fireUpdateEvent(startLine, endLine);
+ };
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ * Sets a new tokenizer for this object.
+ *
+ * @param {Tokenizer} tokenizer The new tokenizer to use
+ *
+ **/
+ this.setTokenizer = function(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.lines = [];
+ this.states = [];
+
+ this.start(0);
+ };
+
+ /**
+ * Sets a new document to associate with this object.
+ * @param {Document} doc The new document to associate with
+ **/
+ this.setDocument = function(doc) {
+ this.doc = doc;
+ this.lines = [];
+ this.states = [];
+
+ this.stop();
+ };
+
+ /**
+ * Fires whenever the background tokeniziers between a range of rows are going to be updated.
+ *
+ * @event update
+ * @param {Object} e An object containing two properties, `first` and `last`, which indicate the rows of the region being updated.
+ *
+ **/
+ /**
+ * Emits the `'update'` event. `firstRow` and `lastRow` are used to define the boundaries of the region to be updated.
+ * @param {Number} firstRow The starting row region
+ * @param {Number} lastRow The final row region
+ *
+ **/
+ this.fireUpdateEvent = function(firstRow, lastRow) {
+ var data = {
+ first: firstRow,
+ last: lastRow
+ };
+ this._emit("update", {data: data});
+ };
+
+ /**
+ * Starts tokenizing at the row indicated.
+ *
+ * @param {Number} startRow The row to start at
+ *
+ **/
+ this.start = function(startRow) {
+ this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());
+
+ // remove all cached items below this line
+ this.lines.splice(this.currentLine, this.lines.length);
+ this.states.splice(this.currentLine, this.states.length);
+
+ this.stop();
+ // pretty long delay to prevent the tokenizer from interfering with the user
+ this.running = setTimeout(this.$worker, 700);
+ };
+
+ this.scheduleStart = function() {
+ if (!this.running)
+ this.running = setTimeout(this.$worker, 700);
+ }
+
+ this.$updateOnChange = function(delta) {
+ var range = delta.range;
+ var startRow = range.start.row;
+ var len = range.end.row - startRow;
+
+ if (len === 0) {
+ this.lines[startRow] = null;
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.lines.splice(startRow, len + 1, null);
+ this.states.splice(startRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(startRow, 1);
+ this.lines.splice.apply(this.lines, args);
+ this.states.splice.apply(this.states, args);
+ }
+
+ this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());
+
+ this.stop();
+ };
+
+ /**
+ * Stops tokenizing.
+ *
+ **/
+ this.stop = function() {
+ if (this.running)
+ clearTimeout(this.running);
+ this.running = false;
+ };
+
+ /**
+ * Gives list of tokens of the row. (tokens are cached)
+ *
+ * @param {Number} row The row to get tokens at
+ *
+ *
+ *
+ **/
+ this.getTokens = function(row) {
+ return this.lines[row] || this.$tokenizeRow(row);
+ };
+
+ /**
+ * [Returns the state of tokenization at the end of a row.]{: #BackgroundTokenizer.getState}
+ *
+ * @param {Number} row The row to get state at
+ **/
+ this.getState = function(row) {
+ if (this.currentLine == row)
+ this.$tokenizeRow(row);
+ return this.states[row] || "start";
+ };
+
+ this.$tokenizeRow = function(row) {
+ var line = this.doc.getLine(row);
+ var state = this.states[row - 1];
+
+ var data = this.tokenizer.getLineTokens(line, state, row);
+
+ if (this.states[row] + "" !== data.state + "") {
+ this.states[row] = data.state;
+ this.lines[row + 1] = null;
+ if (this.currentLine > row + 1)
+ this.currentLine = row + 1;
+ } else if (this.currentLine == row) {
+ this.currentLine = row + 1;
+ }
+
+ return this.lines[row] = data.tokens;
+ };
+
+}).call(BackgroundTokenizer.prototype);
+
+exports.BackgroundTokenizer = BackgroundTokenizer;
+});
diff --git a/src/fauxton/assets/js/libs/ace/background_tokenizer_test.js b/src/fauxton/assets/js/libs/ace/background_tokenizer_test.js
new file mode 100644
index 000000000..7a4cc78cc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/background_tokenizer_test.js
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var JavaScriptMode = require("./mode/javascript").Mode;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+
+function forceTokenize(session){
+ for (var i = 0, l = session.getLength(); i < l; i++)
+ session.getTokens(i)
+}
+
+function testStates(session, states) {
+ for (var i = 0, l = session.getLength(); i < l; i++)
+ assert.equal(session.bgTokenizer.states[i], states[i])
+ assert.ok(l == states.length)
+}
+
+module.exports = {
+
+ "test background tokenizer update on session change" : function() {
+ var doc = new EditSession([
+ "/*",
+ "*/",
+ "var juhu"
+ ]);
+ doc.setMode("./mode/javascript")
+
+ forceTokenize(doc)
+ testStates(doc, ["comment_regex_allowed", "start", "no_regex"])
+
+ doc.remove(new Range(0,2,1,2))
+ testStates(doc, [null, "no_regex"])
+
+ forceTokenize(doc)
+ testStates(doc, ["comment_regex_allowed", "comment_regex_allowed"])
+
+ doc.insert({row:0, column:2}, "\n*/")
+ testStates(doc, [undefined, undefined, "comment_regex_allowed"])
+
+ forceTokenize(doc)
+ testStates(doc, ["comment_regex_allowed", "start", "no_regex"])
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/commands/command_manager.js b/src/fauxton/assets/js/libs/ace/commands/command_manager.js
new file mode 100644
index 000000000..72a9942d7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/command_manager.js
@@ -0,0 +1,112 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+/**
+ * @class CommandManager
+ *
+ *
+ **/
+
+/**
+ * new CommandManager(platform, commands)
+ * @param {String} platform Identifier for the platform; must be either `'mac'` or `'win'`
+ * @param {Array} commands A list of commands
+ *
+ **/
+
+var CommandManager = function(platform, commands) {
+ HashHandler.call(this, commands, platform);
+ this.byName = this.commands;
+ this.setDefaultHandler("exec", function(e) {
+ return e.command.exec(e.editor, e.args || {});
+ });
+};
+
+oop.inherits(CommandManager, HashHandler);
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.exec = function(command, editor, args) {
+ if (typeof command === 'string')
+ command = this.commands[command];
+
+ if (!command)
+ return false;
+
+ if (editor && editor.$readOnly && !command.readOnly)
+ return false;
+
+ var e = {editor: editor, command: command, args: args};
+ var retvalue = this._emit("exec", e);
+ this._signal("afterExec", e);
+
+ return retvalue === false ? false : true;
+ };
+
+ this.toggleRecording = function(editor) {
+ if (this.$inReplay)
+ return;
+
+ editor && editor._emit("changeStatus");
+ if (this.recording) {
+ this.macro.pop();
+ this.removeEventListener("exec", this.$addCommandToMacro);
+
+ if (!this.macro.length)
+ this.macro = this.oldMacro;
+
+ return this.recording = false;
+ }
+ if (!this.$addCommandToMacro) {
+ this.$addCommandToMacro = function(e) {
+ this.macro.push([e.command, e.args]);
+ }.bind(this);
+ }
+
+ this.oldMacro = this.macro;
+ this.macro = [];
+ this.on("exec", this.$addCommandToMacro);
+ return this.recording = true;
+ };
+
+ this.replay = function(editor) {
+ if (this.$inReplay || !this.macro)
+ return;
+
+ if (this.recording)
+ return this.toggleRecording(editor);
+
+ try {
+ this.$inReplay = true;
+ this.macro.forEach(function(x) {
+ if (typeof x == "string")
+ this.exec(x, editor);
+ else
+ this.exec(x[0], editor, x[1]);
+ }, this);
+ } finally {
+ this.$inReplay = false;
+ }
+ };
+
+ this.trimMacro = function(m) {
+ return m.map(function(x){
+ if (typeof x[0] != "string")
+ x[0] = x[0].name;
+ if (!x[1])
+ x = x[0];
+ return x;
+ });
+ };
+
+}).call(CommandManager.prototype);
+
+exports.CommandManager = CommandManager;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/commands/command_manager_test.js b/src/fauxton/assets/js/libs/ace/commands/command_manager_test.js
new file mode 100644
index 000000000..76d973bbb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/command_manager_test.js
@@ -0,0 +1,199 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var CommandManager = require("./command_manager").CommandManager;
+var keys = require("../lib/keys");
+var assert = require("../test/assertions");
+
+module.exports = {
+
+ setUp: function() {
+ this.command = {
+ name: "gotoline",
+ bindKey: {
+ mac: "Command-L",
+ win: "Ctrl-L"
+ },
+ called: false,
+ exec: function(editor) { this.called = true; }
+ };
+
+ this.cm = new CommandManager("mac", [this.command]);
+ },
+
+ "test: register command": function() {
+ this.cm.exec("gotoline");
+ assert.ok(this.command.called);
+ },
+
+ "test: mac hotkeys": function() {
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.command, "l");
+ assert.equal(command, this.command);
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.ctrl, "l");
+ assert.equal(command, undefined);
+ },
+
+ "test: win hotkeys": function() {
+ var cm = new CommandManager("win", [this.command]);
+
+ var command = cm.findKeyCommand(keys.KEY_MODS.command, "l");
+ assert.equal(command, undefined);
+
+ var command = cm.findKeyCommand(keys.KEY_MODS.ctrl, "l");
+ assert.equal(command, this.command);
+ },
+
+ "test: remove command by object": function() {
+ this.cm.removeCommand(this.command);
+
+ this.cm.exec("gotoline");
+ assert.ok(!this.command.called);
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.command, "l");
+ assert.equal(command, null);
+ },
+
+ "test: remove command by name": function() {
+ this.cm.removeCommand("gotoline");
+
+ this.cm.exec("gotoline");
+ assert.ok(!this.command.called);
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.command, "l");
+ assert.equal(command, null);
+ },
+
+ "test: adding a new command with the same name as an existing one should remove the old one first": function() {
+ var command = {
+ name: "gotoline",
+ bindKey: {
+ mac: "Command-L",
+ win: "Ctrl-L"
+ },
+ called: false,
+ exec: function(editor) { this.called = true; }
+ };
+ this.cm.addCommand(command);
+
+ this.cm.exec("gotoline");
+ assert.ok(command.called);
+ assert.ok(!this.command.called);
+
+ assert.equal(this.cm.findKeyCommand(keys.KEY_MODS.command, "l"), command);
+ },
+
+ "test: adding commands and recording a macro": function() {
+ var called = "";
+ this.cm.addCommands({
+ togglerecording: function(editor) {
+ editor.cm.toggleRecording(editor);
+ },
+ replay: function(editor) {
+ editor.cm.replay();
+ },
+ cm1: function(editor, arg) {
+ called += "1" + (arg || "");
+ },
+ cm2: function(editor) {
+ called += "2";
+ }
+ });
+
+
+ var statusUpdateEmitted = false;
+ this._emit = function() {statusUpdateEmitted = true};
+
+ this.cm.exec("togglerecording", this);
+ assert.ok(this.cm.recording);
+ assert.ok(statusUpdateEmitted);
+
+ this.cm.exec("cm1", this, "-");
+ this.cm.exec("cm2");
+ this.cm.exec("replay", this);
+ assert.ok(!this.cm.recording);
+ assert.equal(called, "1-2");
+
+ called = "";
+ this.cm.exec("replay", this);
+ assert.equal(called, "1-2");
+ },
+
+ "test: bindkeys": function() {
+ this.cm.bindKeys({
+ "Ctrl-L|Command-C": "cm1",
+ "Ctrl-R": "cm2"
+ });
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.command, "c");
+ assert.equal(command, "cm1");
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.ctrl, "r");
+ assert.equal(command, "cm2");
+
+ this.cm.bindKeys({
+ "Ctrl-R": null
+ });
+
+ var command = this.cm.findKeyCommand(keys.KEY_MODS.ctrl, "r");
+ assert.equal(command, null);
+ },
+
+ "test: binding keys without modifiers": function() {
+ this.cm.bindKeys({
+ "R": "cm1",
+ "Shift-r": "cm2",
+ "Return": "cm4",
+ "Enter": "cm3"
+ });
+
+ var command = this.cm.findKeyCommand(-1, "r");
+ assert.equal(command, "cm1");
+
+ var command = this.cm.findKeyCommand(-1, "R");
+ assert.equal(command, "cm2");
+
+ var command = this.cm.findKeyCommand(0, "return");
+ assert.equal(command, "cm3");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/commands/default_commands.js b/src/fauxton/assets/js/libs/ace/commands/default_commands.js
new file mode 100644
index 000000000..9c663d18b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/default_commands.js
@@ -0,0 +1,490 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+var config = require("../config");
+
+function bindKey(win, mac) {
+ return {
+ win: win,
+ mac: mac
+ };
+}
+
+exports.commands = [{
+ name: "showSettingsMenu",
+ bindKey: bindKey("Ctrl-,", "Command-,"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/settings_menu", function(module) {
+ module.init(editor);
+ editor.showSettingsMenu();
+ });
+ },
+ readOnly: true
+}, {
+ name: "selectall",
+ bindKey: bindKey("Ctrl-A", "Command-A"),
+ exec: function(editor) { editor.selectAll(); },
+ readOnly: true
+}, {
+ name: "centerselection",
+ bindKey: bindKey(null, "Ctrl-L"),
+ exec: function(editor) { editor.centerSelection(); },
+ readOnly: true
+}, {
+ name: "gotoline",
+ bindKey: bindKey("Ctrl-L", "Command-L"),
+ exec: function(editor) {
+ var line = parseInt(prompt("Enter line number:"), 10);
+ if (!isNaN(line)) {
+ editor.gotoLine(line);
+ }
+ },
+ readOnly: true
+}, {
+ name: "fold",
+ bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"),
+ exec: function(editor) { editor.session.toggleFold(false); },
+ readOnly: true
+}, {
+ name: "unfold",
+ bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"),
+ exec: function(editor) { editor.session.toggleFold(true); },
+ readOnly: true
+}, {
+ name: "foldall",
+ bindKey: bindKey("Alt-0", "Command-Option-0"),
+ exec: function(editor) { editor.session.foldAll(); },
+ readOnly: true
+}, {
+ name: "unfoldall",
+ bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
+ exec: function(editor) { editor.session.unfold(); },
+ readOnly: true
+}, {
+ name: "findnext",
+ bindKey: bindKey("Ctrl-K", "Command-G"),
+ exec: function(editor) { editor.findNext(); },
+ readOnly: true
+}, {
+ name: "findprevious",
+ bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
+ exec: function(editor) { editor.findPrevious(); },
+ readOnly: true
+}, {
+ name: "find",
+ bindKey: bindKey("Ctrl-F", "Command-F"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)});
+ },
+ readOnly: true
+}, {
+ name: "overwrite",
+ bindKey: "Insert",
+ exec: function(editor) { editor.toggleOverwrite(); },
+ readOnly: true
+}, {
+ name: "selecttostart",
+ bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"),
+ exec: function(editor) { editor.getSelection().selectFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ group: "fileJump"
+}, {
+ name: "gotostart",
+ bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
+ exec: function(editor) { editor.navigateFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ group: "fileJump"
+}, {
+ name: "selectup",
+ bindKey: bindKey("Shift-Up", "Shift-Up"),
+ exec: function(editor) { editor.getSelection().selectUp(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "golineup",
+ bindKey: bindKey("Up", "Up|Ctrl-P"),
+ exec: function(editor, args) { editor.navigateUp(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttoend",
+ bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"),
+ exec: function(editor) { editor.getSelection().selectFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ group: "fileJump"
+}, {
+ name: "gotoend",
+ bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
+ exec: function(editor) { editor.navigateFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ group: "fileJump"
+}, {
+ name: "selectdown",
+ bindKey: bindKey("Shift-Down", "Shift-Down"),
+ exec: function(editor) { editor.getSelection().selectDown(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "golinedown",
+ bindKey: bindKey("Down", "Down|Ctrl-N"),
+ exec: function(editor, args) { editor.navigateDown(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectwordleft",
+ bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectWordLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotowordleft",
+ bindKey: bindKey("Ctrl-Left", "Option-Left"),
+ exec: function(editor) { editor.navigateWordLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttolinestart",
+ bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotolinestart",
+ bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
+ exec: function(editor) { editor.navigateLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectleft",
+ bindKey: bindKey("Shift-Left", "Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectLeft(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotoleft",
+ bindKey: bindKey("Left", "Left|Ctrl-B"),
+ exec: function(editor, args) { editor.navigateLeft(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectwordright",
+ bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectWordRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotowordright",
+ bindKey: bindKey("Ctrl-Right", "Option-Right"),
+ exec: function(editor) { editor.navigateWordRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttolineend",
+ bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotolineend",
+ bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
+ exec: function(editor) { editor.navigateLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectright",
+ bindKey: bindKey("Shift-Right", "Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectRight(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "gotoright",
+ bindKey: bindKey("Right", "Right|Ctrl-F"),
+ exec: function(editor, args) { editor.navigateRight(args.times); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectpagedown",
+ bindKey: "Shift-PageDown",
+ exec: function(editor) { editor.selectPageDown(); },
+ readOnly: true
+}, {
+ name: "pagedown",
+ bindKey: bindKey(null, "Option-PageDown"),
+ exec: function(editor) { editor.scrollPageDown(); },
+ readOnly: true
+}, {
+ name: "gotopagedown",
+ bindKey: bindKey("PageDown", "PageDown|Ctrl-V"),
+ exec: function(editor) { editor.gotoPageDown(); },
+ readOnly: true
+}, {
+ name: "selectpageup",
+ bindKey: "Shift-PageUp",
+ exec: function(editor) { editor.selectPageUp(); },
+ readOnly: true
+}, {
+ name: "pageup",
+ bindKey: bindKey(null, "Option-PageUp"),
+ exec: function(editor) { editor.scrollPageUp(); },
+ readOnly: true
+}, {
+ name: "gotopageup",
+ bindKey: "PageUp",
+ exec: function(editor) { editor.gotoPageUp(); },
+ readOnly: true
+}, {
+ name: "scrollup",
+ bindKey: bindKey("Ctrl-Up", null),
+ exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },
+ readOnly: true
+}, {
+ name: "scrolldown",
+ bindKey: bindKey("Ctrl-Down", null),
+ exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },
+ readOnly: true
+}, {
+ name: "selectlinestart",
+ bindKey: "Shift-Home",
+ exec: function(editor) { editor.getSelection().selectLineStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selectlineend",
+ bindKey: "Shift-End",
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "togglerecording",
+ bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"),
+ exec: function(editor) { editor.commands.toggleRecording(editor); },
+ readOnly: true
+}, {
+ name: "replaymacro",
+ bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"),
+ exec: function(editor) { editor.commands.replay(editor); },
+ readOnly: true
+}, {
+ name: "jumptomatching",
+ bindKey: bindKey("Ctrl-P", "Ctrl-Shift-P"),
+ exec: function(editor) { editor.jumpToMatching(); },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "selecttomatching",
+ bindKey: bindKey("Ctrl-Shift-P", null),
+ exec: function(editor) { editor.jumpToMatching(true); },
+ multiSelectAction: "forEach",
+ readOnly: true
+},
+
+// commands disabled in readOnly mode
+{
+ name: "cut",
+ exec: function(editor) {
+ var range = editor.getSelectionRange();
+ editor._emit("cut", range);
+
+ if (!editor.selection.isEmpty()) {
+ editor.session.remove(range);
+ editor.clearSelection();
+ }
+ },
+ multiSelectAction: "forEach"
+}, {
+ name: "removeline",
+ bindKey: bindKey("Ctrl-D", "Command-D"),
+ exec: function(editor) { editor.removeLines(); },
+ multiSelectAction: "forEachLine"
+}, {
+ name: "duplicateSelection",
+ bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
+ exec: function(editor) { editor.duplicateSelection(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "sortlines",
+ bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
+ exec: function(editor) { editor.sortLines(); },
+ multiSelectAction: "forEachLine"
+}, {
+ name: "togglecomment",
+ bindKey: bindKey("Ctrl-/", "Command-/"),
+ exec: function(editor) { editor.toggleCommentLines(); },
+ multiSelectAction: "forEachLine"
+}, {
+ name: "toggleBlockComment",
+ bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"),
+ exec: function(editor) { editor.toggleBlockComment(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "modifyNumberUp",
+ bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
+ exec: function(editor) { editor.modifyNumber(1); },
+ multiSelectAction: "forEach"
+}, {
+ name: "modifyNumberDown",
+ bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
+ exec: function(editor) { editor.modifyNumber(-1); },
+ multiSelectAction: "forEach"
+}, {
+ name: "replace",
+ bindKey: bindKey("Ctrl-H", "Command-Option-F"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)});
+ }
+}, {
+ name: "undo",
+ bindKey: bindKey("Ctrl-Z", "Command-Z"),
+ exec: function(editor) { editor.undo(); }
+}, {
+ name: "redo",
+ bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"),
+ exec: function(editor) { editor.redo(); }
+}, {
+ name: "copylinesup",
+ bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"),
+ exec: function(editor) { editor.copyLinesUp(); }
+}, {
+ name: "movelinesup",
+ bindKey: bindKey("Alt-Up", "Option-Up"),
+ exec: function(editor) { editor.moveLinesUp(); }
+}, {
+ name: "copylinesdown",
+ bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
+ exec: function(editor) { editor.copyLinesDown(); }
+}, {
+ name: "movelinesdown",
+ bindKey: bindKey("Alt-Down", "Option-Down"),
+ exec: function(editor) { editor.moveLinesDown(); }
+}, {
+ name: "del",
+ bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"),
+ exec: function(editor) { editor.remove("right"); },
+ multiSelectAction: "forEach"
+}, {
+ name: "backspace",
+ bindKey: bindKey(
+ "Shift-Backspace|Backspace",
+ "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"
+ ),
+ exec: function(editor) { editor.remove("left"); },
+ multiSelectAction: "forEach"
+}, {
+ name: "cut_or_delete",
+ bindKey: bindKey("Shift-Delete", null),
+ exec: function(editor) {
+ if (editor.selection.isEmpty()) {
+ editor.remove("left");
+ } else {
+ return false;
+ }
+ },
+ multiSelectAction: "forEach"
+}, {
+ name: "removetolinestart",
+ bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
+ exec: function(editor) { editor.removeToLineStart(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removetolineend",
+ bindKey: bindKey("Alt-Delete", "Ctrl-K"),
+ exec: function(editor) { editor.removeToLineEnd(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removewordleft",
+ bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
+ exec: function(editor) { editor.removeWordLeft(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "removewordright",
+ bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
+ exec: function(editor) { editor.removeWordRight(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "outdent",
+ bindKey: bindKey("Shift-Tab", "Shift-Tab"),
+ exec: function(editor) { editor.blockOutdent(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "indent",
+ bindKey: bindKey("Tab", "Tab"),
+ exec: function(editor) { editor.indent(); },
+ multiSelectAction: "forEach"
+},{
+ name: "blockoutdent",
+ bindKey: bindKey("Ctrl-[", "Ctrl-["),
+ exec: function(editor) { editor.blockOutdent(); },
+ multiSelectAction: "forEachLine"
+},{
+ name: "blockindent",
+ bindKey: bindKey("Ctrl-]", "Ctrl-]"),
+ exec: function(editor) { editor.blockIndent(); },
+ multiSelectAction: "forEachLine"
+}, {
+ name: "insertstring",
+ exec: function(editor, str) { editor.insert(str); },
+ multiSelectAction: "forEach"
+}, {
+ name: "inserttext",
+ exec: function(editor, args) {
+ editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
+ },
+ multiSelectAction: "forEach"
+}, {
+ name: "splitline",
+ bindKey: bindKey(null, "Ctrl-O"),
+ exec: function(editor) { editor.splitLine(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "transposeletters",
+ bindKey: bindKey("Ctrl-T", "Ctrl-T"),
+ exec: function(editor) { editor.transposeLetters(); },
+ multiSelectAction: function(editor) {editor.transposeSelections(1); }
+}, {
+ name: "touppercase",
+ bindKey: bindKey("Ctrl-U", "Ctrl-U"),
+ exec: function(editor) { editor.toUpperCase(); },
+ multiSelectAction: "forEach"
+}, {
+ name: "tolowercase",
+ bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
+ exec: function(editor) { editor.toLowerCase(); },
+ multiSelectAction: "forEach"
+}];
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/commands/incremental_search_commands.js b/src/fauxton/assets/js/libs/ace/commands/incremental_search_commands.js
new file mode 100644
index 000000000..ebe979ca9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/incremental_search_commands.js
@@ -0,0 +1,180 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var config = require("../config");
+var oop = require("../lib/oop");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var occurStartCommand = require("./occur_commands").occurStartCommand;
+
+// These commands can be installed in a normal key handler to start iSearch:
+exports.iSearchStartCommands = [{
+ name: "iSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(editor, options) {
+ config.loadModule(["core", "ace/incremental_search"], function(e) {
+ var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
+ iSearch.activate(editor, options.backwards);
+ if (options.jumpToFirstMatch) iSearch.next(options);
+ });
+ },
+ readOnly: true
+}, {
+ name: "iSearchBackwards",
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); },
+ readOnly: true
+}, {
+ name: "iSearchAndGo",
+ bindKey: {win: "Ctrl-K", mac: "Command-G"},
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}, {
+ name: "iSearchBackwardsAndGo",
+ bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"},
+ exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}];
+
+// These commands are only available when incremental search mode is active:
+exports.iSearchCommands = [{
+ name: "restartSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(iSearch) {
+ iSearch.cancelSearch(true);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "searchForward",
+ bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ iSearch.next(options);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "searchBackward",
+ bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ options.backwards = true;
+ iSearch.next(options);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "extendSearchTerm",
+ exec: function(iSearch, string) {
+ iSearch.addChar(string);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "extendSearchTermSpace",
+ bindKey: "space",
+ exec: function(iSearch) { iSearch.addChar(' '); },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: "shrinkSearchTerm",
+ bindKey: "backspace",
+ exec: function(iSearch) {
+ iSearch.removeChar();
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: 'confirmSearch',
+ bindKey: 'return',
+ exec: function(iSearch) { iSearch.deactivate(); },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: 'cancelSearch',
+ bindKey: 'esc|Ctrl-G',
+ exec: function(iSearch) { iSearch.deactivate(true); },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}, {
+ name: 'occurisearch',
+ bindKey: 'Ctrl-O',
+ exec: function(iSearch) {
+ var options = oop.mixin({}, iSearch.$options);
+ iSearch.deactivate();
+ occurStartCommand.exec(iSearch.$editor, options);
+ },
+ readOnly: true,
+ isIncrementalSearchCommand: true
+}];
+
+function IncrementalSearchKeyboardHandler(iSearch) {
+ this.$iSearch = iSearch;
+}
+
+oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
+
+;(function() {
+
+ this.attach = function(editor) {
+ var iSearch = this.$iSearch;
+ HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
+ this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) {
+ if (!e.command.isIncrementalSearchCommand) return undefined;
+ e.stopPropagation();
+ e.preventDefault();
+ return e.command.exec(iSearch, e.args || {});
+ });
+ }
+
+ this.detach = function(editor) {
+ if (!this.$commandExecHandler) return;
+ editor.commands.removeEventListener('exec', this.$commandExecHandler);
+ delete this.$commandExecHandler;
+ }
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ if (cmd.command) { return cmd; }
+ if (hashId == -1) {
+ var extendCmd = this.commands.extendSearchTerm;
+ if (extendCmd) { return {command: extendCmd, args: key}; }
+ }
+ return {command: "null", passEvent: hashId == 0 || hashId == 4};
+ }
+
+}).call(IncrementalSearchKeyboardHandler.prototype);
+
+
+exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/commands/multi_select_commands.js b/src/fauxton/assets/js/libs/ace/commands/multi_select_commands.js
new file mode 100644
index 000000000..ff59f0458
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/multi_select_commands.js
@@ -0,0 +1,97 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+// commands to enter multiselect mode
+exports.defaultCommands = [{
+ name: "addCursorAbove",
+ exec: function(editor) { editor.selectMoreLines(-1); },
+ bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"},
+ readonly: true
+}, {
+ name: "addCursorBelow",
+ exec: function(editor) { editor.selectMoreLines(1); },
+ bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
+ readonly: true
+}, {
+ name: "addCursorAboveSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
+ readonly: true
+}, {
+ name: "addCursorBelowSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
+ readonly: true
+}, {
+ name: "selectMoreBefore",
+ exec: function(editor) { editor.selectMore(-1); },
+ bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
+ readonly: true
+}, {
+ name: "selectMoreAfter",
+ exec: function(editor) { editor.selectMore(1); },
+ bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
+ readonly: true
+}, {
+ name: "selectNextBefore",
+ exec: function(editor) { editor.selectMore(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
+ readonly: true
+}, {
+ name: "selectNextAfter",
+ exec: function(editor) { editor.selectMore(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
+ readonly: true
+}, {
+ name: "splitIntoLines",
+ exec: function(editor) { editor.multiSelect.splitIntoLines(); },
+ bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"},
+ readonly: true
+}, {
+ name: "alignCursors",
+ exec: function(editor) { editor.alignCursors(); },
+ bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}
+}];
+
+// commands active only in multiselect mode
+exports.multiSelectCommands = [{
+ name: "singleSelection",
+ bindKey: "esc",
+ exec: function(editor) { editor.exitMultiSelectMode(); },
+ readonly: true,
+ isAvailable: function(editor) {return editor && editor.inMultiSelectMode}
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+exports.keyboardHandler = new HashHandler(exports.multiSelectCommands);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/commands/occur_commands.js b/src/fauxton/assets/js/libs/ace/commands/occur_commands.js
new file mode 100644
index 000000000..b45fbf61f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/commands/occur_commands.js
@@ -0,0 +1,110 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var config = require("../config"),
+ Occur = require("../occur").Occur;
+
+// These commands can be installed in a normal command handler to start occur:
+var occurStartCommand = {
+ name: "occur",
+ exec: function(editor, options) {
+ var alreadyInOccur = !!editor.session.$occur;
+ var occurSessionActive = new Occur().enter(editor, options);
+ if (occurSessionActive && !alreadyInOccur)
+ OccurKeyboardHandler.installIn(editor);
+ },
+ readOnly: true
+};
+
+var occurCommands = [{
+ name: "occurexit",
+ bindKey: 'esc|Ctrl-G',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}, {
+ name: "occuraccept",
+ bindKey: 'enter',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {translatePosition: true});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var oop = require("../lib/oop");
+
+
+function OccurKeyboardHandler() {}
+
+oop.inherits(OccurKeyboardHandler, HashHandler);
+
+;(function() {
+
+ this.isOccurHandler = true;
+
+ this.attach = function(editor) {
+ HashHandler.call(this, occurCommands, editor.commands.platform);
+ this.$editor = editor;
+ }
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ return (cmd && cmd.command) ? cmd : undefined;
+ }
+
+}).call(OccurKeyboardHandler.prototype);
+
+OccurKeyboardHandler.installIn = function(editor) {
+ var handler = new this();
+ editor.keyBinding.addKeyboardHandler(handler);
+ editor.commands.addCommands(occurCommands);
+}
+
+OccurKeyboardHandler.uninstallFrom = function(editor) {
+ editor.commands.removeCommands(occurCommands);
+ var handler = editor.getKeyboardHandler();
+ if (handler.isOccurHandler)
+ editor.keyBinding.removeKeyboardHandler(handler);
+}
+
+exports.occurStartCommand = occurStartCommand;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/config.js b/src/fauxton/assets/js/libs/ace/config.js
new file mode 100644
index 000000000..f8614c1a3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/config.js
@@ -0,0 +1,295 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"no use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var net = require("./lib/net");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var global = (function() {
+ return this;
+})();
+
+var options = {
+ packaged: false,
+ workerPath: null,
+ modePath: null,
+ themePath: null,
+ basePath: "",
+ suffix: ".js",
+ $moduleUrls: {}
+};
+
+exports.get = function(key) {
+ if (!options.hasOwnProperty(key))
+ throw new Error("Unknown config key: " + key);
+
+ return options[key];
+};
+
+exports.set = function(key, value) {
+ if (!options.hasOwnProperty(key))
+ throw new Error("Unknown config key: " + key);
+
+ options[key] = value;
+};
+
+exports.all = function() {
+ return lang.copyObject(options);
+};
+
+// module loading
+oop.implement(exports, EventEmitter);
+
+exports.moduleUrl = function(name, component) {
+ if (options.$moduleUrls[name])
+ return options.$moduleUrls[name];
+
+ var parts = name.split("/");
+ component = component || parts[parts.length - 2] || "";
+
+ // todo make this configurable or get rid of '-'
+ var sep = component == "snippets" ? "/" : "-";
+ var base = parts[parts.length - 1];
+ if (sep == "-") {
+ var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
+ base = base.replace(re, "");
+ }
+
+ if ((!base || base == component) && parts.length > 1)
+ base = parts[parts.length - 2];
+ var path = options[component + "Path"];
+ if (path == null) {
+ path = options.basePath;
+ } else if (sep == "/") {
+ component = sep = "";
+ }
+ if (path && path.slice(-1) != "/")
+ path += "/";
+ return path + component + sep + base + this.get("suffix");
+};
+
+exports.setModuleUrl = function(name, subst) {
+ return options.$moduleUrls[name] = subst;
+};
+
+exports.$loading = {};
+exports.loadModule = function(moduleName, onLoad) {
+ var module, moduleType;
+ if (Array.isArray(moduleName)) {
+ moduleType = moduleName[0];
+ moduleName = moduleName[1];
+ }
+
+ try {
+ module = require(moduleName);
+ } catch (e) {}
+ // require(moduleName) can return empty object if called after require([moduleName], callback)
+ if (module && !exports.$loading[moduleName])
+ return onLoad && onLoad(module);
+
+ if (!exports.$loading[moduleName])
+ exports.$loading[moduleName] = [];
+
+ exports.$loading[moduleName].push(onLoad);
+
+ if (exports.$loading[moduleName].length > 1)
+ return;
+
+ var afterLoad = function() {
+ require([moduleName], function(module) {
+ exports._emit("load.module", {name: moduleName, module: module});
+ var listeners = exports.$loading[moduleName];
+ exports.$loading[moduleName] = null;
+ listeners.forEach(function(onLoad) {
+ onLoad && onLoad(module);
+ });
+ });
+ };
+
+ if (!exports.get("packaged"))
+ return afterLoad();
+ net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);
+};
+
+
+// initialization
+exports.init = function() {
+ options.packaged = require.packaged || module.packaged || (global.define && define.packaged);
+
+ if (!global.document)
+ return "";
+
+ var scriptOptions = {};
+ var scriptUrl = "";
+
+ var scripts = document.getElementsByTagName("script");
+ for (var i=0; i<scripts.length; i++) {
+ var script = scripts[i];
+
+ var src = script.src || script.getAttribute("src");
+ if (!src)
+ continue;
+
+ var attributes = script.attributes;
+ for (var j=0, l=attributes.length; j < l; j++) {
+ var attr = attributes[j];
+ if (attr.name.indexOf("data-ace-") === 0) {
+ scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/, ""))] = attr.value;
+ }
+ }
+
+ var m = src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);
+ if (m)
+ scriptUrl = m[1];
+ }
+
+ if (scriptUrl) {
+ scriptOptions.base = scriptOptions.base || scriptUrl;
+ scriptOptions.packaged = true;
+ }
+
+ scriptOptions.basePath = scriptOptions.base;
+ scriptOptions.workerPath = scriptOptions.workerPath || scriptOptions.base;
+ scriptOptions.modePath = scriptOptions.modePath || scriptOptions.base;
+ scriptOptions.themePath = scriptOptions.themePath || scriptOptions.base;
+ delete scriptOptions.base;
+
+ for (var key in scriptOptions)
+ if (typeof scriptOptions[key] !== "undefined")
+ exports.set(key, scriptOptions[key]);
+};
+
+function deHyphenate(str) {
+ return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
+}
+
+var optionsProvider = {
+ setOptions: function(optList) {
+ Object.keys(optList).forEach(function(key) {
+ this.setOption(key, optList[key]);
+ }, this);
+ },
+ getOptions: function(optionNames) {
+ var result = {};
+ if (!optionNames) {
+ optionNames = Object.keys(this.$options);
+ } else if (!Array.isArray(optionNames)) {
+ result = optionNames;
+ optionNames = Object.keys(result);
+ }
+ optionNames.forEach(function(key) {
+ result[key] = this.getOption(key);
+ }, this);
+ return result;
+ },
+ setOption: function(name, value) {
+ if (this["$" + name] === value)
+ return;
+ var opt = this.$options[name];
+ if (!opt) {
+ if (typeof console != "undefined" && console.warn)
+ console.warn('misspelled option "' + name + '"');
+ return undefined;
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
+
+ if (!opt.handlesSet)
+ this["$" + name] = value;
+ if (opt && opt.set)
+ opt.set.call(this, value);
+ },
+ getOption: function(name) {
+ var opt = this.$options[name];
+ if (!opt) {
+ if (typeof console != "undefined" && console.warn)
+ console.warn('misspelled option "' + name + '"');
+ return undefined;
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
+ return opt && opt.get ? opt.get.call(this) : this["$" + name];
+ }
+};
+
+var defaultOptions = {};
+/*
+ * option {name, value, initialValue, setterName, set, get }
+ */
+exports.defineOptions = function(obj, path, options) {
+ if (!obj.$options)
+ defaultOptions[path] = obj.$options = {};
+
+ Object.keys(options).forEach(function(key) {
+ var opt = options[key];
+ if (typeof opt == "string")
+ opt = {forwardTo: opt};
+
+ opt.name || (opt.name = key);
+ obj.$options[opt.name] = opt;
+ if ("initialValue" in opt)
+ obj["$" + opt.name] = opt.initialValue;
+ });
+
+ // implement option provider interface
+ oop.implement(obj, optionsProvider);
+
+ return this;
+};
+
+exports.resetOptions = function(obj) {
+ Object.keys(obj.$options).forEach(function(key) {
+ var opt = obj.$options[key];
+ if ("value" in opt)
+ obj.setOption(key, opt.value);
+ });
+};
+
+exports.setDefaultValue = function(path, name, value) {
+ var opts = defaultOptions[path] || (defaultOptions[path] = {});
+ if (opts[name]) {
+ if (opts.forwardTo)
+ exports.setDefaultValue(opts.forwardTo, name, value);
+ else
+ opts[name].value = value;
+ }
+};
+
+exports.setDefaultValues = function(path, optionHash) {
+ Object.keys(optionHash).forEach(function(key) {
+ exports.setDefaultValue(path, key, optionHash[key]);
+ });
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/config_test.js b/src/fauxton/assets/js/libs/ace/config_test.js
new file mode 100644
index 000000000..d09a28018
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/config_test.js
@@ -0,0 +1,128 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var config = require("./config");
+var assert = require("./test/assertions");
+
+module.exports = {
+
+ "test: path resolution" : function() {
+ config.set("packaged", "true");
+ var url = config.moduleUrl("kr_theme", "theme");
+ assert.equal(url, "theme-kr.js");
+
+ config.set("basePath", "a/b");
+ url = config.moduleUrl("m/theme", "theme");
+ assert.equal(url, "a/b/theme-m.js");
+
+ url = config.moduleUrl("m/theme", "ext");
+ assert.equal(url, "a/b/ext-theme.js");
+
+ config.set("workerPath", "c/");
+ url = config.moduleUrl("foo/1", "worker");
+ assert.equal(url, "c/worker-1.js");
+
+ config.setModuleUrl("foo/1", "a/b1.js");
+ url = config.moduleUrl("foo/1", "theme");
+ assert.equal(url, "a/b1.js");
+
+ url = config.moduleUrl("snippets/js");
+ assert.equal(url, "a/b/snippets/js.js");
+
+ config.setModuleUrl("snippets/js", "_.js");
+ url = config.moduleUrl("snippets/js");
+ assert.equal(url, "_.js");
+
+ url = config.moduleUrl("ace/ext/textarea");
+ assert.equal(url, "a/b/ext-textarea.js");
+
+ assert.equal();
+ },
+ "test: define options" : function() {
+ var o = {};
+ config.defineOptions(o, "test_object", {
+ opt1: {
+ set: function(val) {
+ this.x = val;
+ },
+ value: 7,
+ },
+ initialValue: {
+ set: function(val) {
+ this.x = val;
+ },
+ initialValue: 8,
+ },
+ opt2: {
+ get: function(val) {
+ return this.x;
+ }
+ },
+ forwarded: "model"
+ });
+ o.model = {};
+ config.defineOptions(o.model, "model", {
+ forwarded: {value: 1}
+ });
+
+ config.resetOptions(o);
+ config.resetOptions(o.model);
+ assert.equal(o.getOption("opt1"), 7);
+ assert.equal(o.getOption("opt2"), 7);
+ o.setOption("opt1", 8);
+ assert.equal(o.getOption("opt1"), 8);
+ assert.equal(o.getOption("opt2"), 8);
+
+ assert.equal(o.getOption("forwarded"), 1);
+
+ assert.equal(o.getOption("new"), undefined);
+ o.setOption("new", 0);
+ assert.equal(o.getOption("new"), undefined);
+
+
+ assert.equal(o.getOption("initialValue"), 8);
+ o.setOption("initialValue", 7);
+ assert.equal(o.getOption("opt2"), 7);
+
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/css/codefolding-fold-button-states.png b/src/fauxton/assets/js/libs/ace/css/codefolding-fold-button-states.png
new file mode 100644
index 000000000..439a2a2a2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/css/codefolding-fold-button-states.png
Binary files differ
diff --git a/src/fauxton/assets/js/libs/ace/css/editor.css b/src/fauxton/assets/js/libs/ace/css/editor.css
new file mode 100644
index 000000000..b291c11f3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/css/editor.css
@@ -0,0 +1,447 @@
+.ace_editor {
+ position: relative;
+ overflow: hidden;
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
+ font-size: 12px;
+ line-height: normal;
+ color: black;
+ -ms-user-select: none;
+ -moz-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+}
+
+.ace_scroller {
+ position: absolute;
+ overflow: hidden;
+ top: 0;
+ bottom: 0;
+ background-color: inherit;
+}
+
+.ace_content {
+ position: absolute;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ cursor: text;
+}
+
+.ace_dragging, .ace_dragging * {
+ cursor: move !important;
+}
+
+.ace_dragging .ace_scroller:before{
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ content: '';
+ background: rgba(250, 250, 250, 0.01);
+ z-index: 1000;
+}
+.ace_dragging.ace_dark .ace_scroller:before{
+ background: rgba(0, 0, 0, 0.01);
+}
+
+.ace_selecting, .ace_selecting * {
+ cursor: text !important;
+}
+
+.ace_gutter {
+ position: absolute;
+ overflow : hidden;
+ width: auto;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ cursor: default;
+ z-index: 4;
+}
+
+.ace_gutter-active-line {
+ position: absolute;
+ left: 0;
+ right: 0;
+}
+
+.ace_scroller.ace_scroll-left {
+ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;
+}
+
+.ace_gutter-cell {
+ padding-left: 19px;
+ padding-right: 6px;
+ background-repeat: no-repeat;
+}
+
+.ace_gutter-cell.ace_error {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTQ4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTU4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBMjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBMzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkgXxbAAAAJbSURBVHjapFNNaBNBFH4zs5vdZLP5sQmNpT82QY209heh1ioWisaDRcSKF0WKJ0GQnrzrxasHsR6EnlrwD0TagxJabaVEpFYxLWlLSS822tr87m66ccfd2GKyVhA6MMybgfe97/vmPUQphd0sZjto9XIn9OOsvlu2nkqRzVU+6vvlzPf8W6bk8dxQ0NPbxAALgCgg2JkaQuhzQau/El0zbmUA7U0Es8v2CiYmKQJHGO1QICCLoqilMhkmurDAyapKgqItezi/USRdJqEYY4D5jCy03ht2yMkkvL91jTTX10qzyyu2hruPRN7jgbH+EOsXcMLgYiThEgAMhABW85oqy1DXdRIdvP1AHJ2acQXvDIrVHcdQNrEKNYSVMSZGMjEzIIAwDXIo+6G/FxcGnzkC3T2oMhLjre49sBB+RRcHLqdafK6sYdE/GGBwU1VpFNj0aN8pJbe+BkZyevUrvLl6Xmm0W9IuTc0DxrDNAJd5oEvI/KRsNC3bQyNjPO9yQ1YHcfj2QvfQc/5TUhJTBc2iM0U7AWDQtc1nJHvD/cfO2s7jaGkiTEfa/Ep8coLu7zmNmh8+dc5lZDuUeFAGUNA/OY6JVaypQ0vjr7XYjUvJM37vt+j1vuTK5DgVfVUoTjVe+y3/LxMxY2GgU+CSLy4cpfsYorRXuXIOi0Vt40h67uZFTdIo6nLaZcwUJWAzwNS0tBnqqKzQDnjdG/iPyZxo46HaKUpbvYkj8qYRTZsBhge+JHhZyh0x9b95JqjVJkT084kZIPwu/mPWqPgfQ5jXh2+92Ay7HedfAgwA6KDWafb4w3cAAAAASUVORK5CYII=");
+ background-repeat: no-repeat;
+ background-position: 2px center;
+}
+
+.ace_gutter-cell.ace_warning {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUM2OEZDQTg4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUM2OEZDQTk4RTU0MTFFMUEzM0VFRTM2RUY1M0RBMjYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQzY4RkNBNjhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQzY4RkNBNzhFNTQxMUUxQTMzRUVFMzZFRjUzREEyNiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pgd7PfIAAAGmSURBVHjaYvr//z8DJZiJgUIANoCRkREb9gLiSVAaQx4OQM7AAkwd7XU2/v++/rOttdYGEB9dASEvOMydGKfH8Gv/p4XTkvRBfLxeQAP+1cUhXopyvzhP7P/IoSj7g7Mw09cNKO6J1QQ0L4gICPIv/veg/8W+JdFvQNLHVsW9/nmn9zk7B+cCkDwhL7gt6knSZnx9/LuCEOcvkIAMP+cvto9nfqyZmmUAksfnBUtbM60gX/3/kgyv3/xSFOL5DZT+L8vP+Yfh5cvfPvp/xUHyQHXGyAYwgpwBjZYFT3Y1OEl/OfCH4ffv3wzc4iwMvNIsDJ+f/mH4+vIPAxsb631WW0Yln6ZpQLXdMK/DXGDflh+sIv37EivD5x//Gb7+YWT4y86sl7BCCkSD+Z++/1dkvsFRl+HnD1Rvje4F8whjMXmGj58YGf5zsDMwcnAwfPvKcml62DsQDeaDxN+/Y0qwlpEHqrdB94IRNIDUgfgfKJChGK4OikEW3gTiXUB950ASLFAF54AC94A0G9QAfOnmF9DCDzABFqS08IHYDIScdijOjQABBgC+/9awBH96jwAAAABJRU5ErkJggg==");
+ background-position: 2px center;
+}
+
+.ace_gutter-cell.ace_info {
+ background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAAAAAAEFBQVJSUl5eXmRkZGtra39/f4WFhYmJiZGRkaampry8vMPDw8zMzNXV1dzc3OTk5Orq6vDw8P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABQALAAAAAAQABAAAAUuICWOZGmeaBml5XGwFCQSBGyXRSAwtqQIiRuiwIM5BoYVbEFIyGCQoeJGrVptIQA7");
+ background-position: 2px center;
+}
+.ace_dark .ace_gutter-cell.ace_info {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGRTk5MTVGREIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRTk5MTVGRUIxNDkxMUUxOTc5Q0FFREQyMTNGMjBFQyI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkZFOTkxNUZCQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFOTkxNUZDQjE0OTExRTE5NzlDQUVERDIxM0YyMEVDIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+SIDkjAAAAJ1JREFUeNpi/P//PwMlgImBQkB7A6qrq/+DMC55FkIGKCoq4pVnpFkgTp069f/+/fv/r1u37r+tre1/kg0A+ptn9uzZYLaRkRHpLvjw4cNXWVlZhufPnzOcO3eOdAO0tbVPAjHDmzdvGA4fPsxIsgGSkpJmv379Ynj37h2DjIyMCMkG3LhxQ/T27dsMampqDHZ2dq/pH41DxwCAAAMAFdc68dUsFZgAAAAASUVORK5CYII=");
+}
+
+.ace_scrollbar {
+ position: absolute;
+ overflow-x: hidden;
+ overflow-y: auto;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ z-index: 6;
+}
+
+.ace_scrollbar-inner {
+ position: absolute;
+ cursor: text;
+ left: 0;
+ top: 0;
+}
+
+.ace_scrollbar-h {
+ position: absolute;
+ overflow-x: auto;
+ overflow-y: hidden;
+ right: 0;
+ left: 0;
+ bottom: 0;
+ z-index: 6;
+}
+
+.ace_print-margin {
+ position: absolute;
+ height: 100%;
+}
+
+.ace_text-input {
+ position: absolute;
+ z-index: 0;
+ width: 0.5em;
+ height: 1em;
+ opacity: 0;
+ background: transparent;
+ -moz-appearance: none;
+ appearance: none;
+ border: none;
+ resize: none;
+ outline: none;
+ overflow: hidden;
+ font: inherit;
+ padding: 0 1px;
+ margin: 0 -1px;
+ text-indent: -1em;
+}
+
+.ace_text-input.ace_composition {
+ background: #f8f8f8;
+ color: #111;
+ z-index: 1000;
+ opacity: 1;
+ text-indent: 0;
+}
+
+.ace_layer {
+ z-index: 1;
+ position: absolute;
+ overflow: hidden;
+ white-space: nowrap;
+ height: 100%;
+ width: 100%;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ /* setting pointer-events: auto; on node under the mouse, which changes
+ during scroll, will break mouse wheel scrolling in Safari */
+ pointer-events: none;
+}
+
+.ace_gutter-layer {
+ position: relative;
+ width: auto;
+ text-align: right;
+ pointer-events: auto;
+}
+
+.ace_text-layer {
+ font: inherit !important;
+}
+
+.ace_cjk {
+ display: inline-block;
+ text-align: center;
+}
+
+.ace_cursor-layer {
+ z-index: 4;
+}
+
+.ace_cursor {
+ z-index: 4;
+ position: absolute;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ border-left: 2px solid
+}
+
+.ace_slim-cursors .ace_cursor {
+ border-left-width: 1px;
+}
+
+.ace_overwrite-cursors .ace_cursor {
+ border-left-width: 0px;
+ border-bottom: 1px solid;
+}
+
+.ace_hidden-cursors .ace_cursor {
+ opacity: 0.2;
+}
+
+.ace_smooth-blinking .ace_cursor {
+ -moz-transition: opacity 0.18s;
+ -webkit-transition: opacity 0.18s;
+ -o-transition: opacity 0.18s;
+ -ms-transition: opacity 0.18s;
+ transition: opacity 0.18s;
+}
+
+.ace_cursor[style*="opacity: 0"]{
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
+}
+
+.ace_editor.ace_multiselect .ace_cursor {
+ border-left-width: 1px;
+}
+
+.ace_line {
+ white-space: nowrap;
+}
+
+.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {
+ position: absolute;
+ z-index: 3;
+}
+
+.ace_marker-layer .ace_selection {
+ position: absolute;
+ z-index: 5;
+}
+
+.ace_marker-layer .ace_bracket {
+ position: absolute;
+ z-index: 6;
+}
+
+.ace_marker-layer .ace_active-line {
+ position: absolute;
+ z-index: 2;
+}
+
+.ace_marker-layer .ace_selected-word {
+ position: absolute;
+ z-index: 4;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.ace_line .ace_fold {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+
+ display: inline-block;
+ height: 11px;
+ margin-top: -2px;
+ vertical-align: middle;
+
+ background-image:
+ url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82"),
+ url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%3AIDAT8%11c%FC%FF%FF%7F%18%03%1A%60%01%F2%3F%A0%891%80%04%FF%11-%F8%17%9BJ%E2%05%B1ZD%81v%26t%E7%80%F8%A3%82h%A12%1A%20%A3%01%02%0F%01%BA%25%06%00%19%C0%0D%AEF%D5%3ES%00%00%00%00IEND%AEB%60%82");
+ background-repeat: no-repeat, repeat-x;
+ background-position: center center, top left;
+ color: transparent;
+
+ border: 1px solid black;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+
+ cursor: pointer;
+ pointer-events: auto;
+}
+
+.ace_dark .ace_fold {
+}
+
+.ace_fold:hover{
+ background-image:
+ url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%11%00%00%00%09%08%06%00%00%00%D4%E8%C7%0C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%00%B5IDAT(%15%A5%91%3D%0E%02!%10%85ac%E1%05%D6%CE%D6%C6%CE%D2%E8%ED%CD%DE%C0%C6%D6N.%E0V%F8%3D%9Ca%891XH%C2%BE%D9y%3F%90!%E6%9C%C3%BFk%E5%011%C6-%F5%C8N%04%DF%BD%FF%89%DFt%83DN%60%3E%F3%AB%A0%DE%1A%5Dg%BE%10Q%97%1B%40%9C%A8o%10%8F%5E%828%B4%1B%60%87%F6%02%26%85%1Ch%1E%C1%2B%5Bk%FF%86%EE%B7j%09%9A%DA%9B%ACe%A3%F9%EC%DA!9%B4%D5%A6%81%86%86%98%CC%3C%5B%40%FA%81%B3%E9%CB%23%94%C16Azo%05%D4%E1%C1%95a%3B%8A'%A0%E8%CC%17%22%85%1D%BA%00%A2%FA%DC%0A%94%D1%D1%8D%8B%3A%84%17B%C7%60%1A%25Z%FC%8D%00%00%00%00IEND%AEB%60%82"),
+ url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%007%08%06%00%00%00%C4%DD%80C%00%00%03%1EiCCPICC%20Profile%00%00x%01%85T%DFk%D3P%14%FE%DAe%9D%B0%E1%8B%3Ag%11%09%3Eh%91ndStC%9C%B6kW%BA%CDZ%EA6%B7!H%9B%A6m%5C%9A%C6%24%ED~%B0%07%D9%8Bo%3A%C5w%F1%07%3E%F9%07%0C%D9%83o%7B%92%0D%C6%14a%F8%AC%88%22L%F6%22%B3%9E%9B4M'S%03%B9%F7%BB%DF%F9%EE9'%E7%E4%5E%A0%F9qZ%D3%14%2F%0F%14USO%C5%C2%FC%C4%E4%14%DF%F2%01%5E%1CC%2B%FChM%8B%86%16J%26G%40%0F%D3%B2y%EF%B3%F3%0E%1E%C6lt%EEo%DF%AB%FEc%D5%9A%95%0C%11%F0%1C%20%BE%945%C4%22%E1Y%A0i%5C%D4t%13%E0%D6%89%EF%9D15%C2%CDLsX%A7%04%09%1Fg8oc%81%E1%8C%8D%23%96f45%40%9A%09%C2%07%C5B%3AK%B8%408%98i%E0%F3%0D%D8%CE%81%14%E4'%26%A9%92.%8B%3C%ABER%2F%E5dE%B2%0C%F6%F0%1Fs%83%F2_%B0%A8%94%E9%9B%AD%E7%10%8Dm%9A%19N%D1%7C%8A%DE%1F9%7Dp%8C%E6%00%D5%C1%3F_%18%BDA%B8%9DpX6%E3%A35~B%CD%24%AE%11%26%BD%E7%EEti%98%EDe%9A%97Y)%12%25%1C%24%BCbT%AE3li%E6%0B%03%89%9A%E6%D3%ED%F4P%92%B0%9F4%BF43Y%F3%E3%EDP%95%04%EB1%C5%F5%F6KF%F4%BA%BD%D7%DB%91%93%07%E35%3E%A7)%D6%7F%40%FE%BD%F7%F5r%8A%E5y%92%F0%EB%B4%1E%8D%D5%F4%5B%92%3AV%DB%DB%E4%CD%A6%23%C3%C4wQ%3F%03HB%82%8E%1Cd(%E0%91B%0Ca%9Ac%C4%AA%F8L%16%19%22J%A4%D2itTy%B28%D6%3B(%93%96%ED%1CGx%C9_%0E%B8%5E%16%F5%5B%B2%B8%F6%E0%FB%9E%DD%25%D7%8E%BC%15%85%C5%B7%A3%D8Q%ED%B5%81%E9%BA%B2%13%9A%1B%7Fua%A5%A3n%E17%B9%E5%9B%1Bm%AB%0B%08Q%FE%8A%E5%B1H%5Ee%CAO%82Q%D7u6%E6%90S%97%FCu%0B%CF2%94%EE%25v%12X%0C%BA%AC%F0%5E%F8*l%0AO%85%17%C2%97%BF%D4%C8%CE%DE%AD%11%CB%80q%2C%3E%AB%9ES%CD%C6%EC%25%D2L%D2%EBd%B8%BF%8A%F5B%C6%18%F9%901CZ%9D%BE%24M%9C%8A9%F2%DAP%0B'%06w%82%EB%E6%E2%5C%2F%D7%07%9E%BB%CC%5D%E1%FA%B9%08%AD.r%23%8E%C2%17%F5E%7C!%F0%BE3%BE%3E_%B7o%88a%A7%DB%BE%D3d%EB%A31Z%EB%BB%D3%91%BA%A2%B1z%94%8F%DB'%F6%3D%8E%AA%13%19%B2%B1%BE%B1~V%08%2B%B4%A2cjJ%B3tO%00%03%25mN%97%F3%05%93%EF%11%84%0B%7C%88%AE-%89%8F%ABbW%90O%2B%0Ao%99%0C%5E%97%0CI%AFH%D9.%B0%3B%8F%ED%03%B6S%D6%5D%E6i_s9%F3*p%E9%1B%FD%C3%EB.7U%06%5E%19%C0%D1s.%17%A03u%E4%09%B0%7C%5E%2C%EB%15%DB%1F%3C%9E%B7%80%91%3B%DBc%AD%3Dma%BA%8B%3EV%AB%DBt.%5B%1E%01%BB%0F%AB%D5%9F%CF%AA%D5%DD%E7%E4%7F%0Bx%A3%FC%06%A9%23%0A%D6%C2%A1_2%00%00%00%09pHYs%00%00%0B%13%00%00%0B%13%01%00%9A%9C%18%00%00%003IDAT8%11c%FC%FF%FF%7F%3E%03%1A%60%01%F2%3F%A3%891%80%04%FFQ%26%F8w%C0%B43%A1%DB%0C%E2%8F%0A%A2%85%CAh%80%8C%06%08%3C%04%E8%96%18%00%A3S%0D%CD%CF%D8%C1%9D%00%00%00%00IEND%AEB%60%82");
+ background-repeat: no-repeat, repeat-x;
+ background-position: center center, top left;
+}
+
+.ace_gutter-tooltip {
+ background-color: #FFF;
+ background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));
+ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
+ border: 1px solid gray;
+ border-radius: 1px;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
+ color: black;
+ display: inline-block;
+ max-width: 500px;
+ padding: 4px;
+ position: fixed;
+ z-index: 999999;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+ cursor: default;
+ white-space: pre-line;
+ word-wrap: break-word;
+ line-height: normal;
+ font-style: normal;
+ font-weight: normal;
+ letter-spacing: normal;
+}
+
+.ace_folding-enabled > .ace_gutter-cell {
+ padding-right: 13px;
+}
+
+.ace_fold-widget {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ box-sizing: border-box;
+
+ margin: 0 -12px 0 1px;
+ display: none;
+ width: 11px;
+ vertical-align: top;
+
+ background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAe%8A%B1%0D%000%0C%C2%F2%2CK%96%BC%D0%8F9%81%88H%E9%D0%0E%96%C0%10%92%3E%02%80%5E%82%E4%A9*-%EEsw%C8%CC%11%EE%96w%D8%DC%E9*Eh%0C%151(%00%00%00%00IEND%AEB%60%82");
+ background-repeat: no-repeat;
+ background-position: center;
+
+ border-radius: 3px;
+
+ border: 1px solid transparent;
+ cursor: pointer;
+}
+
+.ace_folding-enabled .ace_fold-widget {
+ display: inline-block;
+}
+
+.ace_fold-widget.ace_end {
+ background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%05%00%00%00%05%08%06%00%00%00%8Do%26%E5%00%00%004IDATx%DAm%C7%C1%09%000%08C%D1%8C%ECE%C8E(%8E%EC%02)%1EZJ%F1%C1'%04%07I%E1%E5%EE%CAL%F5%A2%99%99%22%E2%D6%1FU%B5%FE0%D9x%A7%26Wz5%0E%D5%00%00%00%00IEND%AEB%60%82");
+}
+
+.ace_fold-widget.ace_closed {
+ background-image: url("data:image/png,%89PNG%0D%0A%1A%0A%00%00%00%0DIHDR%00%00%00%03%00%00%00%06%08%06%00%00%00%06%E5%24%0C%00%00%009IDATx%DA5%CA%C1%09%000%08%03%C0%AC*(%3E%04%C1%0D%BA%B1%23%A4Uh%E0%20%81%C0%CC%F8%82%81%AA%A2%AArGfr%88%08%11%11%1C%DD%7D%E0%EE%5B%F6%F6%CB%B8%05Q%2F%E9tai%D9%00%00%00%00IEND%AEB%60%82");
+}
+
+.ace_fold-widget:hover {
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ background-color: rgba(255, 255, 255, 0.2);
+ -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
+ -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
+}
+
+.ace_fold-widget:active {
+ border: 1px solid rgba(0, 0, 0, 0.4);
+ background-color: rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
+ -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
+}
+/**
+ * Dark version for fold widgets
+ */
+.ace_dark .ace_fold-widget {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");
+}
+.ace_dark .ace_fold-widget.ace_end {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");
+}
+.ace_dark .ace_fold-widget.ace_closed {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");
+}
+.ace_dark .ace_fold-widget:hover {
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
+ background-color: rgba(255, 255, 255, 0.1);
+}
+.ace_dark .ace_fold-widget:active {
+ -moz-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
+ -webkit-box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);
+}
+
+.ace_fold-widget.ace_invalid {
+ background-color: #FFB4B4;
+ border-color: #DE5555;
+}
+
+.ace_fade-fold-widgets .ace_fold-widget {
+ -moz-transition: opacity 0.4s ease 0.05s;
+ -webkit-transition: opacity 0.4s ease 0.05s;
+ -o-transition: opacity 0.4s ease 0.05s;
+ -ms-transition: opacity 0.4s ease 0.05s;
+ transition: opacity 0.4s ease 0.05s;
+ opacity: 0;
+}
+
+.ace_fade-fold-widgets:hover .ace_fold-widget {
+ -moz-transition: opacity 0.05s ease 0.05s;
+ -webkit-transition: opacity 0.05s ease 0.05s;
+ -o-transition: opacity 0.05s ease 0.05s;
+ -ms-transition: opacity 0.05s ease 0.05s;
+ transition: opacity 0.05s ease 0.05s;
+ opacity:1;
+}
+
+.ace_underline {
+ text-decoration: underline;
+}
+
+.ace_bold {
+ font-weight: bold;
+}
+
+.ace_nobold .ace_bold {
+ font-weight: normal;
+}
+
+.ace_italic {
+ font-style: italic;
+}
+
+
+.ace_error-marker {
+ background-color: rgba(255, 0, 0,0.2);
+ position: absolute;
+ z-index: 9;
+}
+
+.ace_highlight-marker {
+ background-color: rgba(255, 255, 0,0.2);
+ position: absolute;
+ z-index: 8;
+}
diff --git a/src/fauxton/assets/js/libs/ace/css/expand-marker.png b/src/fauxton/assets/js/libs/ace/css/expand-marker.png
new file mode 100644
index 000000000..535e81922
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/css/expand-marker.png
Binary files differ
diff --git a/src/fauxton/assets/js/libs/ace/document.js b/src/fauxton/assets/js/libs/ace/document.js
new file mode 100644
index 000000000..75a7920d7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/document.js
@@ -0,0 +1,642 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+/**
+ * Contains the text of the document. Document can be attached to several [[EditSession `EditSession`]]s.
+ *
+ * At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
+ *
+ * @class Document
+ **/
+
+ /**
+ *
+ * Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
+ * @param {String | Array} text The starting text
+ * @constructor
+ **/
+
+var Document = function(text) {
+ this.$lines = [];
+
+ // There has to be one line at least in the document. If you pass an empty
+ // string to the insert function, nothing will happen. Workaround.
+ if (text.length == 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(text)) {
+ this._insertLines(0, text);
+ } else {
+ this.insert({row: 0, column:0}, text);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ * Replaces all the lines in the current `Document` with the value of `text`.
+ *
+ * @param {String} text The text to use
+ **/
+ this.setValue = function(text) {
+ var len = this.getLength();
+ this.remove(new Range(0, 0, len, this.getLine(len-1).length));
+ this.insert({row: 0, column:0}, text);
+ };
+
+ /**
+ * Returns all the lines in the document as a single string, joined by the new line character.
+ **/
+ this.getValue = function() {
+ return this.getAllLines().join(this.getNewLineCharacter());
+ };
+
+ /**
+ * Creates a new `Anchor` to define a floating point in the document.
+ * @param {Number} row The row number to use
+ * @param {Number} column The column number to use
+ *
+ **/
+ this.createAnchor = function(row, column) {
+ return new Anchor(this, row, column);
+ };
+
+ /**
+ * Splits a string of text on any newline (`\n`) or carriage-return ('\r') characters.
+ *
+ * @method $split
+ * @param {String} text The text to work with
+ * @returns {String} A String array, with each index containing a piece of the original `text` string.
+ *
+ **/
+
+ // check for IE split bug
+ if ("aaa".split(/a/).length == 0)
+ this.$split = function(text) {
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
+ }
+ else
+ this.$split = function(text) {
+ return text.split(/\r\n|\r|\n/);
+ };
+
+
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
+ this.$autoNewLine = match ? match[1] : "\n";
+ };
+
+ /**
+ * Returns the newline character that's being used, depending on the value of `newLineMode`.
+ * @returns {String} If `newLineMode == windows`, `\r\n` is returned.
+ * If `newLineMode == unix`, `\n` is returned.
+ * If `newLineMode == auto`, the value of `autoNewLine` is returned.
+ *
+ **/
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine;
+ }
+ };
+
+ this.$autoNewLine = "\n";
+ this.$newLineMode = "auto";
+ /**
+ * [Sets the new line mode.]{: #Document.setNewLineMode.desc}
+ * @param {String} newLineMode [The newline mode to use; can be either `windows`, `unix`, or `auto`]{: #Document.setNewLineMode.param}
+ *
+ **/
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ };
+
+ /**
+ * [Returns the type of newlines being used; either `windows`, `unix`, or `auto`]{: #Document.getNewLineMode}
+ * @returns {String}
+ **/
+ this.getNewLineMode = function() {
+ return this.$newLineMode;
+ };
+
+ /**
+ * Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`).
+ * @param {String} text The text to check
+ *
+ **/
+ this.isNewLine = function(text) {
+ return (text == "\r\n" || text == "\r" || text == "\n");
+ };
+
+ /**
+ * Returns a verbatim copy of the given line as it is in the document
+ * @param {Number} row The row index to retrieve
+ *
+ **/
+ this.getLine = function(row) {
+ return this.$lines[row] || "";
+ };
+
+ /**
+ * Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`.
+ * @param {Number} firstRow The first row index to retrieve
+ * @param {Number} lastRow The final row index to retrieve
+ *
+ **/
+ this.getLines = function(firstRow, lastRow) {
+ return this.$lines.slice(firstRow, lastRow + 1);
+ };
+
+ /**
+ * Returns all lines in the document as string array.
+ **/
+ this.getAllLines = function() {
+ return this.getLines(0, this.getLength());
+ };
+
+ /**
+ * Returns the number of rows in the document.
+ **/
+ this.getLength = function() {
+ return this.$lines.length;
+ };
+
+ /**
+ * [Given a range within the document, this function returns all the text within that range as a single string.]{: #Document.getTextRange.desc}
+ * @param {Range} range The range to work with
+ *
+ * @returns {String}
+ **/
+ this.getTextRange = function(range) {
+ if (range.start.row == range.end.row) {
+ return this.getLine(range.start.row)
+ .substring(range.start.column, range.end.column);
+ }
+ var lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ return lines.join(this.getNewLineCharacter());
+ };
+
+ this.$clipPosition = function(position) {
+ var length = this.getLength();
+ if (position.row >= length) {
+ position.row = Math.max(0, length - 1);
+ position.column = this.getLine(length-1).length;
+ } else if (position.row < 0)
+ position.row = 0;
+ return position;
+ };
+
+ /**
+ * Inserts a block of `text` at the indicated `position`.
+ * @param {Object} position The position to start inserting at; it's an object that looks like `{ row: row, column: column}`
+ * @param {String} text A chunk of text to insert
+ * @returns {Object} The position ({row, column}) of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
+ *
+ **/
+ this.insert = function(position, text) {
+ if (!text || text.length === 0)
+ return position;
+
+ position = this.$clipPosition(position);
+
+ // only detect new lines if the document has no line break yet
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ var lines = this.$split(text);
+ var firstLine = lines.splice(0, 1)[0];
+ var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0];
+
+ position = this.insertInLine(position, firstLine);
+ if (lastLine !== null) {
+ position = this.insertNewLine(position); // terminate first line
+ position = this._insertLines(position.row, lines);
+ position = this.insertInLine(position, lastLine || "");
+ }
+ return position;
+ };
+
+ /**
+ * Fires whenever the document changes.
+ *
+ * Several methods trigger different `"change"` events. Below is a list of each action type, followed by each property that's also available:
+ *
+ * * `"insertLines"` (emitted by [[Document.insertLines]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines in the document that are changing
+ * * `"insertText"` (emitted by [[Document.insertNewLine]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `text`: the text that's being added
+ * * `"removeLines"` (emitted by [[Document.insertLines]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `lines`: the lines in the document that were removed
+ * * `nl`: the new line character (as defined by [[Document.getNewLineCharacter]])
+ * * `"removeText"` (emitted by [[Document.removeInLine]] and [[Document.removeNewLine]])
+ * * `range`: the [[Range]] of the change within the document
+ * * `text`: the text that's being removed
+ *
+ * @event change
+ * @param {Object} e Contains at least one property called `"action"`. `"action"` indicates the action that triggered the change. Each action also has a set of additional properties.
+ *
+ **/
+ /**
+ * Inserts the elements in `lines` into the document, starting at the row index given by `row`. This method also triggers the `'change'` event.
+ * @param {Number} row The index of the row to insert at
+ * @param {Array} lines An array of strings
+ * @returns {Object} Contains the final row and column, like this:
+ * ```
+ * {row: endRow, column: 0}
+ * ```
+ * If `lines` is empty, this function returns an object containing the current row, and column, like this:
+ * ```
+ * {row: row, column: 0}
+ * ```
+ *
+ **/
+ this.insertLines = function(row, lines) {
+ if (row >= this.getLength())
+ return this.insert({row: row, column: 0}, "\n" + lines.join("\n"));
+ return this._insertLines(Math.max(row, 0), lines);
+ };
+ this._insertLines = function(row, lines) {
+ if (lines.length == 0)
+ return {row: row, column: 0};
+
+ // apply doesn't work for big arrays (smallest threshold is on safari 0xFFFF)
+ // to circumvent that we have to break huge inserts into smaller chunks here
+ if (lines.length > 0xFFFF) {
+ var end = this._insertLines(row, lines.slice(0xFFFF));
+ lines = lines.slice(0, 0xFFFF);
+ }
+
+ var args = [row, 0];
+ args.push.apply(args, lines);
+ this.$lines.splice.apply(this.$lines, args);
+
+ var range = new Range(row, 0, row + lines.length, 0);
+ var delta = {
+ action: "insertLines",
+ range: range,
+ lines: lines
+ };
+ this._emit("change", { data: delta });
+ return end || range.end;
+ };
+
+ /**
+ * Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event.
+ * @param {Object} position The position to insert at
+ * @returns {Object} Returns an object containing the final row and column, like this:<br/>
+ * ```
+ * {row: endRow, column: 0}
+ * ```
+ *
+ **/
+ this.insertNewLine = function(position) {
+ position = this.$clipPosition(position);
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column);
+ this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length));
+
+ var end = {
+ row : position.row + 1,
+ column : 0
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+
+ /**
+ * Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
+ * @param {Object} position The position to insert at; it's an object that looks like `{ row: row, column: column}`
+ * @param {String} text A chunk of text
+ * @returns {Object} Returns an object containing the final row and column, like this:
+ * ```
+ * {row: endRow, column: 0}
+ * ```
+ *
+ **/
+ this.insertInLine = function(position, text) {
+ if (text.length == 0)
+ return position;
+
+ var line = this.$lines[position.row] || "";
+
+ this.$lines[position.row] = line.substring(0, position.column) + text
+ + line.substring(position.column);
+
+ var end = {
+ row : position.row,
+ column : position.column + text.length
+ };
+
+ var delta = {
+ action: "insertText",
+ range: Range.fromPoints(position, end),
+ text: text
+ };
+ this._emit("change", { data: delta });
+
+ return end;
+ };
+
+ /**
+ * Removes the `range` from the document.
+ * @param {Range} range A specified Range to remove
+ * @returns {Object} Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.
+ *
+ **/
+ this.remove = function(range) {
+ if (!range instanceof Range)
+ range = Range.fromPoints(range.start, range.end);
+ // clip to document
+ range.start = this.$clipPosition(range.start);
+ range.end = this.$clipPosition(range.end);
+
+ if (range.isEmpty())
+ return range.start;
+
+ var firstRow = range.start.row;
+ var lastRow = range.end.row;
+
+ if (range.isMultiLine()) {
+ var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1;
+ var lastFullRow = lastRow - 1;
+
+ if (range.end.column > 0)
+ this.removeInLine(lastRow, 0, range.end.column);
+
+ if (lastFullRow >= firstFullRow)
+ this._removeLines(firstFullRow, lastFullRow);
+
+ if (firstFullRow != firstRow) {
+ this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length);
+ this.removeNewLine(range.start.row);
+ }
+ }
+ else {
+ this.removeInLine(firstRow, range.start.column, range.end.column);
+ }
+ return range.start;
+ };
+
+ /**
+ * Removes the specified columns from the `row`. This method also triggers the `'change'` event.
+ * @param {Number} row The row to remove from
+ * @param {Number} startColumn The column to start removing at
+ * @param {Number} endColumn The column to stop removing at
+ * @returns {Object} Returns an object containing `startRow` and `startColumn`, indicating the new row and column values.<br/>If `startColumn` is equal to `endColumn`, this function returns nothing.
+ *
+ **/
+ this.removeInLine = function(row, startColumn, endColumn) {
+ if (startColumn == endColumn)
+ return;
+
+ var range = new Range(row, startColumn, row, endColumn);
+ var line = this.getLine(row);
+ var removed = line.substring(startColumn, endColumn);
+ var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length);
+ this.$lines.splice(row, 1, newLine);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: removed
+ };
+ this._emit("change", { data: delta });
+ return range.start;
+ };
+
+ /**
+ * Removes a range of full lines. This method also triggers the `'change'` event.
+ * @param {Number} firstRow The first row to be removed
+ * @param {Number} lastRow The last row to be removed
+ * @returns {[String]} Returns all the removed lines.
+ *
+ **/
+ this.removeLines = function(firstRow, lastRow) {
+ if (firstRow < 0 || lastRow >= this.getLength())
+ return this.remove(new Range(firstRow, 0, lastRow + 1, 0));
+ return this._removeLines(firstRow, lastRow);
+ };
+
+ this._removeLines = function(firstRow, lastRow) {
+ var range = new Range(firstRow, 0, lastRow + 1, 0);
+ var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
+
+ var delta = {
+ action: "removeLines",
+ range: range,
+ nl: this.getNewLineCharacter(),
+ lines: removed
+ };
+ this._emit("change", { data: delta });
+ return removed;
+ };
+
+ /**
+ * Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event.
+ * @param {Number} row The row to check
+ *
+ **/
+ this.removeNewLine = function(row) {
+ var firstLine = this.getLine(row);
+ var secondLine = this.getLine(row+1);
+
+ var range = new Range(row, firstLine.length, row+1, 0);
+ var line = firstLine + secondLine;
+
+ this.$lines.splice(row, 2, line);
+
+ var delta = {
+ action: "removeText",
+ range: range,
+ text: this.getNewLineCharacter()
+ };
+ this._emit("change", { data: delta });
+ };
+
+ /**
+ * Replaces a range in the document with the new `text`.
+ * @param {Range} range A specified Range to replace
+ * @param {String} text The new text to use as a replacement
+ * @returns {Object} Returns an object containing the final row and column, like this:
+ * {row: endRow, column: 0}
+ * If the text and range are empty, this function returns an object containing the current `range.start` value.
+ * If the text is the exact same as what currently exists, this function returns an object containing the current `range.end` value.
+ *
+ **/
+ this.replace = function(range, text) {
+ if (!range instanceof Range)
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length == 0 && range.isEmpty())
+ return range.start;
+
+ // Shortcut: If the text we want to insert is the same as it is already
+ // in the document, we don't have to replace anything.
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ if (text) {
+ var end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+
+ /**
+ * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
+ **/
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ var delta = deltas[i];
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this.insertLines(range.start.row, delta.lines);
+ else if (delta.action == "insertText")
+ this.insert(range.start, delta.text);
+ else if (delta.action == "removeLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "removeText")
+ this.remove(range);
+ }
+ };
+
+ /**
+ * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
+ **/
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ var delta = deltas[i];
+
+ var range = Range.fromPoints(delta.range.start, delta.range.end);
+
+ if (delta.action == "insertLines")
+ this._removeLines(range.start.row, range.end.row - 1);
+ else if (delta.action == "insertText")
+ this.remove(range);
+ else if (delta.action == "removeLines")
+ this._insertLines(range.start.row, delta.lines);
+ else if (delta.action == "removeText")
+ this.insert(range.start, delta.text);
+ }
+ };
+
+ /**
+ * Converts an index position in a document to a `{row, column}` object.
+ *
+ * Index refers to the "absolute position" of a character in the document. For example:
+ *
+ * ```javascript
+ * var x = 0; // 10 characters, plus one for newline
+ * var y = -1;
+ * ```
+ *
+ * Here, `y` is an index 15: 11 characters for the first row, and 5 characters until `y` in the second.
+ *
+ * @param {Number} index An index to convert
+ * @param {Number} startRow=0 The row from which to start the conversion
+ * @returns {Object} A `{row, column}` object of the `index` position
+ */
+ this.indexToPosition = function(index, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
+ index -= lines[i].length + newlineLength;
+ if (index < 0)
+ return {row: i, column: index + lines[i].length + newlineLength};
+ }
+ return {row: l-1, column: lines[l-1].length};
+ };
+
+ /**
+ * Converts the `{row, column}` position in a document to the character's index.
+ *
+ * Index refers to the "absolute position" of a character in the document. For example:
+ *
+ * ```javascript
+ * var x = 0; // 10 characters, plus one for newline
+ * var y = -1;
+ * ```
+ *
+ * Here, `y` is an index 15: 11 characters for the first row, and 5 characters until `y` in the second.
+ *
+ * @param {Object} pos The `{row, column}` to convert
+ * @param {Number} startRow=0 The row from which to start the conversion
+ * @returns {Number} The index position in the document
+ */
+ this.positionToIndex = function(pos, startRow) {
+ var lines = this.$lines || this.getAllLines();
+ var newlineLength = this.getNewLineCharacter().length;
+ var index = 0;
+ var row = Math.min(pos.row, lines.length);
+ for (var i = startRow || 0; i < row; ++i)
+ index += lines[i].length + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
diff --git a/src/fauxton/assets/js/libs/ace/document_test.js b/src/fauxton/assets/js/libs/ace/document_test.js
new file mode 100644
index 000000000..5c324db0f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/document_test.js
@@ -0,0 +1,306 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var Document = require("./document").Document;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+
+module.exports = {
+
+ "test: insert text in line" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insert({row: 0, column: 1}, "juhu");
+ assert.equal(doc.getValue(), ["1juhu2", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["1juhu2", "34"].join("\n"));
+ },
+
+ "test: insert new line" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insertNewLine({row: 0, column: 1});
+ assert.equal(doc.getValue(), ["1", "2", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["1", "2", "34"].join("\n"));
+ },
+
+ "test: insert lines at the beginning" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insertLines(0, ["aa", "bb"]);
+ assert.equal(doc.getValue(), ["aa", "bb", "12", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["aa", "bb", "12", "34"].join("\n"));
+ },
+
+ "test: insert lines at the end" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insertLines(2, ["aa", "bb"]);
+ assert.equal(doc.getValue(), ["12", "34", "aa", "bb"].join("\n"));
+ },
+
+ "test: insert lines in the middle" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insertLines(1, ["aa", "bb"]);
+ assert.equal(doc.getValue(), ["12", "aa", "bb", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["12", "aa", "bb", "34"].join("\n"));
+ },
+
+ "test: insert multi line string at the start" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insert({row: 0, column: 0}, "aa\nbb\ncc");
+ assert.equal(doc.getValue(), ["aa", "bb", "cc12", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["aa", "bb", "cc12", "34"].join("\n"));
+ },
+
+ "test: insert multi line string at the end" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insert({row: 2, column: 0}, "aa\nbb\ncc");
+ assert.equal(doc.getValue(), ["12", "34aa", "bb", "cc"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34aa", "bb", "cc"].join("\n"));
+ },
+
+ "test: insert multi line string in the middle" : function() {
+ var doc = new Document(["12", "34"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.insert({row: 0, column: 1}, "aa\nbb\ncc");
+ assert.equal(doc.getValue(), ["1aa", "bb", "cc2", "34"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["12", "34"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["1aa", "bb", "cc2", "34"].join("\n"));
+ },
+
+ "test: delete in line" : function() {
+ var doc = new Document(["1234", "5678"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.remove(new Range(0, 1, 0, 3));
+ assert.equal(doc.getValue(), ["14", "5678"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["1234", "5678"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["14", "5678"].join("\n"));
+ },
+
+ "test: delete new line" : function() {
+ var doc = new Document(["1234", "5678"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.remove(new Range(0, 4, 1, 0));
+ assert.equal(doc.getValue(), ["12345678"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["1234", "5678"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["12345678"].join("\n"));
+ },
+
+ "test: delete multi line range line" : function() {
+ var doc = new Document(["1234", "5678", "abcd"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.remove(new Range(0, 2, 2, 2));
+ assert.equal(doc.getValue(), ["12cd"].join("\n"));
+
+ var d = deltas.concat();
+ doc.revertDeltas(d);
+ assert.equal(doc.getValue(), ["1234", "5678", "abcd"].join("\n"));
+
+ doc.applyDeltas(d);
+ assert.equal(doc.getValue(), ["12cd"].join("\n"));
+ },
+
+ "test: delete full lines" : function() {
+ var doc = new Document(["1234", "5678", "abcd"]);
+
+ var deltas = [];
+ doc.on("change", function(e) { deltas.push(e.data); });
+
+ doc.remove(new Range(1, 0, 3, 0));
+ assert.equal(doc.getValue(), ["1234", ""].join("\n"));
+ },
+
+ "test: remove lines should return the removed lines" : function() {
+ var doc = new Document(["1234", "5678", "abcd"]);
+
+ var removed = doc.removeLines(1, 2);
+ assert.equal(removed.join("\n"), ["5678", "abcd"].join("\n"));
+ },
+
+ "test: should handle unix style new lines" : function() {
+ var doc = new Document(["1", "2", "3"]);
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\n"));
+ },
+
+ "test: should handle windows style new lines" : function() {
+ var doc = new Document(["1", "2", "3"].join("\r\n"));
+
+ doc.setNewLineMode("unix");
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\n"));
+ },
+
+ "test: set new line mode to 'windows' should use '\\r\\n' as new lines": function() {
+ var doc = new Document(["1", "2", "3"].join("\n"));
+ doc.setNewLineMode("windows");
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\r\n"));
+ },
+
+ "test: set new line mode to 'unix' should use '\\n' as new lines": function() {
+ var doc = new Document(["1", "2", "3"].join("\r\n"));
+
+ doc.setNewLineMode("unix");
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\n"));
+ },
+
+ "test: set new line mode to 'auto' should detect the incoming nl type": function() {
+ var doc = new Document(["1", "2", "3"].join("\n"));
+
+ doc.setNewLineMode("auto");
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\n"));
+
+ var doc = new Document(["1", "2", "3"].join("\r\n"));
+
+ doc.setNewLineMode("auto");
+ assert.equal(doc.getValue(), ["1", "2", "3"].join("\r\n"));
+
+ doc.replace(new Range(0, 0, 2, 1), ["4", "5", "6"].join("\n"));
+ assert.equal(["4", "5", "6"].join("\n"), doc.getValue());
+ },
+
+ "test: set value": function() {
+ var doc = new Document("1");
+ assert.equal("1", doc.getValue());
+
+ doc.setValue(doc.getValue());
+ assert.equal("1", doc.getValue());
+
+ var doc = new Document("1\n2");
+ assert.equal("1\n2", doc.getValue());
+
+ doc.setValue(doc.getValue());
+ assert.equal("1\n2", doc.getValue());
+ },
+
+ "test: empty document has to contain one line": function() {
+ var doc = new Document("");
+ assert.equal(doc.$lines.length, 1);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/edit_session.js b/src/fauxton/assets/js/libs/ace/edit_session.js
new file mode 100644
index 000000000..98c1e9405
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session.js
@@ -0,0 +1,2505 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var config = require("./config");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Selection = require("./selection").Selection;
+var TextMode = require("./mode/text").Mode;
+var Range = require("./range").Range;
+var Document = require("./document").Document;
+var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+
+/**
+ * Stores all the data about [[Editor `Editor`]] state providing easy way to change editors state.
+ *
+ * `EditSession` can be attached to only one [[Document `Document`]]. Same `Document` can be attached to several `EditSession`s.
+ * @class EditSession
+ **/
+
+//{ events
+/**
+ *
+ * Emitted when the document changes.
+ * @event change
+ * @param {Object} e An object containing a `delta` of information about the change.
+ **/
+/**
+ * Emitted when the tab size changes, via [[EditSession.setTabSize]].
+ *
+ * @event changeTabSize
+ **/
+/**
+ * Emitted when the ability to overwrite text changes, via [[EditSession.setOverwrite]].
+ *
+ * @event changeOverwrite
+ **/
+/**
+ * Emitted when the gutter changes, either by setting or removing breakpoints, or when the gutter decorations change.
+ *
+ * @event changeBreakpoint
+ **/
+/**
+ * Emitted when a front marker changes.
+ *
+ * @event changeFrontMarker
+ **/
+/**
+ * Emitted when a back marker changes.
+ *
+ * @event changeBackMarker
+ **/
+/**
+ * Emitted when an annotation changes, like through [[EditSession.setAnnotations]].
+ *
+ * @event changeAnnotation
+ **/
+/**
+ * Emitted when a background tokenizer asynchronously processes new rows.
+ * @event tokenizerUpdate
+ *
+ * @param {Object} e An object containing one property, `"data"`, that contains information about the changing rows
+ *
+ **/
+/**
+ * Emitted when the current mode changes.
+ *
+ * @event changeMode
+ *
+ **/
+/**
+ * Emitted when the wrap mode changes.
+ *
+ * @event changeWrapMode
+ *
+ **/
+/**
+ * Emitted when the wrapping limit changes.
+ *
+ * @event changeWrapLimit
+ *
+ **/
+/**
+ * Emitted when a code fold is added or removed.
+ *
+ * @event changeFold
+ *
+ **/
+ /**
+ * Emitted when the scroll top changes.
+ * @event changeScrollTop
+ *
+ * @param {Number} scrollTop The new scroll top value
+ **/
+/**
+ * Emitted when the scroll left changes.
+ * @event changeScrollLeft
+ *
+ * @param {Number} scrollLeft The new scroll left value
+ **/
+//}
+
+/**
+ *
+ * Sets up a new `EditSession` and associates it with the given `Document` and `TextMode`.
+ * @param {Document | String} text [If `text` is a `Document`, it associates the `EditSession` with it. Otherwise, a new `Document` is created, with the initial text]{: #textParam}
+ * @param {TextMode} mode [The inital language mode to use for the document]{: #modeParam}
+ *
+ * @constructor
+ **/
+
+var EditSession = function(text, mode) {
+ this.$breakpoints = [];
+ this.$decorations = [];
+ this.$frontMarkers = {};
+ this.$backMarkers = {};
+ this.$markerId = 1;
+ this.$undoSelect = true;
+
+ this.$foldData = [];
+ this.$foldData.toString = function() {
+ return this.join("\n");
+ }
+ this.on("changeFold", this.onChangeFold.bind(this));
+ this.$onChange = this.onChange.bind(this);
+
+ if (typeof text != "object" || !text.getLine)
+ text = new Document(text);
+
+ this.setDocument(text);
+ this.selection = new Selection(this);
+
+ config.resetOptions(this);
+ this.setMode(mode);
+ config._emit("session", this);
+};
+
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ * Sets the `EditSession` to point to a new `Document`. If a `BackgroundTokenizer` exists, it also points to `doc`.
+ *
+ * @param {Document} doc The new `Document` to use
+ *
+ **/
+ this.setDocument = function(doc) {
+ if (this.doc)
+ this.doc.removeListener("change", this.$onChange);
+
+ this.doc = doc;
+ doc.on("change", this.$onChange);
+
+ if (this.bgTokenizer)
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.resetCaches();
+ };
+
+ /**
+ * Returns the `Document` associated with this session.
+ * @return {Document}
+ **/
+ this.getDocument = function() {
+ return this.doc;
+ };
+
+ /**
+ * @param {Number} row The row to work with
+ *
+ **/
+ this.$resetRowCache = function(docRow) {
+ if (!docRow) {
+ this.$docRowCache = [];
+ this.$screenRowCache = [];
+ return;
+ }
+ var l = this.$docRowCache.length;
+ var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
+ if (l > i) {
+ this.$docRowCache.splice(i, l);
+ this.$screenRowCache.splice(i, l);
+ }
+ };
+
+ this.$getRowCacheIndex = function(cacheArray, val) {
+ var low = 0;
+ var hi = cacheArray.length - 1;
+
+ while (low <= hi) {
+ var mid = (low + hi) >> 1;
+ var c = cacheArray[mid];
+
+ if (val > c)
+ low = mid + 1;
+ else if (val < c)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+
+ return low -1;
+ };
+
+ this.resetCaches = function() {
+ this.$modified = true;
+ this.$wrapData = [];
+ this.$rowLengthCache = [];
+ this.$resetRowCache(0);
+ if (this.bgTokenizer)
+ this.bgTokenizer.start(0);
+ };
+
+ this.onChangeFold = function(e) {
+ var fold = e.data;
+ this.$resetRowCache(fold.start.row);
+ };
+
+ this.onChange = function(e) {
+ var delta = e.data;
+ this.$modified = true;
+
+ this.$resetRowCache(delta.range.start.row);
+
+ var removedFolds = this.$updateInternalDataOnChange(e);
+ if (!this.$fromUndo && this.$undoManager && !delta.ignore) {
+ this.$deltasDoc.push(delta);
+ if (removedFolds && removedFolds.length != 0) {
+ this.$deltasFold.push({
+ action: "removeFolds",
+ folds: removedFolds
+ });
+ }
+
+ this.$informUndoManager.schedule();
+ }
+
+ this.bgTokenizer.$updateOnChange(delta);
+ this._emit("change", e);
+ };
+
+ /**
+ * Sets the session text.
+ * @param {String} text The new text to place
+ *
+ *
+ *
+ **/
+ this.setValue = function(text) {
+ this.doc.setValue(text);
+ this.selection.moveCursorTo(0, 0);
+ this.selection.clearSelection();
+
+ this.$resetRowCache(0);
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+ this.getUndoManager().reset();
+ };
+
+ /**
+ * Returns the current [[Document `Document`]] as a string.
+ * @method toString
+ * @returns {String}
+ * @alias EditSession.getValue
+ *
+ **/
+
+ /**
+ * Returns the current [[Document `Document`]] as a string.
+ * @method getValue
+ * @returns {String}
+ * @alias EditSession.toString
+ **/
+ this.getValue =
+ this.toString = function() {
+ return this.doc.getValue();
+ };
+
+ /**
+ * Returns the string of the current selection.
+ **/
+ this.getSelection = function() {
+ return this.selection;
+ };
+
+ /**
+ * {:BackgroundTokenizer.getState}
+ * @param {Number} row The row to start at
+ *
+ * @related BackgroundTokenizer.getState
+ **/
+ this.getState = function(row) {
+ return this.bgTokenizer.getState(row);
+ };
+
+ /**
+ * Starts tokenizing at the row indicated. Returns a list of objects of the tokenized rows.
+ * @param {Number} row The row to start at
+ *
+ *
+ *
+ **/
+ this.getTokens = function(row) {
+ return this.bgTokenizer.getTokens(row);
+ };
+
+ /**
+ * Returns an object indicating the token at the current row. The object has two properties: `index` and `start`.
+ * @param {Number} row The row number to retrieve from
+ * @param {Number} column The column number to retrieve from
+ *
+ *
+ **/
+ this.getTokenAt = function(row, column) {
+ var tokens = this.bgTokenizer.getTokens(row);
+ var token, c = 0;
+ if (column == null) {
+ i = tokens.length - 1;
+ c = this.getLine(row).length;
+ } else {
+ for (var i = 0; i < tokens.length; i++) {
+ c += tokens[i].value.length;
+ if (c >= column)
+ break;
+ }
+ }
+ token = tokens[i];
+ if (!token)
+ return null;
+ token.index = i;
+ token.start = c - token.value.length;
+ return token;
+ };
+
+ /**
+ * Sets the undo manager.
+ * @param {UndoManager} undoManager The new undo manager
+ *
+ *
+ **/
+ this.setUndoManager = function(undoManager) {
+ this.$undoManager = undoManager;
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+
+ if (this.$informUndoManager)
+ this.$informUndoManager.cancel();
+
+ if (undoManager) {
+ var self = this;
+
+ this.$syncInformUndoManager = function() {
+ self.$informUndoManager.cancel();
+
+ if (self.$deltasFold.length) {
+ self.$deltas.push({
+ group: "fold",
+ deltas: self.$deltasFold
+ });
+ self.$deltasFold = [];
+ }
+
+ if (self.$deltasDoc.length) {
+ self.$deltas.push({
+ group: "doc",
+ deltas: self.$deltasDoc
+ });
+ self.$deltasDoc = [];
+ }
+
+ if (self.$deltas.length > 0) {
+ undoManager.execute({
+ action: "aceupdate",
+ args: [self.$deltas, self],
+ merge: self.mergeUndoDeltas
+ });
+ }
+ self.mergeUndoDeltas = false;
+ self.$deltas = [];
+ }
+ this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
+ }
+ };
+
+ /**
+ * starts a new group in undo history
+ **/
+ this.markUndoGroup = function() {
+ if (this.$syncInformUndoManager)
+ this.$syncInformUndoManager();
+ };
+
+ this.$defaultUndoManager = {
+ undo: function() {},
+ redo: function() {},
+ reset: function() {}
+ };
+
+ /**
+ * Returns the current undo manager.
+ **/
+ this.getUndoManager = function() {
+ return this.$undoManager || this.$defaultUndoManager;
+ };
+
+ /**
+ * Returns the current value for tabs. If the user is using soft tabs, this will be a series of spaces (defined by [[EditSession.getTabSize `getTabSize()`]]); otherwise it's simply `'\t'`.
+ **/
+ this.getTabString = function() {
+ if (this.getUseSoftTabs()) {
+ return lang.stringRepeat(" ", this.getTabSize());
+ } else {
+ return "\t";
+ }
+ };
+
+ /**
+ /**
+ * Pass `true` to enable the use of soft tabs. Soft tabs means you're using spaces instead of the tab character (`'\t'`).
+ * @param {Boolean} useSoftTabs Value indicating whether or not to use soft tabs
+ **/
+ this.setUseSoftTabs = function(val) {
+ this.setOption("useSoftTabs", val);
+ };
+ /**
+ * Returns `true` if soft tabs are being used, `false` otherwise.
+ * @returns {Boolean}
+ **/
+ this.getUseSoftTabs = function() {
+ // todo might need more general way for changing settings from mode, but this is ok for now
+ return this.$useSoftTabs && !this.$mode.$indentWithTabs;
+ };
+ /**
+ * Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event.
+ * @param {Number} tabSize The new tab size
+ **/
+ this.setTabSize = function(tabSize) {
+ this.setOption("tabSize", tabSize)
+ };
+ /**
+ * Returns the current tab size.
+ **/
+ this.getTabSize = function() {
+ return this.$tabSize;
+ };
+
+ /**
+ * Returns `true` if the character at the position is a soft tab.
+ * @param {Object} position The position to check
+ *
+ *
+ **/
+ this.isTabStop = function(position) {
+ return this.$useSoftTabs && (position.column % this.$tabSize == 0);
+ };
+
+ this.$overwrite = false;
+ /**
+ * Pass in `true` to enable overwrites in your session, or `false` to disable.
+ *
+ * If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event.
+ *
+ * @param {Boolean} overwrite Defines wheter or not to set overwrites
+ *
+ *
+ **/
+ this.setOverwrite = function(overwrite) {
+ this.setOption("overwrite", overwrite)
+ };
+
+ /**
+ * Returns `true` if overwrites are enabled; `false` otherwise.
+ **/
+ this.getOverwrite = function() {
+ return this.$overwrite;
+ };
+
+ /**
+ * Sets the value of overwrite to the opposite of whatever it currently is.
+ **/
+ this.toggleOverwrite = function() {
+ this.setOverwrite(!this.$overwrite);
+ };
+
+ /**
+ * Adds `className` to the `row`, to be used for CSS stylings and whatnot.
+ * @param {Number} row The row number
+ * @param {String} className The class to add
+ *
+ *
+ **/
+ this.addGutterDecoration = function(row, className) {
+ if (!this.$decorations[row])
+ this.$decorations[row] = "";
+ this.$decorations[row] += " " + className;
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Removes `className` from the `row`.
+ * @param {Number} row The row number
+ * @param {String} className The class to add
+ *
+ *
+ **/
+ this.removeGutterDecoration = function(row, className) {
+ this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Returns an array of numbers, indicating which rows have breakpoints.
+ * @returns {[Number]}
+ **/
+ this.getBreakpoints = function() {
+ return this.$breakpoints;
+ };
+
+ /**
+ * Sets a breakpoint on every row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
+ * @param {Array} rows An array of row indices
+ *
+ *
+ *
+ **/
+ this.setBreakpoints = function(rows) {
+ this.$breakpoints = [];
+ for (var i=0; i<rows.length; i++) {
+ this.$breakpoints[rows[i]] = "ace_breakpoint";
+ }
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Removes all breakpoints on the rows. This function also emites the `'changeBreakpoint'` event.
+ **/
+ this.clearBreakpoints = function() {
+ this.$breakpoints = [];
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Sets a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
+ * @param {Number} row A row index
+ * @param {String} className Class of the breakpoint
+ *
+ *
+ **/
+ this.setBreakpoint = function(row, className) {
+ if (className === undefined)
+ className = "ace_breakpoint";
+ if (className)
+ this.$breakpoints[row] = className;
+ else
+ delete this.$breakpoints[row];
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Removes a breakpoint on the row number given by `rows`. This function also emites the `'changeBreakpoint'` event.
+ * @param {Number} row A row index
+ *
+ *
+ **/
+ this.clearBreakpoint = function(row) {
+ delete this.$breakpoints[row];
+ this._emit("changeBreakpoint", {});
+ };
+
+ /**
+ * Adds a new marker to the given `Range`. If `inFront` is `true`, a front marker is defined, and the `'changeFrontMarker'` event fires; otherwise, the `'changeBackMarker'` event fires.
+ * @param {Range} range Define the range of the marker
+ * @param {String} clazz Set the CSS class for the marker
+ * @param {Function | String} type Identify the type of the marker
+ * @param {Boolean} inFront Set to `true` to establish a front marker
+ *
+ *
+ * @return {Number} The new marker id
+ **/
+ this.addMarker = function(range, clazz, type, inFront) {
+ var id = this.$markerId++;
+
+ var marker = {
+ range : range,
+ type : type || "line",
+ renderer: typeof type == "function" ? type : null,
+ clazz : clazz,
+ inFront: !!inFront,
+ id: id
+ }
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._emit("changeFrontMarker")
+ } else {
+ this.$backMarkers[id] = marker;
+ this._emit("changeBackMarker")
+ }
+
+ return id;
+ };
+
+ /**
+ * Adds a dynamic marker to the session.
+ * @param {Object} marker object with update method
+ * @param {Boolean} inFront Set to `true` to establish a front marker
+ *
+ *
+ * @return {Object} The added marker
+ **/
+ this.addDynamicMarker = function(marker, inFront) {
+ if (!marker.update)
+ return;
+ var id = this.$markerId++;
+ marker.id = id;
+ marker.inFront = !!inFront;
+
+ if (inFront) {
+ this.$frontMarkers[id] = marker;
+ this._emit("changeFrontMarker")
+ } else {
+ this.$backMarkers[id] = marker;
+ this._emit("changeBackMarker")
+ }
+
+ return marker;
+ };
+
+ /**
+ * Removes the marker with the specified ID. If this marker was in front, the `'changeFrontMarker'` event is emitted. If the marker was in the back, the `'changeBackMarker'` event is emitted.
+ * @param {Number} markerId A number representing a marker
+ *
+ *
+ *
+ **/
+ this.removeMarker = function(markerId) {
+ var marker = this.$frontMarkers[markerId] || this.$backMarkers[markerId];
+ if (!marker)
+ return;
+
+ var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers;
+ if (marker) {
+ delete (markers[markerId]);
+ this._emit(marker.inFront ? "changeFrontMarker" : "changeBackMarker");
+ }
+ };
+
+ /**
+ * Returns an array containing the IDs of all the markers, either front or back.
+ * @param {Boolean} inFront If `true`, indicates you only want front markers; `false` indicates only back markers
+ *
+ * @returns {Array}
+ **/
+ this.getMarkers = function(inFront) {
+ return inFront ? this.$frontMarkers : this.$backMarkers;
+ };
+
+ this.highlight = function(re) {
+ if (!this.$searchHighlight) {
+ var highlight = new SearchHighlight(null, "ace_selected-word", "text");
+ this.$searchHighlight = this.addDynamicMarker(highlight);
+ }
+ this.$searchHighlight.setRegexp(re);
+ }
+
+ // experimental
+ this.highlightLines = function(startRow, endRow, clazz, inFront) {
+ if (typeof endRow != "number") {
+ clazz = endRow;
+ endRow = startRow;
+ }
+ if (!clazz)
+ clazz = "ace_step";
+
+ var range = new Range(startRow, 0, endRow, Infinity);
+ range.id = this.addMarker(range, clazz, "fullLine", inFront);
+ return range;
+ };
+
+ /*
+ * Error:
+ * {
+ * row: 12,
+ * column: 2, //can be undefined
+ * text: "Missing argument",
+ * type: "error" // or "warning" or "info"
+ * }
+ */
+ /**
+ * Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
+ * @param {Array} annotations A list of annotations
+ *
+ **/
+ this.setAnnotations = function(annotations) {
+ this.$annotations = annotations;
+ this._emit("changeAnnotation", {});
+ };
+
+ /**
+ * Returns the annotations for the `EditSession`.
+ * @returns {Array}
+ **/
+ this.getAnnotations = function() {
+ return this.$annotations || [];
+ };
+
+ /**
+ * Clears all the annotations for this session. This function also triggers the `'changeAnnotation'` event.
+ **/
+ this.clearAnnotations = function() {
+ this.setAnnotations([]);
+ };
+
+ /**
+ * If `text` contains either the newline (`\n`) or carriage-return ('\r') characters, `$autoNewLine` stores that value.
+ * @param {String} text A block of text
+ *
+ *
+ **/
+ this.$detectNewLine = function(text) {
+ var match = text.match(/^.*?(\r?\n)/m);
+ if (match) {
+ this.$autoNewLine = match[1];
+ } else {
+ this.$autoNewLine = "\n";
+ }
+ };
+
+ /**
+ * Given a starting row and column, this method returns the `Range` of the first word boundary it finds.
+ * @param {Number} row The row to start at
+ * @param {Number} column The column to start at
+ *
+ * @returns {Range}
+ **/
+ this.getWordRange = function(row, column) {
+ var line = this.getLine(row);
+
+ var inToken = false;
+ if (column > 0)
+ inToken = !!line.charAt(column - 1).match(this.tokenRe);
+
+ if (!inToken)
+ inToken = !!line.charAt(column).match(this.tokenRe);
+
+ if (inToken)
+ var re = this.tokenRe;
+ else if (/^\s+$/.test(line.slice(column-1, column+1)))
+ var re = /\s/;
+ else
+ var re = this.nonTokenRe;
+
+ var start = column;
+ if (start > 0) {
+ do {
+ start--;
+ }
+ while (start >= 0 && line.charAt(start).match(re));
+ start++;
+ }
+
+ var end = column;
+ while (end < line.length && line.charAt(end).match(re)) {
+ end++;
+ }
+
+ return new Range(row, start, row, end);
+ };
+
+ /**
+ * Gets the range of a word, including its right whitespace.
+ * @param {Number} row The row number to start from
+ * @param {Number} column The column number to start from
+ *
+ * @return {Range}
+ **/
+ this.getAWordRange = function(row, column) {
+ var wordRange = this.getWordRange(row, column);
+ var line = this.getLine(wordRange.end.row);
+
+ while (line.charAt(wordRange.end.column).match(/[ \t]/)) {
+ wordRange.end.column += 1;
+ }
+ return wordRange;
+ };
+
+ /**
+ * {:Document.setNewLineMode.desc}
+ * @param {String} newLineMode {:Document.setNewLineMode.param}
+ *
+ *
+ * @related Document.setNewLineMode
+ **/
+ this.setNewLineMode = function(newLineMode) {
+ this.doc.setNewLineMode(newLineMode);
+ };
+
+ /**
+ *
+ * Returns the current new line mode.
+ * @returns {String}
+ * @related Document.getNewLineMode
+ **/
+ this.getNewLineMode = function() {
+ return this.doc.getNewLineMode();
+ };
+
+ /**
+ * Identifies if you want to use a worker for the `EditSession`.
+ * @param {Boolean} useWorker Set to `true` to use a worker
+ *
+ **/
+ this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); };
+
+ /**
+ * Returns `true` if workers are being used.
+ **/
+ this.getUseWorker = function() { return this.$useWorker; };
+
+ /**
+ * Reloads all the tokens on the current session. This function calls [[BackgroundTokenizer.start `BackgroundTokenizer.start ()`]] to all the rows; it also emits the `'tokenizerUpdate'` event.
+ **/
+ this.onReloadTokenizer = function(e) {
+ var rows = e.data;
+ this.bgTokenizer.start(rows.first);
+ this._emit("tokenizerUpdate", e);
+ };
+
+ this.$modes = {};
+
+ /**
+ * Sets a new text mode for the `EditSession`. This method also emits the `'changeMode'` event. If a [[BackgroundTokenizer `BackgroundTokenizer`]] is set, the `'tokenizerUpdate'` event is also emitted.
+ * @param {TextMode} mode Set a new text mode
+ * @param {cb} optional callback
+ *
+ **/
+ this.$mode = null;
+ this.$modeId = null;
+ this.setMode = function(mode, cb) {
+ if (mode && typeof mode === "object") {
+ if (mode.getTokenizer)
+ return this.$onChangeMode(mode);
+ var options = mode;
+ var path = options.path;
+ } else {
+ path = mode || "ace/mode/text";
+ }
+
+ // this is needed if ace isn't on require path (e.g tests in node)
+ if (!this.$modes["ace/mode/text"])
+ this.$modes["ace/mode/text"] = new TextMode();
+
+ if (this.$modes[path] && !options) {
+ this.$onChangeMode(this.$modes[path]);
+ cb && cb();
+ return;
+ }
+ // load on demand
+ this.$modeId = path;
+ config.loadModule(["mode", path], function(m) {
+ if (this.$modeId !== path)
+ return cb && cb();
+ if (this.$modes[path] && !options)
+ return this.$onChangeMode(this.$modes[path]);
+ if (m && m.Mode) {
+ m = new m.Mode(options);
+ if (!options) {
+ this.$modes[path] = m;
+ m.$id = path;
+ }
+ this.$onChangeMode(m);
+ cb && cb();
+ }
+ }.bind(this));
+
+ // set mode to text until loading is finished
+ if (!this.$mode)
+ this.$onChangeMode(this.$modes["ace/mode/text"], true);
+ };
+
+ this.$onChangeMode = function(mode, $isPlaceholder) {
+ if (!$isPlaceholder)
+ this.$modeId = mode.$id;
+ if (this.$mode === mode)
+ return;
+
+ this.$mode = mode;
+
+ this.$stopWorker();
+
+ if (this.$useWorker)
+ this.$startWorker();
+
+ var tokenizer = mode.getTokenizer();
+
+ if(tokenizer.addEventListener !== undefined) {
+ var onReloadTokenizer = this.onReloadTokenizer.bind(this);
+ tokenizer.addEventListener("update", onReloadTokenizer);
+ }
+
+ if (!this.bgTokenizer) {
+ this.bgTokenizer = new BackgroundTokenizer(tokenizer);
+ var _self = this;
+ this.bgTokenizer.addEventListener("update", function(e) {
+ _self._emit("tokenizerUpdate", e);
+ });
+ } else {
+ this.bgTokenizer.setTokenizer(tokenizer);
+ }
+
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.tokenRe = mode.tokenRe;
+ this.nonTokenRe = mode.nonTokenRe;
+
+ this.$options.wrapMethod.set.call(this, this.$wrapMethod);
+
+ if (!$isPlaceholder) {
+ this.$setFolding(mode.foldingRules);
+ this._emit("changeMode");
+ this.bgTokenizer.start(0);
+ }
+ };
+
+
+ this.$stopWorker = function() {
+ if (this.$worker)
+ this.$worker.terminate();
+
+ this.$worker = null;
+ };
+
+ this.$startWorker = function() {
+ if (typeof Worker !== "undefined" && !require.noWorker) {
+ try {
+ this.$worker = this.$mode.createWorker(this);
+ } catch (e) {
+ console.log("Could not load worker");
+ console.log(e);
+ this.$worker = null;
+ }
+ }
+ else
+ this.$worker = null;
+ };
+
+ /**
+ * Returns the current text mode.
+ * @returns {TextMode} The current text mode
+ **/
+ this.getMode = function() {
+ return this.$mode;
+ };
+
+ this.$scrollTop = 0;
+ /**
+ * This function sets the scroll top value. It also emits the `'changeScrollTop'` event.
+ * @param {Number} scrollTop The new scroll top value
+ *
+ **/
+ this.setScrollTop = function(scrollTop) {
+ // TODO: should we force integer lineheight instead? scrollTop = Math.round(scrollTop);
+ if (this.$scrollTop === scrollTop || isNaN(scrollTop))
+ return;
+
+ this.$scrollTop = scrollTop;
+ this._signal("changeScrollTop", scrollTop);
+ };
+
+ /**
+ * [Returns the value of the distance between the top of the editor and the topmost part of the visible content.]{: #EditSession.getScrollTop}
+ * @returns {Number}
+ **/
+ this.getScrollTop = function() {
+ return this.$scrollTop;
+ };
+
+ this.$scrollLeft = 0;
+ /**
+ * [Sets the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.setScrollLeft}
+ **/
+ this.setScrollLeft = function(scrollLeft) {
+ // scrollLeft = Math.round(scrollLeft);
+ if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))
+ return;
+
+ this.$scrollLeft = scrollLeft;
+ this._signal("changeScrollLeft", scrollLeft);
+ };
+
+ /**
+ * [Returns the value of the distance between the left of the editor and the leftmost part of the visible content.]{: #EditSession.getScrollLeft}
+ * @returns {Number}
+ **/
+ this.getScrollLeft = function() {
+ return this.$scrollLeft;
+ };
+
+ /**
+ * Returns the width of the screen.
+ * @returns {Number}
+ **/
+ this.getScreenWidth = function() {
+ this.$computeWidth();
+ return this.screenWidth;
+ };
+
+ this.$computeWidth = function(force) {
+ if (this.$modified || force) {
+ this.$modified = false;
+
+ if (this.$useWrapMode)
+ return this.screenWidth = this.$wrapLimit;
+
+ var lines = this.doc.getAllLines();
+ var cache = this.$rowLengthCache;
+ var longestScreenLine = 0;
+ var foldIndex = 0;
+ var foldLine = this.$foldData[foldIndex];
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+ var len = lines.length;
+
+ for (var i = 0; i < len; i++) {
+ if (i > foldStart) {
+ i = foldLine.end.row + 1;
+ if (i >= len)
+ break;
+ foldLine = this.$foldData[foldIndex++];
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+
+ if (cache[i] == null)
+ cache[i] = this.$getStringScreenWidth(lines[i])[0];
+
+ if (cache[i] > longestScreenLine)
+ longestScreenLine = cache[i];
+ }
+ this.screenWidth = longestScreenLine;
+ }
+ };
+
+ /**
+ * Returns a verbatim copy of the given line as it is in the document
+ * @param {Number} row The row to retrieve from
+ *
+ *
+ * @returns {String}
+ *
+ **/
+ this.getLine = function(row) {
+ return this.doc.getLine(row);
+ };
+
+ /**
+ * Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`.
+ * @param {Number} firstRow The first row index to retrieve
+ * @param {Number} lastRow The final row index to retrieve
+ *
+ * @returns {[String]}
+ *
+ **/
+ this.getLines = function(firstRow, lastRow) {
+ return this.doc.getLines(firstRow, lastRow);
+ };
+
+ /**
+ * Returns the number of rows in the document.
+ * @returns {Number}
+ **/
+ this.getLength = function() {
+ return this.doc.getLength();
+ };
+
+ /**
+ * {:Document.getTextRange.desc}
+ * @param {Range} range The range to work with
+ *
+ * @returns {String}
+ **/
+ this.getTextRange = function(range) {
+ return this.doc.getTextRange(range || this.selection.getRange());
+ };
+
+ /**
+ * Inserts a block of `text` and the indicated `position`.
+ * @param {Object} position The position {row, column} to start inserting at
+ * @param {String} text A chunk of text to insert
+ * @returns {Object} The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`.
+ *
+ *
+ **/
+ this.insert = function(position, text) {
+ return this.doc.insert(position, text);
+ };
+
+ /**
+ * Removes the `range` from the document.
+ * @param {Range} range A specified Range to remove
+ * @returns {Object} The new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.
+ *
+ * @related Document.remove
+ *
+ **/
+ this.remove = function(range) {
+ return this.doc.remove(range);
+ };
+
+ /**
+ * Reverts previous changes to your document.
+ * @param {Array} deltas An array of previous changes
+ * @param {Boolean} dontSelect [If `true`, doesn't select the range of where the change occured]{: #dontSelect}
+ *
+ *
+ * @returns {Range}
+ **/
+ this.undoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = deltas.length - 1; i != -1; i--) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.revertDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, true, lastUndoRange);
+ } else {
+ delta.deltas.forEach(function(foldDelta) {
+ this.addFolds(foldDelta.folds);
+ }, this);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+
+ /**
+ * Re-implements a previously undone change to your document.
+ * @param {Array} deltas An array of previous changes
+ * @param {Boolean} dontSelect {:dontSelect}
+ *
+ *
+ * @returns {Range}
+ **/
+ this.redoChanges = function(deltas, dontSelect) {
+ if (!deltas.length)
+ return;
+
+ this.$fromUndo = true;
+ var lastUndoRange = null;
+ for (var i = 0; i < deltas.length; i++) {
+ var delta = deltas[i];
+ if (delta.group == "doc") {
+ this.doc.applyDeltas(delta.deltas);
+ lastUndoRange =
+ this.$getUndoSelection(delta.deltas, false, lastUndoRange);
+ }
+ }
+ this.$fromUndo = false;
+ lastUndoRange &&
+ this.$undoSelect &&
+ !dontSelect &&
+ this.selection.setSelectionRange(lastUndoRange);
+ return lastUndoRange;
+ };
+
+ /**
+ * Enables or disables highlighting of the range where an undo occured.
+ * @param {Boolean} enable If `true`, selects the range of the reinserted change
+ *
+ **/
+ this.setUndoSelect = function(enable) {
+ this.$undoSelect = enable;
+ };
+
+ this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {
+ function isInsert(delta) {
+ var insert =
+ delta.action === "insertText" || delta.action === "insertLines";
+ return isUndo ? !insert : insert;
+ }
+
+ var delta = deltas[0];
+ var range, point;
+ var lastDeltaIsInsert = false;
+ if (isInsert(delta)) {
+ range = Range.fromPoints(delta.range.start, delta.range.end);
+ lastDeltaIsInsert = true;
+ } else {
+ range = Range.fromPoints(delta.range.start, delta.range.start);
+ lastDeltaIsInsert = false;
+ }
+
+ for (var i = 1; i < deltas.length; i++) {
+ delta = deltas[i];
+ if (isInsert(delta)) {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range.setStart(delta.range.start);
+ }
+ point = delta.range.end;
+ if (range.compare(point.row, point.column) == 1) {
+ range.setEnd(delta.range.end);
+ }
+ lastDeltaIsInsert = true;
+ } else {
+ point = delta.range.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range =
+ Range.fromPoints(delta.range.start, delta.range.start);
+ }
+ lastDeltaIsInsert = false;
+ }
+ }
+
+ // Check if this range and the last undo range has something in common.
+ // If true, merge the ranges.
+ if (lastUndoRange != null) {
+ if (Range.comparePoints(lastUndoRange.start, range.start) == 0) {
+ lastUndoRange.start.column += range.end.column - range.start.column;
+ lastUndoRange.end.column += range.end.column - range.start.column;
+ }
+
+ var cmp = lastUndoRange.compareRange(range);
+ if (cmp == 1) {
+ range.setStart(lastUndoRange.start);
+ } else if (cmp == -1) {
+ range.setEnd(lastUndoRange.end);
+ }
+ }
+
+ return range;
+ };
+
+ /**
+ * Replaces a range in the document with the new `text`.
+ *
+ * @param {Range} range A specified Range to replace
+ * @param {String} text The new text to use as a replacement
+ * @returns {Object} An object containing the final row and column, like this:
+ * ```
+ * {row: endRow, column: 0}
+ * ```
+ * If the text and range are empty, this function returns an object containing the current `range.start` value.
+ * If the text is the exact same as what currently exists, this function returns an object containing the current `range.end` value.
+ *
+ *
+ *
+ * @related Document.replace
+ *
+ *
+ **/
+ this.replace = function(range, text) {
+ return this.doc.replace(range, text);
+ };
+
+ /**
+ * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this:
+ * ```json
+ * { row: newRowLocation, column: newColumnLocation }
+ * ```
+ * @param {Range} fromRange The range of text you want moved within the document
+ * @param {Object} toPosition The location (row and column) where you want to move the text to
+ * @returns {Range} The new range where the text was moved to.
+ *
+ *
+ *
+ **/
+ this.moveText = function(fromRange, toPosition, copy) {
+ var text = this.getTextRange(fromRange);
+ var folds = this.getFoldsInRange(fromRange);
+
+ var toRange = Range.fromPoints(toPosition, toPosition);
+ if (!copy) {
+ this.remove(fromRange);
+ var rowDiff = fromRange.start.row - fromRange.end.row;
+ var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;
+ if (collDiff) {
+ if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)
+ toRange.start.column += collDiff;
+ if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)
+ toRange.end.column += collDiff;
+ }
+ if (rowDiff && toRange.start.row >= fromRange.end.row) {
+ toRange.start.row += rowDiff;
+ toRange.end.row += rowDiff;
+ }
+ }
+
+ toRange.end = this.insert(toRange.start, text);
+ if (folds.length) {
+ var oldStart = fromRange.start;
+ var newStart = toRange.start;
+ var rowDiff = newStart.row - oldStart.row;
+ var collDiff = newStart.column - oldStart.column;
+ this.addFolds(folds.map(function(x) {
+ x = x.clone();
+ if (x.start.row == oldStart.row)
+ x.start.column += collDiff;
+ if (x.end.row == oldStart.row)
+ x.end.column += collDiff;
+ x.start.row += rowDiff;
+ x.end.row += rowDiff;
+ return x;
+ }));
+ }
+
+ return toRange;
+ };
+
+ /**
+ * Indents all the rows, from `startRow` to `endRow` (inclusive), by prefixing each row with the token in `indentString`.
+ *
+ * If `indentString` contains the `'\t'` character, it's replaced by whatever is defined by [[EditSession.getTabString `getTabString()`]].
+ * @param {Number} startRow Starting row
+ * @param {Number} endRow Ending row
+ * @param {String} indentString The indent token
+ *
+ *
+ **/
+ this.indentRows = function(startRow, endRow, indentString) {
+ indentString = indentString.replace(/\t/g, this.getTabString());
+ for (var row=startRow; row<=endRow; row++)
+ this.insert({row: row, column:0}, indentString);
+ };
+
+ /**
+ * Outdents all the rows defined by the `start` and `end` properties of `range`.
+ * @param {Range} range A range of rows
+ *
+ *
+ **/
+ this.outdentRows = function (range) {
+ var rowRange = range.collapseRows();
+ var deleteRange = new Range(0, 0, 0, 0);
+ var size = this.getTabSize();
+
+ for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {
+ var line = this.getLine(i);
+
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ for (var j = 0; j < size; ++j)
+ if (line.charAt(j) != ' ')
+ break;
+ if (j < size && line.charAt(j) == '\t') {
+ deleteRange.start.column = j;
+ deleteRange.end.column = j + 1;
+ } else {
+ deleteRange.start.column = 0;
+ deleteRange.end.column = j;
+ }
+ this.remove(deleteRange);
+ }
+ };
+
+ this.$moveLines = function(firstRow, lastRow, dir) {
+ firstRow = this.getRowFoldStart(firstRow);
+ lastRow = this.getRowFoldEnd(lastRow);
+ if (dir < 0) {
+ var row = this.getRowFoldStart(firstRow + dir);
+ if (row < 0) return 0;
+ var diff = row-firstRow;
+ } else if (dir > 0) {
+ var row = this.getRowFoldEnd(lastRow + dir);
+ if (row > this.doc.getLength()-1) return 0;
+ var diff = row-lastRow;
+ } else {
+ firstRow = this.$clipRowToDocument(firstRow);
+ lastRow = this.$clipRowToDocument(lastRow);
+ var diff = lastRow - firstRow + 1;
+ }
+
+ var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);
+ var folds = this.getFoldsInRange(range).map(function(x){
+ x = x.clone();
+ x.start.row += diff;
+ x.end.row += diff;
+ return x;
+ });
+
+ var lines = dir == 0
+ ? this.doc.getLines(firstRow, lastRow)
+ : this.doc.removeLines(firstRow, lastRow);
+ this.doc.insertLines(firstRow+diff, lines);
+ folds.length && this.addFolds(folds);
+ return diff;
+ };
+ /**
+ * Shifts all the lines in the document up one, starting from `firstRow` and ending at `lastRow`.
+ * @param {Number} firstRow The starting row to move up
+ * @param {Number} lastRow The final row to move up
+ * @returns {Number} If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
+ *
+ * @related Document.insertLines
+ *
+ **/
+ this.moveLinesUp = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, -1);
+ };
+
+ /**
+ * Shifts all the lines in the document down one, starting from `firstRow` and ending at `lastRow`.
+ * @param {Number} firstRow The starting row to move down
+ * @param {Number} lastRow The final row to move down
+ * @returns {Number} If `firstRow` is less-than or equal to 0, this function returns 0. Otherwise, on success, it returns -1.
+ *
+ * @related Document.insertLines
+ **/
+ this.moveLinesDown = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 1);
+ };
+
+ /**
+ * Duplicates all the text between `firstRow` and `lastRow`.
+ * @param {Number} firstRow The starting row to duplicate
+ * @param {Number} lastRow The final row to duplicate
+ * @returns {Number} Returns the number of new rows added; in other words, `lastRow - firstRow + 1`.
+ *
+ *
+ **/
+ this.duplicateLines = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 0);
+ };
+
+
+ this.$clipRowToDocument = function(row) {
+ return Math.max(0, Math.min(row, this.doc.getLength()-1));
+ };
+
+ this.$clipColumnToRow = function(row, column) {
+ if (column < 0)
+ return 0;
+ return Math.min(this.doc.getLine(row).length, column);
+ };
+
+
+ this.$clipPositionToDocument = function(row, column) {
+ column = Math.max(0, column);
+
+ if (row < 0) {
+ row = 0;
+ column = 0;
+ } else {
+ var len = this.doc.getLength();
+ if (row >= len) {
+ row = len - 1;
+ column = this.doc.getLine(len-1).length;
+ } else {
+ column = Math.min(this.doc.getLine(row).length, column);
+ }
+ }
+
+ return {
+ row: row,
+ column: column
+ };
+ };
+
+ this.$clipRangeToDocument = function(range) {
+ if (range.start.row < 0) {
+ range.start.row = 0;
+ range.start.column = 0;
+ } else {
+ range.start.column = this.$clipColumnToRow(
+ range.start.row,
+ range.start.column
+ );
+ }
+
+ var len = this.doc.getLength() - 1;
+ if (range.end.row > len) {
+ range.end.row = len;
+ range.end.column = this.doc.getLine(len).length;
+ } else {
+ range.end.column = this.$clipColumnToRow(
+ range.end.row,
+ range.end.column
+ );
+ }
+ return range;
+ };
+
+ // WRAPMODE
+ this.$wrapLimit = 80;
+ this.$useWrapMode = false;
+ this.$wrapLimitRange = {
+ min : null,
+ max : null
+ };
+
+ /**
+ * Sets whether or not line wrapping is enabled. If `useWrapMode` is different than the current value, the `'changeWrapMode'` event is emitted.
+ * @param {Boolean} useWrapMode Enable (or disable) wrap mode
+ *
+ *
+ **/
+ this.setUseWrapMode = function(useWrapMode) {
+ if (useWrapMode != this.$useWrapMode) {
+ this.$useWrapMode = useWrapMode;
+ this.$modified = true;
+ this.$resetRowCache(0);
+
+ // If wrapMode is activaed, the wrapData array has to be initialized.
+ if (useWrapMode) {
+ var len = this.getLength();
+ this.$wrapData = [];
+ for (var i = 0; i < len; i++) {
+ this.$wrapData.push([]);
+ }
+ this.$updateWrapData(0, len - 1);
+ }
+
+ this._emit("changeWrapMode");
+ }
+ };
+
+ /**
+ * Returns `true` if wrap mode is being used; `false` otherwise.
+ * @returns {Boolean}
+ **/
+ this.getUseWrapMode = function() {
+ return this.$useWrapMode;
+ };
+
+ // Allow the wrap limit to move freely between min and max. Either
+ // parameter can be null to allow the wrap limit to be unconstrained
+ // in that direction. Or set both parameters to the same number to pin
+ // the limit to that value.
+ /**
+ * Sets the boundaries of wrap. Either value can be `null` to have an unconstrained wrap, or, they can be the same number to pin the limit. If the wrap limits for `min` or `max` are different, this method also emits the `'changeWrapMode'` event.
+ * @param {Number} min The minimum wrap value (the left side wrap)
+ * @param {Number} max The maximum wrap value (the right side wrap)
+ *
+ *
+ **/
+ this.setWrapLimitRange = function(min, max) {
+ if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {
+ this.$wrapLimitRange = {
+ min: min,
+ max: max
+ };
+ this.$modified = true;
+ // This will force a recalculation of the wrap limit
+ this._emit("changeWrapMode");
+ }
+ };
+
+ /**
+ * This should generally only be called by the renderer when a resize is detected.
+ * @param {Number} desiredLimit The new wrap limit
+ * @returns {Boolean}
+ *
+ * @private
+ **/
+ this.adjustWrapLimit = function(desiredLimit, $printMargin) {
+ var limits = this.$wrapLimitRange
+ if (limits.max < 0)
+ limits = {min: $printMargin, max: $printMargin};
+ var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);
+ if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {
+ this.$wrapLimit = wrapLimit;
+ this.$modified = true;
+ if (this.$useWrapMode) {
+ this.$updateWrapData(0, this.getLength() - 1);
+ this.$resetRowCache(0);
+ this._emit("changeWrapLimit");
+ }
+ return true;
+ }
+ return false;
+ };
+
+ this.$constrainWrapLimit = function(wrapLimit, min, max) {
+ if (min)
+ wrapLimit = Math.max(min, wrapLimit);
+
+ if (max)
+ wrapLimit = Math.min(max, wrapLimit);
+
+ return wrapLimit;
+ };
+
+ /**
+ * Returns the value of wrap limit.
+ * @returns {Number} The wrap limit.
+ **/
+ this.getWrapLimit = function() {
+ return this.$wrapLimit;
+ };
+
+ /**
+ * Sets the line length for soft wrap in the editor. Lines will break
+ * at a minimum of the given length minus 20 chars and at a maximum
+ * of the given number of chars.
+ * @param {number} limit The maximum line length in chars, for soft wrapping lines.
+ */
+ this.setWrapLimit = function (limit) {
+ this.setWrapLimitRange(limit, limit);
+ };
+
+ /**
+ * Returns an object that defines the minimum and maximum of the wrap limit; it looks something like this:
+ *
+ * { min: wrapLimitRange_min, max: wrapLimitRange_max }
+ *
+ * @returns {Object}
+ **/
+ this.getWrapLimitRange = function() {
+ // Avoid unexpected mutation by returning a copy
+ return {
+ min : this.$wrapLimitRange.min,
+ max : this.$wrapLimitRange.max
+ };
+ };
+
+ this.$updateInternalDataOnChange = function(e) {
+ var useWrapMode = this.$useWrapMode;
+ var len;
+ var action = e.data.action;
+ var firstRow = e.data.range.start.row;
+ var lastRow = e.data.range.end.row;
+ var start = e.data.range.start;
+ var end = e.data.range.end;
+ var removedFolds = null;
+
+ if (action.indexOf("Lines") != -1) {
+ if (action == "insertLines") {
+ lastRow = firstRow + (e.data.lines.length);
+ } else {
+ lastRow = firstRow;
+ }
+ len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
+ } else {
+ len = lastRow - firstRow;
+ }
+
+ this.$updating = true;
+ if (len != 0) {
+ if (action.indexOf("remove") != -1) {
+ this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
+
+ var foldLines = this.$foldData;
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ var foldLine = this.getFoldLine(end.row);
+ var idx = 0;
+ if (foldLine) {
+ foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
+ foldLine.shiftRow(-len);
+
+ var foldLineBefore = this.getFoldLine(firstRow);
+ if (foldLineBefore && foldLineBefore !== foldLine) {
+ foldLineBefore.merge(foldLine);
+ foldLine = foldLineBefore;
+ }
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= end.row) {
+ foldLine.shiftRow(-len);
+ }
+ }
+
+ lastRow = firstRow;
+ } else {
+ var args;
+ if (useWrapMode) {
+ args = [firstRow, 0];
+ for (var i = 0; i < len; i++) args.push([]);
+ this.$wrapData.splice.apply(this.$wrapData, args);
+ } else {
+ args = Array(len);
+ args.unshift(firstRow, 0);
+ this.$rowLengthCache.splice.apply(this.$rowLengthCache, args);
+ }
+
+ // If some new line is added inside of a foldLine, then split
+ // the fold line up.
+ var foldLines = this.$foldData;
+ var foldLine = this.getFoldLine(firstRow);
+ var idx = 0;
+ if (foldLine) {
+ var cmp = foldLine.range.compareInside(start.row, start.column)
+ // Inside of the foldLine range. Need to split stuff up.
+ if (cmp == 0) {
+ foldLine = foldLine.split(start.row, start.column);
+ foldLine.shiftRow(len);
+ foldLine.addRemoveChars(
+ lastRow, 0, end.column - start.column);
+ } else
+ // Infront of the foldLine but same row. Need to shift column.
+ if (cmp == -1) {
+ foldLine.addRemoveChars(firstRow, 0, end.column - start.column);
+ foldLine.shiftRow(len);
+ }
+ // Nothing to do if the insert is after the foldLine.
+ idx = foldLines.indexOf(foldLine) + 1;
+ }
+
+ for (idx; idx < foldLines.length; idx++) {
+ var foldLine = foldLines[idx];
+ if (foldLine.start.row >= firstRow) {
+ foldLine.shiftRow(len);
+ }
+ }
+ }
+ } else {
+ // Realign folds. E.g. if you add some new chars before a fold, the
+ // fold should "move" to the right.
+ len = Math.abs(e.data.range.start.column - e.data.range.end.column);
+ if (action.indexOf("remove") != -1) {
+ // Get all the folds in the change range and remove them.
+ removedFolds = this.getFoldsInRange(e.data.range);
+ this.removeFolds(removedFolds);
+
+ len = -len;
+ }
+ var foldLine = this.getFoldLine(firstRow);
+ if (foldLine) {
+ foldLine.addRemoveChars(firstRow, start.column, len);
+ }
+ }
+
+ if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
+ console.error("doc.getLength() and $wrapData.length have to be the same!");
+ }
+ this.$updating = false;
+
+ if (useWrapMode)
+ this.$updateWrapData(firstRow, lastRow);
+ else
+ this.$updateRowLengthCache(firstRow, lastRow);
+
+ return removedFolds;
+ };
+
+ this.$updateRowLengthCache = function(firstRow, lastRow, b) {
+ this.$rowLengthCache[firstRow] = null;
+ this.$rowLengthCache[lastRow] = null;
+ };
+
+ this.$updateWrapData = function(firstRow, lastRow) {
+ var lines = this.doc.getAllLines();
+ var tabSize = this.getTabSize();
+ var wrapData = this.$wrapData;
+ var wrapLimit = this.$wrapLimit;
+ var tokens;
+ var foldLine;
+
+ var row = firstRow;
+ lastRow = Math.min(lastRow, lines.length - 1);
+ while (row <= lastRow) {
+ foldLine = this.getFoldLine(row, foldLine);
+ if (!foldLine) {
+ tokens = this.$getDisplayTokens(lines[row]);
+ wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row ++;
+ } else {
+ tokens = [];
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ var walkTokens;
+ if (placeholder != null) {
+ walkTokens = this.$getDisplayTokens(
+ placeholder, tokens.length);
+ walkTokens[0] = PLACEHOLDER_START;
+ for (var i = 1; i < walkTokens.length; i++) {
+ walkTokens[i] = PLACEHOLDER_BODY;
+ }
+ } else {
+ walkTokens = this.$getDisplayTokens(
+ lines[row].substring(lastColumn, column),
+ tokens.length);
+ }
+ tokens = tokens.concat(walkTokens);
+ }.bind(this),
+ foldLine.end.row,
+ lines[foldLine.end.row].length + 1
+ );
+
+ wrapData[foldLine.start.row]
+ = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ row = foldLine.end.row + 1;
+ }
+ }
+ };
+
+ // "Tokens"
+ var CHAR = 1,
+ CHAR_EXT = 2,
+ PLACEHOLDER_START = 3,
+ PLACEHOLDER_BODY = 4,
+ PUNCTUATION = 9,
+ SPACE = 10,
+ TAB = 11,
+ TAB_SPACE = 12;
+
+
+ this.$computeWrapSplits = function(tokens, wrapLimit) {
+ if (tokens.length == 0) {
+ return [];
+ }
+
+ var splits = [];
+ var displayLength = tokens.length;
+ var lastSplit = 0, lastDocSplit = 0;
+
+ var isCode = this.$wrapAsCode;
+
+ function addSplit(screenPos) {
+ var displayed = tokens.slice(lastSplit, screenPos);
+
+ // The document size is the current size - the extra width for tabs
+ // and multipleWidth characters.
+ var len = displayed.length;
+ displayed.join("").
+ // Get all the TAB_SPACEs.
+ replace(/12/g, function() {
+ len -= 1;
+ }).
+ // Get all the CHAR_EXT/multipleWidth characters.
+ replace(/2/g, function() {
+ len -= 1;
+ });
+
+ lastDocSplit += len;
+ splits.push(lastDocSplit);
+ lastSplit = screenPos;
+ }
+
+ while (displayLength - lastSplit > wrapLimit) {
+ // This is, where the split should be.
+ var split = lastSplit + wrapLimit;
+
+ // If there is a space or tab at this split position, then making
+ // a split is simple.
+ if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {
+ /* disabled see https://github.com/ajaxorg/ace/issues/1186
+ // Include all following spaces + tabs in this split as well.
+ while (tokens[split] >= SPACE) {
+ split ++;
+ } */
+ addSplit(split);
+ continue;
+ }
+
+ // === ELSE ===
+ // Check if split is inside of a placeholder. Placeholder are
+ // not splitable. Therefore, seek the beginning of the placeholder
+ // and try to place the split beofre the placeholder's start.
+ if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {
+ // Seek the start of the placeholder and do the split
+ // before the placeholder. By definition there always
+ // a PLACEHOLDER_START between split and lastSplit.
+ for (split; split != lastSplit - 1; split--) {
+ if (tokens[split] == PLACEHOLDER_START) {
+ // split++; << No incremental here as we want to
+ // have the position before the Placeholder.
+ break;
+ }
+ }
+
+ // If the PLACEHOLDER_START is not the index of the
+ // last split, then we can do the split
+ if (split > lastSplit) {
+ addSplit(split);
+ continue;
+ }
+
+ // If the PLACEHOLDER_START IS the index of the last
+ // split, then we have to place the split after the
+ // placeholder. So, let's seek for the end of the placeholder.
+ split = lastSplit + wrapLimit;
+ for (split; split < tokens.length; split++) {
+ if (tokens[split] != PLACEHOLDER_BODY) {
+ break;
+ }
+ }
+
+ // If spilt == tokens.length, then the placeholder is the last
+ // thing in the line and adding a new split doesn't make sense.
+ if (split == tokens.length) {
+ break; // Breaks the while-loop.
+ }
+
+ // Finally, add the split...
+ addSplit(split);
+ continue;
+ }
+
+ // === ELSE ===
+ // Search for the first non space/tab/placeholder/punctuation token backwards.
+ var minSplit = Math.max(split - (isCode ? 10 : wrapLimit-(wrapLimit>>2)), lastSplit - 1);
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ if (isCode) {
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ while (split > minSplit && tokens[split] == PUNCTUATION) {
+ split --;
+ }
+ } else {
+ while (split > minSplit && tokens[split] < SPACE) {
+ split --;
+ }
+ }
+ // If we found one, then add the split.
+ if (split > minSplit) {
+ addSplit(++split);
+ continue;
+ }
+
+ // === ELSE ===
+ split = lastSplit + wrapLimit;
+ // The split is inside of a CHAR or CHAR_EXT token and no space
+ // around -> force a split.
+ addSplit(split);
+ }
+ return splits;
+ };
+
+ /**
+ * Given a string, returns an array of the display characters, including tabs and spaces.
+ * @param {String} str The string to check
+ * @param {Number} offset The value to start at
+ *
+ *
+ **/
+ this.$getDisplayTokens = function(str, offset) {
+ var arr = [];
+ var tabSize;
+ offset = offset || 0;
+
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charCodeAt(i);
+ // Tab
+ if (c == 9) {
+ tabSize = this.getScreenTabSize(arr.length + offset);
+ arr.push(TAB);
+ for (var n = 1; n < tabSize; n++) {
+ arr.push(TAB_SPACE);
+ }
+ }
+ // Space
+ else if (c == 32) {
+ arr.push(SPACE);
+ } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {
+ arr.push(PUNCTUATION);
+ }
+ // full width characters
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ arr.push(CHAR, CHAR_EXT);
+ } else {
+ arr.push(CHAR);
+ }
+ }
+ return arr;
+ };
+
+ /**
+ * Calculates the width of the string `str` on the screen while assuming that the string starts at the first column on the screen.
+ * @param {String} str The string to calculate the screen width of
+ * @param {Number} maxScreenColumn
+ * @param {Number} screenColumn
+ * @returns {[Number]} Returns an `int[]` array with two elements:<br/>
+ * The first position indicates the number of columns for `str` on screen.<br/>
+ * The second value contains the position of the document column that this function read until.
+ *
+ *
+ *
+ *
+ **/
+ this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+ if (maxScreenColumn == 0)
+ return [0, 0];
+ if (maxScreenColumn == null)
+ maxScreenColumn = Infinity;
+ screenColumn = screenColumn || 0;
+
+ var c, column;
+ for (column = 0; column < str.length; column++) {
+ c = str.charCodeAt(column);
+ // tab
+ if (c == 9) {
+ screenColumn += this.getScreenTabSize(screenColumn);
+ }
+ // full width characters
+ else if (c >= 0x1100 && isFullWidth(c)) {
+ screenColumn += 2;
+ } else {
+ screenColumn += 1;
+ }
+ if (screenColumn > maxScreenColumn) {
+ break;
+ }
+ }
+
+ return [screenColumn, column];
+ };
+
+ /**
+ * Returns number of screenrows in a wrapped line.
+ * @param {Number} row The row number to check
+ *
+ * @returns {Number}
+ **/
+ this.getRowLength = function(row) {
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1;
+ } else {
+ return this.$wrapData[row].length + 1;
+ }
+ };
+
+ /**
+ * Returns the position (on screen) for the last character in the provided screen row.
+ * @param {Number} screenRow The screen row to check
+ * @returns {Number}
+ *
+ * @related EditSession.documentToScreenColumn
+ **/
+ this.getScreenLastRowColumn = function(screenRow) {
+ var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+ return this.documentToScreenColumn(pos.row, pos.column);
+ };
+
+ /**
+ * For the given document row and column, this returns the column position of the last screen row.
+ * @param {Number} docRow
+ *
+ * @param {Number} docColumn
+ **/
+ this.getDocumentLastRowColumn = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.getScreenLastRowColumn(screenRow);
+ };
+
+ /**
+ * For the given document row and column, this returns the document position of the last row.
+ * @param {Number} docRow
+ * @param {Number} docColumn
+ *
+ *
+ **/
+ this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {
+ var screenRow = this.documentToScreenRow(docRow, docColumn);
+ return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);
+ };
+
+ /**
+ * For the given row, this returns the split data.
+ * @returns {String}
+ **/
+ this.getRowSplitData = function(row) {
+ if (!this.$useWrapMode) {
+ return undefined;
+ } else {
+ return this.$wrapData[row];
+ }
+ };
+
+ /**
+ * The distance to the next tab stop at the specified screen column.
+ * @param {Number} screenColumn The screen column to check
+ *
+ *
+ * @returns {Number}
+ **/
+ this.getScreenTabSize = function(screenColumn) {
+ return this.$tabSize - screenColumn % this.$tabSize;
+ };
+
+
+ this.screenToDocumentRow = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).row;
+ };
+
+
+ this.screenToDocumentColumn = function(screenRow, screenColumn) {
+ return this.screenToDocumentPosition(screenRow, screenColumn).column;
+ };
+
+ /**
+ * Converts characters coordinates on the screen to characters coordinates within the document. [This takes into account code folding, word wrap, tab size, and any other visual modifications.]{: #conversionConsiderations}
+ * @param {Number} screenRow The screen row to check
+ * @param {Number} screenColumn The screen column to check
+ * @returns {Object} The object returned has two properties: `row` and `column`.
+ *
+ *
+ * @related EditSession.documentToScreenPosition
+ *
+ **/
+ this.screenToDocumentPosition = function(screenRow, screenColumn) {
+ if (screenRow < 0)
+ return {row: 0, column: 0};
+
+ var line;
+ var docRow = 0;
+ var docColumn = 0;
+ var column;
+ var row = 0;
+ var rowLength = 0;
+
+ var rowCache = this.$screenRowCache;
+ var i = this.$getRowCacheIndex(rowCache, screenRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var docRow = this.$docRowCache[i];
+ var doCache = screenRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var maxRow = this.getLength() - 1;
+ var foldLine = this.getNextFoldLine(docRow);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (row <= screenRow) {
+ rowLength = this.getRowLength(docRow);
+ if (row + rowLength - 1 >= screenRow || docRow >= maxRow) {
+ break;
+ } else {
+ row += rowLength;
+ docRow++;
+ if (docRow > foldStart) {
+ docRow = foldLine.end.row+1;
+ foldLine = this.getNextFoldLine(docRow, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ }
+
+ if (doCache) {
+ this.$docRowCache.push(docRow);
+ this.$screenRowCache.push(row);
+ }
+ }
+
+ if (foldLine && foldLine.start.row <= docRow) {
+ line = this.getFoldDisplayLine(foldLine);
+ docRow = foldLine.start.row;
+ } else if (row + rowLength <= screenRow || docRow > maxRow) {
+ // clip at the end of the document
+ return {
+ row: maxRow,
+ column: this.getLine(maxRow).length
+ }
+ } else {
+ line = this.getLine(docRow);
+ foldLine = null;
+ }
+
+ if (this.$useWrapMode) {
+ var splits = this.$wrapData[docRow];
+ if (splits) {
+ column = splits[screenRow - row];
+ if(screenRow > row && splits.length) {
+ docColumn = splits[screenRow - row - 1] || splits[splits.length - 1];
+ line = line.substring(docColumn);
+ }
+ }
+ }
+
+ docColumn += this.$getStringScreenWidth(line, screenColumn)[1];
+
+ // We remove one character at the end so that the docColumn
+ // position returned is not associated to the next row on the screen.
+ if (this.$useWrapMode && docColumn >= column)
+ docColumn = column - 1;
+
+ if (foldLine)
+ return foldLine.idxToPosition(docColumn);
+
+ return {row: docRow, column: docColumn};
+ };
+
+ /**
+ * Converts document coordinates to screen coordinates. {:conversionConsiderations}
+ * @param {Number} docRow The document row to check
+ * @param {Number} docColumn The document column to check
+ * @returns {Object} The object returned by this method has two properties: `row` and `column`.
+ *
+ *
+ * @related EditSession.screenToDocumentPosition
+ *
+ **/
+ this.documentToScreenPosition = function(docRow, docColumn) {
+ // Normalize the passed in arguments.
+ if (typeof docColumn === "undefined")
+ var pos = this.$clipPositionToDocument(docRow.row, docRow.column);
+ else
+ pos = this.$clipPositionToDocument(docRow, docColumn);
+
+ docRow = pos.row;
+ docColumn = pos.column;
+
+ var screenRow = 0;
+ var foldStartRow = null;
+ var fold = null;
+
+ // Clamp the docRow position in case it's inside of a folded block.
+ fold = this.getFoldAt(docRow, docColumn, 1);
+ if (fold) {
+ docRow = fold.start.row;
+ docColumn = fold.start.column;
+ }
+
+ var rowEnd, row = 0;
+
+
+ var rowCache = this.$docRowCache;
+ var i = this.$getRowCacheIndex(rowCache, docRow);
+ var l = rowCache.length;
+ if (l && i >= 0) {
+ var row = rowCache[i];
+ var screenRow = this.$screenRowCache[i];
+ var doCache = docRow > rowCache[l - 1];
+ } else {
+ var doCache = !l;
+ }
+
+ var foldLine = this.getNextFoldLine(row);
+ var foldStart = foldLine ?foldLine.start.row :Infinity;
+
+ while (row < docRow) {
+ if (row >= foldStart) {
+ rowEnd = foldLine.end.row + 1;
+ if (rowEnd > docRow)
+ break;
+ foldLine = this.getNextFoldLine(rowEnd, foldLine);
+ foldStart = foldLine ?foldLine.start.row :Infinity;
+ }
+ else {
+ rowEnd = row + 1;
+ }
+
+ screenRow += this.getRowLength(row);
+ row = rowEnd;
+
+ if (doCache) {
+ this.$docRowCache.push(row);
+ this.$screenRowCache.push(screenRow);
+ }
+ }
+
+ // Calculate the text line that is displayed in docRow on the screen.
+ var textLine = "";
+ // Check if the final row we want to reach is inside of a fold.
+ if (foldLine && row >= foldStart) {
+ textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);
+ foldStartRow = foldLine.start.row;
+ } else {
+ textLine = this.getLine(docRow).substring(0, docColumn);
+ foldStartRow = docRow;
+ }
+ // Clamp textLine if in wrapMode.
+ if (this.$useWrapMode) {
+ var wrapRow = this.$wrapData[foldStartRow];
+ var screenRowOffset = 0;
+ while (textLine.length >= wrapRow[screenRowOffset]) {
+ screenRow ++;
+ screenRowOffset++;
+ }
+ textLine = textLine.substring(
+ wrapRow[screenRowOffset - 1] || 0, textLine.length
+ );
+ }
+
+ return {
+ row: screenRow,
+ column: this.$getStringScreenWidth(textLine)[0]
+ };
+ };
+
+ /**
+ * For the given document row and column, returns the screen column.
+ * @param {Number} row
+ * @param {Number} docColumn
+ * @returns {Number}
+ *
+ **/
+ this.documentToScreenColumn = function(row, docColumn) {
+ return this.documentToScreenPosition(row, docColumn).column;
+ };
+
+ /**
+ * For the given document row and column, returns the screen row.
+ * @param {Number} docRow
+ * @param {Number} docColumn
+ *
+ *
+ **/
+ this.documentToScreenRow = function(docRow, docColumn) {
+ return this.documentToScreenPosition(docRow, docColumn).row;
+ };
+
+ /**
+ * Returns the length of the screen.
+ * @returns {Number}
+ **/
+ this.getScreenLength = function() {
+ var screenRows = 0;
+ var fold = null;
+ if (!this.$useWrapMode) {
+ screenRows = this.getLength();
+
+ // Remove the folded lines again.
+ var foldData = this.$foldData;
+ for (var i = 0; i < foldData.length; i++) {
+ fold = foldData[i];
+ screenRows -= fold.end.row - fold.start.row;
+ }
+ } else {
+ var lastRow = this.$wrapData.length;
+ var row = 0, i = 0;
+ var fold = this.$foldData[i++];
+ var foldStart = fold ? fold.start.row :Infinity;
+
+ while (row < lastRow) {
+ screenRows += this.$wrapData[row].length + 1;
+ row ++;
+ if (row > foldStart) {
+ row = fold.end.row+1;
+ fold = this.$foldData[i++];
+ foldStart = fold ?fold.start.row :Infinity;
+ }
+ }
+ }
+
+ return screenRows;
+ };
+
+ // For every keystroke this gets called once per char in the whole doc!!
+ // Wouldn't hurt to make it a bit faster for c >= 0x1100
+
+ /**
+ * @private
+ *
+ */
+ function isFullWidth(c) {
+ if (c < 0x1100)
+ return false;
+ return c >= 0x1100 && c <= 0x115F ||
+ c >= 0x11A3 && c <= 0x11A7 ||
+ c >= 0x11FA && c <= 0x11FF ||
+ c >= 0x2329 && c <= 0x232A ||
+ c >= 0x2E80 && c <= 0x2E99 ||
+ c >= 0x2E9B && c <= 0x2EF3 ||
+ c >= 0x2F00 && c <= 0x2FD5 ||
+ c >= 0x2FF0 && c <= 0x2FFB ||
+ c >= 0x3000 && c <= 0x303E ||
+ c >= 0x3041 && c <= 0x3096 ||
+ c >= 0x3099 && c <= 0x30FF ||
+ c >= 0x3105 && c <= 0x312D ||
+ c >= 0x3131 && c <= 0x318E ||
+ c >= 0x3190 && c <= 0x31BA ||
+ c >= 0x31C0 && c <= 0x31E3 ||
+ c >= 0x31F0 && c <= 0x321E ||
+ c >= 0x3220 && c <= 0x3247 ||
+ c >= 0x3250 && c <= 0x32FE ||
+ c >= 0x3300 && c <= 0x4DBF ||
+ c >= 0x4E00 && c <= 0xA48C ||
+ c >= 0xA490 && c <= 0xA4C6 ||
+ c >= 0xA960 && c <= 0xA97C ||
+ c >= 0xAC00 && c <= 0xD7A3 ||
+ c >= 0xD7B0 && c <= 0xD7C6 ||
+ c >= 0xD7CB && c <= 0xD7FB ||
+ c >= 0xF900 && c <= 0xFAFF ||
+ c >= 0xFE10 && c <= 0xFE19 ||
+ c >= 0xFE30 && c <= 0xFE52 ||
+ c >= 0xFE54 && c <= 0xFE66 ||
+ c >= 0xFE68 && c <= 0xFE6B ||
+ c >= 0xFF01 && c <= 0xFF60 ||
+ c >= 0xFFE0 && c <= 0xFFE6;
+ };
+
+}).call(EditSession.prototype);
+
+require("./edit_session/folding").Folding.call(EditSession.prototype);
+require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype);
+
+
+config.defineOptions(EditSession.prototype, "session", {
+ wrap: {
+ set: function(value) {
+ if (!value || value == "off")
+ value = false;
+ else if (value == "free")
+ value = true;
+ else if (value == "printMargin")
+ value = -1;
+ else if (typeof value == "string")
+ value = parseInt(value, 10) || false;
+
+ if (this.$wrap == value)
+ return;
+ if (!value) {
+ this.setUseWrapMode(false);
+ } else {
+ var col = typeof value == "number" ? value : null;
+ this.setWrapLimitRange(col, col);
+ this.setUseWrapMode(true);
+ }
+ this.$wrap = value;
+ },
+ get: function() {
+ return this.getUseWrapMode() ? this.getWrapLimitRange().min || "free" : "off";
+ },
+ handlesSet: true
+ },
+ wrapMethod: {
+ // code|text|auto
+ set: function(val) {
+ if (val == "auto")
+ this.$wrapAsCode = this.$mode.type != "text";
+ else
+ this.$wrapAsCode = val != "text";
+ },
+ initialValue: "auto"
+ },
+ firstLineNumber: {
+ set: function() {this._emit("changeBreakpoint");},
+ initialValue: 1
+ },
+ useWorker: {
+ set: function(useWorker) {
+ this.$useWorker = useWorker;
+
+ this.$stopWorker();
+ if (useWorker)
+ this.$startWorker();
+ },
+ initialValue: true
+ },
+ useSoftTabs: {initialValue: true},
+ tabSize: {
+ set: function(tabSize) {
+ if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+
+ this.$modified = true;
+ this.$rowLengthCache = [];
+ this.$tabSize = tabSize;
+ this._emit("changeTabSize");
+ },
+ initialValue: 4,
+ handlesSet: true
+ },
+ overwrite: {
+ set: function(val) {this._emit("changeOverwrite");},
+ initialValue: false
+ },
+ newLineMode: {
+ set: function(val) {this.doc.setNewLineMode(val)},
+ get: function() {return this.doc.getNewLineMode()},
+ handlesSet: true
+ }
+});
+
+exports.EditSession = EditSession;
+});
diff --git a/src/fauxton/assets/js/libs/ace/edit_session/bracket_match.js b/src/fauxton/assets/js/libs/ace/edit_session/bracket_match.js
new file mode 100644
index 000000000..825f6924d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session/bracket_match.js
@@ -0,0 +1,219 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+
+function BracketMatch() {
+
+ this.findMatchingBracket = function(position, chr) {
+ if (position.column == 0) return null;
+
+ var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);
+ if (charBeforeCursor == "") return null;
+
+ var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/);
+ if (!match)
+ return null;
+
+ if (match[1])
+ return this.$findClosingBracket(match[1], position);
+ else
+ return this.$findOpeningBracket(match[2], position);
+ };
+
+ this.getBracketRange = function(pos) {
+ var line = this.getLine(pos.row);
+ var before = true, range;
+
+ var chr = line.charAt(pos.column-1);
+ var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+ if (!match) {
+ chr = line.charAt(pos.column);
+ pos = {row: pos.row, column: pos.column + 1};
+ match = chr && chr.match(/([\(\[\{])|([\)\]\}])/);
+ before = false;
+ }
+ if (!match)
+ return null;
+
+ if (match[1]) {
+ var bracketPos = this.$findClosingBracket(match[1], pos);
+ if (!bracketPos)
+ return null;
+ range = Range.fromPoints(pos, bracketPos);
+ if (!before) {
+ range.end.column++;
+ range.start.column--;
+ }
+ range.cursor = range.end;
+ } else {
+ var bracketPos = this.$findOpeningBracket(match[2], pos);
+ if (!bracketPos)
+ return null;
+ range = Range.fromPoints(bracketPos, pos);
+ if (!before) {
+ range.start.column++;
+ range.end.column--;
+ }
+ range.cursor = range.start;
+ }
+
+ return range;
+ };
+
+ this.$brackets = {
+ ")": "(",
+ "(": ")",
+ "]": "[",
+ "[": "]",
+ "{": "}",
+ "}": "{"
+ };
+
+ this.$findOpeningBracket = function(bracket, position, typeRe) {
+ var openBracket = this.$brackets[bracket];
+ var depth = 1;
+
+ var iterator = new TokenIterator(this, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ if (!token)
+ token = iterator.stepForward();
+ if (!token)
+ return;
+
+ if (!typeRe){
+ typeRe = new RegExp(
+ "(\\.?" +
+ token.type.replace(".", "\\.").replace("rparen", ".paren")
+ + ")+"
+ );
+ }
+
+ // Start searching in token, just before the character at position.column
+ var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;
+ var value = token.value;
+
+ while (true) {
+
+ while (valueIndex >= 0) {
+ var chr = value.charAt(valueIndex);
+ if (chr == openBracket) {
+ depth -= 1;
+ if (depth == 0) {
+ return {row: iterator.getCurrentTokenRow(),
+ column: valueIndex + iterator.getCurrentTokenColumn()};
+ }
+ }
+ else if (chr == bracket) {
+ depth += 1;
+ }
+ valueIndex -= 1;
+ }
+
+ // Scan backward through the document, looking for the next token
+ // whose type matches typeRe
+ do {
+ token = iterator.stepBackward();
+ } while (token && !typeRe.test(token.type));
+
+ if (token == null)
+ break;
+
+ value = token.value;
+ valueIndex = value.length - 1;
+ }
+
+ return null;
+ };
+
+ this.$findClosingBracket = function(bracket, position, typeRe) {
+ var closingBracket = this.$brackets[bracket];
+ var depth = 1;
+
+ var iterator = new TokenIterator(this, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ if (!token)
+ token = iterator.stepForward();
+ if (!token)
+ return;
+
+ if (!typeRe){
+ typeRe = new RegExp(
+ "(\\.?" +
+ token.type.replace(".", "\\.").replace("lparen", ".paren")
+ + ")+"
+ );
+ }
+
+ // Start searching in token, after the character at position.column
+ var valueIndex = position.column - iterator.getCurrentTokenColumn();
+
+ while (true) {
+
+ var value = token.value;
+ var valueLength = value.length;
+ while (valueIndex < valueLength) {
+ var chr = value.charAt(valueIndex);
+ if (chr == closingBracket) {
+ depth -= 1;
+ if (depth == 0) {
+ return {row: iterator.getCurrentTokenRow(),
+ column: valueIndex + iterator.getCurrentTokenColumn()};
+ }
+ }
+ else if (chr == bracket) {
+ depth += 1;
+ }
+ valueIndex += 1;
+ }
+
+ // Scan forward through the document, looking for the next token
+ // whose type matches typeRe
+ do {
+ token = iterator.stepForward();
+ } while (token && !typeRe.test(token.type));
+
+ if (token == null)
+ break;
+
+ valueIndex = 0;
+ }
+
+ return null;
+ };
+}
+exports.BracketMatch = BracketMatch;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/edit_session/fold.js b/src/fauxton/assets/js/libs/ace/edit_session/fold.js
new file mode 100644
index 000000000..232101bd6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session/fold.js
@@ -0,0 +1,140 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var RangeList = require("../range_list").RangeList;
+var oop = require("../lib/oop")
+/*
+ * Simple fold-data struct.
+ **/
+var Fold = exports.Fold = function(range, placeholder) {
+ this.foldLine = null;
+ this.placeholder = placeholder;
+ this.range = range;
+ this.start = range.start;
+ this.end = range.end;
+
+ this.sameRow = range.start.row == range.end.row;
+ this.subFolds = this.ranges = [];
+};
+
+oop.inherits(Fold, RangeList);
+
+(function() {
+
+ this.toString = function() {
+ return '"' + this.placeholder + '" ' + this.range.toString();
+ };
+
+ this.setFoldLine = function(foldLine) {
+ this.foldLine = foldLine;
+ this.subFolds.forEach(function(fold) {
+ fold.setFoldLine(foldLine);
+ });
+ };
+
+ this.clone = function() {
+ var range = this.range.clone();
+ var fold = new Fold(range, this.placeholder);
+ this.subFolds.forEach(function(subFold) {
+ fold.subFolds.push(subFold.clone());
+ });
+ fold.collapseChildren = this.collapseChildren;
+ return fold;
+ };
+
+ this.addSubFold = function(fold) {
+ if (this.range.isEqual(fold))
+ return;
+
+ if (!this.range.containsRange(fold))
+ throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+
+ // transform fold to local coordinates
+ consumeRange(fold, this.start);
+
+ var row = fold.start.row, column = fold.start.column;
+ for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {
+ cmp = this.subFolds[i].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterStart = this.subFolds[i];
+
+ if (cmp == 0)
+ return afterStart.addSubFold(fold);
+
+ // cmp == -1
+ var row = fold.range.end.row, column = fold.range.end.column;
+ for (var j = i, cmp = -1; j < this.subFolds.length; j++) {
+ cmp = this.subFolds[j].range.compare(row, column);
+ if (cmp != 1)
+ break;
+ }
+ var afterEnd = this.subFolds[j];
+
+ if (cmp == 0)
+ throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+
+ var consumedFolds = this.subFolds.splice(i, j - i, fold);
+ fold.setFoldLine(this.foldLine);
+
+ return fold;
+ };
+
+ this.restoreRange = function(range) {
+ return restoreRange(range, this.start);
+ };
+
+}).call(Fold.prototype);
+
+function consumePoint(point, anchor) {
+ point.row -= anchor.row;
+ if (point.row == 0)
+ point.column -= anchor.column;
+}
+function consumeRange(range, anchor) {
+ consumePoint(range.start, anchor);
+ consumePoint(range.end, anchor);
+}
+function restorePoint(point, anchor) {
+ if (point.row == 0)
+ point.column += anchor.column;
+ point.row += anchor.row;
+}
+function restoreRange(range, anchor) {
+ restorePoint(range.start, anchor);
+ restorePoint(range.end, anchor);
+}
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/edit_session/fold_line.js b/src/fauxton/assets/js/libs/ace/edit_session/fold_line.js
new file mode 100644
index 000000000..0218195eb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session/fold_line.js
@@ -0,0 +1,268 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+/*
+ * If an array is passed in, the folds are expected to be sorted already.
+ */
+function FoldLine(foldData, folds) {
+ this.foldData = foldData;
+ if (Array.isArray(folds)) {
+ this.folds = folds;
+ } else {
+ folds = this.folds = [ folds ];
+ }
+
+ var last = folds[folds.length - 1]
+ this.range = new Range(folds[0].start.row, folds[0].start.column,
+ last.end.row, last.end.column);
+ this.start = this.range.start;
+ this.end = this.range.end;
+
+ this.folds.forEach(function(fold) {
+ fold.setFoldLine(this);
+ }, this);
+}
+
+(function() {
+ /*
+ * Note: This doesn't update wrapData!
+ */
+ this.shiftRow = function(shift) {
+ this.start.row += shift;
+ this.end.row += shift;
+ this.folds.forEach(function(fold) {
+ fold.start.row += shift;
+ fold.end.row += shift;
+ });
+ }
+
+ this.addFold = function(fold) {
+ if (fold.sameRow) {
+ if (fold.start.row < this.startRow || fold.endRow > this.endRow) {
+ throw new Error("Can't add a fold to this FoldLine as it has no connection");
+ }
+ this.folds.push(fold);
+ this.folds.sort(function(a, b) {
+ return -a.range.compareEnd(b.start.row, b.start.column);
+ });
+ if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ }
+ } else if (fold.start.row == this.end.row) {
+ this.folds.push(fold);
+ this.end.row = fold.end.row;
+ this.end.column = fold.end.column;
+ } else if (fold.end.row == this.start.row) {
+ this.folds.unshift(fold);
+ this.start.row = fold.start.row;
+ this.start.column = fold.start.column;
+ } else {
+ throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");
+ }
+ fold.foldLine = this;
+ }
+
+ this.containsRow = function(row) {
+ return row >= this.start.row && row <= this.end.row;
+ }
+
+ this.walk = function(callback, endRow, endColumn) {
+ var lastEnd = 0,
+ folds = this.folds,
+ fold,
+ comp, stop, isNewRow = true;
+
+ if (endRow == null) {
+ endRow = this.end.row;
+ endColumn = this.end.column;
+ }
+
+ for (var i = 0; i < folds.length; i++) {
+ fold = folds[i];
+
+ comp = fold.range.compareStart(endRow, endColumn);
+ // This fold is after the endRow/Column.
+ if (comp == -1) {
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ return;
+ }
+
+ stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);
+ stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);
+
+ // If the user requested to stop the walk or endRow/endColumn is
+ // inside of this fold (comp == 0), then end here.
+ if (stop || comp == 0) {
+ return;
+ }
+
+ // Note the new lastEnd might not be on the same line. However,
+ // it's the callback's job to recognize this.
+ isNewRow = !fold.sameRow;
+ lastEnd = fold.end.column;
+ }
+ callback(null, endRow, endColumn, lastEnd, isNewRow);
+ }
+
+ this.getNextFoldTo = function(row, column) {
+ var fold, cmp;
+ for (var i = 0; i < this.folds.length; i++) {
+ fold = this.folds[i];
+ cmp = fold.range.compareEnd(row, column);
+ if (cmp == -1) {
+ return {
+ fold: fold,
+ kind: "after"
+ };
+ } else if (cmp == 0) {
+ return {
+ fold: fold,
+ kind: "inside"
+ }
+ }
+ }
+ return null;
+ }
+
+ this.addRemoveChars = function(row, column, len) {
+ var ret = this.getNextFoldTo(row, column),
+ fold, folds;
+ if (ret) {
+ fold = ret.fold;
+ if (ret.kind == "inside"
+ && fold.start.column != column
+ && fold.start.row != row)
+ {
+ //throwing here breaks whole editor
+ //TODO: properly handle this
+ window.console && window.console.log(row, column, fold);
+ } else if (fold.start.row == row) {
+ folds = this.folds;
+ var i = folds.indexOf(fold);
+ if (i == 0) {
+ this.start.column += len;
+ }
+ for (i; i < folds.length; i++) {
+ fold = folds[i];
+ fold.start.column += len;
+ if (!fold.sameRow) {
+ return;
+ }
+ fold.end.column += len;
+ }
+ this.end.column += len;
+ }
+ }
+ }
+
+ this.split = function(row, column) {
+ var fold = this.getNextFoldTo(row, column).fold;
+ var folds = this.folds;
+ var foldData = this.foldData;
+
+ if (!fold)
+ return null;
+
+ var i = folds.indexOf(fold);
+ var foldBefore = folds[i - 1];
+ this.end.row = foldBefore.end.row;
+ this.end.column = foldBefore.end.column;
+
+ // Remove the folds after row/column and create a new FoldLine
+ // containing these removed folds.
+ folds = folds.splice(i, folds.length - i);
+
+ var newFoldLine = new FoldLine(foldData, folds);
+ foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);
+ return newFoldLine;
+ }
+
+ this.merge = function(foldLineNext) {
+ var folds = foldLineNext.folds;
+ for (var i = 0; i < folds.length; i++) {
+ this.addFold(folds[i]);
+ }
+ // Remove the foldLineNext - no longer needed, as
+ // it's merged now with foldLineNext.
+ var foldData = this.foldData;
+ foldData.splice(foldData.indexOf(foldLineNext), 1);
+ }
+
+ this.toString = function() {
+ var ret = [this.range.toString() + ": [" ];
+
+ this.folds.forEach(function(fold) {
+ ret.push(" " + fold.toString());
+ });
+ ret.push("]")
+ return ret.join("\n");
+ }
+
+ this.idxToPosition = function(idx) {
+ var lastFoldEndColumn = 0;
+ var fold;
+
+ for (var i = 0; i < this.folds.length; i++) {
+ var fold = this.folds[i];
+
+ idx -= fold.start.column - lastFoldEndColumn;
+ if (idx < 0) {
+ return {
+ row: fold.start.row,
+ column: fold.start.column + idx
+ };
+ }
+
+ idx -= fold.placeholder.length;
+ if (idx < 0) {
+ return fold.start;
+ }
+
+ lastFoldEndColumn = fold.end.column;
+ }
+
+ return {
+ row: this.end.row,
+ column: this.end.column + idx
+ };
+ }
+}).call(FoldLine.prototype);
+
+exports.FoldLine = FoldLine;
+});
diff --git a/src/fauxton/assets/js/libs/ace/edit_session/folding.js b/src/fauxton/assets/js/libs/ace/edit_session/folding.js
new file mode 100644
index 000000000..a9b2ddd12
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session/folding.js
@@ -0,0 +1,799 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var FoldLine = require("./fold_line").FoldLine;
+var Fold = require("./fold").Fold;
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+function Folding() {
+ /*
+ * Looks up a fold at a given row/column. Possible values for side:
+ * -1: ignore a fold if fold.start = row/column
+ * +1: ignore a fold if fold.end = row/column
+ */
+ this.getFoldAt = function(row, column, side) {
+ var foldLine = this.getFoldLine(row);
+ if (!foldLine)
+ return null;
+
+ var folds = foldLine.folds;
+ for (var i = 0; i < folds.length; i++) {
+ var fold = folds[i];
+ if (fold.range.contains(row, column)) {
+ if (side == 1 && fold.range.isEnd(row, column)) {
+ continue;
+ } else if (side == -1 && fold.range.isStart(row, column)) {
+ continue;
+ }
+ return fold;
+ }
+ }
+ };
+
+ /*
+ * Returns all folds in the given range. Note, that this will return folds
+ *
+ */
+ this.getFoldsInRange = function(range) {
+ var start = range.start;
+ var end = range.end;
+ var foldLines = this.$foldData;
+ var foundFolds = [];
+
+ start.column += 1;
+ end.column -= 1;
+
+ for (var i = 0; i < foldLines.length; i++) {
+ var cmp = foldLines[i].range.compareRange(range);
+ if (cmp == 2) {
+ // Range is before foldLine. No intersection. This means,
+ // there might be other foldLines that intersect.
+ continue;
+ }
+ else if (cmp == -2) {
+ // Range is after foldLine. There can't be any other foldLines then,
+ // so let's give up.
+ break;
+ }
+
+ var folds = foldLines[i].folds;
+ for (var j = 0; j < folds.length; j++) {
+ var fold = folds[j];
+ cmp = fold.range.compareRange(range);
+ if (cmp == -2) {
+ break;
+ } else if (cmp == 2) {
+ continue;
+ } else
+ // WTF-state: Can happen due to -1/+1 to start/end column.
+ if (cmp == 42) {
+ break;
+ }
+ foundFolds.push(fold);
+ }
+ }
+ start.column -= 1;
+ end.column += 1;
+
+ return foundFolds;
+ };
+
+ /*
+ * Returns all folds in the document
+ */
+ this.getAllFolds = function() {
+ var folds = [];
+ var foldLines = this.$foldData;
+
+ function addFold(fold) {
+ folds.push(fold);
+ }
+
+ for (var i = 0; i < foldLines.length; i++)
+ for (var j = 0; j < foldLines[i].folds.length; j++)
+ addFold(foldLines[i].folds[j]);
+
+ return folds;
+ };
+
+ /*
+ * Returns the string between folds at the given position.
+ * E.g.
+ * foo<fold>b|ar<fold>wolrd -> "bar"
+ * foo<fold>bar<fold>wol|rd -> "world"
+ * foo<fold>bar<fo|ld>wolrd -> <null>
+ *
+ * where | means the position of row/column
+ *
+ * The trim option determs if the return string should be trimed according
+ * to the "side" passed with the trim value:
+ *
+ * E.g.
+ * foo<fold>b|ar<fold>wolrd -trim=-1> "b"
+ * foo<fold>bar<fold>wol|rd -trim=+1> "rld"
+ * fo|o<fold>bar<fold>wolrd -trim=00> "foo"
+ */
+ this.getFoldStringAt = function(row, column, trim, foldLine) {
+ foldLine = foldLine || this.getFoldLine(row);
+ if (!foldLine)
+ return null;
+
+ var lastFold = {
+ end: { column: 0 }
+ };
+ // TODO: Refactor to use getNextFoldTo function.
+ var str, fold;
+ for (var i = 0; i < foldLine.folds.length; i++) {
+ fold = foldLine.folds[i];
+ var cmp = fold.range.compareEnd(row, column);
+ if (cmp == -1) {
+ str = this
+ .getLine(fold.start.row)
+ .substring(lastFold.end.column, fold.start.column);
+ break;
+ }
+ else if (cmp === 0) {
+ return null;
+ }
+ lastFold = fold;
+ }
+ if (!str)
+ str = this.getLine(fold.start.row).substring(lastFold.end.column);
+
+ if (trim == -1)
+ return str.substring(0, column - lastFold.end.column);
+ else if (trim == 1)
+ return str.substring(column - lastFold.end.column);
+ else
+ return str;
+ };
+
+ this.getFoldLine = function(docRow, startFoldLine) {
+ var foldData = this.$foldData;
+ var i = 0;
+ if (startFoldLine)
+ i = foldData.indexOf(startFoldLine);
+ if (i == -1)
+ i = 0;
+ for (i; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {
+ return foldLine;
+ } else if (foldLine.end.row > docRow) {
+ return null;
+ }
+ }
+ return null;
+ };
+
+ // returns the fold which starts after or contains docRow
+ this.getNextFoldLine = function(docRow, startFoldLine) {
+ var foldData = this.$foldData;
+ var i = 0;
+ if (startFoldLine)
+ i = foldData.indexOf(startFoldLine);
+ if (i == -1)
+ i = 0;
+ for (i; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (foldLine.end.row >= docRow) {
+ return foldLine;
+ }
+ }
+ return null;
+ };
+
+ this.getFoldedRowCount = function(first, last) {
+ var foldData = this.$foldData, rowCount = last-first+1;
+ for (var i = 0; i < foldData.length; i++) {
+ var foldLine = foldData[i],
+ end = foldLine.end.row,
+ start = foldLine.start.row;
+ if (end >= last) {
+ if(start < last) {
+ if(start >= first)
+ rowCount -= last-start;
+ else
+ rowCount = 0;//in one fold
+ }
+ break;
+ } else if(end >= first){
+ if (start >= first) //fold inside range
+ rowCount -= end-start;
+ else
+ rowCount -= end-first+1;
+ }
+ }
+ return rowCount;
+ };
+
+ this.$addFoldLine = function(foldLine) {
+ this.$foldData.push(foldLine);
+ this.$foldData.sort(function(a, b) {
+ return a.start.row - b.start.row;
+ });
+ return foldLine;
+ };
+
+ /**
+ * Adds a new fold.
+ *
+ * @returns
+ * The new created Fold object or an existing fold object in case the
+ * passed in range fits an existing fold exactly.
+ */
+ this.addFold = function(placeholder, range) {
+ var foldData = this.$foldData;
+ var added = false;
+ var fold;
+
+ if (placeholder instanceof Fold)
+ fold = placeholder;
+ else {
+ fold = new Fold(range, placeholder);
+ fold.collapseChildren = range.collapseChildren;
+ }
+ this.$clipRangeToDocument(fold.range);
+
+ var startRow = fold.start.row;
+ var startColumn = fold.start.column;
+ var endRow = fold.end.row;
+ var endColumn = fold.end.column;
+
+ // --- Some checking ---
+ if (!(startRow < endRow ||
+ startRow == endRow && startColumn <= endColumn - 2))
+ throw new Error("The range has to be at least 2 characters width");
+
+ var startFold = this.getFoldAt(startRow, startColumn, 1);
+ var endFold = this.getFoldAt(endRow, endColumn, -1);
+ if (startFold && endFold == startFold)
+ return startFold.addSubFold(fold);
+
+ if (
+ (startFold && !startFold.range.isStart(startRow, startColumn))
+ || (endFold && !endFold.range.isEnd(endRow, endColumn))
+ ) {
+ throw new Error("A fold can't intersect already existing fold" + fold.range + startFold.range);
+ }
+
+ // Check if there are folds in the range we create the new fold for.
+ var folds = this.getFoldsInRange(fold.range);
+ if (folds.length > 0) {
+ // Remove the folds from fold data.
+ this.removeFolds(folds);
+ // Add the removed folds as subfolds on the new fold.
+ folds.forEach(function(subFold) {
+ fold.addSubFold(subFold);
+ });
+ }
+
+ for (var i = 0; i < foldData.length; i++) {
+ var foldLine = foldData[i];
+ if (endRow == foldLine.start.row) {
+ foldLine.addFold(fold);
+ added = true;
+ break;
+ } else if (startRow == foldLine.end.row) {
+ foldLine.addFold(fold);
+ added = true;
+ if (!fold.sameRow) {
+ // Check if we might have to merge two FoldLines.
+ var foldLineNext = foldData[i + 1];
+ if (foldLineNext && foldLineNext.start.row == endRow) {
+ // We need to merge!
+ foldLine.merge(foldLineNext);
+ break;
+ }
+ }
+ break;
+ } else if (endRow <= foldLine.start.row) {
+ break;
+ }
+ }
+
+ if (!added)
+ foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));
+
+ if (this.$useWrapMode)
+ this.$updateWrapData(foldLine.start.row, foldLine.start.row);
+ else
+ this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);
+
+ // Notify that fold data has changed.
+ this.$modified = true;
+ this._emit("changeFold", { data: fold, action: "add" });
+
+ return fold;
+ };
+
+ this.addFolds = function(folds) {
+ folds.forEach(function(fold) {
+ this.addFold(fold);
+ }, this);
+ };
+
+ this.removeFold = function(fold) {
+ var foldLine = fold.foldLine;
+ var startRow = foldLine.start.row;
+ var endRow = foldLine.end.row;
+
+ var foldLines = this.$foldData;
+ var folds = foldLine.folds;
+ // Simple case where there is only one fold in the FoldLine such that
+ // the entire fold line can get removed directly.
+ if (folds.length == 1) {
+ foldLines.splice(foldLines.indexOf(foldLine), 1);
+ } else
+ // If the fold is the last fold of the foldLine, just remove it.
+ if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {
+ folds.pop();
+ foldLine.end.row = folds[folds.length - 1].end.row;
+ foldLine.end.column = folds[folds.length - 1].end.column;
+ } else
+ // If the fold is the first fold of the foldLine, just remove it.
+ if (foldLine.range.isStart(fold.start.row, fold.start.column)) {
+ folds.shift();
+ foldLine.start.row = folds[0].start.row;
+ foldLine.start.column = folds[0].start.column;
+ } else
+ // We know there are more then 2 folds and the fold is not at the edge.
+ // This means, the fold is somewhere in between.
+ //
+ // If the fold is in one row, we just can remove it.
+ if (fold.sameRow) {
+ folds.splice(folds.indexOf(fold), 1);
+ } else
+ // The fold goes over more then one row. This means remvoing this fold
+ // will cause the fold line to get splitted up. newFoldLine is the second part
+ {
+ var newFoldLine = foldLine.split(fold.start.row, fold.start.column);
+ folds = newFoldLine.folds;
+ folds.shift();
+ newFoldLine.start.row = folds[0].start.row;
+ newFoldLine.start.column = folds[0].start.column;
+ }
+
+ if (!this.$updating) {
+ if (this.$useWrapMode)
+ this.$updateWrapData(startRow, endRow);
+ else
+ this.$updateRowLengthCache(startRow, endRow);
+ }
+
+ // Notify that fold data has changed.
+ this.$modified = true;
+ this._emit("changeFold", { data: fold, action: "remove" });
+ };
+
+ this.removeFolds = function(folds) {
+ // We need to clone the folds array passed in as it might be the folds
+ // array of a fold line and as we call this.removeFold(fold), folds
+ // are removed from folds and changes the current index.
+ var cloneFolds = [];
+ for (var i = 0; i < folds.length; i++) {
+ cloneFolds.push(folds[i]);
+ }
+
+ cloneFolds.forEach(function(fold) {
+ this.removeFold(fold);
+ }, this);
+ this.$modified = true;
+ };
+
+ this.expandFold = function(fold) {
+ this.removeFold(fold);
+ fold.subFolds.forEach(function(subFold) {
+ fold.restoreRange(subFold);
+ this.addFold(subFold);
+ }, this);
+ if (fold.collapseChildren > 0) {
+ this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);
+ }
+ fold.subFolds = [];
+ };
+
+ this.expandFolds = function(folds) {
+ folds.forEach(function(fold) {
+ this.expandFold(fold);
+ }, this);
+ };
+
+ this.unfold = function(location, expandInner) {
+ var range, folds;
+ if (location == null) {
+ range = new Range(0, 0, this.getLength(), 0);
+ expandInner = true;
+ } else if (typeof location == "number")
+ range = new Range(location, 0, location, this.getLine(location).length);
+ else if ("row" in location)
+ range = Range.fromPoints(location, location);
+ else
+ range = location;
+
+ folds = this.getFoldsInRange(range);
+ if (expandInner) {
+ this.removeFolds(folds);
+ } else {
+ // TODO: might need to remove and add folds in one go instead of using
+ // expandFolds several times.
+ while (folds.length) {
+ this.expandFolds(folds);
+ folds = this.getFoldsInRange(range);
+ }
+ }
+ };
+
+ /*
+ * Checks if a given documentRow is folded. This is true if there are some
+ * folded parts such that some parts of the line is still visible.
+ **/
+ this.isRowFolded = function(docRow, startFoldRow) {
+ return !!this.getFoldLine(docRow, startFoldRow);
+ };
+
+ this.getRowFoldEnd = function(docRow, startFoldRow) {
+ var foldLine = this.getFoldLine(docRow, startFoldRow);
+ return foldLine ? foldLine.end.row : docRow;
+ };
+
+ this.getRowFoldStart = function(docRow, startFoldRow) {
+ var foldLine = this.getFoldLine(docRow, startFoldRow);
+ return foldLine ? foldLine.start.row : docRow;
+ };
+
+ this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
+ if (startRow == null) {
+ startRow = foldLine.start.row;
+ startColumn = 0;
+ }
+
+ if (endRow == null) {
+ endRow = foldLine.end.row;
+ endColumn = this.getLine(endRow).length;
+ }
+
+ // Build the textline using the FoldLine walker.
+ var doc = this.doc;
+ var textLine = "";
+
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ if (row < startRow)
+ return;
+ if (row == startRow) {
+ if (column < startColumn)
+ return;
+ lastColumn = Math.max(startColumn, lastColumn);
+ }
+
+ if (placeholder != null) {
+ textLine += placeholder;
+ } else {
+ textLine += doc.getLine(row).substring(lastColumn, column);
+ }
+ }, endRow, endColumn);
+ return textLine;
+ };
+
+ this.getDisplayLine = function(row, endColumn, startRow, startColumn) {
+ var foldLine = this.getFoldLine(row);
+
+ if (!foldLine) {
+ var line;
+ line = this.doc.getLine(row);
+ return line.substring(startColumn || 0, endColumn || line.length);
+ } else {
+ return this.getFoldDisplayLine(
+ foldLine, row, endColumn, startRow, startColumn);
+ }
+ };
+
+ this.$cloneFoldData = function() {
+ var fd = [];
+ fd = this.$foldData.map(function(foldLine) {
+ var folds = foldLine.folds.map(function(fold) {
+ return fold.clone();
+ });
+ return new FoldLine(fd, folds);
+ });
+
+ return fd;
+ };
+
+ this.toggleFold = function(tryToUnfold) {
+ var selection = this.selection;
+ var range = selection.getRange();
+ var fold;
+ var bracketPos;
+
+ if (range.isEmpty()) {
+ var cursor = range.start;
+ fold = this.getFoldAt(cursor.row, cursor.column);
+
+ if (fold) {
+ this.expandFold(fold);
+ return;
+ } else if (bracketPos = this.findMatchingBracket(cursor)) {
+ if (range.comparePoint(bracketPos) == 1) {
+ range.end = bracketPos;
+ } else {
+ range.start = bracketPos;
+ range.start.column++;
+ range.end.column--;
+ }
+ } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {
+ if (range.comparePoint(bracketPos) == 1)
+ range.end = bracketPos;
+ else
+ range.start = bracketPos;
+
+ range.start.column++;
+ } else {
+ range = this.getCommentFoldRange(cursor.row, cursor.column) || range;
+ }
+ } else {
+ var folds = this.getFoldsInRange(range);
+ if (tryToUnfold && folds.length) {
+ this.expandFolds(folds);
+ return;
+ } else if (folds.length == 1 ) {
+ fold = folds[0];
+ }
+ }
+
+ if (!fold)
+ fold = this.getFoldAt(range.start.row, range.start.column);
+
+ if (fold && fold.range.toString() == range.toString()) {
+ this.expandFold(fold);
+ return;
+ }
+
+ var placeholder = "...";
+ if (!range.isMultiLine()) {
+ placeholder = this.getTextRange(range);
+ if(placeholder.length < 4)
+ return;
+ placeholder = placeholder.trim().substring(0, 2) + "..";
+ }
+
+ this.addFold(placeholder, range);
+ };
+
+ this.getCommentFoldRange = function(row, column, dir) {
+ var iterator = new TokenIterator(this, row, column);
+ var token = iterator.getCurrentToken();
+ if (token && /^comment|string/.test(token.type)) {
+ var range = new Range();
+ var re = new RegExp(token.type.replace(/\..*/, "\\."));
+ if (dir != 1) {
+ do {
+ token = iterator.stepBackward();
+ } while(token && re.test(token.type));
+ iterator.stepForward();
+ }
+
+ range.start.row = iterator.getCurrentTokenRow();
+ range.start.column = iterator.getCurrentTokenColumn() + 2;
+
+ iterator = new TokenIterator(this, row, column);
+
+ if (dir != -1) {
+ do {
+ token = iterator.stepForward();
+ } while(token && re.test(token.type));
+ token = iterator.stepBackward();
+ } else
+ token = iterator.getCurrentToken();
+
+ range.end.row = iterator.getCurrentTokenRow();
+ range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;
+ return range;
+ }
+ };
+
+ this.foldAll = function(startRow, endRow, depth) {
+ if (depth == undefined)
+ depth = 100000; // JSON.stringify doesn't hanle Infinity
+ var foldWidgets = this.foldWidgets;
+ endRow = endRow || this.getLength();
+ startRow = startRow || 0;
+ for (var row = startRow; row < endRow; row++) {
+ if (foldWidgets[row] == null)
+ foldWidgets[row] = this.getFoldWidget(row);
+ if (foldWidgets[row] != "start")
+ continue;
+
+ var range = this.getFoldWidgetRange(row);
+ var rangeEndRow = range.end.row;
+ // sometimes range can be incompatible with existing fold
+ // TODO change addFold to return null istead of throwing
+ if (range && range.isMultiLine()
+ && rangeEndRow <= endRow
+ && range.start.row >= startRow
+ ) try {
+ var fold = this.addFold("...", range);
+ fold.collapseChildren = depth;
+ // addFold can change the range
+ row = rangeEndRow;
+ } catch(e) {}
+ }
+ };
+
+ // structured folding
+ this.$foldStyles = {
+ "manual": 1,
+ "markbegin": 1,
+ "markbeginend": 1
+ };
+ this.$foldStyle = "markbegin";
+ this.setFoldStyle = function(style) {
+ if (!this.$foldStyles[style])
+ throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]");
+
+ if (this.$foldStyle == style)
+ return;
+
+ this.$foldStyle = style;
+
+ if (style == "manual")
+ this.unfold();
+
+ // reset folding
+ var mode = this.$foldMode;
+ this.$setFolding(null);
+ this.$setFolding(mode);
+ };
+
+ this.$setFolding = function(foldMode) {
+ if (this.$foldMode == foldMode)
+ return;
+
+ this.$foldMode = foldMode;
+
+ this.removeListener('change', this.$updateFoldWidgets);
+ this._emit("changeAnnotation");
+
+ if (!foldMode || this.$foldStyle == "manual") {
+ this.foldWidgets = null;
+ return;
+ }
+
+ this.foldWidgets = [];
+ this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);
+ this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);
+
+ this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);
+ this.on('change', this.$updateFoldWidgets);
+
+ };
+
+ this.getParentFoldRangeData = function (row, ignoreCurrent) {
+ var fw = this.foldWidgets;
+ if (!fw || (ignoreCurrent && fw[row]))
+ return {};
+
+ var i = row - 1, firstRange;
+ while (i >= 0) {
+ var c = fw[i];
+ if (c == null)
+ c = fw[i] = this.getFoldWidget(i);
+
+ if (c == "start") {
+ var range = this.getFoldWidgetRange(i);
+ if (!firstRange)
+ firstRange = range;
+ if (range && range.end.row >= row)
+ break;
+ }
+ i--;
+ }
+
+ return {
+ range: i !== -1 && range,
+ firstRange: firstRange
+ };
+ }
+
+ this.onFoldWidgetClick = function(row, e) {
+ var type = this.getFoldWidget(row);
+ var line = this.getLine(row);
+ e = e.domEvent;
+ var children = e.shiftKey;
+ var all = e.ctrlKey || e.metaKey;
+ var siblings = e.altKey;
+
+ var dir = type === "end" ? -1 : 1;
+ var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);
+
+ if (fold) {
+ if (children || all)
+ this.removeFold(fold);
+ else
+ this.expandFold(fold);
+ return;
+ }
+
+ var range = this.getFoldWidgetRange(row);
+ // sometimes singleline folds can be missed by the code above
+ if (range && !range.isMultiLine()) {
+ fold = this.getFoldAt(range.start.row, range.start.column, 1);
+ if (fold && range.isEqual(fold.range)) {
+ this.removeFold(fold);
+ return;
+ }
+ }
+
+ if (siblings) {
+ var data = this.getParentFoldRangeData(row);
+ if (data.range) {
+ var startRow = data.range.start.row + 1;
+ var endRow = data.range.end.row;
+ }
+ this.foldAll(startRow, endRow, all ? 10000 : 0);
+ } else if (children) {
+ var endRow = range ? range.end.row : this.getLength();
+ this.foldAll(row + 1, range.end.row, all ? 10000 : 0);
+ } else if (range) {
+ if (all)
+ range.collapseChildren = 10000;
+ this.addFold("...", range);
+ }
+
+ if (!range)
+ (e.target || e.srcElement).className += " ace_invalid"
+ };
+
+ this.updateFoldWidgets = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ var firstRow = range.start.row;
+ var len = range.end.row - firstRow;
+
+ if (len === 0) {
+ this.foldWidgets[firstRow] = null;
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.foldWidgets.splice(firstRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.foldWidgets.splice.apply(this.foldWidgets, args);
+ }
+ };
+
+}
+
+exports.Folding = Folding;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/edit_session_test.js b/src/fauxton/assets/js/libs/ace/edit_session_test.js
new file mode 100644
index 000000000..87cc9567c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/edit_session_test.js
@@ -0,0 +1,1075 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("./lib/lang");
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var UndoManager = require("./undomanager").UndoManager;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+var JavaScriptMode = require("./mode/javascript").Mode;
+
+function createFoldTestSession() {
+ var lines = [
+ "function foo(items) {",
+ " for (var i=0; i<items.length; i++) {",
+ " alert(items[i] + \"juhu\");",
+ " } // Real Tab.",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"));
+ session.setUndoManager(new UndoManager());
+ session.addFold("args...", new Range(0, 13, 0, 18));
+ session.addFold("foo...", new Range(1, 10, 2, 10));
+ session.addFold("bar...", new Range(2, 20, 2, 25));
+ return session;
+}
+
+function assertArray(a, b) {
+ assert.equal(a+"", b+"");
+ assert.ok(a.length == b.length);
+ for (var i = 0; i < a.length; i++) {
+ assert.equal(a[i], b[i]);
+ }
+}
+
+module.exports = {
+
+ "test: find matching opening bracket in Text mode" : function() {
+ var session = new EditSession(["(()(", "())))"]);
+
+ assert.position(session.findMatchingBracket({row: 0, column: 3}), 0, 1);
+ assert.position(session.findMatchingBracket({row: 1, column: 2}), 1, 0);
+ assert.position(session.findMatchingBracket({row: 1, column: 3}), 0, 3);
+ assert.position(session.findMatchingBracket({row: 1, column: 4}), 0, 0);
+ assert.equal(session.findMatchingBracket({row: 1, column: 5}), null);
+ },
+
+ "test: find matching closing bracket in Text mode" : function() {
+ var session = new EditSession(["(()(", "())))"]);
+
+ assert.position(session.findMatchingBracket({row: 1, column: 1}), 1, 1);
+ assert.position(session.findMatchingBracket({row: 1, column: 1}), 1, 1);
+ assert.position(session.findMatchingBracket({row: 0, column: 4}), 1, 2);
+ assert.position(session.findMatchingBracket({row: 0, column: 2}), 0, 2);
+ assert.position(session.findMatchingBracket({row: 0, column: 1}), 1, 3);
+ assert.equal(session.findMatchingBracket({row: 0, column: 0}), null);
+ },
+
+ "test: find matching opening bracket in JavaScript mode" : function() {
+ var lines = [
+ "function foo() {",
+ " var str = \"{ foo()\";",
+ " if (debug) {",
+ " // write str (a string) to the console",
+ " console.log(str);",
+ " }",
+ " str += \" bar() }\";",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ assert.position(session.findMatchingBracket({row: 0, column: 14}), 0, 12);
+ assert.position(session.findMatchingBracket({row: 7, column: 1}), 0, 15);
+ assert.position(session.findMatchingBracket({row: 6, column: 20}), 1, 15);
+ assert.position(session.findMatchingBracket({row: 1, column: 22}), 1, 20);
+ assert.position(session.findMatchingBracket({row: 3, column: 31}), 3, 21);
+ assert.position(session.findMatchingBracket({row: 4, column: 24}), 4, 19);
+ assert.equal(session.findMatchingBracket({row: 0, column: 1}), null);
+ },
+
+ "test: find matching closing bracket in JavaScript mode" : function() {
+ var lines = [
+ "function foo() {",
+ " var str = \"{ foo()\";",
+ " if (debug) {",
+ " // write str (a string) to the console",
+ " console.log(str);",
+ " }",
+ " str += \" bar() }\";",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ assert.position(session.findMatchingBracket({row: 0, column: 13}), 0, 13);
+ assert.position(session.findMatchingBracket({row: 0, column: 16}), 7, 0);
+ assert.position(session.findMatchingBracket({row: 1, column: 16}), 6, 19);
+ assert.position(session.findMatchingBracket({row: 1, column: 21}), 1, 21);
+ assert.position(session.findMatchingBracket({row: 3, column: 22}), 3, 30);
+ assert.position(session.findMatchingBracket({row: 4, column: 20}), 4, 23);
+ },
+
+ "test: handle unbalanced brackets in JavaScript mode" : function() {
+ var lines = [
+ "function foo() {",
+ " var str = \"{ foo()\";",
+ " if (debug) {",
+ " // write str a string) to the console",
+ " console.log(str);",
+ " ",
+ " str += \" bar() \";",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ assert.equal(session.findMatchingBracket({row: 0, column: 16}), null);
+ assert.equal(session.findMatchingBracket({row: 3, column: 30}), null);
+ assert.equal(session.findMatchingBracket({row: 1, column: 16}), null);
+ },
+
+ "test: match different bracket types" : function() {
+ var session = new EditSession(["({[", ")]}"]);
+
+ assert.position(session.findMatchingBracket({row: 0, column: 1}), 1, 0);
+ assert.position(session.findMatchingBracket({row: 0, column: 2}), 1, 2);
+ assert.position(session.findMatchingBracket({row: 0, column: 3}), 1, 1);
+
+ assert.position(session.findMatchingBracket({row: 1, column: 1}), 0, 0);
+ assert.position(session.findMatchingBracket({row: 1, column: 2}), 0, 2);
+ assert.position(session.findMatchingBracket({row: 1, column: 3}), 0, 1);
+ },
+
+ "test: move lines down" : function() {
+ var session = new EditSession(["a1", "a2", "a3", "a4"]);
+
+ session.moveLinesDown(0, 1);
+ assert.equal(session.getValue(), ["a3", "a1", "a2", "a4"].join("\n"));
+
+ session.moveLinesDown(1, 2);
+ assert.equal(session.getValue(), ["a3", "a4", "a1", "a2"].join("\n"));
+
+ session.moveLinesDown(2, 3);
+ assert.equal(session.getValue(), ["a3", "a4", "a1", "a2"].join("\n"));
+
+ session.moveLinesDown(2, 2);
+ assert.equal(session.getValue(), ["a3", "a4", "a2", "a1"].join("\n"));
+ },
+
+ "test: move lines up" : function() {
+ var session = new EditSession(["a1", "a2", "a3", "a4"]);
+
+ session.moveLinesUp(2, 3);
+ assert.equal(session.getValue(), ["a1", "a3", "a4", "a2"].join("\n"));
+
+ session.moveLinesUp(1, 2);
+ assert.equal(session.getValue(), ["a3", "a4", "a1", "a2"].join("\n"));
+
+ session.moveLinesUp(0, 1);
+ assert.equal(session.getValue(), ["a3", "a4", "a1", "a2"].join("\n"));
+
+ session.moveLinesUp(2, 2);
+ assert.equal(session.getValue(), ["a3", "a1", "a4", "a2"].join("\n"));
+ },
+
+ "test: duplicate lines" : function() {
+ var session = new EditSession(["1", "2", "3", "4"]);
+
+ session.duplicateLines(1, 2);
+ assert.equal(session.getValue(), ["1", "2", "3", "2", "3", "4"].join("\n"));
+ },
+
+ "test: duplicate last line" : function() {
+ var session = new EditSession(["1", "2", "3"]);
+
+ session.duplicateLines(2, 2);
+ assert.equal(session.getValue(), ["1", "2", "3", "3"].join("\n"));
+ },
+
+ "test: duplicate first line" : function() {
+ var session = new EditSession(["1", "2", "3"]);
+
+ session.duplicateLines(0, 0);
+ assert.equal(session.getValue(), ["1", "1", "2", "3"].join("\n"));
+ },
+
+ "test: getScreenLastRowColumn": function() {
+ var session = new EditSession([
+ "juhu",
+ "12\t\t34",
+ "ぁぁa"
+ ]);
+
+ assert.equal(session.getScreenLastRowColumn(0), 4);
+ assert.equal(session.getScreenLastRowColumn(1), 10);
+ assert.equal(session.getScreenLastRowColumn(2), 5);
+ },
+
+ "test: convert document to screen coordinates" : function() {
+ var session = new EditSession("01234\t567890\t1234");
+ session.setTabSize(4);
+
+ assert.equal(session.documentToScreenColumn(0, 0), 0);
+ assert.equal(session.documentToScreenColumn(0, 4), 4);
+ assert.equal(session.documentToScreenColumn(0, 5), 5);
+ assert.equal(session.documentToScreenColumn(0, 6), 8);
+ assert.equal(session.documentToScreenColumn(0, 12), 14);
+ assert.equal(session.documentToScreenColumn(0, 13), 16);
+
+ session.setTabSize(2);
+
+ assert.equal(session.documentToScreenColumn(0, 0), 0);
+ assert.equal(session.documentToScreenColumn(0, 4), 4);
+ assert.equal(session.documentToScreenColumn(0, 5), 5);
+ assert.equal(session.documentToScreenColumn(0, 6), 6);
+ assert.equal(session.documentToScreenColumn(0, 7), 7);
+ assert.equal(session.documentToScreenColumn(0, 12), 12);
+ assert.equal(session.documentToScreenColumn(0, 13), 14);
+ },
+
+ "test: convert document to screen coordinates with leading tabs": function() {
+ var session = new EditSession("\t\t123");
+ session.setTabSize(4);
+
+ assert.equal(session.documentToScreenColumn(0, 0), 0);
+ assert.equal(session.documentToScreenColumn(0, 1), 4);
+ assert.equal(session.documentToScreenColumn(0, 2), 8);
+ assert.equal(session.documentToScreenColumn(0, 3), 9);
+ },
+
+ "test: documentToScreen without soft wrap": function() {
+ var session = new EditSession([
+ "juhu",
+ "12\t\t34",
+ "ぁぁa"
+ ]);
+
+ assert.position(session.documentToScreenPosition(0, 3), 0, 3);
+ assert.position(session.documentToScreenPosition(1, 3), 1, 4);
+ assert.position(session.documentToScreenPosition(1, 4), 1, 8);
+ assert.position(session.documentToScreenPosition(2, 2), 2, 4);
+ },
+
+ "test: documentToScreen with soft wrap": function() {
+ var session = new EditSession(["foo bar foo bar"]);
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(12, 12);
+ session.adjustWrapLimit(80);
+
+ assert.position(session.documentToScreenPosition(0, 11), 0, 11);
+ assert.position(session.documentToScreenPosition(0, 12), 1, 0);
+ },
+
+ "test: documentToScreen with soft wrap and multibyte characters": function() {
+ var session = new EditSession(["ぁぁa"]);
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(2, 2);
+ session.adjustWrapLimit(80);
+
+ assert.position(session.documentToScreenPosition(0, 1), 1, 0);
+ assert.position(session.documentToScreenPosition(0, 2), 2, 0);
+ assert.position(session.documentToScreenPosition(0, 4), 2, 1);
+ },
+
+ "test: documentToScreen should clip position to the document boundaries": function() {
+ var session = new EditSession("foo bar\njuhu kinners");
+
+ assert.position(session.documentToScreenPosition(-1, 4), 0, 0);
+ assert.position(session.documentToScreenPosition(3, 0), 1, 12);
+ },
+
+ "test: convert screen to document coordinates" : function() {
+ var session = new EditSession("01234\t567890\t1234");
+ session.setTabSize(4);
+
+ assert.equal(session.screenToDocumentColumn(0, 0), 0);
+ assert.equal(session.screenToDocumentColumn(0, 4), 4);
+ assert.equal(session.screenToDocumentColumn(0, 5), 5);
+ assert.equal(session.screenToDocumentColumn(0, 6), 5);
+ assert.equal(session.screenToDocumentColumn(0, 7), 5);
+ assert.equal(session.screenToDocumentColumn(0, 8), 6);
+ assert.equal(session.screenToDocumentColumn(0, 9), 7);
+ assert.equal(session.screenToDocumentColumn(0, 15), 12);
+ assert.equal(session.screenToDocumentColumn(0, 19), 16);
+
+ session.setTabSize(2);
+
+ assert.equal(session.screenToDocumentColumn(0, 0), 0);
+ assert.equal(session.screenToDocumentColumn(0, 4), 4);
+ assert.equal(session.screenToDocumentColumn(0, 5), 5);
+ assert.equal(session.screenToDocumentColumn(0, 6), 6);
+ assert.equal(session.screenToDocumentColumn(0, 12), 12);
+ assert.equal(session.screenToDocumentColumn(0, 13), 12);
+ assert.equal(session.screenToDocumentColumn(0, 14), 13);
+ },
+
+ "test: screenToDocument with soft wrap": function() {
+ var session = new EditSession(["foo bar foo bar"]);
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(12, 12);
+ session.adjustWrapLimit(80);
+
+ assert.position(session.screenToDocumentPosition(1, 0), 0, 12);
+ assert.position(session.screenToDocumentPosition(0, 11), 0, 11);
+ // Check if the position is clamped the right way.
+ assert.position(session.screenToDocumentPosition(0, 12), 0, 11);
+ assert.position(session.screenToDocumentPosition(0, 20), 0, 11);
+ },
+
+ "test: screenToDocument with soft wrap and multi byte characters": function() {
+ var session = new EditSession(["ぁ a"]);
+ session.setUseWrapMode(true);
+ session.adjustWrapLimit(80);
+
+ assert.position(session.screenToDocumentPosition(0, 1), 0, 0);
+ assert.position(session.screenToDocumentPosition(0, 2), 0, 1);
+ assert.position(session.screenToDocumentPosition(0, 3), 0, 2);
+ assert.position(session.screenToDocumentPosition(0, 4), 0, 3);
+ assert.position(session.screenToDocumentPosition(0, 5), 0, 3);
+ },
+
+ "test: screenToDocument should clip position to the document boundaries": function() {
+ var session = new EditSession("foo bar\njuhu kinners");
+
+ assert.position(session.screenToDocumentPosition(-1, 4), 0, 0);
+ assert.position(session.screenToDocumentPosition(0, -1), 0, 0);
+ assert.position(session.screenToDocumentPosition(0, 30), 0, 7);
+ assert.position(session.screenToDocumentPosition(2, 4), 1, 12);
+ assert.position(session.screenToDocumentPosition(1, 30), 1, 12);
+ assert.position(session.screenToDocumentPosition(20, 50), 1, 12);
+ assert.position(session.screenToDocumentPosition(20, 5), 1, 12);
+
+ // and the same for folded rows
+ session.addFold("...", new Range(0,1,1,3));
+ assert.position(session.screenToDocumentPosition(1, 2), 1, 12);
+ // for wrapped rows
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(5,5);
+ assert.position(session.screenToDocumentPosition(4, 1), 1, 12);
+ },
+
+ "test: wrapLine split function" : function() {
+ function computeAndAssert(line, assertEqual, wrapLimit, tabSize) {
+ wrapLimit = wrapLimit || 12;
+ tabSize = tabSize || 4;
+ line = lang.stringTrimRight(line);
+ var tokens = EditSession.prototype.$getDisplayTokens(line);
+ var splits = EditSession.prototype.$computeWrapSplits(tokens, wrapLimit, tabSize);
+ // console.log("String:", line, "Result:", splits, "Expected:", assertEqual);
+ assert.ok(splits.length == assertEqual.length);
+ for (var i = 0; i < splits.length; i++) {
+ assert.ok(splits[i] == assertEqual[i]);
+ }
+ }
+
+ EditSession.prototype.$wrapAsCode = true;
+ // Basic splitting.
+ computeAndAssert("foo bar foo bar", [ 12 ]);
+ computeAndAssert("foo bar f bar", [ 12 ]);
+ computeAndAssert("foo bar f r", [ 12 ]); // 14 if we enable
+ computeAndAssert("foo bar foo bar foo bara foo", [12, 25]);
+
+ // Don't split if there is only whitespaces/tabs at the end of the line.
+ computeAndAssert("foo foo foo \t \t", [ ]);
+
+ // If there is no space to split, force split.
+ computeAndAssert("foooooooooooooo", [ 12 ]);
+ computeAndAssert("fooooooooooooooooooooooooooo", [12, 24]);
+ computeAndAssert("foo bar fooooooooooobooooooo", [8, 20]);
+
+ // Basic splitting + tabs.
+ computeAndAssert("foo \t\tbar", [ 6 ]);
+ computeAndAssert("foo \t \tbar", [ 7 ]);
+
+ // Ignore spaces/tabs at beginning of split.
+ computeAndAssert("foo \t \t \t \t bar", [ 7 ]); // 14
+
+ // Test wrapping for asian characters.
+ computeAndAssert("ぁぁ", [1], 2);
+ computeAndAssert(" ぁぁ", [1, 2], 2);
+ computeAndAssert(" ぁ\tぁ", [1, 3], 2);
+ computeAndAssert(" ぁぁ\tぁ", [1, 4], 4);
+
+ // Test wrapping for punctuation.
+ computeAndAssert(" ab.c;ef++", [1, 3, 5, 7, 8], 2);
+ computeAndAssert(" a.b", [1, 2, 3], 1);
+ computeAndAssert("#>>", [1, 2], 1);
+
+ // Test wrapping for punctuation in
+ EditSession.prototype.$wrapAsCode = false;
+ computeAndAssert("ab cde, Juhu kinners", [3, 8, 13, 19], 6);
+ },
+
+ "test get longest line" : function() {
+ var session = new EditSession(["12"]);
+ session.setTabSize(4);
+ assert.equal(session.getScreenWidth(), 2);
+
+ session.doc.insertNewLine({row: 0, column: Infinity});
+ session.doc.insertLines(1, ["123"]);
+ assert.equal(session.getScreenWidth(), 3);
+
+ session.doc.insertNewLine({row: 0, column: Infinity});
+ session.doc.insertLines(1, ["\t\t"]);
+
+ assert.equal(session.getScreenWidth(), 8);
+
+ session.setTabSize(2);
+ assert.equal(session.getScreenWidth(), 4);
+ },
+
+ "test getDisplayString": function() {
+ var session = new EditSession(["12"]);
+ session.setTabSize(4);
+
+ assert.equal(session.$getDisplayTokens("\t").length, 4);
+ assert.equal(session.$getDisplayTokens("abc").length, 3);
+ assert.equal(session.$getDisplayTokens("abc\t").length, 4);
+ },
+
+ "test issue 83": function() {
+ var session = new EditSession("");
+ var editor = new Editor(new MockRenderer(), session);
+ var document = session.getDocument();
+
+ session.setUseWrapMode(true);
+
+ document.insertLines(0, ["a", "b"]);
+ document.insertLines(2, ["c", "d"]);
+ document.removeLines(1, 2);
+ },
+
+ "test wrapMode init has to create wrapData array": function() {
+ var session = new EditSession("foo bar\nfoo bar");
+ var editor = new Editor(new MockRenderer(), session);
+ var document = session.getDocument();
+
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(3, 3);
+ session.adjustWrapLimit(80);
+
+ // Test if wrapData is there and was computed.
+ assert.equal(session.$wrapData.length, 2);
+ assert.equal(session.$wrapData[0].length, 1);
+ assert.equal(session.$wrapData[1].length, 1);
+ },
+
+ "test first line blank with wrap": function() {
+ var session = new EditSession("\nfoo");
+ session.setUseWrapMode(true);
+ assert.equal(session.doc.getValue(), ["", "foo"].join("\n"));
+ },
+
+ "test first line blank with wrap 2" : function() {
+ var session = new EditSession("");
+ session.setUseWrapMode(true);
+ session.setValue("\nfoo");
+
+ assert.equal(session.doc.getValue(), ["", "foo"].join("\n"));
+ },
+
+ "test fold getFoldDisplayLine": function() {
+ var session = createFoldTestSession();
+ function assertDisplayLine(foldLine, str) {
+ var line = session.getLine(foldLine.end.row);
+ var displayLine =
+ session.getFoldDisplayLine(foldLine, foldLine.end.row, line.length);
+ assert.equal(displayLine, str);
+ }
+
+ assertDisplayLine(session.$foldData[0], "function foo(args...) {")
+ assertDisplayLine(session.$foldData[1], " for (vfoo...ert(items[bar...\"juhu\");");
+ },
+
+ "test foldLine idxToPosition": function() {
+ var session = createFoldTestSession();
+
+ function assertIdx2Pos(foldLineIdx, idx, row, column) {
+ var foldLine = session.$foldData[foldLineIdx];
+ assert.position(foldLine.idxToPosition(idx), row, column);
+ }
+
+// "function foo(items) {",
+// " for (var i=0; i<items.length; i++) {",
+// " alert(items[i] + \"juhu\");",
+// " } // Real Tab.",
+// "}"
+
+ assertIdx2Pos(0, 12, 0, 12);
+ assertIdx2Pos(0, 13, 0, 13);
+ assertIdx2Pos(0, 14, 0, 13);
+ assertIdx2Pos(0, 19, 0, 13);
+ assertIdx2Pos(0, 20, 0, 18);
+
+ assertIdx2Pos(1, 10, 1, 10);
+ assertIdx2Pos(1, 11, 1, 10);
+ assertIdx2Pos(1, 15, 1, 10);
+ assertIdx2Pos(1, 16, 2, 10);
+ assertIdx2Pos(1, 26, 2, 20);
+ assertIdx2Pos(1, 27, 2, 20);
+ assertIdx2Pos(1, 32, 2, 25);
+ },
+
+ "test fold documentToScreen": function() {
+ var session = createFoldTestSession();
+ function assertDoc2Screen(docRow, docCol, screenRow, screenCol) {
+ assert.position(
+ session.documentToScreenPosition(docRow, docCol),
+ screenRow, screenCol
+ );
+ }
+
+ // One fold ending in the same row.
+ assertDoc2Screen(0, 0, 0, 0);
+ assertDoc2Screen(0, 13, 0, 13);
+ assertDoc2Screen(0, 14, 0, 13);
+ assertDoc2Screen(0, 17, 0, 13);
+ assertDoc2Screen(0, 18, 0, 20);
+
+ // Fold ending on some other row.
+ assertDoc2Screen(1, 0, 1, 0);
+ assertDoc2Screen(1, 10, 1, 10);
+ assertDoc2Screen(1, 11, 1, 10);
+ assertDoc2Screen(1, 99, 1, 10);
+
+ assertDoc2Screen(2, 0, 1, 10);
+ assertDoc2Screen(2, 9, 1, 10);
+ assertDoc2Screen(2, 10, 1, 16);
+ assertDoc2Screen(2, 11, 1, 17);
+
+ // Fold in the same row with fold over more then one row in the same row.
+ assertDoc2Screen(2, 19, 1, 25);
+ assertDoc2Screen(2, 20, 1, 26);
+ assertDoc2Screen(2, 21, 1, 26);
+
+ assertDoc2Screen(2, 24, 1, 26);
+ assertDoc2Screen(2, 25, 1, 32);
+ assertDoc2Screen(2, 26, 1, 33);
+ assertDoc2Screen(2, 99, 1, 40);
+
+ // Test one position after the folds. Should be all like normal.
+ assertDoc2Screen(3, 0, 2, 0);
+ },
+
+ "test fold screenToDocument": function() {
+ var session = createFoldTestSession();
+ function assertScreen2Doc(docRow, docCol, screenRow, screenCol) {
+ assert.position(
+ session.screenToDocumentPosition(screenRow, screenCol),
+ docRow, docCol
+ );
+ }
+
+ // One fold ending in the same row.
+ assertScreen2Doc(0, 0, 0, 0);
+ assertScreen2Doc(0, 13, 0, 13);
+ assertScreen2Doc(0, 13, 0, 14);
+ assertScreen2Doc(0, 18, 0, 20);
+ assertScreen2Doc(0, 19, 0, 21);
+
+ // Fold ending on some other row.
+ assertScreen2Doc(1, 0, 1, 0);
+ assertScreen2Doc(1, 10, 1, 10);
+ assertScreen2Doc(1, 10, 1, 11);
+
+ assertScreen2Doc(1, 10, 1, 15);
+ assertScreen2Doc(2, 10, 1, 16);
+ assertScreen2Doc(2, 11, 1, 17);
+
+ // Fold in the same row with fold over more then one row in the same row.
+ assertScreen2Doc(2, 19, 1, 25);
+ assertScreen2Doc(2, 20, 1, 26);
+ assertScreen2Doc(2, 20, 1, 27);
+
+ assertScreen2Doc(2, 20, 1, 31);
+ assertScreen2Doc(2, 25, 1, 32);
+ assertScreen2Doc(2, 26, 1, 33);
+ assertScreen2Doc(2, 33, 1, 99);
+
+ // Test one position after the folds. Should be all like normal.
+ assertScreen2Doc(3, 0, 2, 0);
+ },
+
+ "test getFoldsInRange()": function() {
+ var session = createFoldTestSession();
+ var foldLines = session.$foldData;
+ var folds = foldLines[0].folds.concat(foldLines[1].folds);
+
+ function test(startRow, startColumn, endColumn, endRow, folds) {
+ var r = new Range(startRow, startColumn, endColumn, endRow);
+ var retFolds = session.getFoldsInRange(r);
+
+ assert.ok(retFolds.length == folds.length);
+ for (var i = 0; i < retFolds.length; i++) {
+ assert.equal(retFolds[i].range + "", folds[i].range + "");
+ }
+ }
+
+ test(0, 0, 0, 13, [ ]);
+ test(0, 0, 0, 14, [ folds[0] ]);
+ test(0, 0, 0, 18, [ folds[0] ]);
+ test(0, 0, 1, 10, [ folds[0] ]);
+ test(0, 0, 1, 11, [ folds[0], folds[1] ]);
+ test(0, 18, 1, 11, [ folds[1] ]);
+ test(2, 0, 2, 13, [ folds[1] ]);
+ test(2, 10, 2, 20, [ ]);
+ test(2, 10, 2, 11, [ ]);
+ test(2, 19, 2, 20, [ ]);
+ },
+
+ "test fold one-line text insert": function() {
+ // These are mostly test for the FoldLine.addRemoveChars function.
+ var session = createFoldTestSession();
+ var undoManager = session.getUndoManager();
+ var foldLines = session.$foldData;
+
+ function insert(row, column, text) {
+ session.insert({row: row, column: column}, text);
+
+ // Force the session to store all changes made to the document NOW
+ // on the undoManager's queue. Otherwise we can't undo in separate
+ // steps later.
+ session.$syncInformUndoManager();
+ }
+
+ var foldLine, fold, folds;
+ // First line.
+ foldLine = session.$foldData[0];
+ fold = foldLine.folds[0];
+
+ insert(0, 0, "0");
+ assert.range(foldLine.range, 0, 14, 0, 19);
+ assert.range(fold.range, 0, 14, 0, 19);
+ insert(0, 14, "1");
+ assert.range(foldLine.range, 0, 15, 0, 20);
+ assert.range(fold.range, 0, 15, 0, 20);
+ insert(0, 20, "2");
+ assert.range(foldLine.range, 0, 15, 0, 20);
+ assert.range(fold.range, 0, 15, 0, 20);
+
+ // Second line.
+ foldLine = session.$foldData[1];
+ folds = foldLine.folds;
+
+ insert(1, 0, "3");
+ assert.range(foldLine.range, 1, 11, 2, 25);
+ assert.range(folds[0].range, 1, 11, 2, 10);
+ assert.range(folds[1].range, 2, 20, 2, 25);
+
+ insert(1, 11, "4");
+ assert.range(foldLine.range, 1, 12, 2, 25);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 20, 2, 25);
+
+ insert(2, 10, "5");
+ assert.range(foldLine.range, 1, 12, 2, 26);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 21, 2, 26);
+
+ insert(2, 21, "6");
+ assert.range(foldLine.range, 1, 12, 2, 27);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 22, 2, 27);
+
+ insert(2, 27, "7");
+ assert.range(foldLine.range, 1, 12, 2, 27);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 22, 2, 27);
+
+ // UNDO = REMOVE
+ undoManager.undo(); // 6
+ assert.range(foldLine.range, 1, 12, 2, 27);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 22, 2, 27);
+
+ undoManager.undo(); // 5
+ assert.range(foldLine.range, 1, 12, 2, 26);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 21, 2, 26);
+
+ undoManager.undo(); // 4
+ assert.range(foldLine.range, 1, 12, 2, 25);
+ assert.range(folds[0].range, 1, 12, 2, 10);
+ assert.range(folds[1].range, 2, 20, 2, 25);
+
+ undoManager.undo(); // 3
+ assert.range(foldLine.range, 1, 11, 2, 25);
+ assert.range(folds[0].range, 1, 11, 2, 10);
+ assert.range(folds[1].range, 2, 20, 2, 25);
+
+ undoManager.undo(); // Beginning first line.
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 0, 15, 0, 20);
+ assert.range(foldLines[1].range, 1, 10, 2, 25);
+
+ foldLine = session.$foldData[0];
+ fold = foldLine.folds[0];
+
+ undoManager.undo(); // 2
+ assert.range(foldLine.range, 0, 15, 0, 20);
+ assert.range(fold.range, 0, 15, 0, 20);
+
+ undoManager.undo(); // 1
+ assert.range(foldLine.range, 0, 14, 0, 19);
+ assert.range(fold.range, 0, 14, 0, 19);
+
+ undoManager.undo(); // 0
+ assert.range(foldLine.range, 0, 13, 0, 18);
+ assert.range(fold.range, 0, 13, 0, 18);
+ },
+
+ "test fold multi-line insert/remove": function() {
+ var session = createFoldTestSession(),
+ undoManager = session.getUndoManager(),
+ foldLines = session.$foldData;
+ function insert(row, column, text) {
+ session.insert({row: row, column: column}, text);
+ // Force the session to store all changes made to the document NOW
+ // on the undoManager's queue. Otherwise we can't undo in separate
+ // steps later.
+ session.$syncInformUndoManager();
+ }
+
+ var foldLines = session.$foldData, foldLine, fold, folds;
+
+ insert(0, 0, "\nfo0");
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 2, 10, 3, 25);
+
+ insert(2, 0, "\nba1");
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 3, 13, 4, 25);
+
+ insert(3, 10, "\nfo2");
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 4, 6, 5, 25);
+
+ insert(5, 10, "\nba3");
+ assert.equal(foldLines.length, 3);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 4, 6, 5, 10);
+ assert.range(foldLines[2].range, 6, 13, 6, 18);
+
+ insert(6, 18, "\nfo4");
+ assert.equal(foldLines.length, 3);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 4, 6, 5, 10);
+ assert.range(foldLines[2].range, 6, 13, 6, 18);
+
+ undoManager.undo(); // 3
+ assert.equal(foldLines.length, 3);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 4, 6, 5, 10);
+ assert.range(foldLines[2].range, 6, 13, 6, 18);
+
+ undoManager.undo(); // 2
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 4, 6, 5, 25);
+
+ undoManager.undo(); // 1
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 3, 13, 4, 25);
+
+ undoManager.undo(); // 0
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 1, 16, 1, 21);
+ assert.range(foldLines[1].range, 2, 10, 3, 25);
+
+ undoManager.undo(); // Beginning
+ assert.equal(foldLines.length, 2);
+ assert.range(foldLines[0].range, 0, 13, 0, 18);
+ assert.range(foldLines[1].range, 1, 10, 2, 25);
+ // TODO: Add test for inseration inside of folds.
+ },
+
+ "test fold wrap data compution": function() {
+ function assertWrap(line0, line1, line2) {
+ line0 && assertArray(wrapData[0], line0);
+ line1 && assertArray(wrapData[1], line1);
+ line2 && assertArray(wrapData[2], line2);
+ }
+
+ function removeFoldAssertWrap(docRow, docColumn, line0, line1, line2) {
+ session.removeFold(session.getFoldAt(docRow, docColumn));
+ assertWrap(line0, line1, line2);
+ }
+
+ var lines = [
+ "foo bar foo bar",
+ "foo bar foo bar",
+ "foo bar foo bar"
+ ];
+
+ var session = new EditSession(lines.join("\n"));
+ session.setUseWrapMode(true);
+ session.$wrapLimit = 7;
+ session.$updateWrapData(0, 2);
+ var wrapData = session.$wrapData;
+
+ // Do a simple assertion without folds to check basic functionallity.
+ assertWrap([8], [8], [8]);
+
+ // --- Do in line folding ---
+
+ // Adding a fold. The split position is inside of the fold. As placeholder
+ // are not splitable, the split should be before the split.
+ session.addFold("woot", new Range(0, 4, 0, 15));
+ assertWrap([4], [8], [8]);
+
+ // Remove the fold again which should reset the wrapData.
+ removeFoldAssertWrap(0, 4, [8], [8], [8]);
+
+ session.addFold("woot", new Range(0, 6, 0, 9));
+ assertWrap([6, 13], [8], [8]);
+ removeFoldAssertWrap(0, 6, [8], [8], [8]);
+
+ // The fold fits into the wrap limit - no split expected.
+ session.addFold("woot", new Range(0, 3, 0, 15));
+ assertWrap([], [8], [8]);
+ removeFoldAssertWrap(0, 4, [8], [8], [8]);
+
+ // Fold after split position should be all fine.
+ session.addFold("woot", new Range(0, 8, 0, 15));
+ assertWrap([8], [8], [8]);
+ removeFoldAssertWrap(0, 8, [8], [8], [8]);
+
+ // Fold's placeholder is far too long for wrapSplit.
+ session.addFold("woot0123456789", new Range(0, 8, 0, 15));
+ assertWrap([8], [8], [8]);
+ removeFoldAssertWrap(0, 8, [8], [8], [8]);
+
+ // Fold's placeholder is far too long for wrapSplit
+ // + content at the end of the line
+ session.addFold("woot0123456789", new Range(0, 6, 0, 8));
+ assertWrap([6, 20], [8], [8]);
+ removeFoldAssertWrap(0, 8, [8], [8], [8]);
+
+ session.addFold("woot0123456789", new Range(0, 6, 0, 8));
+ session.addFold("woot0123456789", new Range(0, 8, 0, 10));
+ assertWrap([6, 20, 34], [8], [8]);
+ session.removeFold(session.getFoldAt(0, 7));
+ removeFoldAssertWrap(0, 8, [8], [8], [8]);
+
+ session.addFold("woot0123456789", new Range(0, 7, 0, 9));
+ session.addFold("woot0123456789", new Range(0, 13, 0, 15));
+ assertWrap([7, 21, 25], [8], [8]);
+ session.removeFold(session.getFoldAt(0, 7));
+ removeFoldAssertWrap(0, 14, [8], [8], [8]);
+
+ // --- Do some multiline folding ---
+
+ // Add a fold over two lines. Note, that the wrapData[1] stays the
+ // same. This is an implementation detail and expected behavior.
+ session.addFold("woot", new Range(0, 8, 1, 15));
+ assertWrap([8], [8 /* See comments */], [8]);
+ removeFoldAssertWrap(0, 8, [8], [8], [8]);
+
+ session.addFold("woot", new Range(0, 9, 1, 11));
+ assertWrap([8, 14], [8 /* See comments */], [8]);
+ removeFoldAssertWrap(0, 9, [8], [8], [8]);
+
+ session.addFold("woot", new Range(0, 9, 1, 15));
+ assertWrap([8], [8 /* See comments */], [8]);
+ removeFoldAssertWrap(0, 9, [8], [8], [8]);
+
+ return session;
+ },
+
+ "test delete fold with wrap enabled": function() {
+ var session = new EditSession("");
+ session.setValue([
+ "This is some placeholder text that will be folded inline.",
+ "This is some placeholder text that will be folded inline.",
+ "More text.",
+ "<p>The cursor in this paragraph text will be offset by 1 row.<p>",
+ "<p>Everything after this will be offset as well due to the folds in the row before too.</p>"
+ ].join("\n"));
+ session.addFold('...', new Range(0, 8, 0, 42));
+ session.addFold('...', new Range(1, 8, 1, 42));
+ session.addFold('...', new Range(3, 7, 3, 51));
+ session.setOption("wrap", 40);
+ session.remove(new Range(0,0, 2, 5));
+ // needed because adjustWrapLimit is called async from renderer
+ session.adjustWrapLimit(80);
+
+ assert.equal(session.$wrapData + "", [[], [], [40, 76]] + "");
+ },
+
+ "test add fold": function() {
+ var session = createFoldTestSession();
+ var fold;
+
+ function tryAddFold(placeholder, range, shouldFail) {
+ var fail = false;
+ try {
+ fold = session.addFold(placeholder, range);
+ } catch (e) {
+ fail = true;
+ }
+ if (fail != shouldFail) {
+ throw new Error("Expected to get an exception");
+ }
+ }
+
+ tryAddFold("foo", new Range(0, 13, 0, 17), false);
+ tryAddFold("foo", new Range(0, 14, 0, 18), true);
+ tryAddFold("foo", new Range(0, 13, 0, 18), false);
+ assert.equal(session.$foldData[0].folds.length, 1);
+
+ tryAddFold("f", new Range(0, 13, 0, 18), false);
+ tryAddFold("foo", new Range(0, 18, 0, 21), false);
+ assert.equal(session.$foldData[0].folds.length, 2);
+ session.removeFold(fold);
+
+ tryAddFold("foo", new Range(0, 18, 0, 22), false);
+ tryAddFold("foo", new Range(0, 18, 0, 19), true);
+ tryAddFold("foo", new Range(0, 22, 1, 10), false);
+ },
+
+ "test add subfolds": function() {
+ var session = createFoldTestSession();
+ var fold, oldFold;
+ var foldData = session.$foldData;
+
+ oldFold = foldData[0].folds[0];
+
+ fold = session.addFold("fold0", new Range(0, 10, 0, 21));
+ assert.equal(foldData[0].folds.length, 1);
+ assert.equal(fold.subFolds.length, 1);
+ assert.equal(fold.subFolds[0], oldFold);
+
+ session.expandFold(fold);
+ assert.equal(foldData[0].folds.length, 1);
+ assert.equal(foldData[0].folds[0], oldFold);
+ assert.equal(fold.subFolds.length, 0);
+
+ fold = session.addFold("fold0", new Range(0, 13, 2, 10));
+ assert.equal(foldData.length, 1);
+ assert.equal(fold.subFolds.length, 2);
+ assert.equal(fold.subFolds[0], oldFold);
+
+ session.expandFold(fold);
+ assert.equal(foldData.length, 2);
+ assert.equal(foldData[0].folds.length, 1);
+ assert.equal(foldData[0].folds[0], oldFold);
+ assert.equal(fold.subFolds.length, 0);
+
+ session.unfold(null, true);
+ fold = session.addFold("fold0", new Range(0, 0, 0, 21));
+ session.addFold("fold0", new Range(0, 1, 0, 5));
+ session.addFold("fold0", new Range(0, 6, 0, 8));
+ assert.equal(fold.subFolds.length, 2);
+ },
+
+ "test row cache": function() {
+ var session = createFoldTestSession();
+
+ session.screenToDocumentPosition(2,3);
+ assertArray(session.$docRowCache, [1,3]);
+ assertArray(session.$screenRowCache, [1,2]);
+
+ session.screenToDocumentPosition(5,3);
+ assertArray(session.$docRowCache, [1,3,4]);
+ assertArray(session.$screenRowCache, [1,2,3]);
+
+ session.screenToDocumentPosition(0,3);
+ assertArray(session.$docRowCache, [1,3,4]);
+ assertArray(session.$screenRowCache, [1,2,3]);
+
+ var pos = session.screenToDocumentPosition(0,0);
+ assert.equal(pos.row, 0);
+ assertArray(session.$docRowCache, [1,3,4]);
+ assertArray(session.$screenRowCache, [1,2,3]);
+
+ session.screenToDocumentPosition(1,0);
+ assertArray(session.$docRowCache, [1,3,4]);
+ assertArray(session.$screenRowCache, [1,2,3]);
+
+ session.$resetRowCache();
+ assertArray(session.$docRowCache, []);
+ assertArray(session.$screenRowCache, []);
+
+ session.screenToDocumentPosition(1,3);
+ assertArray(session.$docRowCache, [1]);
+ assertArray(session.$screenRowCache, [1]);
+
+ session.screenToDocumentPosition(5,3);
+ assertArray(session.$docRowCache, [1,3,4]);
+ assertArray(session.$screenRowCache, [1,2,3]);
+
+ session = new EditSession(new Array(30).join("\n"));
+ session.documentToScreenPosition(2,0);
+ session.documentToScreenPosition(2,0);
+ assertArray(session.$docRowCache, [1,2]);
+ assertArray(session.$screenRowCache, [1,2]);
+ },
+
+ "test annotations": function() {
+ var session = new EditSession([]),
+ annotation = {row: 0, type: 'info', text: "This is a test."};
+
+ session.clearAnnotations();
+ assertArray(session.getAnnotations(), []);
+ session.setAnnotations([annotation]);
+ assertArray(session.getAnnotations(), [annotation]);
+ },
+
+ "test: mode loading" : function(next) {
+ if (!require.undef) {
+ console.log("Skipping test: This test only runs in the browser");
+ next();
+ return;
+ }
+ var session = new EditSession([]);
+ session.setMode("ace/mode/javascript");
+ assert.equal(session.$modeid, "ace/mode/javascript");
+ session.on("changeMode", function() {
+ assert.equal(session.$modeid, "ace/mode/javascript");
+ });
+ session.setMode("ace/mode/sh", function(mode) {
+ assert.ok(!mode);
+ });
+ setTimeout(function() {
+ session.setMode("ace/mode/javascript", function(mode) {
+ session.setMode("ace/mode/javascript");
+ assert.equal(session.$modeid, "ace/mode/javascript");
+ next();
+ });
+ }, 0);
+ }
+};
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/editor.js b/src/fauxton/assets/js/libs/ace/editor.js
new file mode 100644
index 000000000..4ff568c95
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/editor.js
@@ -0,0 +1,2423 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var lang = require("./lib/lang");
+var useragent = require("./lib/useragent");
+var TextInput = require("./keyboard/textinput").TextInput;
+var MouseHandler = require("./mouse/mouse_handler").MouseHandler;
+var FoldHandler = require("./mouse/fold_handler").FoldHandler;
+var KeyBinding = require("./keyboard/keybinding").KeyBinding;
+var EditSession = require("./edit_session").EditSession;
+var Search = require("./search").Search;
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var CommandManager = require("./commands/command_manager").CommandManager;
+var defaultCommands = require("./commands/default_commands").commands;
+var config = require("./config");
+
+/**
+ * The main entry point into the Ace functionality.
+ *
+ * The `Editor` manages the [[EditSession]] (which manages [[Document]]s), as well as the [[VirtualRenderer]], which draws everything to the screen.
+ *
+ * Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
+ * @class Editor
+ **/
+
+/**
+ * Creates a new `Editor` object.
+ *
+ * @param {VirtualRenderer} renderer Associated `VirtualRenderer` that draws everything
+ * @param {EditSession} session The `EditSession` to refer to
+ *
+ *
+ * @constructor
+ **/
+var Editor = function(renderer, session) {
+ var container = renderer.getContainerElement();
+ this.container = container;
+ this.renderer = renderer;
+
+ this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
+ this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
+ this.renderer.textarea = this.textInput.getElement();
+ this.keyBinding = new KeyBinding(this);
+
+ // TODO detect touch event support
+ this.$mouseHandler = new MouseHandler(this);
+ new FoldHandler(this);
+
+ this.$blockScrolling = 0;
+ this.$search = new Search().set({
+ wrap: true
+ });
+
+ this.$historyTracker = this.$historyTracker.bind(this);
+ this.commands.on("exec", this.$historyTracker);
+
+ this.$initOperationListeners();
+
+ this._$emitInputEvent = lang.delayedCall(function() {
+ this._signal("input", {});
+ this.session.bgTokenizer && this.session.bgTokenizer.scheduleStart();
+ }.bind(this));
+
+ this.on("change", function(_, _self) {
+ _self._$emitInputEvent.schedule(31);
+ });
+
+ this.setSession(session || new EditSession(""));
+ config.resetOptions(this);
+ config._emit("editor", this);
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.$initOperationListeners = function() {
+ function last(a) {return a[a.length - 1]};
+
+ this.selections = [];
+ this.commands.on("exec", function(e) {
+ this.startOperation(e);
+
+ var command = e.command;
+ if (command.group == "fileJump") {
+ var prev = this.prevOp;
+ if (!prev || prev.command.group != "fileJump") {
+ this.lastFileJumpPos = last(this.selections)
+ }
+ } else {
+ this.lastFileJumpPos = null;
+ }
+ }.bind(this), true);
+
+ this.commands.on("afterExec", function(e) {
+ var command = e.command;
+
+ if (command.group == "fileJump") {
+ if (this.lastFileJumpPos && !this.curOp.selectionChanged) {
+ this.selection.fromJSON(this.lastFileJumpPos);
+ return
+ }
+ }
+ this.endOperation(e);
+ }.bind(this), true);
+
+ this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
+
+ this.on("change", function() {
+ this.curOp || this.startOperation();
+ this.curOp.docChanged = true;
+ }.bind(this), true);
+
+ this.on("changeSelection", function() {
+ this.curOp || this.startOperation();
+ this.curOp.selectionChanged = true;
+ }.bind(this), true);
+ }
+
+ this.curOp = null;
+ this.prevOp = {};
+ this.startOperation = function(commadEvent) {
+ if (this.curOp) {
+ if (!commadEvent || this.curOp.command)
+ return;
+ this.prevOp = this.curOp;
+ }
+ if (!commadEvent) {
+ this.previousCommand = null;
+ commadEvent = {};
+ }
+
+ this.$opResetTimer.schedule();
+ this.curOp = {
+ command: commadEvent.command || {},
+ args: commadEvent.args
+ };
+
+ this.selections.push(this.selection.toJSON());
+ };
+
+ this.endOperation = function() {
+ if (this.curOp) {
+ this.prevOp = this.curOp;
+ this.curOp = null;
+ }
+ };
+
+ this.$historyTracker = function(e) {
+ if (!this.$mergeUndoDeltas)
+ return;
+
+
+ var prev = this.prevOp;
+ var mergeableCommands = ["backspace", "del", "insertstring"];
+ // previous command was the same
+ var shouldMerge = prev.command && (e.command.name == prev.command.name);
+ if (e.command.name == "insertstring") {
+ var text = e.args;
+ if (this.mergeNextCommand === undefined)
+ this.mergeNextCommand = true;
+
+ shouldMerge = shouldMerge
+ && this.mergeNextCommand // previous command allows to coalesce with
+ && (!/\s/.test(text) || /\s/.test(prev.args)) // previous insertion was of same type
+
+ this.mergeNextCommand = true;
+ } else {
+ shouldMerge = shouldMerge
+ && mergeableCommands.indexOf(e.command.name) !== -1// the command is mergeable
+ }
+
+ if (
+ this.$mergeUndoDeltas != "always"
+ && Date.now() - this.sequenceStartTime > 2000
+ ) {
+ shouldMerge = false; // the sequence is too long
+ }
+
+ if (shouldMerge)
+ this.session.mergeUndoDeltas = true;
+ else if (mergeableCommands.indexOf(e.command.name) !== -1)
+ this.sequenceStartTime = Date.now();
+ };
+
+ /**
+ * Sets a new key handler, such as "vim" or "windows".
+ * @param {String} keyboardHandler The new key handler
+ *
+ *
+ **/
+ this.setKeyboardHandler = function(keyboardHandler) {
+ if (!keyboardHandler) {
+ this.keyBinding.setKeyboardHandler(null);
+ } else if (typeof keyboardHandler == "string") {
+ this.$keybindingId = keyboardHandler;
+ var _self = this;
+ config.loadModule(["keybinding", keyboardHandler], function(module) {
+ if (_self.$keybindingId == keyboardHandler)
+ _self.keyBinding.setKeyboardHandler(module && module.handler);
+ });
+ } else {
+ this.$keybindingId = null;
+ this.keyBinding.setKeyboardHandler(keyboardHandler);
+ }
+ };
+
+ /**
+ * Returns the keyboard handler, such as "vim" or "windows".
+ *
+ * @returns {String}
+ *
+ **/
+ this.getKeyboardHandler = function() {
+ return this.keyBinding.getKeyboardHandler();
+ };
+
+
+ /**
+ * Emitted whenever the [[EditSession]] changes.
+ * @event changeSession
+ * @param {Object} e An object with two properties, `oldSession` and `session`, that represent the old and new [[EditSession]]s.
+ *
+ *
+ **/
+ /**
+ * Sets a new editsession to use. This method also emits the `'changeSession'` event.
+ * @param {EditSession} session The new session to use
+ *
+ *
+ **/
+ this.setSession = function(session) {
+ if (this.session == session)
+ return;
+
+ if (this.session) {
+ var oldSession = this.session;
+ this.session.removeEventListener("change", this.$onDocumentChange);
+ this.session.removeEventListener("changeMode", this.$onChangeMode);
+ this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+ this.session.removeEventListener("changeTabSize", this.$onChangeTabSize);
+ this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+ this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode);
+ this.session.removeEventListener("onChangeFold", this.$onChangeFold);
+ this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+ this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker);
+ this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+ this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation);
+ this.session.removeEventListener("changeOverwrite", this.$onCursorChange);
+ this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange);
+ this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ var selection = this.session.getSelection();
+ selection.removeEventListener("changeCursor", this.$onCursorChange);
+ selection.removeEventListener("changeSelection", this.$onSelectionChange);
+ }
+
+ this.session = session;
+
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ session.addEventListener("change", this.$onDocumentChange);
+ this.renderer.setSession(session);
+
+ this.$onChangeMode = this.onChangeMode.bind(this);
+ session.addEventListener("changeMode", this.$onChangeMode);
+
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+ session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
+
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+ session.addEventListener("changeTabSize", this.$onChangeTabSize);
+
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+ session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
+
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+ session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
+
+ this.$onChangeFold = this.onChangeFold.bind(this);
+ session.addEventListener("changeFold", this.$onChangeFold);
+
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+ this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
+
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+ this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
+
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+ this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
+
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+ this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
+
+ this.$onCursorChange = this.onCursorChange.bind(this);
+ this.session.addEventListener("changeOverwrite", this.$onCursorChange);
+
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+ this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
+
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+ this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
+
+ this.selection = session.getSelection();
+ this.selection.addEventListener("changeCursor", this.$onCursorChange);
+
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
+ this.selection.addEventListener("changeSelection", this.$onSelectionChange);
+
+ this.onChangeMode();
+
+ this.$blockScrolling += 1;
+ this.onCursorChange();
+ this.$blockScrolling -= 1;
+
+ this.onScrollTopChange();
+ this.onScrollLeftChange();
+ this.onSelectionChange();
+ this.onChangeFrontMarker();
+ this.onChangeBackMarker();
+ this.onChangeBreakpoint();
+ this.onChangeAnnotation();
+ this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
+ this.renderer.updateFull();
+
+ this._emit("changeSession", {
+ session: session,
+ oldSession: oldSession
+ });
+ };
+
+ /**
+ * Returns the current session being used.
+ * @returns {EditSession}
+ **/
+ this.getSession = function() {
+ return this.session;
+ };
+
+ /**
+ * Sets the current document to `val`.
+ * @param {String} val The new value to set for the document
+ * @param {Number} cursorPos Where to set the new value. `undefined` or 0 is selectAll, -1 is at the document start, and 1 is at the end
+ *
+ * @returns {String} The current document value
+ * @related Document.setValue
+ **/
+ this.setValue = function(val, cursorPos) {
+ this.session.doc.setValue(val);
+
+ if (!cursorPos)
+ this.selectAll();
+ else if (cursorPos == 1)
+ this.navigateFileEnd();
+ else if (cursorPos == -1)
+ this.navigateFileStart();
+
+ return val;
+ };
+
+ /**
+ * Returns the current session's content.
+ *
+ * @returns {String}
+ * @related EditSession.getValue
+ **/
+ this.getValue = function() {
+ return this.session.getValue();
+ };
+
+ /**
+ *
+ * Returns the currently highlighted selection.
+ * @returns {String} The highlighted selection
+ **/
+ this.getSelection = function() {
+ return this.selection;
+ };
+
+ /**
+ * {:VirtualRenderer.onResize}
+ * @param {Boolean} force If `true`, recomputes the size, even if the height and width haven't changed
+ *
+ *
+ * @related VirtualRenderer.onResize
+ **/
+ this.resize = function(force) {
+ this.renderer.onResize(force);
+ };
+
+ /**
+ * {:VirtualRenderer.setTheme}
+ * @param {String} theme The path to a theme
+ *
+ *
+ **/
+ this.setTheme = function(theme) {
+ this.renderer.setTheme(theme);
+ };
+
+ /**
+ * {:VirtualRenderer.getTheme}
+ *
+ * @returns {String} The set theme
+ * @related VirtualRenderer.getTheme
+ **/
+ this.getTheme = function() {
+ return this.renderer.getTheme();
+ };
+
+ /**
+ * {:VirtualRenderer.setStyle}
+ * @param {String} style A class name
+ *
+ *
+ * @related VirtualRenderer.setStyle
+ **/
+ this.setStyle = function(style) {
+ this.renderer.setStyle(style);
+ };
+
+ /**
+ * {:VirtualRenderer.unsetStyle}
+ * @related VirtualRenderer.unsetStyle
+ **/
+ this.unsetStyle = function(style) {
+ this.renderer.unsetStyle(style);
+ };
+
+ /**
+ * Gets the current font size of the editor text.
+ */
+ this.getFontSize = function () {
+ return this.getOption("fontSize") ||
+ dom.computedStyle(this.container, "fontSize");
+ };
+
+ /**
+ * Set a new font size (in pixels) for the editor text.
+ * @param {String} size A font size ( _e.g._ "12px")
+ *
+ *
+ **/
+ this.setFontSize = function(size) {
+ this.setOption("fontSize", size);
+ };
+
+ this.$highlightBrackets = function() {
+ if (this.session.$bracketHighlight) {
+ this.session.removeMarker(this.session.$bracketHighlight);
+ this.session.$bracketHighlight = null;
+ }
+
+ if (this.$highlightPending) {
+ return;
+ }
+
+ // perform highlight async to not block the browser during navigation
+ var self = this;
+ this.$highlightPending = true;
+ setTimeout(function() {
+ self.$highlightPending = false;
+
+ var pos = self.session.findMatchingBracket(self.getCursorPosition());
+ if (pos) {
+ var range = new Range(pos.row, pos.column, pos.row, pos.column+1);
+ } else if (self.session.$mode.getMatching) {
+ var range = self.session.$mode.getMatching(self.session);
+ }
+ if (range)
+ self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text");
+ }, 50);
+ };
+
+ /**
+ *
+ * Brings the current `textInput` into focus.
+ **/
+ this.focus = function() {
+ // Safari needs the timeout
+ // iOS and Firefox need it called immediately
+ // to be on the save side we do both
+ var _self = this;
+ setTimeout(function() {
+ _self.textInput.focus();
+ });
+ this.textInput.focus();
+ };
+
+ /**
+ * Returns `true` if the current `textInput` is in focus.
+ * @return {Boolean}
+ **/
+ this.isFocused = function() {
+ return this.textInput.isFocused();
+ };
+
+ /**
+ *
+ * Blurs the current `textInput`.
+ **/
+ this.blur = function() {
+ this.textInput.blur();
+ };
+
+ /**
+ * Emitted once the editor comes into focus.
+ * @event focus
+ *
+ *
+ **/
+ this.onFocus = function() {
+ if (this.$isFocused)
+ return;
+ this.$isFocused = true;
+ this.renderer.showCursor();
+ this.renderer.visualizeFocus();
+ this._emit("focus");
+ };
+
+ /**
+ * Emitted once the editor has been blurred.
+ * @event blur
+ *
+ *
+ **/
+ this.onBlur = function() {
+ if (!this.$isFocused)
+ return;
+ this.$isFocused = false;
+ this.renderer.hideCursor();
+ this.renderer.visualizeBlur();
+ this._emit("blur");
+ };
+
+ this.$cursorChange = function() {
+ this.renderer.updateCursor();
+ };
+
+ /**
+ * Emitted whenever the document is changed.
+ * @event change
+ * @param {Object} e Contains a single property, `data`, which has the delta of changes
+ *
+ *
+ *
+ **/
+ this.onDocumentChange = function(e) {
+ var delta = e.data;
+ var range = delta.range;
+ var lastRow;
+
+ if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines")
+ lastRow = range.end.row;
+ else
+ lastRow = Infinity;
+ this.renderer.updateLines(range.start.row, lastRow);
+
+ this._emit("change", e);
+
+ // update cursor because tab characters can influence the cursor position
+ this.$cursorChange();
+ };
+
+ this.onTokenizerUpdate = function(e) {
+ var rows = e.data;
+ this.renderer.updateLines(rows.first, rows.last);
+ };
+
+
+ this.onScrollTopChange = function() {
+ this.renderer.scrollToY(this.session.getScrollTop());
+ };
+
+ this.onScrollLeftChange = function() {
+ this.renderer.scrollToX(this.session.getScrollLeft());
+ };
+
+ /**
+ * Emitted when the selection changes.
+ *
+ **/
+ this.onCursorChange = function() {
+ this.$cursorChange();
+
+ if (!this.$blockScrolling) {
+ this.renderer.scrollCursorIntoView();
+ }
+
+ this.$highlightBrackets();
+ this.$updateHighlightActiveLine();
+ this._emit("changeSelection");
+ };
+
+ this.$updateHighlightActiveLine = function() {
+ var session = this.getSession();
+
+ var highlight;
+ if (this.$highlightActiveLine) {
+ if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
+ highlight = this.getCursorPosition();
+ if (this.renderer.$maxLines && this.session.getLength() === 1)
+ highlight = false;
+ }
+
+ if (session.$highlightLineMarker && !highlight) {
+ session.removeMarker(session.$highlightLineMarker.id);
+ session.$highlightLineMarker = null;
+ } else if (!session.$highlightLineMarker && highlight) {
+ var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
+ range.id = session.addMarker(range, "ace_active-line", "screenLine");
+ session.$highlightLineMarker = range;
+ } else if (highlight) {
+ session.$highlightLineMarker.start.row = highlight.row;
+ session.$highlightLineMarker.end.row = highlight.row;
+ session.$highlightLineMarker.start.column = highlight.column;
+ session._emit("changeBackMarker");
+ }
+ };
+
+ this.onSelectionChange = function(e) {
+ var session = this.session;
+
+ if (session.$selectionMarker) {
+ session.removeMarker(session.$selectionMarker);
+ }
+ session.$selectionMarker = null;
+
+ if (!this.selection.isEmpty()) {
+ var range = this.selection.getRange();
+ var style = this.getSelectionStyle();
+ session.$selectionMarker = session.addMarker(range, "ace_selection", style);
+ } else {
+ this.$updateHighlightActiveLine();
+ }
+
+ var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()
+ this.session.highlight(re);
+
+ this._emit("changeSelection");
+ };
+
+ this.$getSelectionHighLightRegexp = function() {
+ var session = this.session;
+
+ var selection = this.getSelectionRange();
+ if (selection.isEmpty() || selection.isMultiLine())
+ return;
+
+ var startOuter = selection.start.column - 1;
+ var endOuter = selection.end.column + 1;
+ var line = session.getLine(selection.start.row);
+ var lineCols = line.length;
+ var needle = line.substring(Math.max(startOuter, 0),
+ Math.min(endOuter, lineCols));
+
+ // Make sure the outer characters are not part of the word.
+ if ((startOuter >= 0 && /^[\w\d]/.test(needle)) ||
+ (endOuter <= lineCols && /[\w\d]$/.test(needle)))
+ return;
+
+ needle = line.substring(selection.start.column, selection.end.column);
+ if (!/^[\w\d]+$/.test(needle))
+ return;
+
+ var re = this.$search.$assembleRegExp({
+ wholeWord: true,
+ caseSensitive: true,
+ needle: needle
+ });
+
+ return re;
+ };
+
+
+ this.onChangeFrontMarker = function() {
+ this.renderer.updateFrontMarkers();
+ };
+
+ this.onChangeBackMarker = function() {
+ this.renderer.updateBackMarkers();
+ };
+
+
+ this.onChangeBreakpoint = function() {
+ this.renderer.updateBreakpoints();
+ };
+
+ this.onChangeAnnotation = function() {
+ this.renderer.setAnnotations(this.session.getAnnotations());
+ };
+
+
+ this.onChangeMode = function(e) {
+ this.renderer.updateText();
+ this._emit("changeMode", e);
+ };
+
+
+ this.onChangeWrapLimit = function() {
+ this.renderer.updateFull();
+ };
+
+ this.onChangeWrapMode = function() {
+ this.renderer.onResize(true);
+ };
+
+
+ this.onChangeFold = function() {
+ // Update the active line marker as due to folding changes the current
+ // line range on the screen might have changed.
+ this.$updateHighlightActiveLine();
+ // TODO: This might be too much updating. Okay for now.
+ this.renderer.updateFull();
+ };
+
+
+ /**
+ * Returns the string of text currently highlighted.
+ * @returns {String}
+ **/
+ this.getSelectedText = function() {
+ return this.session.getTextRange(this.getSelectionRange());
+ };
+
+ /**
+ * Emitted when text is copied.
+ * @event copy
+ * @param {String} text The copied text
+ *
+ **/
+ /**
+ * Returns the string of text currently highlighted.
+ * @returns {String}
+ * @deprecated Use getSelectedText instead.
+ **/
+ this.getCopyText = function() {
+ var text = this.getSelectedText();
+ this._signal("copy", text);
+ return text;
+ };
+
+ /**
+ * Called whenever a text "copy" happens.
+ **/
+ this.onCopy = function() {
+ this.commands.exec("copy", this);
+ };
+
+ /**
+ * Called whenever a text "cut" happens.
+ **/
+ this.onCut = function() {
+ this.commands.exec("cut", this);
+ };
+
+ /**
+ * Emitted when text is pasted.
+ * @event paste
+ * @param {String} text The pasted text
+ *
+ *
+ **/
+ /**
+ * Called whenever a text "paste" happens.
+ * @param {String} text The pasted text
+ *
+ *
+ **/
+ this.onPaste = function(text) {
+ // todo this should change when paste becomes a command
+ if (this.$readOnly)
+ return;
+ this._emit("paste", text);
+ this.insert(text);
+ };
+
+
+ this.execCommand = function(command, args) {
+ this.commands.exec(command, this, args);
+ };
+
+ /**
+ * Inserts `text` into wherever the cursor is pointing.
+ * @param {String} text The new text to add
+ *
+ *
+ **/
+ this.insert = function(text) {
+ var session = this.session;
+ var mode = session.getMode();
+ var cursor = this.getCursorPosition();
+
+ if (this.getBehavioursEnabled()) {
+ // Get a transform if the current mode wants one.
+ var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
+ if (transform) {
+ if (text !== transform.text) {
+ this.session.mergeUndoDeltas = false;
+ this.$mergeNextCommand = false;
+ }
+ text = transform.text;
+
+ }
+ }
+
+ if (text == "\t")
+ text = this.session.getTabString();
+
+ // remove selected text
+ if (!this.selection.isEmpty()) {
+ var range = this.getSelectionRange();
+ cursor = this.session.remove(range);
+ this.clearSelection();
+ }
+ else if (this.session.getOverwrite()) {
+ var range = new Range.fromPoints(cursor, cursor);
+ range.end.column += text.length;
+ this.session.remove(range);
+ }
+
+ if (text == "\n" || text == "\r\n") {
+ var line = session.getLine(cursor.row)
+ if (cursor.column > line.search(/\S|$/)) {
+ var d = line.substr(cursor.column).search(/\S|$/);
+ session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
+ }
+ }
+ this.clearSelection();
+
+ var start = cursor.column;
+ var lineState = session.getState(cursor.row);
+ var line = session.getLine(cursor.row);
+ var shouldOutdent = mode.checkOutdent(lineState, line, text);
+ var end = session.insert(cursor, text);
+
+ if (transform && transform.selection) {
+ if (transform.selection.length == 2) { // Transform relative to the current column
+ this.selection.setSelectionRange(
+ new Range(cursor.row, start + transform.selection[0],
+ cursor.row, start + transform.selection[1]));
+ } else { // Transform relative to the current row.
+ this.selection.setSelectionRange(
+ new Range(cursor.row + transform.selection[0],
+ transform.selection[1],
+ cursor.row + transform.selection[2],
+ transform.selection[3]));
+ }
+ }
+
+ if (session.getDocument().isNewLine(text)) {
+ var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());
+
+ session.insert({row: cursor.row+1, column: 0}, lineIndent);
+ }
+ if (shouldOutdent)
+ mode.autoOutdent(lineState, session, cursor.row);
+ };
+
+ this.onTextInput = function(text) {
+ this.keyBinding.onTextInput(text);
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ this.keyBinding.onCommandKey(e, hashId, keyCode);
+ };
+
+ /**
+ * Pass in `true` to enable overwrites in your session, or `false` to disable. If overwrites is enabled, any text you enter will type over any text after it. If the value of `overwrite` changes, this function also emites the `changeOverwrite` event.
+ * @param {Boolean} overwrite Defines wheter or not to set overwrites
+ *
+ *
+ * @related EditSession.setOverwrite
+ **/
+ this.setOverwrite = function(overwrite) {
+ this.session.setOverwrite(overwrite);
+ };
+
+ /**
+ * Returns `true` if overwrites are enabled; `false` otherwise.
+ * @returns {Boolean}
+ * @related EditSession.getOverwrite
+ **/
+ this.getOverwrite = function() {
+ return this.session.getOverwrite();
+ };
+
+ /**
+ * Sets the value of overwrite to the opposite of whatever it currently is.
+ * @related EditSession.toggleOverwrite
+ **/
+ this.toggleOverwrite = function() {
+ this.session.toggleOverwrite();
+ };
+
+ /**
+ * Sets how fast the mouse scrolling should do.
+ * @param {Number} speed A value indicating the new speed (in milliseconds)
+ **/
+ this.setScrollSpeed = function(speed) {
+ this.setOption("scrollSpeed", speed);
+ };
+
+ /**
+ * Returns the value indicating how fast the mouse scroll speed is (in milliseconds).
+ * @returns {Number}
+ **/
+ this.getScrollSpeed = function() {
+ return this.getOption("scrollSpeed");
+ };
+
+ /**
+ * Sets the delay (in milliseconds) of the mouse drag.
+ * @param {Number} dragDelay A value indicating the new delay
+ **/
+ this.setDragDelay = function(dragDelay) {
+ this.setOption("dragDelay", dragDelay);
+ };
+
+ /**
+ * Returns the current mouse drag delay.
+ * @returns {Number}
+ **/
+ this.getDragDelay = function() {
+ return this.getOption("dragDelay");
+ };
+
+ /**
+ * Emitted when the selection style changes, via [[Editor.setSelectionStyle]].
+ * @event changeSelectionStyle
+ * @param {Object} data Contains one property, `data`, which indicates the new selection style
+ **/
+ /**
+ * Draw selection markers spanning whole line, or only over selected text. Default value is "line"
+ * @param {String} style The new selection style "line"|"text"
+ *
+ **/
+ this.setSelectionStyle = function(val) {
+ this.setOption("selectionStyle", val);
+ };
+
+ /**
+ * Returns the current selection style.
+ * @returns {String}
+ **/
+ this.getSelectionStyle = function() {
+ return this.getOption("selectionStyle");
+ };
+
+ /**
+ * Determines whether or not the current line should be highlighted.
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the current line
+ **/
+ this.setHighlightActiveLine = function(shouldHighlight) {
+ this.setOption("highlightActiveLine", shouldHighlight);
+ };
+ /**
+ * Returns `true` if current lines are always highlighted.
+ * @return {Boolean}
+ **/
+ this.getHighlightActiveLine = function() {
+ return this.getOption("highlightActiveLine");
+ };
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ this.setOption("highlightGutterLine", shouldHighlight);
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.getOption("highlightGutterLine");
+ };
+ /**
+ * Determines if the currently selected word should be highlighted.
+ * @param {Boolean} shouldHighlight Set to `true` to highlight the currently selected word
+ *
+ **/
+ this.setHighlightSelectedWord = function(shouldHighlight) {
+ this.setOption("highlightSelectedWord", shouldHighlight);
+ };
+
+ /**
+ * Returns `true` if currently highlighted words are to be highlighted.
+ * @returns {Boolean}
+ **/
+ this.getHighlightSelectedWord = function() {
+ return this.$highlightSelectedWord;
+ };
+
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.renderer.setAnimatedScroll(shouldAnimate);
+ };
+
+ this.getAnimatedScroll = function(){
+ return this.renderer.getAnimatedScroll();
+ };
+
+ /**
+ * If `showInvisibles` is set to `true`, invisible characters&mdash;like spaces or new lines&mdash;are show in the editor.
+ * @param {Boolean} showInvisibles Specifies whether or not to show invisible characters
+ *
+ **/
+ this.setShowInvisibles = function(showInvisibles) {
+ this.renderer.setShowInvisibles(showInvisibles);
+ };
+
+ /**
+ * Returns `true` if invisible characters are being shown.
+ * @returns {Boolean}
+ **/
+ this.getShowInvisibles = function() {
+ return this.renderer.getShowInvisibles();
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ this.renderer.setDisplayIndentGuides(display);
+ };
+
+ this.getDisplayIndentGuides = function() {
+ return this.renderer.getDisplayIndentGuides();
+ };
+
+ /**
+ * If `showPrintMargin` is set to `true`, the print margin is shown in the editor.
+ * @param {Boolean} showPrintMargin Specifies whether or not to show the print margin
+ *
+ **/
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.renderer.setShowPrintMargin(showPrintMargin);
+ };
+
+ /**
+ * Returns `true` if the print margin is being shown.
+ * @returns {Boolean}
+ **/
+ this.getShowPrintMargin = function() {
+ return this.renderer.getShowPrintMargin();
+ };
+
+ /**
+ * Sets the column defining where the print margin should be.
+ * @param {Number} showPrintMargin Specifies the new print margin
+ *
+ **/
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.renderer.setPrintMarginColumn(showPrintMargin);
+ };
+
+ /**
+ * Returns the column number of where the print margin is.
+ * @returns {Number}
+ **/
+ this.getPrintMarginColumn = function() {
+ return this.renderer.getPrintMarginColumn();
+ };
+
+ /**
+ * If `readOnly` is true, then the editor is set to read-only mode, and none of the content can change.
+ * @param {Boolean} readOnly Specifies whether the editor can be modified or not
+ *
+ **/
+ this.setReadOnly = function(readOnly) {
+ this.setOption("readOnly", readOnly);
+ };
+
+ /**
+ * Returns `true` if the editor is set to read-only mode.
+ * @returns {Boolean}
+ **/
+ this.getReadOnly = function() {
+ return this.getOption("readOnly");
+ };
+
+ /**
+ * Specifies whether to use behaviors or not. ["Behaviors" in this case is the auto-pairing of special characters, like quotation marks, parenthesis, or brackets.]{: #BehaviorsDef}
+ * @param {Boolean} enabled Enables or disables behaviors
+ *
+ **/
+ this.setBehavioursEnabled = function (enabled) {
+ this.setOption("behavioursEnabled", enabled);
+ };
+
+ /**
+ * Returns `true` if the behaviors are currently enabled. {:BehaviorsDef}
+ *
+ * @returns {Boolean}
+ **/
+ this.getBehavioursEnabled = function () {
+ return this.getOption("behavioursEnabled");
+ };
+
+ /**
+ * Specifies whether to use wrapping behaviors or not, i.e. automatically wrapping the selection with characters such as brackets
+ * when such a character is typed in.
+ * @param {Boolean} enabled Enables or disables wrapping behaviors
+ *
+ **/
+ this.setWrapBehavioursEnabled = function (enabled) {
+ this.setOption("wrapBehavioursEnabled", enabled);
+ };
+
+ /**
+ * Returns `true` if the wrapping behaviors are currently enabled.
+ **/
+ this.getWrapBehavioursEnabled = function () {
+ return this.getOption("wrapBehavioursEnabled");
+ };
+
+ /**
+ * Indicates whether the fold widgets should be shown or not.
+ * @param {Boolean} show Specifies whether the fold widgets are shown
+ **/
+ this.setShowFoldWidgets = function(show) {
+ this.setOption("showFoldWidgets", show);
+
+ };
+ /**
+ * Returns `true` if the fold widgets are shown.
+ * @return {Boolean}
+ **/
+ this.getShowFoldWidgets = function() {
+ return this.getOption("showFoldWidgets");
+ };
+
+ this.setFadeFoldWidgets = function(fade) {
+ this.setOption("fadeFoldWidgets", fade);
+ };
+
+ this.getFadeFoldWidgets = function() {
+ return this.getOption("fadeFoldWidgets");
+ };
+
+ /**
+ * Removes words of text from the editor. A "word" is defined as a string of characters bookended by whitespace.
+ * @param {String} dir The direction of the deletion to occur, either "left" or "right"
+ *
+ **/
+ this.remove = function(dir) {
+ if (this.selection.isEmpty()){
+ if (dir == "left")
+ this.selection.selectLeft();
+ else
+ this.selection.selectRight();
+ }
+
+ var range = this.getSelectionRange();
+ if (this.getBehavioursEnabled()) {
+ var session = this.session;
+ var state = session.getState(range.start.row);
+ var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);
+
+ if (range.end.column == 0) {
+ var text = session.getTextRange(range);
+ if (text[text.length - 1] == "\n") {
+ var line = session.getLine(range.end.row)
+ if (/^\s+$/.test(line)) {
+ range.end.column = line.length
+ }
+ }
+ }
+ if (new_range)
+ range = new_range;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+
+ /**
+ * Removes the word directly to the right of the current selection.
+ **/
+ this.removeWordRight = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordRight();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+
+ /**
+ * Removes the word directly to the left of the current selection.
+ **/
+ this.removeWordLeft = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectWordLeft();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+
+ /**
+ * Removes all the words to the left of the current selection, until the start of the line.
+ **/
+ this.removeToLineStart = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineStart();
+
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ };
+
+ /**
+ * Removes all the words to the right of the current selection, until the end of the line.
+ **/
+ this.removeToLineEnd = function() {
+ if (this.selection.isEmpty())
+ this.selection.selectLineEnd();
+
+ var range = this.getSelectionRange();
+ if (range.start.column == range.end.column && range.start.row == range.end.row) {
+ range.end.column = 0;
+ range.end.row++;
+ }
+
+ this.session.remove(range);
+ this.clearSelection();
+ };
+
+ /**
+ * Splits the line at the current selection (by inserting an `'\n'`).
+ **/
+ this.splitLine = function() {
+ if (!this.selection.isEmpty()) {
+ this.session.remove(this.getSelectionRange());
+ this.clearSelection();
+ }
+
+ var cursor = this.getCursorPosition();
+ this.insert("\n");
+ this.moveCursorToPosition(cursor);
+ };
+
+ /**
+ * Transposes current line.
+ **/
+ this.transposeLetters = function() {
+ if (!this.selection.isEmpty()) {
+ return;
+ }
+
+ var cursor = this.getCursorPosition();
+ var column = cursor.column;
+ if (column === 0)
+ return;
+
+ var line = this.session.getLine(cursor.row);
+ var swap, range;
+ if (column < line.length) {
+ swap = line.charAt(column) + line.charAt(column-1);
+ range = new Range(cursor.row, column-1, cursor.row, column+1);
+ }
+ else {
+ swap = line.charAt(column-1) + line.charAt(column-2);
+ range = new Range(cursor.row, column-2, cursor.row, column);
+ }
+ this.session.replace(range, swap);
+ };
+
+ /**
+ * Converts the current selection entirely into lowercase.
+ **/
+ this.toLowerCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toLowerCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+
+ /**
+ * Converts the current selection entirely into uppercase.
+ **/
+ this.toUpperCase = function() {
+ var originalRange = this.getSelectionRange();
+ if (this.selection.isEmpty()) {
+ this.selection.selectWord();
+ }
+
+ var range = this.getSelectionRange();
+ var text = this.session.getTextRange(range);
+ this.session.replace(range, text.toUpperCase());
+ this.selection.setSelectionRange(originalRange);
+ };
+
+ /**
+ * Inserts an indentation into the current cursor position or indents the selected lines.
+ *
+ * @related EditSession.indentRows
+ **/
+ this.indent = function() {
+ var session = this.session;
+ var range = this.getSelectionRange();
+
+ if (range.start.row < range.end.row) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ } else if (range.start.column < range.end.column) {
+ var text = session.getTextRange(range)
+ if (!/^\s+$/.test(text)) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ }
+ }
+
+ var line = session.getLine(range.start.row)
+ var position = range.start;
+ var size = session.getTabSize();
+ var column = session.documentToScreenColumn(position.row, position.column);
+
+ if (this.session.getUseSoftTabs()) {
+ var count = (size - column % size);
+ var indentString = lang.stringRepeat(" ", count);
+ } else {
+ var count = column % size;
+ while (line[range.start.column] == " " && count) {
+ range.start.column--;
+ count--;
+ }
+ this.selection.setSelectionRange(range);
+ indentString = "\t";
+ }
+ return this.insert(indentString);
+ };
+
+ /**
+ * Indents the current line.
+ * @related EditSession.indentRows
+ **/
+ this.blockIndent = function() {
+ var rows = this.$getSelectedRows();
+ this.session.indentRows(rows.first, rows.last, "\t");
+ };
+
+ /**
+ * Outdents the current line.
+ * @related EditSession.outdentRows
+ **/
+ this.blockOutdent = function() {
+ var selection = this.session.getSelection();
+ this.session.outdentRows(selection.getRange());
+ };
+
+ // TODO: move out of core when we have good mechanism for managing extensions
+ this.sortLines = function() {
+ var rows = this.$getSelectedRows();
+ var session = this.session;
+
+ var lines = [];
+ for (i = rows.first; i <= rows.last; i++)
+ lines.push(session.getLine(i));
+
+ lines.sort(function(a, b) {
+ if (a.toLowerCase() < b.toLowerCase()) return -1;
+ if (a.toLowerCase() > b.toLowerCase()) return 1;
+ return 0;
+ });
+
+ var deleteRange = new Range(0, 0, 0, 0);
+ for (var i = rows.first; i <= rows.last; i++) {
+ var line = session.getLine(i);
+ deleteRange.start.row = i;
+ deleteRange.end.row = i;
+ deleteRange.end.column = line.length;
+ session.replace(deleteRange, lines[i-rows.first]);
+ }
+ };
+
+ /**
+ * Given the currently selected range, this function either comments all the lines, or uncomments all of them.
+ **/
+ this.toggleCommentLines = function() {
+ var state = this.session.getState(this.getCursorPosition().row);
+ var rows = this.$getSelectedRows();
+ this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);
+ };
+
+ this.toggleBlockComment = function() {
+ var cursor = this.getCursorPosition();
+ var state = this.session.getState(cursor.row);
+ var range = this.getSelectionRange();
+ this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
+ };
+
+ /**
+ * Works like [[EditSession.getTokenAt]], except it returns a number.
+ * @returns {Number}
+ **/
+ this.getNumberAt = function( row, column ) {
+ var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g
+ _numberRx.lastIndex = 0
+
+ var s = this.session.getLine(row)
+ while (_numberRx.lastIndex < column) {
+ var m = _numberRx.exec(s)
+ if(m.index <= column && m.index+m[0].length >= column){
+ var number = {
+ value: m[0],
+ start: m.index,
+ end: m.index+m[0].length
+ }
+ return number;
+ }
+ }
+ return null;
+ };
+
+ /**
+ * If the character before the cursor is a number, this functions changes its value by `amount`.
+ * @param {Number} amount The value to change the numeral by (can be negative to decrease value)
+ *
+ **/
+ this.modifyNumber = function(amount) {
+ var row = this.selection.getCursor().row;
+ var column = this.selection.getCursor().column;
+
+ // get the char before the cursor
+ var charRange = new Range(row, column-1, row, column);
+
+ var c = this.session.getTextRange(charRange);
+ // if the char is a digit
+ if (!isNaN(parseFloat(c)) && isFinite(c)) {
+ // get the whole number the digit is part of
+ var nr = this.getNumberAt(row, column);
+ // if number found
+ if (nr) {
+ var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end;
+ var decimals = nr.start + nr.value.length - fp;
+
+ var t = parseFloat(nr.value);
+ t *= Math.pow(10, decimals);
+
+
+ if(fp !== nr.end && column < fp){
+ amount *= Math.pow(10, nr.end - column - 1);
+ } else {
+ amount *= Math.pow(10, nr.end - column);
+ }
+
+ t += amount;
+ t /= Math.pow(10, decimals);
+ var nnr = t.toFixed(decimals);
+
+ //update number
+ var replaceRange = new Range(row, nr.start, row, nr.end);
+ this.session.replace(replaceRange, nnr);
+
+ //reposition the cursor
+ this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));
+
+ }
+ }
+ };
+
+ /**
+ * Removes all the lines in the current selection
+ * @related EditSession.remove
+ **/
+ this.removeLines = function() {
+ var rows = this.$getSelectedRows();
+ var range;
+ if (rows.first === 0 || rows.last+1 < this.session.getLength())
+ range = new Range(rows.first, 0, rows.last+1, 0);
+ else
+ range = new Range(
+ rows.first-1, this.session.getLine(rows.first-1).length,
+ rows.last, this.session.getLine(rows.last).length
+ );
+ this.session.remove(range);
+ this.clearSelection();
+ };
+
+ this.duplicateSelection = function() {
+ var sel = this.selection;
+ var doc = this.session;
+ var range = sel.getRange();
+ var reverse = sel.isBackwards();
+ if (range.isEmpty()) {
+ var row = range.start.row;
+ doc.duplicateLines(row, row);
+ } else {
+ var point = reverse ? range.start : range.end;
+ var endPoint = doc.insert(point, doc.getTextRange(range), false);
+ range.start = point;
+ range.end = endPoint;
+
+ sel.setSelectionRange(range, reverse)
+ }
+ };
+
+ /**
+ * Shifts all the selected lines down one row.
+ *
+ * @returns {Number} On success, it returns -1.
+ * @related EditSession.moveLinesUp
+ **/
+ this.moveLinesDown = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.moveLinesDown(firstRow, lastRow);
+ });
+ };
+
+ /**
+ * Shifts all the selected lines up one row.
+ * @returns {Number} On success, it returns -1.
+ * @related EditSession.moveLinesDown
+ **/
+ this.moveLinesUp = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.moveLinesUp(firstRow, lastRow);
+ });
+ };
+
+ /**
+ * Moves a range of text from the given range to the given position. `toPosition` is an object that looks like this:
+ * ```json
+ * { row: newRowLocation, column: newColumnLocation }
+ * ```
+ * @param {Range} fromRange The range of text you want moved within the document
+ * @param {Object} toPosition The location (row and column) where you want to move the text to
+ *
+ * @returns {Range} The new range where the text was moved to.
+ * @related EditSession.moveText
+ **/
+ this.moveText = function(range, toPosition, copy) {
+ return this.session.moveText(range, toPosition, copy);
+ };
+
+ /**
+ * Copies all the selected lines up one row.
+ * @returns {Number} On success, returns 0.
+ *
+ **/
+ this.copyLinesUp = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ this.session.duplicateLines(firstRow, lastRow);
+ return 0;
+ });
+ };
+
+ /**
+ * Copies all the selected lines down one row.
+ * @returns {Number} On success, returns the number of new rows added; in other words, `lastRow - firstRow + 1`.
+ * @related EditSession.duplicateLines
+ *
+ **/
+ this.copyLinesDown = function() {
+ this.$moveLines(function(firstRow, lastRow) {
+ return this.session.duplicateLines(firstRow, lastRow);
+ });
+ };
+
+ /**
+ * Executes a specific function, which can be anything that manipulates selected lines, such as copying them, duplicating them, or shifting them.
+ * @param {Function} mover A method to call on each selected row
+ *
+ *
+ **/
+ this.$moveLines = function(mover) {
+ var selection = this.selection;
+ if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
+ var range = selection.toOrientedRange();
+ var rows = this.$getSelectedRows(range);
+ var linesMoved = mover.call(this, rows.first, rows.last);
+ range.moveBy(linesMoved, 0);
+ selection.fromOrientedRange(range);
+ } else {
+ var ranges = selection.rangeList.ranges;
+ selection.rangeList.detach(this.session);
+
+ for (var i = ranges.length; i--; ) {
+ var rangeIndex = i;
+ var rows = ranges[i].collapseRows();
+ var last = rows.end.row;
+ var first = rows.start.row;
+ while (i--) {
+ var rows = ranges[i].collapseRows();
+ if (first - rows.end.row <= 1)
+ first = rows.end.row;
+ else
+ break;
+ }
+ i++;
+
+ var linesMoved = mover.call(this, first, last);
+ while (rangeIndex >= i) {
+ ranges[rangeIndex].moveBy(linesMoved, 0);
+ rangeIndex--;
+ }
+ }
+ selection.fromOrientedRange(selection.ranges[0]);
+ selection.rangeList.attach(this.session);
+ }
+ };
+
+ /**
+ * Returns an object indicating the currently selected rows. The object looks like this:
+ *
+ * ```json
+ * { first: range.start.row, last: range.end.row }
+ * ```
+ *
+ * @returns {Object}
+ **/
+ this.$getSelectedRows = function() {
+ var range = this.getSelectionRange().collapseRows();
+
+ return {
+ first: range.start.row,
+ last: range.end.row
+ };
+ };
+
+ this.onCompositionStart = function(text) {
+ this.renderer.showComposition(this.getCursorPosition());
+ };
+
+ this.onCompositionUpdate = function(text) {
+ this.renderer.setCompositionText(text);
+ };
+
+ this.onCompositionEnd = function() {
+ this.renderer.hideComposition();
+ };
+
+ /**
+ * {:VirtualRenderer.getFirstVisibleRow}
+ *
+ * @returns {Number}
+ * @related VirtualRenderer.getFirstVisibleRow
+ **/
+ this.getFirstVisibleRow = function() {
+ return this.renderer.getFirstVisibleRow();
+ };
+
+ /**
+ * {:VirtualRenderer.getLastVisibleRow}
+ *
+ * @returns {Number}
+ * @related VirtualRenderer.getLastVisibleRow
+ **/
+ this.getLastVisibleRow = function() {
+ return this.renderer.getLastVisibleRow();
+ };
+
+ /**
+ * Indicates if the row is currently visible on the screen.
+ * @param {Number} row The row to check
+ *
+ * @returns {Boolean}
+ **/
+ this.isRowVisible = function(row) {
+ return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());
+ };
+
+ /**
+ * Indicates if the entire row is currently visible on the screen.
+ * @param {Number} row The row to check
+ *
+ *
+ * @returns {Boolean}
+ **/
+ this.isRowFullyVisible = function(row) {
+ return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());
+ };
+
+ /**
+ * Returns the number of currently visibile rows.
+ * @returns {Number}
+ **/
+ this.$getVisibleRowCount = function() {
+ return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;
+ };
+
+ this.$moveByPage = function(dir, select) {
+ var renderer = this.renderer;
+ var config = this.renderer.layerConfig;
+ var rows = dir * Math.floor(config.height / config.lineHeight);
+
+ this.$blockScrolling++;
+ if (select == true) {
+ this.selection.$moveSelection(function(){
+ this.moveCursorBy(rows, 0);
+ });
+ } else if (select == false) {
+ this.selection.moveCursorBy(rows, 0);
+ this.selection.clearSelection();
+ }
+ this.$blockScrolling--;
+
+ var scrollTop = renderer.scrollTop;
+
+ renderer.scrollBy(0, rows * config.lineHeight);
+ if (select != null)
+ renderer.scrollCursorIntoView(null, 0.5);
+
+ renderer.animateScrolling(scrollTop);
+ };
+
+ /**
+ * Selects the text from the current position of the document until where a "page down" finishes.
+ **/
+ this.selectPageDown = function() {
+ this.$moveByPage(1, true);
+ };
+
+ /**
+ * Selects the text from the current position of the document until where a "page up" finishes.
+ **/
+ this.selectPageUp = function() {
+ this.$moveByPage(-1, true);
+ };
+
+ /**
+ * Shifts the document to wherever "page down" is, as well as moving the cursor position.
+ **/
+ this.gotoPageDown = function() {
+ this.$moveByPage(1, false);
+ };
+
+ /**
+ * Shifts the document to wherever "page up" is, as well as moving the cursor position.
+ **/
+ this.gotoPageUp = function() {
+ this.$moveByPage(-1, false);
+ };
+
+ /**
+ * Scrolls the document to wherever "page down" is, without changing the cursor position.
+ **/
+ this.scrollPageDown = function() {
+ this.$moveByPage(1);
+ };
+
+ /**
+ * Scrolls the document to wherever "page up" is, without changing the cursor position.
+ **/
+ this.scrollPageUp = function() {
+ this.$moveByPage(-1);
+ };
+
+ /**
+ * Moves the editor to the specified row.
+ * @related VirtualRenderer.scrollToRow
+ **/
+ this.scrollToRow = function(row) {
+ this.renderer.scrollToRow(row);
+ };
+
+ /**
+ * Scrolls to a line. If `center` is `true`, it puts the line in middle of screen (or attempts to).
+ * @param {Number} line The line to scroll to
+ * @param {Boolean} center If `true`
+ * @param {Boolean} animate If `true` animates scrolling
+ * @param {Function} callback Function to be called when the animation has finished
+ *
+ *
+ * @related VirtualRenderer.scrollToLine
+ **/
+ this.scrollToLine = function(line, center, animate, callback) {
+ this.renderer.scrollToLine(line, center, animate, callback);
+ };
+
+ /**
+ * Attempts to center the current selection on the screen.
+ **/
+ this.centerSelection = function() {
+ var range = this.getSelectionRange();
+ var pos = {
+ row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),
+ column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)
+ }
+ this.renderer.alignCursor(pos, 0.5);
+ };
+
+ /**
+ * Gets the current position of the cursor.
+ * @returns {Object} An object that looks something like this:
+ *
+ * ```json
+ * { row: currRow, column: currCol }
+ * ```
+ *
+ * @related Selection.getCursor
+ **/
+ this.getCursorPosition = function() {
+ return this.selection.getCursor();
+ };
+
+ /**
+ * Returns the screen position of the cursor.
+ * @returns {Number}
+ * @related EditSession.documentToScreenPosition
+ **/
+ this.getCursorPositionScreen = function() {
+ return this.session.documentToScreenPosition(this.getCursorPosition());
+ };
+
+ /**
+ * {:Selection.getRange}
+ * @returns {Range}
+ * @related Selection.getRange
+ **/
+ this.getSelectionRange = function() {
+ return this.selection.getRange();
+ };
+
+
+ /**
+ * Selects all the text in editor.
+ * @related Selection.selectAll
+ **/
+ this.selectAll = function() {
+ this.$blockScrolling += 1;
+ this.selection.selectAll();
+ this.$blockScrolling -= 1;
+ };
+
+ /**
+ * {:Selection.clearSelection}
+ * @related Selection.clearSelection
+ **/
+ this.clearSelection = function() {
+ this.selection.clearSelection();
+ };
+
+ /**
+ * Moves the cursor to the specified row and column. Note that this does not de-select the current selection.
+ * @param {Number} row The new row number
+ * @param {Number} column The new column number
+ *
+ *
+ * @related Selection.moveCursorTo
+ **/
+ this.moveCursorTo = function(row, column) {
+ this.selection.moveCursorTo(row, column);
+ };
+
+ /**
+ * Moves the cursor to the position indicated by `pos.row` and `pos.column`.
+ * @param {Object} pos An object with two properties, row and column
+ *
+ *
+ * @related Selection.moveCursorToPosition
+ **/
+ this.moveCursorToPosition = function(pos) {
+ this.selection.moveCursorToPosition(pos);
+ };
+
+ /**
+ * Moves the cursor's row and column to the next matching bracket.
+ *
+ **/
+ this.jumpToMatching = function(select) {
+ var cursor = this.getCursorPosition();
+
+ var range = this.session.getBracketRange(cursor);
+ if (!range) {
+ range = this.find({
+ needle: /[{}()\[\]]/g,
+ preventScroll:true,
+ start: {row: cursor.row, column: cursor.column - 1}
+ });
+ if (!range)
+ return;
+ var pos = range.start;
+ if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ range = this.session.getBracketRange(pos);
+ }
+
+ pos = range && range.cursor || pos;
+ if (pos) {
+ if (select) {
+ if (range && range.isEqual(this.getSelectionRange()))
+ this.clearSelection();
+ else
+ this.selection.selectTo(pos.row, pos.column);
+ } else {
+ this.clearSelection();
+ this.moveCursorTo(pos.row, pos.column);
+ }
+ }
+ };
+
+ /**
+ * Moves the cursor to the specified line number, and also into the indiciated column.
+ * @param {Number} lineNumber The line number to go to
+ * @param {Number} column A column number to go to
+ * @param {Boolean} animate If `true` animates scolling
+ *
+ **/
+ this.gotoLine = function(lineNumber, column, animate) {
+ this.selection.clearSelection();
+ this.session.unfold({row: lineNumber - 1, column: column || 0});
+
+ this.$blockScrolling += 1;
+ // todo: find a way to automatically exit multiselect mode
+ this.exitMultiSelectMode && this.exitMultiSelectMode();
+ this.moveCursorTo(lineNumber - 1, column || 0);
+ this.$blockScrolling -= 1;
+
+ if (!this.isRowFullyVisible(lineNumber - 1))
+ this.scrollToLine(lineNumber - 1, true, animate);
+ };
+
+ /**
+ * Moves the cursor to the specified row and column. Note that this does de-select the current selection.
+ * @param {Number} row The new row number
+ * @param {Number} column The new column number
+ *
+ *
+ * @related Editor.moveCursorTo
+ **/
+ this.navigateTo = function(row, column) {
+ this.clearSelection();
+ this.moveCursorTo(row, column);
+ };
+
+ /**
+ * Moves the cursor up in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} times The number of times to change navigation
+ *
+ *
+ **/
+ this.navigateUp = function(times) {
+ if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
+ var selectionStart = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionStart);
+ }
+ this.selection.clearSelection();
+ times = times || 1;
+ this.selection.moveCursorBy(-times, 0);
+ };
+
+ /**
+ * Moves the cursor down in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} times The number of times to change navigation
+ *
+ *
+ **/
+ this.navigateDown = function(times) {
+ if (this.selection.isMultiLine() && this.selection.isBackwards()) {
+ var selectionEnd = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionEnd);
+ }
+ this.selection.clearSelection();
+ times = times || 1;
+ this.selection.moveCursorBy(times, 0);
+ };
+
+ /**
+ * Moves the cursor left in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} times The number of times to change navigation
+ *
+ *
+ **/
+ this.navigateLeft = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionStart = this.getSelectionRange().start;
+ this.moveCursorToPosition(selectionStart);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorLeft();
+ }
+ }
+ this.clearSelection();
+ };
+
+ /**
+ * Moves the cursor right in the document the specified number of times. Note that this does de-select the current selection.
+ * @param {Number} times The number of times to change navigation
+ *
+ *
+ **/
+ this.navigateRight = function(times) {
+ if (!this.selection.isEmpty()) {
+ var selectionEnd = this.getSelectionRange().end;
+ this.moveCursorToPosition(selectionEnd);
+ }
+ else {
+ times = times || 1;
+ while (times--) {
+ this.selection.moveCursorRight();
+ }
+ }
+ this.clearSelection();
+ };
+
+ /**
+ *
+ * Moves the cursor to the start of the current line. Note that this does de-select the current selection.
+ **/
+ this.navigateLineStart = function() {
+ this.selection.moveCursorLineStart();
+ this.clearSelection();
+ };
+
+ /**
+ *
+ * Moves the cursor to the end of the current line. Note that this does de-select the current selection.
+ **/
+ this.navigateLineEnd = function() {
+ this.selection.moveCursorLineEnd();
+ this.clearSelection();
+ };
+
+ /**
+ *
+ * Moves the cursor to the end of the current file. Note that this does de-select the current selection.
+ **/
+ this.navigateFileEnd = function() {
+ var scrollTop = this.renderer.scrollTop;
+ this.selection.moveCursorFileEnd();
+ this.clearSelection();
+ this.renderer.animateScrolling(scrollTop);
+ };
+
+ /**
+ *
+ * Moves the cursor to the start of the current file. Note that this does de-select the current selection.
+ **/
+ this.navigateFileStart = function() {
+ var scrollTop = this.renderer.scrollTop;
+ this.selection.moveCursorFileStart();
+ this.clearSelection();
+ this.renderer.animateScrolling(scrollTop);
+ };
+
+ /**
+ *
+ * Moves the cursor to the word immediately to the right of the current position. Note that this does de-select the current selection.
+ **/
+ this.navigateWordRight = function() {
+ this.selection.moveCursorWordRight();
+ this.clearSelection();
+ };
+
+ /**
+ *
+ * Moves the cursor to the word immediately to the left of the current position. Note that this does de-select the current selection.
+ **/
+ this.navigateWordLeft = function() {
+ this.selection.moveCursorWordLeft();
+ this.clearSelection();
+ };
+
+ /**
+ * Replaces the first occurance of `options.needle` with the value in `replacement`.
+ * @param {String} replacement The text to replace with
+ * @param {Object} options The [[Search `Search`]] options to use
+ *
+ *
+ **/
+ this.replace = function(replacement, options) {
+ if (options)
+ this.$search.set(options);
+
+ var range = this.$search.find(this.session);
+ var replaced = 0;
+ if (!range)
+ return replaced;
+
+ if (this.$tryReplace(range, replacement)) {
+ replaced = 1;
+ }
+ if (range !== null) {
+ this.selection.setSelectionRange(range);
+ this.renderer.scrollSelectionIntoView(range.start, range.end);
+ }
+
+ return replaced;
+ };
+
+ /**
+ * Replaces all occurances of `options.needle` with the value in `replacement`.
+ * @param {String} replacement The text to replace with
+ * @param {Object} options The [[Search `Search`]] options to use
+ *
+ *
+ **/
+ this.replaceAll = function(replacement, options) {
+ if (options) {
+ this.$search.set(options);
+ }
+
+ var ranges = this.$search.findAll(this.session);
+ var replaced = 0;
+ if (!ranges.length)
+ return replaced;
+
+ this.$blockScrolling += 1;
+
+ var selection = this.getSelectionRange();
+ this.clearSelection();
+ this.selection.moveCursorTo(0, 0);
+
+ for (var i = ranges.length - 1; i >= 0; --i) {
+ if(this.$tryReplace(ranges[i], replacement)) {
+ replaced++;
+ }
+ }
+
+ this.selection.setSelectionRange(selection);
+ this.$blockScrolling -= 1;
+
+ return replaced;
+ };
+
+ this.$tryReplace = function(range, replacement) {
+ var input = this.session.getTextRange(range);
+ replacement = this.$search.replace(input, replacement);
+ if (replacement !== null) {
+ range.end = this.session.replace(range, replacement);
+ return range;
+ } else {
+ return null;
+ }
+ };
+
+ /**
+ * {:Search.getOptions} For more information on `options`, see [[Search `Search`]].
+ * @related Search.getOptions
+ * @returns {Object}
+ **/
+ this.getLastSearchOptions = function() {
+ return this.$search.getOptions();
+ };
+
+ /**
+ * Attempts to find `needle` within the document. For more information on `options`, see [[Search `Search`]].
+ * @param {String} needle The text to search for (optional)
+ * @param {Object} options An object defining various search properties
+ * @param {Boolean} animate If `true` animate scrolling
+ *
+ *
+ * @related Search.find
+ **/
+ this.find = function(needle, options, animate) {
+ if (!options)
+ options = {};
+
+ if (typeof needle == "string" || needle instanceof RegExp)
+ options.needle = needle;
+ else if (typeof needle == "object")
+ oop.mixin(options, needle);
+
+ var range = this.selection.getRange();
+ if (options.needle == null) {
+ needle = this.session.getTextRange(range)
+ || this.$search.$options.needle;
+ if (!needle) {
+ range = this.session.getWordRange(range.start.row, range.start.column);
+ needle = this.session.getTextRange(range);
+ }
+ this.$search.set({needle: needle});
+ }
+
+ this.$search.set(options);
+ if (!options.start)
+ this.$search.set({start: range});
+
+ var newRange = this.$search.find(this.session);
+ if (options.preventScroll)
+ return newRange;
+ if (newRange) {
+ this.revealRange(newRange, animate);
+ return newRange;
+ }
+ // clear selection if nothing is found
+ if (options.backwards)
+ range.start = range.end;
+ else
+ range.end = range.start;
+ this.selection.setRange(range);
+ };
+
+ /**
+ * Performs another search for `needle` in the document. For more information on `options`, see [[Search `Search`]].
+ * @param {Object} options search options
+ * @param {Boolean} animate If `true` animate scrolling
+ *
+ *
+ * @related Editor.find
+ **/
+ this.findNext = function(options, animate) {
+ this.find({skipCurrent: true, backwards: false}, options, animate);
+ };
+
+ /**
+ * Performs a search for `needle` backwards. For more information on `options`, see [[Search `Search`]].
+ * @param {Object} options search options
+ * @param {Boolean} animate If `true` animate scrolling
+ *
+ *
+ * @related Editor.find
+ **/
+ this.findPrevious = function(options, animate) {
+ this.find(options, {skipCurrent: true, backwards: true}, animate);
+ };
+
+ this.revealRange = function(range, animate) {
+ this.$blockScrolling += 1;
+ this.session.unfold(range);
+ this.selection.setSelectionRange(range);
+ this.$blockScrolling -= 1;
+
+ var scrollTop = this.renderer.scrollTop;
+ this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);
+ if (animate != false)
+ this.renderer.animateScrolling(scrollTop);
+ };
+
+ /**
+ * {:UndoManager.undo}
+ * @related UndoManager.undo
+ **/
+ this.undo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().undo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+
+ /**
+ * {:UndoManager.redo}
+ * @related UndoManager.redo
+ **/
+ this.redo = function() {
+ this.$blockScrolling++;
+ this.session.getUndoManager().redo();
+ this.$blockScrolling--;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ };
+
+ /**
+ *
+ * Cleans up the entire editor.
+ **/
+ this.destroy = function() {
+ this.renderer.destroy();
+ this._emit("destroy", this);
+ };
+
+ /**
+ * Enables automatic scrolling of the cursor into view when editor itself is inside scrollable element
+ * @param {Boolean} enable default true
+ **/
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (enable === false)
+ return;
+ var rect;
+ var self = this;
+ var shouldScroll = false;
+ if (!this.$scrollAnchor)
+ this.$scrollAnchor = document.createElement("div");
+ var scrollAnchor = this.$scrollAnchor;
+ scrollAnchor.style.cssText = "position:absolute";
+ this.container.insertBefore(scrollAnchor, this.container.firstChild);
+ var onChangeSelection = this.on("changeSelection", function() {
+ shouldScroll = true;
+ });
+ // needed to not trigger sync reflow
+ var onBeforeRender = this.renderer.on("beforeRender", function() {
+ if (shouldScroll)
+ rect = self.renderer.container.getBoundingClientRect();
+ });
+ var onAfterRender = this.renderer.on("afterRender", function() {
+ if (shouldScroll && rect && self.isFocused()) {
+ var renderer = self.renderer;
+ var pos = renderer.$cursorLayer.$pixelPos;
+ var config = renderer.layerConfig;
+ var top = pos.top - config.offset;
+ if (pos.top >= 0 && top + rect.top < 0) {
+ shouldScroll = true;
+ } else if (pos.top < config.height &&
+ pos.top + rect.top + config.lineHeight > window.innerHeight) {
+ shouldScroll = false;
+ } else {
+ shouldScroll = null;
+ }
+ if (shouldScroll != null) {
+ scrollAnchor.style.top = top + "px";
+ scrollAnchor.style.left = pos.left + "px";
+ scrollAnchor.style.height = config.lineHeight + "px";
+ scrollAnchor.scrollIntoView(shouldScroll);
+ }
+ shouldScroll = rect = null;
+ }
+ });
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (enable === true)
+ return;
+ delete this.setAutoScrollEditorIntoView;
+ this.removeEventListener("changeSelection", onChangeSelection);
+ this.renderer.removeEventListener("afterRender", onAfterRender);
+ this.renderer.removeEventListener("beforeRender", onBeforeRender);
+ };
+ };
+
+
+ this.$resetCursorStyle = function() {
+ var style = this.$cursorStyle || "ace";
+ var cursorLayer = this.renderer.$cursorLayer;
+ if (!cursorLayer)
+ return;
+ cursorLayer.setSmoothBlinking(style == "smooth");
+ cursorLayer.isBlinking = !this.$readOnly && style != "wide";
+ };
+
+}).call(Editor.prototype);
+
+
+
+config.defineOptions(Editor.prototype, "editor", {
+ selectionStyle: {
+ set: function(style) {
+ this.onSelectionChange();
+ this._emit("changeSelectionStyle", {data: style});
+ },
+ initialValue: "line"
+ },
+ highlightActiveLine: {
+ set: function() {this.$updateHighlightActiveLine();},
+ initialValue: true
+ },
+ highlightSelectedWord: {
+ set: function(shouldHighlight) {this.$onSelectionChange();},
+ initialValue: true
+ },
+ readOnly: {
+ set: function(readOnly) {
+ this.textInput.setReadOnly(readOnly);
+ this.$resetCursorStyle();
+ },
+ initialValue: false
+ },
+ cursorStyle: {
+ set: function(val) { this.$resetCursorStyle(); },
+ values: ["ace", "slim", "smooth", "wide"],
+ initialValue: "ace"
+ },
+ mergeUndoDeltas: {
+ values: [false, true, "always"],
+ initialValue: true
+ },
+ behavioursEnabled: {initialValue: true},
+ wrapBehavioursEnabled: {initialValue: true},
+
+ hScrollBarAlwaysVisible: "renderer",
+ vScrollBarAlwaysVisible: "renderer",
+ highlightGutterLine: "renderer",
+ animatedScroll: "renderer",
+ showInvisibles: "renderer",
+ showPrintMargin: "renderer",
+ printMarginColumn: "renderer",
+ printMargin: "renderer",
+ fadeFoldWidgets: "renderer",
+ showFoldWidgets: "renderer",
+ showGutter: "renderer",
+ displayIndentGuides: "renderer",
+ fontSize: "renderer",
+ fontFamily: "renderer",
+ maxLines: "renderer",
+ minLines: "renderer",
+ scrollPastEnd: "renderer",
+ fixedWidthGutter: "renderer",
+
+ scrollSpeed: "$mouseHandler",
+ dragDelay: "$mouseHandler",
+ dragEnabled: "$mouseHandler",
+ focusTimout: "$mouseHandler",
+
+ firstLineNumber: "session",
+ overwrite: "session",
+ newLineMode: "session",
+ useWorker: "session",
+ useSoftTabs: "session",
+ tabSize: "session",
+ wrap: "session",
+ foldStyle: "session"
+});
+
+exports.Editor = Editor;
+});
diff --git a/src/fauxton/assets/js/libs/ace/editor_change_document_test.js b/src/fauxton/assets/js/libs/ace/editor_change_document_test.js
new file mode 100644
index 000000000..a1fdaad9d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/editor_change_document_test.js
@@ -0,0 +1,188 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var Text = require("./mode/text").Mode;
+var JavaScriptMode = require("./mode/javascript").Mode;
+var CssMode = require("./mode/css").Mode;
+var HtmlMode = require("./mode/html").Mode;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var assert = require("./test/assertions");
+
+module.exports = {
+
+ setUp : function(next) {
+ this.session1 = new EditSession(["abc", "def"]);
+ this.session2 = new EditSession(["ghi", "jkl"]);
+
+
+ this.editor = new Editor(new MockRenderer());
+ next();
+ },
+
+ "test: change document" : function() {
+ this.editor.setSession(this.session1);
+ assert.equal(this.editor.getSession(), this.session1);
+
+ this.editor.setSession(this.session2);
+ assert.equal(this.editor.getSession(), this.session2);
+ },
+
+ "test: only changes to the new document should have effect" : function() {
+ var called = false;
+ this.editor.onDocumentChange = function() {
+ called = true;
+ };
+
+ this.editor.setSession(this.session1);
+ this.editor.setSession(this.session2);
+
+ this.session1.duplicateLines(0, 0);
+ assert.notOk(called);
+
+ this.session2.duplicateLines(0, 0);
+ assert.ok(called);
+ },
+
+ "test: should use cursor of new document" : function() {
+ this.session1.getSelection().moveCursorTo(0, 1);
+ this.session2.getSelection().moveCursorTo(1, 0);
+
+ this.editor.setSession(this.session1);
+ assert.position(this.editor.getCursorPosition(), 0, 1);
+
+ this.editor.setSession(this.session2);
+ assert.position(this.editor.getCursorPosition(), 1, 0);
+ },
+
+ "test: only changing the cursor of the new doc should not have an effect" : function() {
+ this.editor.onCursorChange = function() {
+ called = true;
+ };
+
+ this.editor.setSession(this.session1);
+ this.editor.setSession(this.session2);
+ assert.position(this.editor.getCursorPosition(), 0, 0);
+
+ var called = false;
+ this.session1.getSelection().moveCursorTo(0, 1);
+ assert.position(this.editor.getCursorPosition(), 0, 0);
+ assert.notOk(called);
+
+ this.session2.getSelection().moveCursorTo(1, 1);
+ assert.position(this.editor.getCursorPosition(), 1, 1);
+ assert.ok(called);
+ },
+
+ "test: should use selection of new document" : function() {
+ this.session1.getSelection().selectTo(0, 1);
+ this.session2.getSelection().selectTo(1, 0);
+
+ this.editor.setSession(this.session1);
+ assert.position(this.editor.getSelection().getSelectionLead(), 0, 1);
+
+ this.editor.setSession(this.session2);
+ assert.position(this.editor.getSelection().getSelectionLead(), 1, 0);
+ },
+
+ "test: only changing the selection of the new doc should not have an effect" : function() {
+ this.editor.onSelectionChange = function() {
+ called = true;
+ };
+
+ this.editor.setSession(this.session1);
+ this.editor.setSession(this.session2);
+ assert.position(this.editor.getSelection().getSelectionLead(), 0, 0);
+
+ var called = false;
+ this.session1.getSelection().selectTo(0, 1);
+ assert.position(this.editor.getSelection().getSelectionLead(), 0, 0);
+ assert.notOk(called);
+
+ this.session2.getSelection().selectTo(1, 1);
+ assert.position(this.editor.getSelection().getSelectionLead(), 1, 1);
+ assert.ok(called);
+ },
+
+ "test: should use mode of new document" : function() {
+ this.editor.onChangeMode = function() {
+ called = true;
+ };
+ this.editor.setSession(this.session1);
+ this.editor.setSession(this.session2);
+
+ var called = false;
+ this.session1.setMode(new Text());
+ assert.notOk(called);
+
+ this.session2.setMode(new JavaScriptMode());
+ assert.ok(called);
+ },
+
+ "test: should use stop worker of old document" : function(next) {
+ var self = this;
+
+ // 1. Open an editor and set the session to CssMode
+ self.editor.setSession(self.session1);
+ self.session1.setMode(new CssMode());
+
+ // 2. Add a line or two of valid CSS.
+ self.session1.setValue("DIV { color: red; }");
+
+ // 3. Clear the session value.
+ self.session1.setValue("");
+
+ // 4. Set the session to HtmlMode
+ self.session1.setMode(new HtmlMode());
+
+ // 5. Try to type valid HTML
+ self.session1.insert({row: 0, column: 0}, "<html></html>");
+
+ setTimeout(function() {
+ assert.equal(Object.keys(self.session1.getAnnotations()).length, 0);
+ next();
+ }, 600);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/editor_highlight_selected_word_test.js b/src/fauxton/assets/js/libs/ace/editor_highlight_selected_word_test.js
new file mode 100644
index 000000000..13e19c235
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/editor_highlight_selected_word_test.js
@@ -0,0 +1,223 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var assert = require("./test/assertions");
+
+var lipsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. " +
+ "Mauris at arcu mi, eu lobortis mauris. Quisque ut libero eget " +
+ "diam congue vehicula. Quisque ut odio ut mi aliquam tincidunt. " +
+ "Duis lacinia aliquam lorem eget eleifend. Morbi eget felis mi. " +
+ "Duis quam ligula, consequat vitae convallis volutpat, blandit " +
+ "nec neque. Nulla facilisi. Etiam suscipit lorem ac justo " +
+ "sollicitudin tristique. Phasellus ut posuere nunc. Aliquam " +
+ "scelerisque mollis felis non gravida. Vestibulum lacus sem, " +
+ "posuere non bibendum id, luctus non dolor. Aenean id metus " +
+ "lorem, vel dapibus est. Donec gravida feugiat augue nec " +
+ "accumsan.Lorem ipsum dolor sit amet, consectetur adipiscing " +
+ "elit. Nulla vulputate, velit vitae tincidunt congue, nunc " +
+ "augue accumsan velit, eu consequat turpis lectus ac orci. " +
+ "Pellentesque ornare dolor feugiat dui auctor eu varius nulla " +
+ "fermentum. Sed aliquam odio at velit lacinia vel fermentum " +
+ "felis sodales. In dignissim magna eget nunc lobortis non " +
+ "fringilla nibh ullamcorper. Donec facilisis malesuada elit " +
+ "at egestas. Etiam bibendum, diam vitae tempor aliquet, dui " +
+ "libero vehicula odio, eget bibendum mauris velit eu lorem.\n" +
+ "consectetur";
+
+function callHighlighterUpdate(session, firstRow, lastRow) {
+ var rangeCount = 0;
+ var mockMarkerLayer = { drawSingleLineMarker: function() {rangeCount++;} }
+ session.$searchHighlight.update([], mockMarkerLayer, session, {
+ firstRow: firstRow,
+ lastRow: lastRow
+ });
+ return rangeCount;
+}
+
+module.exports = {
+ setUp: function(next) {
+ this.session = new EditSession(lipsum);
+ this.editor = new Editor(new MockRenderer(), this.session);
+ this.selection = this.session.getSelection();
+ this.search = this.editor.$search;
+ next();
+ },
+
+ "test: highlight selected words by default": function() {
+ assert.equal(this.editor.getHighlightSelectedWord(), true);
+ },
+
+ "test: highlight a word": function() {
+ this.editor.moveCursorTo(0, 9);
+ this.selection.selectWord();
+
+ var highlighter = this.editor.session.$searchHighlight;
+ assert.ok(highlighter != null);
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "ipsum");
+ assert.equal(highlighter.cache.length, 0);
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 2);
+ },
+
+ "test: highlight a word and clear highlight": function() {
+ this.editor.moveCursorTo(0, 8);
+ this.selection.selectWord();
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "ipsum");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 2);
+
+ this.session.highlight("");
+ assert.equal(this.session.$searchHighlight.cache.length, 0);
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: highlight another word": function() {
+ this.selection.moveCursorTo(0, 14);
+ this.selection.selectWord();
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "dolor");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 4);
+ },
+
+ "test: no selection, no highlight": function() {
+ this.selection.clearSelection();
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: select a word, no highlight": function() {
+ this.selection.moveCursorTo(0, 14);
+ this.selection.selectWord();
+
+ this.editor.setHighlightSelectedWord(false);
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "dolor");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: select a word with no matches": function() {
+ this.editor.setHighlightSelectedWord(true);
+
+ var currentOptions = this.search.getOptions();
+ var newOptions = {
+ wrap: true,
+ wholeWord: true,
+ caseSensitive: true,
+ needle: "Mauris"
+ };
+ this.search.set(newOptions);
+
+ var match = this.search.find(this.session);
+ assert.notEqual(match, null, "found a match for 'Mauris'");
+
+ this.search.set(currentOptions);
+
+ this.selection.setSelectionRange(match);
+
+ assert.equal(this.session.getTextRange(match), "Mauris");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 1);
+ },
+
+ "test: partial word selection 1": function() {
+ this.selection.moveCursorTo(0, 14);
+ this.selection.selectWord();
+ this.selection.selectLeft();
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "dolo");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: partial word selection 2": function() {
+ this.selection.moveCursorTo(0, 13);
+ this.selection.selectWord();
+ this.selection.selectRight();
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "dolor ");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: partial word selection 3": function() {
+ this.selection.moveCursorTo(0, 14);
+ this.selection.selectWord();
+ this.selection.selectLeft();
+ this.selection.shiftSelection(1);
+
+ var range = this.selection.getRange();
+ assert.equal(this.session.getTextRange(range), "olor");
+ assert.equal(callHighlighterUpdate(this.session, 0, 0), 0);
+ },
+
+ "test: select last word": function() {
+ this.selection.moveCursorTo(0, 1);
+
+ var currentOptions = this.search.getOptions();
+ var newOptions = {
+ wrap: true,
+ wholeWord: true,
+ caseSensitive: true,
+ backwards: true,
+ needle: "consectetur"
+ };
+ this.search.set(newOptions);
+
+ var match = this.search.find(this.session);
+ assert.notEqual(match, null, "found a match for 'consectetur'");
+ assert.position(match.start, 1, 0);
+
+ this.search.set(currentOptions);
+
+ this.selection.setSelectionRange(match);
+
+ assert.equal(this.session.getTextRange(match), "consectetur");
+ assert.equal(callHighlighterUpdate(this.session, 0, 1), 3);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/editor_navigation_test.js b/src/fauxton/assets/js/libs/ace/editor_navigation_test.js
new file mode 100644
index 000000000..ab348241b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/editor_navigation_test.js
@@ -0,0 +1,164 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var assert = require("./test/assertions");
+
+module.exports = {
+ createEditSession : function(rows, cols) {
+ var line = new Array(cols + 1).join("a");
+ var text = new Array(rows).join(line + "\n") + line;
+ return new EditSession(text);
+ },
+
+ "test: navigate to end of file should scroll the last line into view" : function() {
+ var doc = this.createEditSession(200, 10);
+ var editor = new Editor(new MockRenderer(), doc);
+
+ editor.navigateFileEnd();
+ var cursor = editor.getCursorPosition();
+
+ assert.ok(editor.getFirstVisibleRow() <= cursor.row);
+ assert.ok(editor.getLastVisibleRow() >= cursor.row);
+ },
+
+ "test: navigate to start of file should scroll the first row into view" : function() {
+ var doc = this.createEditSession(200, 10);
+ var editor = new Editor(new MockRenderer(), doc);
+
+ editor.moveCursorTo(editor.getLastVisibleRow() + 20);
+ editor.navigateFileStart();
+
+ assert.equal(editor.getFirstVisibleRow(), 0);
+ },
+
+ "test: goto hidden line should scroll the line into the middle of the viewport" : function() {
+ var editor = new Editor(new MockRenderer(), this.createEditSession(200, 5));
+
+ editor.navigateTo(0, 0);
+ editor.gotoLine(101);
+ assert.position(editor.getCursorPosition(), 100, 0);
+ assert.equal(editor.getFirstVisibleRow(), 89);
+
+ editor.navigateTo(100, 0);
+ editor.gotoLine(11);
+ assert.position(editor.getCursorPosition(), 10, 0);
+ assert.equal(editor.getFirstVisibleRow(), 0);
+
+ editor.navigateTo(100, 0);
+ editor.gotoLine(6);
+ assert.position(editor.getCursorPosition(), 5, 0);
+ assert.equal(0, editor.getFirstVisibleRow(), 0);
+
+ editor.navigateTo(100, 0);
+ editor.gotoLine(1);
+ assert.position(editor.getCursorPosition(), 0, 0);
+ assert.equal(editor.getFirstVisibleRow(), 0);
+
+ editor.navigateTo(0, 0);
+ editor.gotoLine(191);
+ assert.position(editor.getCursorPosition(), 190, 0);
+ assert.equal(editor.getFirstVisibleRow(), 179);
+
+ editor.navigateTo(0, 0);
+ editor.gotoLine(196);
+ assert.position(editor.getCursorPosition(), 195, 0);
+ assert.equal(editor.getFirstVisibleRow(), 180);
+ },
+
+ "test: goto visible line should only move the cursor and not scroll": function() {
+ var editor = new Editor(new MockRenderer(), this.createEditSession(200, 5));
+
+ editor.navigateTo(0, 0);
+ editor.gotoLine(12);
+ assert.position(editor.getCursorPosition(), 11, 0);
+ assert.equal(editor.getFirstVisibleRow(), 0);
+
+ editor.navigateTo(30, 0);
+ editor.gotoLine(33);
+ assert.position(editor.getCursorPosition(), 32, 0);
+ assert.equal(editor.getFirstVisibleRow(), 30);
+ },
+
+ "test: navigate from the end of a long line down to a short line and back should maintain the curser column": function() {
+ var editor = new Editor(new MockRenderer(), new EditSession(["123456", "1"]));
+
+ editor.navigateTo(0, 6);
+ assert.position(editor.getCursorPosition(), 0, 6);
+
+ editor.navigateDown();
+ assert.position(editor.getCursorPosition(), 1, 1);
+
+ editor.navigateUp();
+ assert.position(editor.getCursorPosition(), 0, 6);
+ },
+
+ "test: reset desired column on navigate left or right": function() {
+ var editor = new Editor(new MockRenderer(), new EditSession(["123456", "12"]));
+
+ editor.navigateTo(0, 6);
+ assert.position(editor.getCursorPosition(), 0, 6);
+
+ editor.navigateDown();
+ assert.position(editor.getCursorPosition(), 1, 2);
+
+ editor.navigateLeft();
+ assert.position(editor.getCursorPosition(), 1, 1);
+
+ editor.navigateUp();
+ assert.position(editor.getCursorPosition(), 0, 1);
+ },
+
+ "test: typing text should update the desired column": function() {
+ var editor = new Editor(new MockRenderer(), new EditSession(["1234", "1234567890"]));
+
+ editor.navigateTo(0, 3);
+ editor.insert("juhu");
+
+ editor.navigateDown();
+ assert.position(editor.getCursorPosition(), 1, 7);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/editor_text_edit_test.js b/src/fauxton/assets/js/libs/ace/editor_text_edit_test.js
new file mode 100644
index 000000000..77ec34ed2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/editor_text_edit_test.js
@@ -0,0 +1,557 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var JavaScriptMode = require("./mode/javascript").Mode;
+var UndoManager = require("./undomanager").UndoManager;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var assert = require("./test/assertions");
+var whitespace = require("./ext/whitespace");
+
+module.exports = {
+ "test: delete line from the middle" : function() {
+ var session = new EditSession(["a", "b", "c", "d"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 1);
+ editor.removeLines();
+
+ assert.equal(session.toString(), "a\nc\nd");
+ assert.position(editor.getCursorPosition(), 1, 0);
+
+ editor.removeLines();
+
+ assert.equal(session.toString(), "a\nd");
+ assert.position(editor.getCursorPosition(), 1, 0);
+
+ editor.removeLines();
+
+ assert.equal(session.toString(), "a");
+ assert.position(editor.getCursorPosition(), 0, 1);
+
+ editor.removeLines();
+
+ assert.equal(session.toString(), "");
+ assert.position(editor.getCursorPosition(), 0, 0);
+ },
+
+ "test: delete multiple selected lines" : function() {
+ var session = new EditSession(["a", "b", "c", "d"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 1);
+ editor.getSelection().selectDown();
+
+ editor.removeLines();
+ assert.equal(session.toString(), "a\nd");
+ assert.position(editor.getCursorPosition(), 1, 0);
+ },
+
+ "test: delete first line" : function() {
+ var session = new EditSession(["a", "b", "c"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.removeLines();
+
+ assert.equal(session.toString(), "b\nc");
+ assert.position(editor.getCursorPosition(), 0, 0);
+ },
+
+ "test: delete last should also delete the new line of the previous line" : function() {
+ var session = new EditSession(["a", "b", "c", ""].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(3, 0);
+
+ editor.removeLines();
+ assert.equal(session.toString(), "a\nb\nc");
+ assert.position(editor.getCursorPosition(), 2, 1);
+
+ editor.removeLines();
+ assert.equal(session.toString(), "a\nb");
+ assert.position(editor.getCursorPosition(), 1, 1);
+ },
+
+ "test: indent block" : function() {
+ var session = new EditSession(["a12345", "b12345", "c12345"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 3);
+ editor.getSelection().selectDown();
+
+ editor.indent();
+
+ assert.equal(["a12345", " b12345", " c12345"].join("\n"), session.toString());
+
+ assert.position(editor.getCursorPosition(), 2, 7);
+
+ var range = editor.getSelectionRange();
+ assert.position(range.start, 1, 7);
+ assert.position(range.end, 2, 7);
+ },
+
+ "test: indent selected lines" : function() {
+ var session = new EditSession(["a12345", "b12345", "c12345"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 0);
+ editor.getSelection().selectDown();
+
+ editor.indent();
+ assert.equal(["a12345", " b12345", "c12345"].join("\n"), session.toString());
+ },
+
+ "test: no auto indent if cursor is before the {" : function() {
+ var session = new EditSession("{", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 0);
+ editor.onTextInput("\n");
+ assert.equal(["", "{"].join("\n"), session.toString());
+ },
+
+ "test: outdent block" : function() {
+ var session = new EditSession([" a12345", " b12345", " c12345"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 5);
+ editor.getSelection().selectDown();
+ editor.getSelection().selectDown();
+
+ editor.blockOutdent();
+ assert.equal(session.toString(), [" a12345", "b12345", " c12345"].join("\n"));
+
+ assert.position(editor.getCursorPosition(), 2, 1);
+
+ var range = editor.getSelectionRange();
+ assert.position(range.start, 0, 1);
+ assert.position(range.end, 2, 1);
+
+ editor.blockOutdent();
+ assert.equal(session.toString(), ["a12345", "b12345", "c12345"].join("\n"));
+
+ var range = editor.getSelectionRange();
+ assert.position(range.start, 0, 0);
+ assert.position(range.end, 2, 0);
+ },
+
+ "test: outent without a selection should update cursor" : function() {
+ var session = new EditSession(" 12");
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 3);
+ editor.blockOutdent(" ");
+
+ assert.equal(session.toString(), " 12");
+ assert.position(editor.getCursorPosition(), 0, 0);
+ },
+
+ "test: comment lines should perserve selection" : function() {
+ var session = new EditSession([" abc", "cde"].join("\n"), new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+ whitespace.detectIndentation(session);
+
+ editor.moveCursorTo(0, 2);
+ editor.getSelection().selectDown();
+ editor.toggleCommentLines();
+
+ assert.equal(["// abc", "// cde"].join("\n"), session.toString());
+
+ var selection = editor.getSelectionRange();
+ assert.position(selection.start, 0, 5);
+ assert.position(selection.end, 1, 5);
+ },
+
+ "test: uncomment lines should perserve selection" : function() {
+ var session = new EditSession(["// abc", "//cde"].join("\n"), new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+ session.setTabSize(2);
+
+ editor.moveCursorTo(0, 1);
+ editor.getSelection().selectDown();
+ editor.getSelection().selectRight();
+ editor.getSelection().selectRight();
+
+ editor.toggleCommentLines();
+
+ assert.equal([" abc", "cde"].join("\n"), session.toString());
+ assert.range(editor.getSelectionRange(), 0, 0, 1, 1);
+ },
+
+ "test: toggle comment lines twice should return the original text" : function() {
+ var session = new EditSession([" abc", "cde", "fg"], new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 0);
+ editor.getSelection().selectDown();
+ editor.getSelection().selectDown();
+
+ editor.toggleCommentLines();
+ editor.toggleCommentLines();
+
+ assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
+ },
+
+
+ "test: comment lines - if the selection end is at the line start it should stay there": function() {
+ //select down
+ var session = new EditSession(["abc", "cde"].join("\n"), new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 0);
+ editor.getSelection().selectDown();
+
+ editor.toggleCommentLines();
+ assert.range(editor.getSelectionRange(), 0, 3, 1, 0);
+
+ // select up
+ var session = new EditSession(["abc", "cde"].join("\n"), new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 0);
+ editor.getSelection().selectUp();
+
+ editor.toggleCommentLines();
+ assert.range(editor.getSelectionRange(), 0, 3, 1, 0);
+ },
+
+ "test: move lines down should keep selection on moved lines" : function() {
+ var session = new EditSession(["11", "22", "33", "44"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(0, 1);
+ editor.getSelection().selectDown();
+
+ editor.moveLinesDown();
+ assert.equal(["33", "11", "22", "44"].join("\n"), session.toString());
+ assert.position(editor.getCursorPosition(), 2, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 1, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 2, 1);
+
+ editor.moveLinesDown();
+ assert.equal(["33", "44", "11", "22"].join("\n"), session.toString());
+ assert.position(editor.getCursorPosition(), 3, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 2, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 3, 1);
+
+ // moving again should have no effect
+ editor.moveLinesDown();
+ assert.equal(["33", "44", "11", "22"].join("\n"), session.toString());
+ assert.position(editor.getCursorPosition(), 3, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 2, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 3, 1);
+ },
+
+ "test: move lines up should keep selection on moved lines" : function() {
+ var session = new EditSession(["11", "22", "33", "44"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(2, 1);
+ editor.getSelection().selectDown();
+
+ editor.moveLinesUp();
+ assert.equal(session.toString(), ["11", "33", "44", "22"].join("\n"));
+ assert.position(editor.getCursorPosition(), 2, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 1, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 2, 1);
+
+ editor.moveLinesUp();
+ assert.equal(session.toString(), ["33", "44", "11", "22"].join("\n"));
+ assert.position(editor.getCursorPosition(), 1, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 0, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 1, 1);
+ },
+
+ "test: move line without active selection should not move cursor relative to the moved line" : function() {
+ var session = new EditSession(["11", "22", "33", "44"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 1);
+ editor.clearSelection();
+
+ editor.moveLinesDown();
+ assert.equal(["11", "33", "22", "44"].join("\n"), session.toString());
+ assert.position(editor.getCursorPosition(), 2, 1);
+
+ editor.clearSelection();
+
+ editor.moveLinesUp();
+ assert.equal(["11", "22", "33", "44"].join("\n"), session.toString());
+ assert.position(editor.getCursorPosition(), 1, 1);
+ },
+
+ "test: copy lines down should keep selection" : function() {
+ var session = new EditSession(["11", "22", "33", "44"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 1);
+ editor.getSelection().selectDown();
+
+ editor.copyLinesDown();
+ assert.equal(["11", "22", "33", "22", "33", "44"].join("\n"), session.toString());
+
+ assert.position(editor.getCursorPosition(), 4, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 3, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 4, 1);
+ },
+
+ "test: copy lines up should keep selection" : function() {
+ var session = new EditSession(["11", "22", "33", "44"].join("\n"));
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.moveCursorTo(1, 1);
+ editor.getSelection().selectDown();
+
+ editor.copyLinesUp();
+ assert.equal(["11", "22", "33", "22", "33", "44"].join("\n"), session.toString());
+
+ assert.position(editor.getCursorPosition(), 2, 1);
+ assert.position(editor.getSelection().getSelectionAnchor(), 1, 1);
+ assert.position(editor.getSelection().getSelectionLead(), 2, 1);
+ },
+
+ "test: input a tab with soft tab should convert it to spaces" : function() {
+ var session = new EditSession("");
+ var editor = new Editor(new MockRenderer(), session);
+
+ session.setTabSize(2);
+ session.setUseSoftTabs(true);
+
+ editor.onTextInput("\t");
+ assert.equal(session.toString(), " ");
+
+ session.setTabSize(5);
+ editor.onTextInput("\t");
+ assert.equal(session.toString(), " ");
+ },
+
+ "test: input tab without soft tabs should keep the tab character" : function() {
+ var session = new EditSession("");
+ var editor = new Editor(new MockRenderer(), session);
+
+ session.setUseSoftTabs(false);
+
+ editor.onTextInput("\t");
+ assert.equal(session.toString(), "\t");
+ },
+
+ "test: undo/redo for delete line" : function() {
+ var session = new EditSession(["111", "222", "333"]);
+ var undoManager = new UndoManager();
+ session.setUndoManager(undoManager);
+
+ var initialText = session.toString();
+ var editor = new Editor(new MockRenderer(), session);
+
+ editor.removeLines();
+ var step1 = session.toString();
+ assert.equal(step1, "222\n333");
+ session.$syncInformUndoManager();
+
+ editor.removeLines();
+ var step2 = session.toString();
+ assert.equal(step2, "333");
+ session.$syncInformUndoManager();
+
+ editor.removeLines();
+ var step3 = session.toString();
+ assert.equal(step3, "");
+ session.$syncInformUndoManager();
+
+ undoManager.undo();
+ session.$syncInformUndoManager();
+ assert.equal(session.toString(), step2);
+
+ undoManager.undo();
+ session.$syncInformUndoManager();
+ assert.equal(session.toString(), step1);
+
+ undoManager.undo();
+ session.$syncInformUndoManager();
+ assert.equal(session.toString(), initialText);
+
+ undoManager.undo();
+ session.$syncInformUndoManager();
+ assert.equal(session.toString(), initialText);
+ },
+
+ "test: remove left should remove character left of the cursor" : function() {
+ var session = new EditSession(["123", "456"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 1);
+ editor.remove("left");
+ assert.equal(session.toString(), "123\n56");
+ },
+
+ "test: remove left should remove line break if cursor is at line start" : function() {
+ var session = new EditSession(["123", "456"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.remove("left");
+ assert.equal(session.toString(), "123456");
+ },
+
+ "test: remove left should remove tabsize spaces if cursor is on a tab stop and preceeded by spaces" : function() {
+ var session = new EditSession(["123", " 456"]);
+ session.setUseSoftTabs(true);
+ session.setTabSize(4);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 8);
+ editor.remove("left");
+ assert.equal(session.toString(), "123\n 456");
+ },
+
+ "test: transpose at line start should be a noop": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.transposeLetters();
+
+ assert.equal(session.getValue(), ["123", "4567", "89"].join("\n"));
+ },
+
+ "test: transpose in line should swap the charaters before and after the cursor": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 2);
+ editor.transposeLetters();
+
+ assert.equal(session.getValue(), ["123", "4657", "89"].join("\n"));
+ },
+
+ "test: transpose at line end should swap the last two characters": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 4);
+ editor.transposeLetters();
+
+ assert.equal(session.getValue(), ["123", "4576", "89"].join("\n"));
+ },
+
+ "test: transpose with non empty selection should be a noop": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 1);
+ editor.getSelection().selectRight();
+ editor.transposeLetters();
+
+ assert.equal(session.getValue(), ["123", "4567", "89"].join("\n"));
+ },
+
+ "test: transpose should move the cursor behind the last swapped character": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 2);
+ editor.transposeLetters();
+ assert.position(editor.getCursorPosition(), 1, 3);
+ },
+
+ "test: remove to line end": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 2);
+ editor.removeToLineEnd();
+ assert.equal(session.getValue(), ["123", "45", "89"].join("\n"));
+ },
+
+ "test: remove to line end at line end should remove the new line": function() {
+ var session = new EditSession(["123", "4567", "89"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 4);
+ editor.removeToLineEnd();
+ assert.position(editor.getCursorPosition(), 1, 4);
+ assert.equal(session.getValue(), ["123", "456789"].join("\n"));
+ },
+
+ "test: transform selection to uppercase": function() {
+ var session = new EditSession(["ajax", "dot", "org"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.getSelection().selectLineEnd();
+ editor.toUpperCase()
+ assert.equal(session.getValue(), ["ajax", "DOT", "org"].join("\n"));
+ },
+
+ "test: transform word to uppercase": function() {
+ var session = new EditSession(["ajax", "dot", "org"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.toUpperCase()
+ assert.equal(session.getValue(), ["ajax", "DOT", "org"].join("\n"));
+ assert.position(editor.getCursorPosition(), 1, 0);
+ },
+
+ "test: transform selection to lowercase": function() {
+ var session = new EditSession(["AJAX", "DOT", "ORG"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.getSelection().selectLineEnd();
+ editor.toLowerCase()
+ assert.equal(session.getValue(), ["AJAX", "dot", "ORG"].join("\n"));
+ },
+
+ "test: transform word to lowercase": function() {
+ var session = new EditSession(["AJAX", "DOT", "ORG"]);
+
+ var editor = new Editor(new MockRenderer(), session);
+ editor.moveCursorTo(1, 0);
+ editor.toLowerCase()
+ assert.equal(session.getValue(), ["AJAX", "dot", "ORG"].join("\n"));
+ assert.position(editor.getCursorPosition(), 1, 0);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/ext/chromevox.js b/src/fauxton/assets/js/libs/ace/ext/chromevox.js
new file mode 100644
index 000000000..9f7a79963
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/chromevox.js
@@ -0,0 +1,980 @@
+define(function(require, exports, module) {
+
+/* ChromeVox Ace namespace. */
+var cvoxAce = {};
+
+/* Typedefs for Closure compiler. */
+/**
+ * @typedef {{
+ rate: number,
+ pitch: number,
+ volume: number,
+ relativePitch: number,
+ punctuationEcho: string
+ }}
+ */
+/* TODO(peterxiao): Export this typedef through cvox.Api. */
+cvoxAce.SpeechProperty;
+
+/**
+ * @typedef {{
+ * row: number,
+ * column: number
+ * }}
+ */
+cvoxAce.Cursor;
+
+/**
+ * @typedef {{
+ type: string,
+ value: string
+ }}
+ }
+ */
+cvoxAce.Token;
+
+/**
+ * These are errors and information that Ace will display in the gutter.
+ * @typedef {{
+ row: number,
+ column: number,
+ value: string
+ }}
+ }
+ */
+cvoxAce.Annotation;
+
+/* Speech Properties. */
+/**
+ * Speech property for speaking constant tokens.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var CONSTANT_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.4,
+ 'volume': 0.9
+};
+
+/**
+ * Default speech property for speaking tokens.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var DEFAULT_PROP = {
+ 'rate': 1,
+ 'pitch': 0.5,
+ 'volume': 0.9
+};
+
+/**
+ * Speech property for speaking entity tokens.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var ENTITY_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.8,
+ 'volume': 0.9
+};
+
+/**
+ * Speech property for speaking keywords.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var KEYWORD_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.3,
+ 'volume': 0.9
+};
+
+/**
+ * Speech property for speaking storage tokens.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var STORAGE_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.7,
+ 'volume': 0.9
+};
+
+/**
+ * Speech property for speaking variable tokens.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var VARIABLE_PROP = {
+ 'rate': 0.8,
+ 'pitch': 0.8,
+ 'volume': 0.9
+};
+
+/**
+ * Speech property for speaking deleted text.
+ * @type {cvoxAce.SpeechProperty}
+ */
+var DELETED_PROP = {
+ 'punctuationEcho': 'none',
+ 'relativePitch': -0.6
+};
+
+/* Constants for Earcons. */
+var ERROR_EARCON = 'ALERT_NONMODAL';
+var MODE_SWITCH_EARCON = 'ALERT_MODAL';
+var NO_MATCH_EARCON = 'INVALID_KEYPRESS';
+
+/* Constants for vim state. */
+var INSERT_MODE_STATE = 'insertMode';
+var COMMAND_MODE_STATE = 'start';
+
+var REPLACE_LIST = [
+ {
+ substr: ';',
+ newSubstr: ' semicolon '
+ },
+ {
+ substr: ':',
+ newSubstr: ' colon '
+ }
+];
+
+/**
+ * Context menu commands.
+ */
+var Command = {
+ SPEAK_ANNOT: 'annots',
+ SPEAK_ALL_ANNOTS: 'all_annots',
+ TOGGLE_LOCATION: 'toggle_location',
+ SPEAK_MODE: 'mode',
+ SPEAK_ROW_COL: 'row_col',
+ TOGGLE_DISPLACEMENT: 'toggle_displacement',
+ FOCUS_TEXT: 'focus_text'
+};
+
+/**
+ * Key prefix for each shortcut.
+ */
+var KEY_PREFIX = 'CONTROL + SHIFT ';
+
+/* Globals. */
+cvoxAce.editor = null;
+/**
+ * Last cursor position.
+ * @type {cvoxAce.Cursor}
+ */
+var lastCursor = null;
+
+/**
+ * Table of annotations.
+ * @typedef {!Object.<number, Object<number, cvoxAce.Annotation>>}
+ */
+var annotTable = {};
+
+/**
+ * Whether to speak character, word, and then line. This allows blind users
+ * to know the location of the cursor when they change lines.
+ * @typedef {boolean}
+ */
+var shouldSpeakRowLocation = false;
+
+/**
+ * Whether to speak displacement.
+ * @typedef {boolean}
+ */
+var shouldSpeakDisplacement = false;
+
+/**
+ * Whether text was changed to cause a cursor change event.
+ * @typedef {boolean}
+ */
+var changed = false;
+
+/**
+ * Current state vim is in.
+ */
+var vimState = null;
+
+/**
+ * Mapping from key code to shortcut.
+ */
+var keyCodeToShortcutMap = {};
+
+/**
+ * Mapping from command to shortcut.
+ */
+var cmdToShortcutMap = {};
+
+/**
+ * Get shortcut string from keyCode.
+ * @param {number} keyCode Key code of shortcut.
+ * @return {string} String representation of shortcut.
+ */
+var getKeyShortcutString = function(keyCode) {
+ return KEY_PREFIX + String.fromCharCode(keyCode);
+};
+
+/**
+ * Return if in vim mode.
+ * @return {boolean} True if in Vim mode.
+ */
+var isVimMode = function() {
+ var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler();
+ return keyboardHandler.$id === 'ace/keyboard/vim';
+};
+
+/**
+ * Gets the current token.
+ * @param {!cvoxAce.Cursor} cursor Current position of the cursor.
+ * @return {!cvoxAce.Token} Token at the current position.
+ */
+var getCurrentToken = function(cursor) {
+ return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1);
+};
+
+/**
+ * Gets the current line the cursor is under.
+ * @param {!cvoxAce.Cursor} cursor Current cursor position.
+ */
+var getCurrentLine = function(cursor) {
+ return cvoxAce.editor.getSession().getLine(cursor.row);
+};
+
+/**
+ * Event handler for row changes. When the user changes rows we want to speak
+ * the line so the user can work on this line. If shouldSpeakRowLocation is on
+ * then we speak the character, then the row, then the line so the user knows
+ * where the cursor is.
+ * @param {!cvoxAce.Cursor} currCursor Current cursor position.
+ */
+var onRowChange = function(currCursor) {
+ /* Notify that this line has an annotation. */
+ if (annotTable[currCursor.row]) {
+ cvox.Api.playEarcon(ERROR_EARCON);
+ }
+ if (shouldSpeakRowLocation) {
+ cvox.Api.stop();
+ speakChar(currCursor);
+ speakTokenQueue(getCurrentToken(currCursor));
+ speakLine(currCursor.row, 1);
+ } else {
+ speakLine(currCursor.row, 0);
+ }
+};
+
+/**
+ * Returns whether the cursor is at the beginning of a word. A word is
+ * a grouping of alphanumeric characters including underscores.
+ * @param {!cvoxAce.Cursor} cursor Current cursor position.
+ * @return {boolean} Whether there is word.
+ */
+var isWord = function(cursor) {
+ var line = getCurrentLine(cursor);
+ var lineSuffix = line.substr(cursor.column - 1);
+ if (cursor.column === 0) {
+ lineSuffix = ' ' + line;
+ }
+ /* Use regex to tell if the suffix is at the start of a new word. */
+ var firstWordRegExp = /^\W(\w+)/;
+ var words = firstWordRegExp.exec(lineSuffix);
+ return words !== null;
+};
+
+/**
+ * A mapping of syntax type to speech properties / expanding rules.
+ */
+var rules = {
+ 'constant': {
+ prop: CONSTANT_PROP
+ },
+ 'entity': {
+ prop: ENTITY_PROP
+ },
+ 'keyword': {
+ prop: KEYWORD_PROP
+ },
+ 'storage': {
+ prop: STORAGE_PROP
+ },
+ 'variable': {
+ prop: VARIABLE_PROP
+ },
+ 'meta': {
+ prop: DEFAULT_PROP,
+ replace: [
+ {
+ substr: '</',
+ newSubstr: ' closing tag '
+ },
+ {
+ substr: '/>',
+ newSubstr: ' close tag '
+ },
+ {
+ substr: '<',
+ newSubstr: ' tag start '
+ },
+ {
+ substr: '>',
+ newSubstr: ' tag end '
+ }
+ ]
+ }
+};
+
+/**
+ * Default rule to be used.
+ */
+var DEFAULT_RULE = {
+ prop: DEFAULT_RULE
+};
+
+/**
+ * Expands substrings to how they are read based on the given rules.
+ * @param {string} value Text to be expanded.
+ * @param {Array.<Object>} replaceRules Rules to determine expansion.
+ * @return {string} New expanded value.
+ */
+var expand = function(value, replaceRules) {
+ var newValue = value;
+ for (var i = 0; i < replaceRules.length; i++) {
+ var replaceRule = replaceRules[i];
+ var regexp = new RegExp(replaceRule.substr, 'g');
+ newValue = newValue.replace(regexp, replaceRule.newSubstr);
+ }
+ return newValue;
+};
+
+/**
+ * Merges tokens from start inclusive to end exclusive.
+ * @param {Array.<cvoxAce.Token>} Tokens to be merged.
+ * @param {number} start Start index inclusive.
+ * @param {number} end End index exclusive.
+ * @return {cvoxAce.Token} Merged token.
+ */
+var mergeTokens = function(tokens, start, end) {
+ /* Different type of token found! Merge all previous like tokens. */
+ var newToken = {};
+ newToken.value = '';
+ newToken.type = tokens[start].type;
+ for (var j = start; j < end; j++) {
+ newToken.value += tokens[j].value;
+ }
+ return newToken;
+};
+
+/**
+ * Merges tokens that use the same speech properties.
+ * @param {Array.<cvoxAce.Token>} tokens Tokens to be merged.
+ * @return {Array.<cvoxAce.Token>} Merged tokens.
+ */
+var mergeLikeTokens = function(tokens) {
+ if (tokens.length <= 1) {
+ return tokens;
+ }
+ var newTokens = [];
+ var lastLikeIndex = 0;
+ for (var i = 1; i < tokens.length; i++) {
+ var lastLikeToken = tokens[lastLikeIndex];
+ var currToken = tokens[i];
+ if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) {
+ newTokens.push(mergeTokens(tokens, lastLikeIndex, i));
+ lastLikeIndex = i;
+ }
+ }
+ newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length));
+ return newTokens;
+};
+
+/**
+ * Returns if given row is a whitespace row.
+ * @param {number} row Row.
+ * @return {boolean} True if row is whitespaces.
+ */
+var isRowWhiteSpace = function(row) {
+ var line = cvoxAce.editor.getSession().getLine(row);
+ var whiteSpaceRegexp = /^\s*$/;
+ return whiteSpaceRegexp.exec(line) !== null;
+};
+
+/**
+ * Speak the line with syntax properties.
+ * @param {number} row Row to speak.
+ * @param {number} queue Queue mode to speak.
+ */
+var speakLine = function(row, queue) {
+ var tokens = cvoxAce.editor.getSession().getTokens(row);
+ if (tokens.length === 0 || isRowWhiteSpace(row)) {
+ cvox.Api.playEarcon('EDITABLE_TEXT');
+ return;
+ }
+ tokens = mergeLikeTokens(tokens);
+ var firstToken = tokens[0];
+ /* Filter out first token. */
+ tokens = tokens.filter(function(token) {
+ return token !== firstToken;
+ });
+ /* Speak first token separately to flush if queue. */
+ speakToken_(firstToken, queue);
+ /* Speak rest of tokens. */
+ tokens.forEach(speakTokenQueue);
+};
+
+/**
+ * Speak the token based on the syntax of the token, flushing.
+ * @param {!cvoxAce.Token} token Token to speak.
+ * @param {number} queue Queue mode.
+ */
+var speakTokenFlush = function(token) {
+ speakToken_(token, 0);
+};
+
+/**
+ * Speak the token based on the syntax of the token, queueing.
+ * @param {!cvoxAce.Token} token Token to speak.
+ * @param {number} queue Queue mode.
+ */
+var speakTokenQueue = function(token) {
+ speakToken_(token, 1);
+};
+
+/**
+ * @param {!cvoxAce.Token} token Token to speak.
+ * Get the token speech property.
+ */
+var getTokenRule = function(token) {
+ /* Types are period delimited. In this case, we only syntax speak the outer
+ * most type of token. */
+ if (!token || !token.type) {
+ return;
+ }
+ var split = token.type.split('.');
+ if (split.length === 0) {
+ return;
+ }
+ var type = split[0];
+ var rule = rules[type];
+ if (!rule) {
+ return DEFAULT_RULE;
+ }
+ return rule;
+};
+
+/**
+ * Speak the token based on the syntax of the token.
+ * @private
+ * @param {!cvoxAce.Token} token Token to speak.
+ * @param {number} queue Queue mode.
+ */
+var speakToken_ = function(token, queue) {
+ var rule = getTokenRule(token);
+ var value = expand(token.value, REPLACE_LIST);
+ if (rule.replace) {
+ value = expand(value, rule.replace);
+ }
+ cvox.Api.speak(value, queue, rule.prop);
+};
+
+/**
+ * Speaks the character under the cursor. This is queued.
+ * @param {!cvoxAce.Cursor} cursor Current cursor position.
+ * @return {string} Character.
+ */
+var speakChar = function(cursor) {
+ var line = getCurrentLine(cursor);
+ cvox.Api.speak(line[cursor.column], 1);
+};
+
+/**
+ * Speaks the jump from lastCursor to currCursor. This function assumes the
+ * jump takes place on the current line.
+ * @param {!cvoxAce.Cursor} lastCursor Previous cursor position.
+ * @param {!cvoxAce.Cursor} currCursor Current cursor position.
+ */
+var speakDisplacement = function(lastCursor, currCursor) {
+ var line = getCurrentLine(currCursor);
+
+ /* Get the text that we jumped past. */
+ var displace = line.substring(lastCursor.column, currCursor.column);
+
+ /* Speak out loud spaces. */
+ displace = displace.replace(/ /g, ' space ');
+ cvox.Api.speak(displace);
+};
+
+/**
+ * Speaks the word if the cursor jumped to a new word or to the beginning
+ * of the line. Otherwise speak the charactor.
+ * @param {!cvoxAce.Cursor} lastCursor Previous cursor position.
+ * @param {!cvoxAce.Cursor} currCursor Current cursor position.
+ */
+var speakCharOrWordOrLine = function(lastCursor, currCursor) {
+ /* Say word only if jump. */
+ if (Math.abs(lastCursor.column - currCursor.column) !== 1) {
+ var currLineLength = getCurrentLine(currCursor).length;
+ /* Speak line if jumping to beginning or end of line. */
+ if (currCursor.column === 0 || currCursor.column === currLineLength) {
+ speakLine(currCursor.row, 0);
+ return;
+ }
+ if (isWord(currCursor)) {
+ cvox.Api.stop();
+ speakTokenQueue(getCurrentToken(currCursor));
+ return;
+ }
+ }
+ speakChar(currCursor);
+};
+
+/**
+ * Event handler for column changes. If shouldSpeakDisplacement is on, then
+ * we just speak displacements in row changes. Otherwise, we either speak
+ * the character for single character movements, the word when jumping to the
+ * next word, or the entire line if jumping to beginning or end of the line.
+ * @param {!cvoxAce.Cursor} lastCursor Previous cursor position.
+ * @param {!cvoxAce.Cursor} currCursor Current cursor position.
+ */
+var onColumnChange = function(lastCursor, currCursor) {
+ if (!cvoxAce.editor.selection.isEmpty()) {
+ speakDisplacement(lastCursor, currCursor);
+ cvox.Api.speak('selected', 1);
+ }
+ else if (shouldSpeakDisplacement) {
+ speakDisplacement(lastCursor, currCursor);
+ } else {
+ speakCharOrWordOrLine(lastCursor, currCursor);
+ }
+};
+
+/**
+ * Event handler for cursor changes. Classify cursor changes as either row or
+ * column changes, then delegate accordingly.
+ * @param {!Event} evt The event.
+ */
+var onCursorChange = function(evt) {
+ /* Do not speak if cursor change was a result of text insertion. We want to
+ * speak the text that was inserted and not where the cursor lands. */
+ if (changed) {
+ changed = false;
+ return;
+ }
+ var currCursor = cvoxAce.editor.selection.getCursor();
+ if (currCursor.row !== lastCursor.row) {
+ onRowChange(currCursor);
+ } else {
+ onColumnChange(lastCursor, currCursor);
+ }
+ lastCursor = currCursor;
+};
+
+/**
+ * Event handler for selection changes.
+ * @param {!Event} evt The event.
+ */
+var onSelectionChange = function(evt) {
+ /* Assumes that when selection changes to empty, the user has unselected. */
+ if (cvoxAce.editor.selection.isEmpty()) {
+ cvox.Api.speak('unselected');
+ }
+};
+
+/**
+ * Event handler for source changes. We want auditory feedback for inserting
+ * and deleting text.
+ * @param {!Event} evt The event.
+ */
+var onChange = function(evt) {
+ var data = evt.data;
+ switch (data.action) {
+ case 'removeText':
+ cvox.Api.speak(data.text, 0, DELETED_PROP);
+ /* Let the future cursor change event know it's from text change. */
+ changed = true;
+ break;
+ case 'insertText':
+ cvox.Api.speak(data.text, 0);
+ /* Let the future cursor change event know it's from text change. */
+ changed = true;
+ break;
+ }
+};
+
+/**
+ * Returns whether or not the annotation is new.
+ * @param {!cvoxAce.Annotation} annot Annotation in question.
+ * @return {boolean} Whether annot is new.
+ */
+var isNewAnnotation = function(annot) {
+ var row = annot.row;
+ var col = annot.column;
+ return !annotTable[row] || !annotTable[row][col];
+};
+
+/**
+ * Populates the annotation table.
+ * @param {!Array.<cvoxAce.Annotation>} annotations Array of annotations.
+ */
+var populateAnnotations = function(annotations) {
+ annotTable = {};
+ for (var i = 0; i < annotations.length; i++) {
+ var annotation = annotations[i];
+ var row = annotation.row;
+ var col = annotation.column;
+ if (!annotTable[row]) {
+ annotTable[row] = {};
+ }
+ annotTable[row][col] = annotation;
+ }
+};
+
+/**
+ * Event handler for annotation changes. We want to notify the user when an
+ * a new annotation appears.
+ * @param {!Event} evt Event.
+ */
+var onAnnotationChange = function(evt) {
+ var annotations = cvoxAce.editor.getSession().getAnnotations();
+ var newAnnotations = annotations.filter(isNewAnnotation);
+ if (newAnnotations.length > 0) {
+ cvox.Api.playEarcon(ERROR_EARCON);
+ }
+ populateAnnotations(annotations);
+};
+
+/**
+ * Speak annotation.
+ * @param {!cvoxAce.Annotation} annot Annotation to speak.
+ */
+var speakAnnot = function(annot) {
+ var annotText = annot.type + ' ' + annot.text + ' on ' +
+ rowColToString(annot.row, annot.column);
+ annotText = annotText.replace(';', 'semicolon');
+ cvox.Api.speak(annotText, 1);
+};
+
+/**
+ * Speak annotations in a row.
+ * @param {number} row Row of annotations to speak.
+ */
+var speakAnnotsByRow = function(row) {
+ var annots = annotTable[row];
+ for (var col in annots) {
+ speakAnnot(annots[col]);
+ }
+};
+
+/**
+ * Get a string representation of a row and column.
+ * @param {boolean} row Zero indexed row.
+ * @param {boolean} col Zero indexed column.
+ * @return {string} Row and column to be spoken.
+ */
+var rowColToString = function(row, col) {
+ return 'row ' + (row + 1) + ' column ' + (col + 1);
+};
+
+/**
+ * Speaks the row and column.
+ */
+var speakCurrRowAndCol = function() {
+ cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column));
+};
+
+/**
+ * Speaks all annotations.
+ */
+var speakAllAnnots = function() {
+ for (var row in annotTable) {
+ speakAnnotsByRow(row);
+ }
+};
+
+/**
+ * Speak the vim mode. If no vim mode, this function does nothing.
+ */
+var speakMode = function() {
+ if (!isVimMode()) {
+ return;
+ }
+ switch (cvoxAce.editor.keyBinding.$data.state) {
+ case INSERT_MODE_STATE:
+ cvox.Api.speak('Insert mode');
+ break;
+ case COMMAND_MODE_STATE:
+ cvox.Api.speak('Command mode');
+ break;
+ }
+};
+
+/**
+ * Toggle speak location.
+ */
+var toggleSpeakRowLocation = function() {
+ shouldSpeakRowLocation = !shouldSpeakRowLocation;
+ /* Auditory feedback of the change. */
+ if (shouldSpeakRowLocation) {
+ cvox.Api.speak('Speak location on row change enabled.');
+ } else {
+ cvox.Api.speak('Speak location on row change disabled.');
+ }
+};
+
+/**
+ * Toggle speak displacement.
+ */
+var toggleSpeakDisplacement = function() {
+ shouldSpeakDisplacement = !shouldSpeakDisplacement;
+ /* Auditory feedback of the change. */
+ if (shouldSpeakDisplacement) {
+ cvox.Api.speak('Speak displacement on column changes.');
+ } else {
+ cvox.Api.speak('Speak current character or word on column changes.');
+ }
+};
+
+/**
+ * Event handler for key down events. Gets the right shortcut from the map,
+ * and calls the associated function.
+ * @param {!Event} evt Keyboard event.
+ */
+var onKeyDown = function(evt) {
+ if (evt.ctrlKey && evt.shiftKey) {
+ var shortcut = keyCodeToShortcutMap[evt.keyCode];
+ if (shortcut) {
+ shortcut.func();
+ }
+ }
+};
+
+/**
+ * Event handler for status change events. Auditory feedback of changing
+ * between vim states.
+ * @param {!Event} evt Change status event.
+ * @param {!Object} editor Editor state.
+ */
+var onChangeStatus = function(evt, editor) {
+ if (!isVimMode()) {
+ return;
+ }
+ var state = editor.keyBinding.$data.state;
+ if (state === vimState) {
+ /* State hasn't changed, do nothing. */
+ return;
+ }
+ switch (state) {
+ case INSERT_MODE_STATE:
+ cvox.Api.playEarcon(MODE_SWITCH_EARCON);
+ /* When in insert mode, we want to speak out keys as feedback. */
+ cvox.Api.setKeyEcho(true);
+ break;
+ case COMMAND_MODE_STATE:
+ cvox.Api.playEarcon(MODE_SWITCH_EARCON);
+ /* When in command mode, we want don't speak out keys because those keys
+ * are not being inserted in the document. */
+ cvox.Api.setKeyEcho(false);
+ break;
+ }
+ vimState = state;
+};
+
+/**
+ * Handles context menu events. This is a ChromeVox feature where hitting
+ * the shortcut ChromeVox + comma will open up a search bar where you can
+ * type in various commands. All keyboard shortcuts are also commands that
+ * can be invoked. This handles the event that ChromeVox sends to the page.
+ * @param {Event} evt Event received.
+ */
+var contextMenuHandler = function(evt) {
+ var cmd = evt.detail['customCommand'];
+ var shortcut = cmdToShortcutMap[cmd];
+ if (shortcut) {
+ shortcut.func();
+ /* ChromeVox will bring focus to an element near the cursor instead of the
+ * text input. */
+ cvoxAce.editor.focus();
+ }
+};
+
+/**
+ * Initialize the ChromeVox context menu.
+ */
+var initContextMenu = function() {
+ var ACTIONS = SHORTCUTS.map(function(shortcut) {
+ return {
+ desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode),
+ cmd: shortcut.cmd
+ };
+ });
+
+ /* Attach ContextMenuActions. */
+ var body = document.querySelector('body');
+ body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS));
+
+ /* Listen for ContextMenu events. */
+ body.addEventListener('ATCustomEvent', contextMenuHandler, true);
+};
+
+/**
+ * Event handler for find events. When there is a match, we want to speak the
+ * line we are now at. Otherwise, we want to notify the user there was no
+ * match
+ * @param {!Event} evt The event.
+ */
+var onFindSearchbox = function(evt) {
+ if (evt.match) {
+ /* There is still a match! Speak the line. */
+ speakLine(lastCursor.row, 0);
+ } else {
+ /* No match, give auditory feedback! */
+ cvox.Api.playEarcon(NO_MATCH_EARCON);
+ }
+};
+
+/**
+ * Focus to text input.
+ */
+var focus = function() {
+ cvoxAce.editor.focus();
+};
+
+/**
+ * Shortcut definitions.
+ */
+var SHORTCUTS = [
+ {
+ /* 1 key. */
+ keyCode: 49,
+ func: function() {
+ speakAnnotsByRow(lastCursor.row);
+ },
+ cmd: Command.SPEAK_ANNOT,
+ desc: 'Speak annotations on line'
+ },
+ {
+ /* 2 key. */
+ keyCode: 50,
+ func: speakAllAnnots,
+ cmd: Command.SPEAK_ALL_ANNOTS,
+ desc: 'Speak all annotations'
+ },
+ {
+ /* 3 key. */
+ keyCode: 51,
+ func: speakMode,
+ cmd: Command.SPEAK_MODE,
+ desc: 'Speak Vim mode'
+ },
+ {
+ /* 4 key. */
+ keyCode: 52,
+ func: toggleSpeakRowLocation,
+ cmd: Command.TOGGLE_LOCATION,
+ desc: 'Toggle speak row location'
+ },
+ {
+ /* 5 key. */
+ keyCode: 53,
+ func: speakCurrRowAndCol,
+ cmd: Command.SPEAK_ROW_COL,
+ desc: 'Speak row and column'
+ },
+ {
+ /* 6 key. */
+ keyCode: 54,
+ func: toggleSpeakDisplacement,
+ cmd: Command.TOGGLE_DISPLACEMENT,
+ desc: 'Toggle speak displacement'
+ },
+ {
+ /* 7 key. */
+ keyCode: 55,
+ func: focus,
+ cmd: Command.FOCUS_TEXT,
+ desc: 'Focus text'
+ }
+];
+
+/**
+ * Event handler for focus events.
+ */
+var onFocus = function() {
+ cvoxAce.editor = editor;
+
+ /* Set up listeners. */
+ editor.getSession().selection.on('changeCursor', onCursorChange);
+ editor.getSession().selection.on('changeSelection', onSelectionChange);
+ editor.getSession().on('change', onChange);
+ editor.getSession().on('changeAnnotation', onAnnotationChange);
+ editor.on('changeStatus', onChangeStatus);
+ editor.on('findSearchBox', onFindSearchbox);
+ editor.container.addEventListener('keydown', onKeyDown);
+
+ lastCursor = editor.selection.getCursor();
+};
+
+/**
+ * Initialize the theme.
+ * @param {Object} editor Editor to use.
+ */
+var init = function(editor) {
+ onFocus();
+
+ /* Construct maps. */
+ SHORTCUTS.forEach(function(shortcut) {
+ keyCodeToShortcutMap[shortcut.keyCode] = shortcut;
+ cmdToShortcutMap[shortcut.cmd] = shortcut;
+ });
+
+ editor.on('focus', onFocus);
+
+ /* Assume we start in command mode if vim. */
+ if (isVimMode()) {
+ cvox.Api.setKeyEcho(false);
+ }
+ initContextMenu();
+};
+
+/**
+ * Returns if cvox exists, and the api exists.
+ * @return {boolean} Whether not Cvox Api exists.
+ */
+function cvoxApiExists() {
+ return (typeof(cvox) !== 'undefined') && cvox && cvox.Api;
+}
+
+/**
+ * Number of tries for Cvox loading.
+ * @type {number}
+ */
+var tries = 0;
+
+/**
+ * Max number of tries to watch for Cvox loading.
+ * @type {number}
+ */
+var MAX_TRIES = 15;
+
+/**
+ * Check for ChromeVox load.
+ * @param {Object} editor Editor to use.
+ */
+function watchForCvoxLoad(editor) {
+ if (cvoxApiExists()) {
+ init(editor);
+ } else {
+ tries++;
+ if (tries >= MAX_TRIES) {
+ return;
+ }
+ window.setTimeout(watchForCvoxLoad, 500, editor);
+ }
+}
+
+var Editor = require('../editor').Editor;
+require('../config').defineOptions(Editor.prototype, 'editor', {
+ enableChromevoxEnhancements: {
+ set: function(val) {
+ if (val) {
+ watchForCvoxLoad(this);
+ }
+ },
+ value: true // turn it on by default or check for window.cvox
+ }
+});
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/ext/elastic_tabstops_lite.js b/src/fauxton/assets/js/libs/ace/ext/elastic_tabstops_lite.js
new file mode 100644
index 000000000..9901c5dfd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/elastic_tabstops_lite.js
@@ -0,0 +1,319 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var ElasticTabstopsLite = function(editor) {
+ this.$editor = editor;
+ var self = this;
+ var changedRows = [];
+ var recordChanges = false;
+ this.onAfterExec = function() {
+ recordChanges = false;
+ self.processRows(changedRows);
+ changedRows = [];
+ };
+ this.onExec = function() {
+ recordChanges = true;
+ };
+ this.onChange = function(e) {
+ var range = e.data.range
+ if (recordChanges) {
+ if (changedRows.indexOf(range.start.row) == -1)
+ changedRows.push(range.start.row);
+ if (range.end.row != range.start.row)
+ changedRows.push(range.end.row);
+ }
+ };
+};
+
+(function() {
+ this.processRows = function(rows) {
+ this.$inChange = true;
+ var checkedRows = [];
+
+ for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
+ var row = rows[r];
+
+ if (checkedRows.indexOf(row) > -1)
+ continue;
+
+ var cellWidthObj = this.$findCellWidthsForBlock(row);
+ var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
+ var rowIndex = cellWidthObj.firstRow;
+
+ for (var w = 0, l = cellWidths.length; w < l; w++) {
+ var widths = cellWidths[w];
+ checkedRows.push(rowIndex);
+ this.$adjustRow(rowIndex, widths);
+ rowIndex++;
+ }
+ }
+ this.$inChange = false;
+ };
+
+ this.$findCellWidthsForBlock = function(row) {
+ var cellWidths = [], widths;
+
+ // starting row and backward
+ var rowIter = row;
+ while (rowIter >= 0) {
+ widths = this.$cellWidthsForRow(rowIter);
+ if (widths.length == 0)
+ break;
+
+ cellWidths.unshift(widths);
+ rowIter--;
+ }
+ var firstRow = rowIter + 1;
+
+ // forward (not including starting row)
+ rowIter = row;
+ var numRows = this.$editor.session.getLength();
+
+ while (rowIter < numRows - 1) {
+ rowIter++;
+
+ widths = this.$cellWidthsForRow(rowIter);
+ if (widths.length == 0)
+ break;
+
+ cellWidths.push(widths);
+ }
+
+ return { cellWidths: cellWidths, firstRow: firstRow };
+ };
+
+ this.$cellWidthsForRow = function(row) {
+ var selectionColumns = this.$selectionColumnsForRow(row);
+ // todo: support multicursor
+
+ var tabs = [-1].concat(this.$tabsForRow(row));
+ var widths = tabs.map(function(el) { return 0; } ).slice(1);
+ var line = this.$editor.session.getLine(row);
+
+ for (var i = 0, len = tabs.length - 1; i < len; i++) {
+ var leftEdge = tabs[i]+1;
+ var rightEdge = tabs[i+1];
+
+ var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge);
+ var cell = line.substring(leftEdge, rightEdge);
+ widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge);
+ }
+
+ return widths;
+ };
+
+ this.$selectionColumnsForRow = function(row) {
+ var selections = [], cursor = this.$editor.getCursorPosition();
+ if (this.$editor.session.getSelection().isEmpty()) {
+ // todo: support multicursor
+ if (row == cursor.row)
+ selections.push(cursor.column);
+ }
+
+ return selections;
+ };
+
+ this.$setBlockCellWidthsToMax = function(cellWidths) {
+ var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
+ var columnInfo = this.$izip_longest(cellWidths);
+
+ for (var c = 0, l = columnInfo.length; c < l; c++) {
+ var column = columnInfo[c];
+ if (!column.push) {
+ console.error(column);
+ continue;
+ }
+ // add an extra None to the end so that the end of the column automatically
+ // finishes a block
+ column.push(NaN);
+
+ for (var r = 0, s = column.length; r < s; r++) {
+ var width = column[r];
+ if (startingNewBlock) {
+ blockStartRow = r;
+ maxWidth = 0;
+ startingNewBlock = false;
+ }
+ if (isNaN(width)) {
+ // block ended
+ blockEndRow = r;
+
+ for (var j = blockStartRow; j < blockEndRow; j++) {
+ cellWidths[j][c] = maxWidth;
+ }
+ startingNewBlock = true;
+ }
+
+ maxWidth = Math.max(maxWidth, width);
+ }
+ }
+
+ return cellWidths;
+ };
+
+ this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) {
+ var rightmost = 0;
+
+ if (selectionColumns.length) {
+ var lengths = [];
+ for (var s = 0, length = selectionColumns.length; s < length; s++) {
+ if (selectionColumns[s] <= cellRightEdge)
+ lengths.push(s);
+ else
+ lengths.push(0);
+ }
+ rightmost = Math.max.apply(Math, lengths);
+ }
+
+ return rightmost;
+ };
+
+ this.$tabsForRow = function(row) {
+ var rowTabs = [], line = this.$editor.session.getLine(row),
+ re = /\t/g, match;
+
+ while ((match = re.exec(line)) != null) {
+ rowTabs.push(match.index);
+ }
+
+ return rowTabs;
+ };
+
+ this.$adjustRow = function(row, widths) {
+ var rowTabs = this.$tabsForRow(row);
+
+ if (rowTabs.length == 0)
+ return;
+
+ var bias = 0, location = -1;
+
+ // this always only contains two elements, so we're safe in the loop below
+ var expandedSet = this.$izip(widths, rowTabs);
+
+ for (var i = 0, l = expandedSet.length; i < l; i++) {
+ var w = expandedSet[i][0], it = expandedSet[i][1];
+ location += 1 + w;
+ it += bias;
+ var difference = location - it;
+
+ if (difference == 0)
+ continue;
+
+ var partialLine = this.$editor.session.getLine(row).substr(0, it );
+ var strippedPartialLine = partialLine.replace(/\s*$/g, "");
+ var ispaces = partialLine.length - strippedPartialLine.length;
+
+ if (difference > 0) {
+ // put the spaces after the tab and then delete the tab, so any insertion
+ // points behave as expected
+ this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t");
+ this.$editor.session.getDocument().removeInLine(row, it, it + 1);
+
+ bias += difference;
+ }
+
+ if (difference < 0 && ispaces >= -difference) {
+ this.$editor.session.getDocument().removeInLine(row, it + difference, it);
+ bias += difference;
+ }
+ }
+ };
+
+ // the is a (naive) Python port--but works for these purposes
+ this.$izip_longest = function(iterables) {
+ if (!iterables[0])
+ return [];
+ var longest = iterables[0].length;
+ var iterablesLength = iterables.length;
+
+ for (var i = 1; i < iterablesLength; i++) {
+ var iLength = iterables[i].length;
+ if (iLength > longest)
+ longest = iLength;
+ }
+
+ var expandedSet = [];
+
+ for (var l = 0; l < longest; l++) {
+ var set = [];
+ for (var i = 0; i < iterablesLength; i++) {
+ if (iterables[i][l] === "")
+ set.push(NaN);
+ else
+ set.push(iterables[i][l]);
+ }
+
+ expandedSet.push(set);
+ }
+
+
+ return expandedSet;
+ };
+
+ // an even more (naive) Python port
+ this.$izip = function(widths, tabs) {
+ // grab the shorter size
+ var size = widths.length >= tabs.length ? tabs.length : widths.length;
+
+ var expandedSet = [];
+ for (var i = 0; i < size; i++) {
+ var set = [ widths[i], tabs[i] ];
+ expandedSet.push(set);
+ }
+ return expandedSet;
+ };
+
+}).call(ElasticTabstopsLite.prototype);
+
+exports.ElasticTabstopsLite = ElasticTabstopsLite;
+
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ useElasticTabstops: {
+ set: function(val) {
+ if (val) {
+ if (!this.elasticTabstops)
+ this.elasticTabstops = new ElasticTabstopsLite(this);
+ this.commands.on("afterExec", this.elasticTabstops.onAfterExec);
+ this.commands.on("exec", this.elasticTabstops.onExec);
+ this.on("change", this.elasticTabstops.onChange);
+ } else if (this.elasticTabstops) {
+ this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec);
+ this.commands.removeListener("exec", this.elasticTabstops.onExec);
+ this.removeListener("change", this.elasticTabstops.onChange);
+ }
+ }
+ }
+});
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/emmet.js b/src/fauxton/assets/js/libs/ace/ext/emmet.js
new file mode 100644
index 000000000..6647da40a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/emmet.js
@@ -0,0 +1,415 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
+var Editor = require("ace/editor").Editor;
+var snippetManager = require("ace/snippets").snippetManager;
+var Range = require("ace/range").Range;
+var emmet;
+
+Editor.prototype.indexToPosition = function(index) {
+ return this.session.doc.indexToPosition(index);
+};
+
+Editor.prototype.positionToIndex = function(pos) {
+ return this.session.doc.positionToIndex(pos);
+};
+
+/**
+ * Implementation of {@link IEmmetEditor} interface for Ace
+ */
+function AceEmmetEditor() {}
+
+AceEmmetEditor.prototype = {
+ setupContext: function(editor) {
+ this.ace = editor;
+ this.indentation = editor.session.getTabString();
+ if (!emmet)
+ emmet = window.emmet;
+ emmet.require("resources").setVariable("indentation", this.indentation);
+ this.$syntax = null;
+ this.$syntax = this.getSyntax();
+ },
+ /**
+ * Returns character indexes of selected text: object with <code>start</code>
+ * and <code>end</code> properties. If there's no selection, should return
+ * object with <code>start</code> and <code>end</code> properties referring
+ * to current caret position
+ * @return {Object}
+ * @example
+ * var selection = editor.getSelectionRange();
+ * alert(selection.start + ', ' + selection.end);
+ */
+ getSelectionRange: function() {
+ // TODO should start be caret position instead?
+ var range = this.ace.getSelectionRange();
+ return {
+ start: this.ace.positionToIndex(range.start),
+ end: this.ace.positionToIndex(range.end)
+ };
+ },
+
+ /**
+ * Creates selection from <code>start</code> to <code>end</code> character
+ * indexes. If <code>end</code> is ommited, this method should place caret
+ * and <code>start</code> index
+ * @param {Number} start
+ * @param {Number} [end]
+ * @example
+ * editor.createSelection(10, 40);
+ *
+ * //move caret to 15th character
+ * editor.createSelection(15);
+ */
+ createSelection: function(start, end) {
+ this.ace.selection.setRange({
+ start: this.ace.indexToPosition(start),
+ end: this.ace.indexToPosition(end)
+ });
+ },
+
+ /**
+ * Returns current line's start and end indexes as object with <code>start</code>
+ * and <code>end</code> properties
+ * @return {Object}
+ * @example
+ * var range = editor.getCurrentLineRange();
+ * alert(range.start + ', ' + range.end);
+ */
+ getCurrentLineRange: function() {
+ var row = this.ace.getCursorPosition().row;
+ var lineLength = this.ace.session.getLine(row).length;
+ var index = this.ace.positionToIndex({row: row, column: 0});
+ return {
+ start: index,
+ end: index + lineLength
+ };
+ },
+
+ /**
+ * Returns current caret position
+ * @return {Number|null}
+ */
+ getCaretPos: function(){
+ var pos = this.ace.getCursorPosition();
+ return this.ace.positionToIndex(pos);
+ },
+
+ /**
+ * Set new caret position
+ * @param {Number} index Caret position
+ */
+ setCaretPos: function(index){
+ var pos = this.ace.indexToPosition(index);
+ this.ace.clearSelection();
+ this.ace.selection.moveCursorToPosition(pos);
+ },
+
+ /**
+ * Returns content of current line
+ * @return {String}
+ */
+ getCurrentLine: function() {
+ var row = this.ace.getCursorPosition().row;
+ return this.ace.session.getLine(row);
+ },
+
+ /**
+ * Replace editor's content or it's part (from <code>start</code> to
+ * <code>end</code> index). If <code>value</code> contains
+ * <code>caret_placeholder</code>, the editor will put caret into
+ * this position. If you skip <code>start</code> and <code>end</code>
+ * arguments, the whole target's content will be replaced with
+ * <code>value</code>.
+ *
+ * If you pass <code>start</code> argument only,
+ * the <code>value</code> will be placed at <code>start</code> string
+ * index of current content.
+ *
+ * If you pass <code>start</code> and <code>end</code> arguments,
+ * the corresponding substring of current target's content will be
+ * replaced with <code>value</code>.
+ * @param {String} value Content you want to paste
+ * @param {Number} [start] Start index of editor's content
+ * @param {Number} [end] End index of editor's content
+ * @param {Boolean} [noIndent] Do not auto indent <code>value</code>
+ */
+ replaceContent: function(value, start, end, noIndent) {
+ if (end == null)
+ end = start == null ? this.getContent().length : start;
+ if (start == null)
+ start = 0;
+
+ var editor = this.ace;
+ var range = Range.fromPoints(editor.indexToPosition(start), editor.indexToPosition(end));
+ editor.session.remove(range);
+
+ range.end = range.start;
+ //editor.selection.setRange(range);
+
+ value = this.$updateTabstops(value);
+ snippetManager.insertSnippet(editor, value)
+ },
+
+ /**
+ * Returns editor's content
+ * @return {String}
+ */
+ getContent: function(){
+ return this.ace.getValue();
+ },
+
+ /**
+ * Returns current editor's syntax mode
+ * @return {String}
+ */
+ getSyntax: function() {
+ if (this.$syntax)
+ return this.$syntax;
+ var syntax = this.ace.session.$modeId.split("/").pop();
+ if (syntax == "html" || syntax == "php") {
+ var cursor = this.ace.getCursorPosition();
+ var state = this.ace.session.getState(cursor.row);
+ if (typeof state != "string")
+ state = state[0];
+ if (state) {
+ state = state.split("-");
+ if (state.length > 1)
+ syntax = state[0];
+ else if (syntax == "php")
+ syntax = "html";
+ }
+ }
+ return syntax;
+ },
+
+ /**
+ * Returns current output profile name (@see emmet#setupProfile)
+ * @return {String}
+ */
+ getProfileName: function() {
+ switch(this.getSyntax()) {
+ case "css": return "css";
+ case "xml":
+ case "xsl":
+ return "xml";
+ case "html":
+ var profile = emmet.require("resources").getVariable("profile");
+ // no forced profile, guess from content html or xhtml?
+ if (!profile)
+ profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
+ return profile;
+ }
+ return "xhtml";
+ },
+
+ /**
+ * Ask user to enter something
+ * @param {String} title Dialog title
+ * @return {String} Entered data
+ * @since 0.65
+ */
+ prompt: function(title) {
+ return prompt(title);
+ },
+
+ /**
+ * Returns current selection
+ * @return {String}
+ * @since 0.65
+ */
+ getSelection: function() {
+ return this.ace.session.getTextRange();
+ },
+
+ /**
+ * Returns current editor's file path
+ * @return {String}
+ * @since 0.65
+ */
+ getFilePath: function() {
+ return "";
+ },
+
+ // update tabstops: make sure all caret placeholders are unique
+ // by default, abbreviation parser generates all unlinked (un-mirrored)
+ // tabstops as ${0}, so we have upgrade all caret tabstops with unique
+ // positions but make sure that all other tabstops are not linked accidentally
+ // based on https://github.com/sergeche/emmet-sublime/blob/master/editor.js#L119-L171
+ $updateTabstops: function(value) {
+ var base = 1000;
+ var zeroBase = 0;
+ var lastZero = null;
+ var range = emmet.require('range');
+ var ts = emmet.require('tabStops');
+ var settings = emmet.require('resources').getVocabulary("user");
+ var tabstopOptions = {
+ tabstop: function(data) {
+ var group = parseInt(data.group, 10);
+ var isZero = group === 0;
+ if (isZero)
+ group = ++zeroBase;
+ else
+ group += base;
+
+ var placeholder = data.placeholder;
+ if (placeholder) {
+ // recursively update nested tabstops
+ placeholder = ts.processText(placeholder, tabstopOptions);
+ }
+
+ var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
+
+ if (isZero) {
+ lastZero = range.create(data.start, result);
+ }
+
+ return result
+ },
+ escape: function(ch) {
+ if (ch == '$') return '\\$';
+ if (ch == '\\') return '\\\\';
+ return ch;
+ }
+ };
+
+ value = ts.processText(value, tabstopOptions);
+
+ if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
+ value += '${0}';
+ } else if (lastZero) {
+ value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero);
+ }
+
+ return value;
+ }
+};
+
+
+var keymap = {
+ expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"},
+ match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"},
+ match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"},
+ matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"},
+ next_edit_point: "alt+right",
+ prev_edit_point: "alt+left",
+ toggle_comment: {"mac": "command+/", "win": "ctrl+/"},
+ split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"},
+ remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"},
+ evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"},
+ increment_number_by_1: "ctrl+up",
+ decrement_number_by_1: "ctrl+down",
+ increment_number_by_01: "alt+up",
+ decrement_number_by_01: "alt+down",
+ increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"},
+ decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"},
+ select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."},
+ select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"},
+ reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"},
+
+ encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"},
+ // update_image_size: {"mac": "shift+ctrl+i", "win": "ctrl+u"},
+ // expand_as_you_type: "ctrl+alt+enter",
+ // wrap_as_you_type: {"mac": "shift+ctrl+g", "win": "shift+ctrl+g"},
+ expand_abbreviation_with_tab: "Tab",
+ wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"}
+};
+
+var editorProxy = new AceEmmetEditor();
+exports.commands = new HashHandler();
+exports.runEmmetCommand = function(editor) {
+ editorProxy.setupContext(editor);
+ if (editorProxy.getSyntax() == "php")
+ return false;
+ var actions = emmet.require("actions");
+
+ if (this.action == "expand_abbreviation_with_tab") {
+ if (!editor.selection.isEmpty())
+ return false;
+ }
+
+ if (this.action == "wrap_with_abbreviation") {
+ // without setTimeout prompt doesn't work on firefox
+ return setTimeout(function() {
+ actions.run("wrap_with_abbreviation", editorProxy);
+ }, 0);
+ }
+
+ try {
+ var result = actions.run(this.action, editorProxy);
+ } catch(e) {
+ editor._signal("changeStatus", typeof e == "string" ? e : e.message);
+ console.log(e);
+ }
+ return result;
+};
+
+for (var command in keymap) {
+ exports.commands.addCommand({
+ name: "emmet:" + command,
+ action: command,
+ bindKey: keymap[command],
+ exec: exports.runEmmetCommand,
+ multiSelectAction: "forEach"
+ });
+}
+
+var onChangeMode = function(e, target) {
+ var editor = target;
+ if (!editor)
+ return;
+ var modeId = editor.session.$modeId;
+ var enabled = modeId && /css|less|scss|sass|stylus|html|php/.test(modeId);
+ if (e.enableEmmet === false)
+ enabled = false;
+ if (enabled)
+ editor.keyBinding.addKeyboardHandler(exports.commands);
+ else
+ editor.keyBinding.removeKeyboardHandler(exports.commands);
+};
+
+
+exports.AceEmmetEditor = AceEmmetEditor;
+require("ace/config").defineOptions(Editor.prototype, "editor", {
+ enableEmmet: {
+ set: function(val) {
+ this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
+ onChangeMode({enableEmmet: !!val}, this);
+ },
+ value: true
+ }
+});
+
+
+exports.setCore = function(e) {emmet = e;};
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/ext/keybinding_menu.js b/src/fauxton/assets/js/libs/ace/ext/keybinding_menu.js
new file mode 100644
index 000000000..bf8189a50
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/keybinding_menu.js
@@ -0,0 +1,86 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Show Keyboard Shortcuts
+ * @fileOverview Show Keyboard Shortcuts <br />
+ * Generates a menu which displays the keyboard shortcuts.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+ "use strict";
+ var Editor = require("ace/editor").Editor;
+ /**
+ * Generates a menu which displays the keyboard shortcuts.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {ace.Editor} editor An instance of the ace editor.
+ */
+ function showKeyboardShortcuts (editor) {
+ // make sure the menu isn't open already.
+ if(!document.getElementById('kbshortcutmenu')) {
+ var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+ var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
+ var kb = getEditorKeybordShortcuts(editor);
+ var el = document.createElement('div');
+ var commands = kb.reduce(function(previous, current) {
+ return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'
+ + current.command + '</span> : '
+ + '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
+ }, '');
+
+ el.id = 'kbshortcutmenu';
+ el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
+ overlayPage(editor, el, '0', '0', '0', null);
+ }
+ };
+ module.exports.init = function(editor) {
+ Editor.prototype.showKeyboardShortcuts = function() {
+ showKeyboardShortcuts(this);
+ };
+ editor.commands.addCommands([{
+ name: "showKeyboardShortcuts",
+ bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+ exec: function(editor, line) {
+ editor.showKeyboardShortcuts();
+ }
+ }]);
+ };
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/language_tools.js b/src/fauxton/assets/js/libs/ace/ext/language_tools.js
new file mode 100644
index 000000000..e5cd8bb41
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/language_tools.js
@@ -0,0 +1,129 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var snippetManager = require("../snippets").snippetManager;
+var Autocomplete = require("../autocomplete").Autocomplete;
+var config = require("../config");
+
+var textCompleter = require("../autocomplete/text_completer");
+var keyWordCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ var state = editor.session.getState(pos.row);
+ var completions = session.$mode.getCompletions(state, session, pos, prefix);
+ callback(null, completions);
+ }
+};
+
+var snippetCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ var scope = snippetManager.$getScope(editor);
+ var snippetMap = snippetManager.snippetMap;
+ var completions = [];
+ [scope, "_"].forEach(function(scope) {
+ var snippets = snippetMap[scope] || [];
+ for (var i = snippets.length; i--;) {
+ var s = snippets[i];
+ var caption = s.name || s.tabTrigger;
+ if (!caption)
+ continue;
+ completions.push({
+ caption: caption,
+ snippet: s.content,
+ meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet"
+ });
+ }
+ }, this);
+ callback(null, completions);
+ }
+};
+
+var completers = [snippetCompleter, textCompleter, keyWordCompleter];
+exports.addCompleter = function(completer) {
+ completers.push(completer);
+};
+
+var expandSnippet = {
+ name: "expandSnippet",
+ exec: function(editor) {
+ var success = snippetManager.expandWithTab(editor);
+ if (!success)
+ editor.execCommand("indent");
+ },
+ bindKey: "tab"
+}
+
+var onChangeMode = function(e, editor) {
+ var mode = editor.session.$mode;
+ var id = mode.$id
+ if (!snippetManager.files) snippetManager.files = {};
+ if (id && !snippetManager.files[id]) {
+ var snippetFilePath = id.replace("mode", "snippets");
+ config.loadModule(snippetFilePath, function(m) {
+ if (m) {
+ snippetManager.files[id] = m;
+ m.snippets = snippetManager.parseSnippetFile(m.snippetText);
+ snippetManager.register(m.snippets, m.scope);
+ }
+ });
+ }
+};
+
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ enableBasicAutocompletion: {
+ set: function(val) {
+ if (val) {
+ this.completers = completers
+ this.commands.addCommand(Autocomplete.startCommand);
+ } else {
+ this.commands.removeCommand(Autocomplete.startCommand);
+ }
+ },
+ value: false
+ },
+ enableSnippets: {
+ set: function(val) {
+ if (val) {
+ this.commands.addCommand(expandSnippet);
+ this.on("changeMode", onChangeMode);
+ onChangeMode(null, this)
+ } else {
+ this.commands.removeCommand(expandSnippet);
+ this.off("changeMode", onChangeMode);
+ }
+ },
+ value: false
+ }
+});
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/add_editor_menu_options.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/add_editor_menu_options.js
new file mode 100644
index 000000000..fd56859b5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/add_editor_menu_options.js
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Add Editor Menu Options
+ * @fileOverview Add Editor Menu Options <br />
+ * The menu options property needs to be added to the editor
+ * so that the settings menu can know about options for
+ * selection elements and track which option is selected.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+'use strict';
+
+/**
+ * The menu options property needs to be added to the editor
+ * so that the settings menu can know about options for
+ * selection elements and track which option is selected.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {ace.Editor} editor An instance of the ace editor.
+ */
+module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
+ var modelist = require('../modelist');
+ var themelist = require('../themelist');
+ editor.menuOptions = {
+ "setNewLineMode" : [{
+ "textContent" : "unix",
+ "value" : "unix"
+ }, {
+ "textContent" : "windows",
+ "value" : "windows"
+ }, {
+ "textContent" : "auto",
+ "value" : "auto"
+ }],
+ "setTheme" : [],
+ "setMode" : [],
+ "setKeyboardHandler": [{
+ "textContent" : "ace",
+ "value" : ""
+ }, {
+ "textContent" : "vim",
+ "value" : "ace/keyboard/vim"
+ }, {
+ "textContent" : "emacs",
+ "value" : "ace/keyboard/emacs"
+ }]
+ };
+
+ editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
+ return {
+ 'textContent' : theme.desc,
+ 'value' : theme.theme
+ };
+ });
+
+ editor.menuOptions.setMode = modelist.modes.map(function(mode) {
+ return {
+ 'textContent' : mode.name,
+ 'value' : mode.mode
+ };
+ });
+};
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/element_generator.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/element_generator.js
new file mode 100644
index 000000000..ec6ba93bd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/element_generator.js
@@ -0,0 +1,148 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Element Generator
+ * @fileOverview Element Generator <br />
+ * Contains methods for generating elements.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+'use strict';
+/**
+ * Creates a DOM option element
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {object} obj An object containing properties to add to the dom
+ * element. If one of those properties is named `selected` then it will be
+ * added as an attribute on the element instead.
+ */
+module.exports.createOption = function createOption (obj) {
+ var attribute;
+ var el = document.createElement('option');
+ for(attribute in obj) {
+ if(obj.hasOwnProperty(attribute)) {
+ if(attribute === 'selected') {
+ el.setAttribute(attribute, obj[attribute]);
+ } else {
+ el[attribute] = obj[attribute];
+ }
+ }
+ }
+ return el;
+};
+/**
+ * Creates a DOM checkbox element.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {string} id The id of the element.
+ * @param {boolean} checked Whether or not the element is checked.
+ * @param {string} clss The class of the element.
+ * @returns {DOMElement} Returns a checkbox element reference.
+ */
+module.exports.createCheckbox = function createCheckbox (id, checked, clss) {
+ var el = document.createElement('input');
+ el.setAttribute('type', 'checkbox');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('value', checked);
+ el.setAttribute('class', clss);
+ if(checked) {
+ el.setAttribute('checked', 'checked');
+ }
+ return el;
+};
+/**
+ * Creates a DOM text input element.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {string} id The id of the element.
+ * @param {string} value The default value of the input element.
+ * @param {string} clss The class of the element.
+ * @returns {DOMElement} Returns an input element reference.
+ */
+module.exports.createInput = function createInput (id, value, clss) {
+ var el = document.createElement('input');
+ el.setAttribute('type', 'text');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('value', value);
+ el.setAttribute('class', clss);
+ return el;
+};
+/**
+ * Creates a DOM label element.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {string} text The label text.
+ * @param {string} labelFor The id of the element being labeled.
+ * @returns {DOMElement} Returns a label element reference.
+ */
+module.exports.createLabel = function createLabel (text, labelFor) {
+ var el = document.createElement('label');
+ el.setAttribute('for', labelFor);
+ el.textContent = text;
+ return el;
+};
+/**
+ * Creates a DOM selection element.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {string} id The id of the element.
+ * @param {string} values An array of objects suitable for `createOption`
+ * @param {string} clss The class of the element.
+ * @returns {DOMElement} Returns a selection element reference.
+ * @see ace/ext/element_generator.createOption
+ */
+module.exports.createSelection = function createSelection (id, values, clss) {
+ var el = document.createElement('select');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('class', clss);
+ values.forEach(function(item) {
+ el.appendChild(module.exports.createOption(item));
+ });
+ return el;
+};
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/generate_settings_menu.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/generate_settings_menu.js
new file mode 100644
index 000000000..16d3a76c9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/generate_settings_menu.js
@@ -0,0 +1,258 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define*/
+
+/**
+ * Generates the settings menu
+ * @fileOverview Generates the settings menu.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+'use strict';
+var egen = require('./element_generator');
+var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
+var getSetFunctions = require('./get_set_functions').getSetFunctions;
+
+/**
+ * Generates an interactive menu with settings useful to end users.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {ace.Editor} editor An instance of the ace editor.
+ */
+module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
+ /**
+ * container for dom elements that will go in the menu.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ var elements = [];
+ /**
+ * Sorts the menu entries (elements var) so they'll appear in alphabetical order
+ * the sort is performed based on the value of the contains property
+ * of each element. Since this is an `array.sort` the array is sorted
+ * in place.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ function cleanupElementsList() {
+ elements.sort(function(a, b) {
+ var x = a.getAttribute('contains');
+ var y = b.getAttribute('contains');
+ return x.localeCompare(y);
+ });
+ }
+ /**
+ * Wraps all dom elements contained in the elements var with a single
+ * div.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ function wrapElements() {
+ var topmenu = document.createElement('div');
+ topmenu.setAttribute('id', 'ace_settingsmenu');
+ elements.forEach(function(element) {
+ topmenu.appendChild(element);
+ });
+ return topmenu;
+ }
+ /**
+ * Creates a new menu entry.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {object} obj This is a reference to the object containing the
+ * set function. It is used to set up event listeners for when the
+ * menu options change.
+ * @param {string} clss Maps to the class of the dom element. This is
+ * the name of the object containing the set function e.g. `editor`,
+ * `session`, `renderer`.
+ * @param {string} item This is the set function name. It maps to the
+ * id of the dom element (check, select, input) and to the "contains"
+ * attribute of the div holding both the element and its label.
+ * @param {mixed} val This is the value of the setting. It is mapped to
+ * the dom element's value, checked, or selected option accordingly.
+ */
+ function createNewEntry(obj, clss, item, val) {
+ var el;
+ var div = document.createElement('div');
+ div.setAttribute('contains', item);
+ div.setAttribute('class', 'ace_optionsMenuEntry');
+ div.setAttribute('style', 'clear: both;');
+
+ div.appendChild(egen.createLabel(
+ item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
+ item
+ ));
+
+ if (Array.isArray(val)) {
+ el = egen.createSelection(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ editor.menuOptions[e.target.id].forEach(function(x) {
+ if(x.textContent !== e.target.textContent) {
+ delete x.selected;
+ }
+ });
+ obj[e.target.id](e.target.value);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else if(typeof val === 'boolean') {
+ el = egen.createCheckbox(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ // renderer['setHighlightGutterLine'](true);
+ obj[e.target.id](!!e.target.checked);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else {
+ // this aids in giving the ability to specify settings through
+ // post and get requests.
+ // /ace_editor.html?setMode=ace/mode/html&setOverwrite=true
+ el = egen.createInput(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ if(e.target.value === 'true') {
+ obj[e.target.id](true);
+ } else if(e.target.value === 'false') {
+ obj[e.target.id](false);
+ } else {
+ obj[e.target.id](e.target.value);
+ }
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ }
+ el.style.cssText = 'float:right;';
+ div.appendChild(el);
+ return div;
+ }
+ /**
+ * Generates selection fields for the menu and populates their options
+ * using information from `editor.menuOptions`
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {string} item The set function name.
+ * @param {object} esr A reference to the object having the set function.
+ * @param {string} clss The name of the object containing the set function.
+ * @param {string} fn The matching get function's function name.
+ * @returns {DOMElement} Returns a dom element containing a selection
+ * element populated with options. The option whose value matches that
+ * returned from `esr[fn]()` will be selected.
+ */
+ function makeDropdown(item, esr, clss, fn) {
+ var val = editor.menuOptions[item];
+ var currentVal = esr[fn]();
+ if (typeof currentVal == 'object')
+ currentVal = currentVal.$id;
+ val.forEach(function(valuex) {
+ if (valuex.value === currentVal)
+ valuex.selected = 'selected';
+ });
+ return createNewEntry(esr, clss, item, val);
+ }
+ /**
+ * Processes the set functions returned from `getSetFunctions`. First it
+ * checks for menu options defined in `editor.menuOptions`. If no
+ * options are specified then it checks whether there is a get function
+ * (replace set with get) for the setting. When either of those
+ * conditions are met it will attempt to create a new entry for the
+ * settings menu and push it into the elements array defined above.
+ * It can only do so for get functions which return
+ * strings, numbers, and booleans. A special case is written in for
+ * `getMode` where it looks at the returned objects `$id` property and
+ * forwards that through instead. Other special cases could be written
+ * in but that would get a bit ridiculous.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {object} setObj An item from the array returned by
+ * `getSetFunctions`.
+ */
+ function handleSet(setObj) {
+ var item = setObj.functionName;
+ var esr = setObj.parentObj;
+ var clss = setObj.parentName;
+ var val;
+ var fn = item.replace(/^set/, 'get');
+ if(editor.menuOptions[item] !== undefined) {
+ // has options for select element
+ elements.push(makeDropdown(item, esr, clss, fn));
+ } else if(typeof esr[fn] === 'function') {
+ // has get function
+ try {
+ val = esr[fn]();
+ if(typeof val === 'object') {
+ // setMode takes a string, getMode returns an object
+ // the $id property of that object is the string
+ // which may be given to setMode...
+ val = val.$id;
+ }
+ // the rest of the get functions return strings,
+ // booleans, or numbers.
+ elements.push(
+ createNewEntry(esr, clss, item, val)
+ );
+ } catch (e) {
+ // if there are errors it is because the element
+ // does not belong in the settings menu
+ }
+ }
+ }
+ addEditorMenuOptions(editor);
+ // gather the set functions
+ getSetFunctions(editor).forEach(function(setObj) {
+ // populate the elements array with good stuff.
+ handleSet(setObj);
+ });
+ // sort the menu entries in the elements list so people can find
+ // the settings in alphabetical order.
+ cleanupElementsList();
+ // dump the entries from the elements list and wrap them up in a div
+ return wrapElements();
+};
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js
new file mode 100644
index 000000000..e412bfbab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js
@@ -0,0 +1,100 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Get Editor Keyboard Shortcuts
+ * @fileOverview Get Editor Keyboard Shortcuts <br />
+ * Gets a map of keyboard shortcuts to command names for the current platform.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+"use strict";
+var keys = require("../../lib/keys");
+
+/**
+ * Gets a map of keyboard shortcuts to command names for the current platform.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {ace.Editor} editor An editor instance.
+ * @returns {Array} Returns an array of objects representing the keyboard
+ * shortcuts for the given editor.
+ * @example
+ * var getKbShortcuts = require('./get_keyboard_shortcuts');
+ * console.log(getKbShortcuts(editor));
+ * // [
+ * // {'command' : aCommand, 'key' : 'Control-d'},
+ * // {'command' : aCommand, 'key' : 'Control-d'}
+ * // ]
+ */
+module.exports.getEditorKeybordShortcuts = function(editor) {
+ var KEY_MODS = keys.KEY_MODS;
+ var keybindings = [];
+ var commandMap = {};
+ editor.keyBinding.$handlers.forEach(function(handler) {
+ var ckb = handler.commandKeyBinding;
+ for (var i in ckb) {
+ var modifier = parseInt(i);
+ if (modifier == -1) {
+ modifier = "";
+ } else if(isNaN(modifier)) {
+ modifier = i;
+ } else {
+ modifier = "" +
+ (modifier & KEY_MODS.command ? "Cmd-" : "") +
+ (modifier & KEY_MODS.ctrl ? "Ctrl-" : "") +
+ (modifier & KEY_MODS.alt ? "Alt-" : "") +
+ (modifier & KEY_MODS.shift ? "Shift-" : "");
+ }
+ for (var key in ckb[i]) {
+ var command = ckb[i][key]
+ if (typeof command != "string")
+ command = command.name
+ if (commandMap[command]) {
+ commandMap[command].key += "|" + modifier + key;
+ } else {
+ commandMap[command] = {key: modifier+key, command: command};
+ keybindings.push(commandMap[command]);
+ }
+ }
+ }
+ });
+ return keybindings;
+};
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_set_functions.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_set_functions.js
new file mode 100644
index 000000000..4cd655084
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/get_set_functions.js
@@ -0,0 +1,141 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true */
+/*global define*/
+
+/**
+ * Get Set Functions
+ * @fileOverview Get Set Functions <br />
+ * Gets various functions for setting settings.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+'use strict';
+/**
+ * Generates a list of set functions for the settings menu.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {object} editor The editor instance
+ * @return {array} Returns an array of objects. Each object contains the
+ * following properties: functionName, parentObj, and parentName. The
+ * function name will be the name of a method beginning with the string
+ * `set` which was found. The parent object will be a reference to the
+ * object having the method matching the function name. The parent name
+ * will be a string representing the identifier of the parent object e.g.
+ * `editor`, `session`, or `renderer`.
+ */
+module.exports.getSetFunctions = function getSetFunctions (editor) {
+ /**
+ * Output array. Will hold the objects described above.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ var out = [];
+ /**
+ * This object provides a map between the objects which will be
+ * traversed and the parent name which will appear in the output.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ var my = {
+ 'editor' : editor,
+ 'session' : editor.session,
+ 'renderer' : editor.renderer
+ };
+ /**
+ * This array will hold the set function names which have already been
+ * found so that they are not added to the output multiple times.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ var opts = [];
+ /**
+ * This is a list of set functions which will not appear in the settings
+ * menu. I don't know what to do with setKeyboardHandler. When I tried
+ * to use it, it didn't appear to be working. Someone who knows better
+ * could remove it from this list and add it's options to
+ * add_editor_menu_options.js
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ var skip = [
+ 'setOption',
+ 'setUndoManager',
+ 'setDocument',
+ 'setValue',
+ 'setBreakpoints',
+ 'setScrollTop',
+ 'setScrollLeft',
+ 'setSelectionStyle',
+ 'setWrapLimitRange'
+ ];
+
+
+ /**
+ * This will search the objects mapped to the `my` variable above. When
+ * it finds a set function in the object that is not listed in the
+ * `skip` list or the `opts` list it will push a new object to the
+ * output array.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+ ['renderer', 'session', 'editor'].forEach(function(esra) {
+ var esr = my[esra];
+ var clss = esra;
+ for(var fn in esr) {
+ if(skip.indexOf(fn) === -1) {
+ if(/^set/.test(fn) && opts.indexOf(fn) === -1) {
+ // found set function
+ opts.push(fn);
+ out.push({
+ 'functionName' : fn,
+ 'parentObj' : esr,
+ 'parentName' : clss
+ });
+ }
+ }
+ }
+ });
+ return out;
+};
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/overlay_page.js b/src/fauxton/assets/js/libs/ace/ext/menu_tools/overlay_page.js
new file mode 100644
index 000000000..bf985e29c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/overlay_page.js
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Overlay Page
+ * @fileOverview Overlay Page <br />
+ * Generates an overlay for displaying menus. The overlay is an absolutely
+ * positioned div.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+'use strict';
+var dom = require("../../lib/dom");
+var cssText = require("../../requirejs/text!./settings_menu.css");
+dom.importCssString(cssText);
+
+/**
+ * Generates an overlay for displaying menus. The overlay is an absolutely
+ * positioned div.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {DOMElement} contentElement Any element which may be presented inside
+ * a div.
+ * @param {string|number} top absolute position value.
+ * @param {string|number} right absolute position value.
+ * @param {string|number} bottom absolute position value.
+ * @param {string|number} left absolute position value.
+ */
+module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
+ top = top ? 'top: ' + top + ';' : '';
+ bottom = bottom ? 'bottom: ' + bottom + ';' : '';
+ right = right ? 'right: ' + right + ';' : '';
+ left = left ? 'left: ' + left + ';' : '';
+
+ var closer = document.createElement('div');
+ var contentContainer = document.createElement('div');
+
+ function documentEscListener(e) {
+ if (e.keyCode === 27) {
+ closer.click();
+ }
+ }
+
+ closer.style.cssText = 'margin: 0; padding: 0; ' +
+ 'position: fixed; top:0; bottom:0; left:0; right:0;' +
+ 'z-index: 9990; ' +
+ 'background-color: rgba(0, 0, 0, 0.3);';
+ closer.addEventListener('click', function() {
+ document.removeEventListener('keydown', documentEscListener);
+ closer.parentNode.removeChild(closer);
+ editor.focus();
+ closer = null;
+ });
+ // click closer if esc key is pressed
+ document.addEventListener('keydown', documentEscListener);
+
+ contentContainer.style.cssText = top + right + bottom + left;
+ contentContainer.addEventListener('click', function(e) {
+ e.stopPropagation();
+ });
+
+ var wrapper = dom.createElement("div");
+ wrapper.style.position = "relative";
+
+ var closeButton = dom.createElement("div");
+ closeButton.className = "ace_closeButton";
+ closeButton.addEventListener('click', function() {
+ closer.click();
+ });
+
+ wrapper.appendChild(closeButton);
+ contentContainer.appendChild(wrapper);
+
+ contentContainer.appendChild(contentElement);
+ closer.appendChild(contentContainer);
+ document.body.appendChild(closer);
+ editor.blur();
+};
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/menu_tools/settings_menu.css b/src/fauxton/assets/js/libs/ace/ext/menu_tools/settings_menu.css
new file mode 100644
index 000000000..f8b761ce2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/menu_tools/settings_menu.css
@@ -0,0 +1,48 @@
+#ace_settingsmenu, #kbshortcutmenu {
+ background-color: #F7F7F7;
+ color: black;
+ box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);
+ padding: 1em 0.5em 2em 1em;
+ overflow: auto;
+ position: absolute;
+ margin: 0;
+ bottom: 0;
+ right: 0;
+ top: 0;
+ z-index: 9991;
+ cursor: default;
+}
+
+.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {
+ box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);
+ background-color: rgba(255, 255, 255, 0.6);
+ color: black;
+}
+
+.ace_optionsMenuEntry:hover {
+ background-color: rgba(100, 100, 100, 0.1);
+ -webkit-transition: all 0.5s;
+ transition: all 0.3s
+}
+
+.ace_closeButton {
+ background: rgba(245, 146, 146, 0.5);
+ border: 1px solid #F48A8A;
+ border-radius: 50%;
+ padding: 7px;
+ position: absolute;
+ right: -8px;
+ top: -8px;
+ z-index: 1000;
+}
+.ace_closeButton{
+ background: rgba(245, 146, 146, 0.9);
+}
+.ace_optionsMenuKey {
+ color: darkslateblue;
+ font-weight: bold;
+}
+.ace_optionsMenuCommand {
+ color: darkcyan;
+ font-weight: normal;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/modelist.js b/src/fauxton/assets/js/libs/ace/ext/modelist.js
new file mode 100644
index 000000000..88b0218db
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/modelist.js
@@ -0,0 +1,174 @@
+define(function(require, exports, module) {
+"use strict";
+
+var modes = [];
+/**
+ * Suggests a mode based on the file extension present in the given path
+ * @param {string} path The path to the file
+ * @returns {object} Returns an object containing information about the
+ * suggested mode.
+ */
+function getModeForPath(path) {
+ var mode = modesByName.text;
+ var fileName = path.split(/[\/\\]/).pop();
+ for (var i = 0; i < modes.length; i++) {
+ if (modes[i].supportsFile(fileName)) {
+ mode = modes[i];
+ break;
+ }
+ }
+ return mode;
+}
+
+var Mode = function(name, caption, extensions) {
+ this.name = name;
+ this.caption = caption;
+ this.mode = "ace/mode/" + name;
+ this.extensions = extensions;
+ if (/\^/.test(extensions)) {
+ var re = extensions.replace(/\|(\^)?/g, function(a, b){
+ return "$|" + (b ? "^" : "^.*\\.");
+ }) + "$";
+ } else {
+ var re = "^.*\\.(" + extensions + ")$";
+ }
+
+ this.extRe = new RegExp(re, "gi");
+};
+
+Mode.prototype.supportsFile = function(filename) {
+ return filename.match(this.extRe);
+};
+
+// todo firstlinematch
+var supportedModes = {
+ ABAP: ["abap"],
+ ActionScript:["as"],
+ ADA: ["ada|adb"],
+ AsciiDoc: ["asciidoc"],
+ Assembly_x86:["asm"],
+ AutoHotKey: ["ahk"],
+ BatchFile: ["bat|cmd"],
+ C9Search: ["c9search_results"],
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],
+ Clojure: ["clj"],
+ Cobol: ["CBL|COB"],
+ coffee: ["coffee|cf|cson|^Cakefile"],
+ ColdFusion: ["cfm"],
+ CSharp: ["cs"],
+ CSS: ["css"],
+ Curly: ["curly"],
+ D: ["d|di"],
+ Dart: ["dart"],
+ Diff: ["diff|patch"],
+ Dot: ["dot"],
+ Erlang: ["erl|hrl"],
+ EJS: ["ejs"],
+ Forth: ["frt|fs|ldr"],
+ FTL: ["ftl"],
+ Glsl: ["glsl|frag|vert"],
+ golang: ["go"],
+ Groovy: ["groovy"],
+ HAML: ["haml"],
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
+ Haskell: ["hs"],
+ haXe: ["hx"],
+ HTML: ["html|htm|xhtml"],
+ HTML_Ruby: ["erb|rhtml|html.erb"],
+ INI: ["ini|conf|cfg|prefs"],
+ Jack: ["jack"],
+ Jade: ["jade"],
+ Java: ["java"],
+ JavaScript: ["js|jsm"],
+ JSON: ["json"],
+ JSONiq: ["jq"],
+ JSP: ["jsp"],
+ JSX: ["jsx"],
+ Julia: ["jl"],
+ LaTeX: ["tex|latex|ltx|bib"],
+ LESS: ["less"],
+ Liquid: ["liquid"],
+ Lisp: ["lisp"],
+ LiveScript: ["ls"],
+ LogiQL: ["logic|lql"],
+ LSL: ["lsl"],
+ Lua: ["lua"],
+ LuaPage: ["lp"],
+ Lucene: ["lucene"],
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
+ MATLAB: ["matlab"],
+ Markdown: ["md|markdown"],
+ MySQL: ["mysql"],
+ MUSHCode: ["mc|mush"],
+ Nix: ["nix"],
+ ObjectiveC: ["m|mm"],
+ OCaml: ["ml|mli"],
+ Pascal: ["pas|p"],
+ Perl: ["pl|pm"],
+ pgSQL: ["pgsql"],
+ PHP: ["php|phtml"],
+ Powershell: ["ps1"],
+ Prolog: ["plg|prolog"],
+ Properties: ["properties"],
+ Protobuf: ["proto"],
+ Python: ["py"],
+ R: ["r"],
+ RDoc: ["Rd"],
+ RHTML: ["Rhtml"],
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
+ Rust: ["rs"],
+ SASS: ["sass"],
+ SCAD: ["scad"],
+ Scala: ["scala"],
+ Scheme: ["scm|rkt"],
+ SCSS: ["scss"],
+ SH: ["sh|bash|^.bashrc"],
+ SJS: ["sjs"],
+ Space: ["space"],
+ snippets: ["snippets"],
+ Soy_Template:["soy"],
+ SQL: ["sql"],
+ Stylus: ["styl|stylus"],
+ SVG: ["svg"],
+ Tcl: ["tcl"],
+ Tex: ["tex"],
+ Text: ["txt"],
+ Textile: ["textile"],
+ Toml: ["toml"],
+ Twig: ["twig"],
+ Typescript: ["ts|typescript|str"],
+ VBScript: ["vbs"],
+ Velocity: ["vm"],
+ Verilog: ["v|vh|sv|svh"],
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"],
+ XQuery: ["xq"],
+ YAML: ["yaml|yml"]
+};
+
+var nameOverrides = {
+ ObjectiveC: "Objective-C",
+ CSharp: "C#",
+ golang: "Go",
+ C_Cpp: "C/C++",
+ coffee: "CoffeeScript",
+ HTML_Ruby: "HTML (Ruby)",
+ FTL: "FreeMarker"
+};
+var modesByName = {};
+for (var name in supportedModes) {
+ var data = supportedModes[name];
+ var displayName = nameOverrides[name] || name;
+ var filename = name.toLowerCase();
+ var mode = new Mode(filename, displayName, data[0]);
+ modesByName[filename] = mode;
+ modes.push(mode);
+}
+
+module.exports = {
+ getModeForPath: getModeForPath,
+ modes: modes,
+ modesByName: modesByName
+};
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/ext/old_ie.js b/src/fauxton/assets/js/libs/ace/ext/old_ie.js
new file mode 100644
index 000000000..ca67888fe
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/old_ie.js
@@ -0,0 +1,108 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var MAX_TOKEN_COUNT = 1000;
+var useragent = require("../lib/useragent");
+var TokenizerModule = require("../tokenizer");
+
+function patch(obj, name, regexp, replacement) {
+ eval("obj['" + name + "']=" + obj[name].toString().replace(
+ regexp, replacement
+ ));
+}
+
+if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat")
+ useragent.isOldIE = true;
+
+if (typeof document != "undefined" && !document.documentElement.querySelector) {
+ useragent.isOldIE = true;
+ var qs = function(el, selector) {
+ if (selector.charAt(0) == ".") {
+ var classNeme = selector.slice(1);
+ } else {
+ var m = selector.match(/(\w+)=(\w+)/);
+ var attr = m && m[1];
+ var attrVal = m && m[2];
+ }
+ for (var i = 0; i < el.all.length; i++) {
+ var ch = el.all[i];
+ if (classNeme) {
+ if (ch.className.indexOf(classNeme) != -1)
+ return ch;
+ } else if (attr) {
+ if (ch.getAttribute(attr) == attrVal)
+ return ch;
+ }
+ }
+ };
+ var sb = require("./searchbox").SearchBox.prototype;
+ patch(
+ sb, "$initElements",
+ /([^\s=]*).querySelector\((".*?")\)/g,
+ "qs($1, $2)"
+ );
+}
+
+var compliantExecNpcg = /()??/.exec("")[1] === undefined;
+if (compliantExecNpcg)
+ return;
+var proto = TokenizerModule.Tokenizer.prototype;
+TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer;
+proto.getLineTokens_orig = proto.getLineTokens;
+
+patch(
+ TokenizerModule, "Tokenizer",
+ "ruleRegExps.push(adjustedregex);\n",
+ function(m) {
+ return m + '\
+ if (state[i].next && RegExp(adjustedregex).test(""))\n\
+ rule._qre = RegExp(adjustedregex, "g");\n\
+ ';
+ }
+);
+TokenizerModule.Tokenizer.prototype = proto;
+patch(
+ proto, "getLineTokens",
+ /if \(match\[i \+ 1\] === undefined\)\s*continue;/,
+ "if (!match[i + 1]) {\n\
+ if (value)continue;\n\
+ var qre = state[mapping[i]]._qre;\n\
+ if (!qre) continue;\n\
+ qre.lastIndex = lastIndex;\n\
+ if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\
+ continue;\n\
+ }"
+);
+
+useragent.isOldIE = true;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/ext/old_ie_test.js b/src/fauxton/assets/js/libs/ace/ext/old_ie_test.js
new file mode 100644
index 000000000..98652e14c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/old_ie_test.js
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+
+module.exports = {
+ "test: getTokenizer() (smoke test)" : function() {
+ var exec = RegExp.prototype.exec
+ var brokenExec = function(str) {
+ var result = exec.call(this, str);
+ if (result) {
+ for (var i = result.length; i--;)
+ if (!result[i])
+ result[i] = "";
+ }
+ return result;
+ }
+
+ try {
+ // break this to emulate old ie
+ RegExp.prototype.exec = brokenExec;
+ require("./old_ie");
+ var Tokenizer = require("../tokenizer").Tokenizer;
+ var JavaScriptHighlightRules = require("../mode/javascript_highlight_rules").JavaScriptHighlightRules;
+ var tokenizer = new Tokenizer((new JavaScriptHighlightRules).getRules());
+
+ var tokens = tokenizer.getLineTokens("'juhu'", "start").tokens;
+ assert.equal("string", tokens[0].type);
+ } finally {
+ // restore modified functions
+ RegExp.prototype.exec = exec;
+ var module = require("../tokenizer");
+ module.Tokenizer = module.Tokenizer_orig;
+ module.Tokenizer.prototype.getLineTokens = module.Tokenizer.prototype.getLineTokens_orig;
+ }
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/ext/searchbox.css b/src/fauxton/assets/js/libs/ace/ext/searchbox.css
new file mode 100644
index 000000000..c0f5f2841
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/searchbox.css
@@ -0,0 +1,157 @@
+
+
+/* ------------------------------------------------------------------------------------------
+ * Editor Search Form
+ * --------------------------------------------------------------------------------------- */
+ .ace_search {
+ background-color: #ddd;
+ border: 1px solid #cbcbcb;
+ border-top: 0 none;
+ max-width: 297px;
+ overflow: hidden;
+ margin: 0;
+ padding: 4px;
+ padding-right: 6px;
+ padding-bottom: 0;
+ position: absolute;
+ top: 0px;
+ z-index: 99;
+}
+.ace_search.left {
+ border-left: 0 none;
+ border-radius: 0px 0px 5px 0px;
+ left: 0;
+}
+.ace_search.right {
+ border-radius: 0px 0px 0px 5px;
+ border-right: 0 none;
+ right: 0;
+}
+
+.ace_search_form, .ace_replace_form {
+ border-radius: 3px;
+ border: 1px solid #cbcbcb;
+ float: left;
+ margin-bottom: 4px;
+ overflow: hidden;
+}
+.ace_search_form.ace_nomatch {
+ outline: 1px solid red;
+}
+
+.ace_search_field {
+ background-color: white;
+ border-right: 1px solid #cbcbcb;
+ border: 0 none;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ display: block;
+ float: left;
+ height: 22px;
+ outline: 0;
+ padding: 0 7px;
+ width: 214px;
+ margin: 0;
+}
+.ace_searchbtn,
+.ace_replacebtn {
+ background: #fff;
+ border: 0 none;
+ border-left: 1px solid #dcdcdc;
+ cursor: pointer;
+ display: block;
+ float: left;
+ height: 22px;
+ margin: 0;
+ padding: 0;
+ position: relative;
+}
+.ace_searchbtn:last-child,
+.ace_replacebtn:last-child {
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+.ace_searchbtn:disabled {
+ background: none;
+ cursor: default;
+}
+.ace_searchbtn {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ width: 27px;
+}
+.ace_searchbtn.prev {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);
+}
+.ace_searchbtn.next {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);
+}
+.ace_searchbtn_close {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;
+ border-radius: 50%;
+ border: 0 none;
+ color: #656565;
+ cursor: pointer;
+ display: block;
+ float: right;
+ font-family: Arial;
+ font-size: 16px;
+ height: 14px;
+ line-height: 16px;
+ margin: 5px 1px 9px 5px;
+ padding: 0;
+ text-align: center;
+ width: 14px;
+}
+.ace_searchbtn_close:hover {
+ background-color: #656565;
+ background-position: 50% 100%;
+ color: white;
+}
+.ace_replacebtn.prev {
+ width: 54px
+}
+.ace_replacebtn.next {
+ width: 27px
+}
+
+.ace_button {
+ margin-left: 2px;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -o-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ overflow: hidden;
+ opacity: 0.7;
+ border: 1px solid rgba(100,100,100,0.23);
+ padding: 1px;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ color: black;
+}
+
+.ace_button:hover {
+ background-color: #eee;
+ opacity:1;
+}
+.ace_button:active {
+ background-color: #ddd;
+}
+
+.ace_button.checked {
+ border-color: #3399ff;
+ opacity:1;
+}
+
+.ace_search_options{
+ margin-bottom: 3px;
+ text-align: right;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -o-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/searchbox.js b/src/fauxton/assets/js/libs/ace/ext/searchbox.js
new file mode 100644
index 000000000..fbbaa8f39
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/searchbox.js
@@ -0,0 +1,286 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var event = require("../lib/event");
+var searchboxCss = require("../requirejs/text!./searchbox.css");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var keyUtil = require("../lib/keys");
+
+dom.importCssString(searchboxCss, "ace_searchbox");
+
+var html = '<div class="ace_search right">\
+ <button type="button" action="hide" class="ace_searchbtn_close"></button>\
+ <div class="ace_search_form">\
+ <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
+ <button type="button" action="findNext" class="ace_searchbtn next"></button>\
+ <button type="button" action="findPrev" class="ace_searchbtn prev"></button>\
+ </div>\
+ <div class="ace_replace_form">\
+ <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
+ <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>\
+ <button type="button" action="replaceAll" class="ace_replacebtn">All</button>\
+ </div>\
+ <div class="ace_search_options">\
+ <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
+ <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
+ <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
+ </div>\
+</div>'.replace(/>\s+/g, ">");
+
+var SearchBox = function(editor, range, showReplaceForm) {
+ var div = dom.createElement("div");
+ div.innerHTML = html;
+ this.element = div.firstChild;
+
+ this.$init();
+ this.setEditor(editor);
+};
+
+(function() {
+ this.setEditor = function(editor) {
+ editor.searchBox = this;
+ editor.container.appendChild(this.element);
+ this.editor = editor;
+ };
+
+ this.$initElements = function(sb) {
+ this.searchBox = sb.querySelector(".ace_search_form");
+ this.replaceBox = sb.querySelector(".ace_replace_form");
+ this.searchOptions = sb.querySelector(".ace_search_options");
+ this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
+ this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
+ this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
+ this.searchInput = this.searchBox.querySelector(".ace_search_field");
+ this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
+ };
+
+ this.$init = function() {
+ var sb = this.element;
+
+ this.$initElements(sb);
+
+ var _this = this;
+ event.addListener(sb, "mousedown", function(e) {
+ setTimeout(function(){
+ _this.activeInput.focus();
+ }, 0);
+ event.stopPropagation(e);
+ });
+ event.addListener(sb, "click", function(e) {
+ var t = e.target || e.srcElement;
+ var action = t.getAttribute("action");
+ if (action && _this[action])
+ _this[action]();
+ else if (_this.$searchBarKb.commands[action])
+ _this.$searchBarKb.commands[action].exec(_this);
+ event.stopPropagation(e);
+ });
+
+ event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
+ if (command && command.exec) {
+ command.exec(_this);
+ event.stopEvent(e);
+ }
+ });
+
+ this.$onChange = lang.delayedCall(function() {
+ _this.find(false, false);
+ });
+
+ event.addListener(this.searchInput, "input", function() {
+ _this.$onChange.schedule(20);
+ });
+ event.addListener(this.searchInput, "focus", function() {
+ _this.activeInput = _this.searchInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ event.addListener(this.replaceInput, "focus", function() {
+ _this.activeInput = _this.replaceInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ };
+
+ //keybinging outsite of the searchbox
+ this.$closeSearchBarKb = new HashHandler([{
+ bindKey: "Esc",
+ name: "closeSearchBar",
+ exec: function(editor) {
+ editor.searchBox.hide();
+ }
+ }]);
+
+ //keybinging outsite of the searchbox
+ this.$searchBarKb = new HashHandler();
+ this.$searchBarKb.bindKeys({
+ "Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function(sb) {
+ var isReplace = sb.isReplace = !sb.isReplace;
+ sb.replaceBox.style.display = isReplace ? "" : "none";
+ sb[isReplace ? "replaceInput" : "searchInput"].focus();
+ },
+ "Ctrl-G|Command-G": function(sb) {
+ sb.findNext();
+ },
+ "Ctrl-Shift-G|Command-Shift-G": function(sb) {
+ sb.findPrev();
+ },
+ "esc": function(sb) {
+ setTimeout(function() { sb.hide();});
+ },
+ "Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findNext();
+ },
+ "Shift-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findPrev();
+ },
+ "Tab": function(sb) {
+ (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
+ }
+ });
+
+ this.$searchBarKb.addCommands([{
+ name: "toggleRegexpMode",
+ bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
+ exec: function(sb) {
+ sb.regExpOption.checked = !sb.regExpOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleCaseSensitive",
+ bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
+ exec: function(sb) {
+ sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleWholeWords",
+ bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
+ exec: function(sb) {
+ sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
+ sb.$syncOptions();
+ }
+ }]);
+
+ this.$syncOptions = function() {
+ dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
+ dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
+ dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
+ this.find(false, false);
+ };
+
+ this.highlight = function(re) {
+ this.editor.session.highlight(re || this.editor.$search.$options.re);
+ this.editor.renderer.updateBackMarkers()
+ };
+ this.find = function(skipCurrent, backwards) {
+ var range = this.editor.find(this.searchInput.value, {
+ skipCurrent: skipCurrent,
+ backwards: backwards,
+ wrap: true,
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ };
+ this.findNext = function() {
+ this.find(true, false);
+ };
+ this.findPrev = function() {
+ this.find(true, true);
+ };
+ this.replace = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replace(this.replaceInput.value);
+ };
+ this.replaceAndFindNext = function() {
+ if (!this.editor.getReadOnly()) {
+ this.editor.replace(this.replaceInput.value);
+ this.findNext()
+ }
+ };
+ this.replaceAll = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replaceAll(this.replaceInput.value);
+ };
+
+ this.hide = function() {
+ this.element.style.display = "none";
+ this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
+ this.editor.focus();
+ };
+ this.show = function(value, isReplace) {
+ this.element.style.display = "";
+ this.replaceBox.style.display = isReplace ? "" : "none";
+
+ this.isReplace = isReplace;
+
+ if (value)
+ this.searchInput.value = value;
+ this.searchInput.focus();
+ this.searchInput.select();
+
+ this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
+ };
+
+}).call(SearchBox.prototype);
+
+exports.SearchBox = SearchBox;
+
+exports.Search = function(editor, isReplace) {
+ var sb = editor.searchBox || new SearchBox(editor);
+ sb.show(editor.session.getTextRange(), isReplace);
+};
+
+});
+
+
+/* ------------------------------------------------------------------------------------------
+ * TODO
+ * --------------------------------------------------------------------------------------- */
+/*
+- move search form to the left if it masks current word
+- includ all options that search has. ex: regex
+- searchbox.searchbox is not that pretty. we should have just searchbox
+- disable prev button if it makes sence
+*/
diff --git a/src/fauxton/assets/js/libs/ace/ext/settings_menu.js b/src/fauxton/assets/js/libs/ace/ext/settings_menu.js
new file mode 100644
index 000000000..44f6d6ad5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/settings_menu.js
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Show Settings Menu
+ * @fileOverview Show Settings Menu <br />
+ * Displays an interactive settings menu mostly generated on the fly based on
+ * the current state of the editor.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+"use strict";
+var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
+var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+/**
+ * This displays the settings menu if it is not already being shown.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ * @param {ace.Editor} editor An instance of the ace editor.
+ */
+function showSettingsMenu(editor) {
+ // make sure the menu isn't open already.
+ var sm = document.getElementById('ace_settingsmenu');
+ if (!sm)
+ overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
+}
+
+/**
+ * Initializes the settings menu extension. It adds the showSettingsMenu
+ * method to the given editor object and adds the showSettingsMenu command
+ * to the editor with appropriate keyboard shortcuts.
+ * @param {ace.Editor} editor An instance of the Editor.
+ */
+module.exports.init = function(editor) {
+ var Editor = require("ace/editor").Editor;
+ Editor.prototype.showSettingsMenu = function() {
+ showSettingsMenu(this);
+ };
+};
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/spellcheck.js b/src/fauxton/assets/js/libs/ace/ext/spellcheck.js
new file mode 100644
index 000000000..08bf2189b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/spellcheck.js
@@ -0,0 +1,69 @@
+define(function(require, exports, module) {
+"use strict";
+var event = require("../lib/event");
+
+exports.contextMenuHandler = function(e){
+ var host = e.target;
+ var text = host.textInput.getElement();
+ if (!host.selection.isEmpty())
+ return;
+ var c = host.getCursorPosition();
+ var r = host.session.getWordRange(c.row, c.column);
+ var w = host.session.getTextRange(r);
+
+ host.session.tokenRe.lastIndex = 0;
+ if (!host.session.tokenRe.test(w))
+ return;
+ var PLACEHOLDER = "\x01\x01";
+ var value = w + " " + PLACEHOLDER;
+ text.value = value;
+ text.setSelectionRange(w.length, w.length + 1);
+ text.setSelectionRange(0, 0);
+ text.setSelectionRange(0, w.length);
+
+ var afterKeydown = false;
+ event.addListener(text, "keydown", function onKeydown() {
+ event.removeListener(text, "keydown", onKeydown);
+ afterKeydown = true;
+ });
+
+ host.textInput.setInputHandler(function(newVal) {
+ console.log(newVal , value, text.selectionStart, text.selectionEnd)
+ if (newVal == value)
+ return '';
+ if (newVal.lastIndexOf(value, 0) === 0)
+ return newVal.slice(value.length);
+ if (newVal.substr(text.selectionEnd) == value)
+ return newVal.slice(0, -value.length);
+ if (newVal.slice(-2) == PLACEHOLDER) {
+ var val = newVal.slice(0, -2);
+ if (val.slice(-1) == " ") {
+ if (afterKeydown)
+ return val.substring(0, text.selectionEnd);
+ val = val.slice(0, -1);
+ host.session.replace(r, val);
+ return "";
+ }
+ }
+
+ return newVal;
+ });
+};
+// todo support highlighting with typo.js
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ spellcheck: {
+ set: function(val) {
+ var text = this.textInput.getElement();
+ text.spellcheck = !!val;
+ if (!val)
+ this.removeListener("nativecontextmenu", exports.contextMenuHandler);
+ else
+ this.on("nativecontextmenu", exports.contextMenuHandler);
+ },
+ value: true
+ }
+});
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/ext/split.js b/src/fauxton/assets/js/libs/ace/ext/split.js
new file mode 100644
index 000000000..8316562fd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/split.js
@@ -0,0 +1,40 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+/**
+ * this is experimental, and subject to change, use at your own risk!
+ */
+module.exports = require("../split");
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/ext/static.css b/src/fauxton/assets/js/libs/ace/ext/static.css
new file mode 100644
index 000000000..bd4797803
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/static.css
@@ -0,0 +1,23 @@
+.ace_static_highlight {
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;
+ font-size: 12px;
+}
+
+.ace_static_highlight .ace_gutter {
+ width: 25px !important;
+ display: block;
+ float: left;
+ text-align: right;
+ padding: 0 3px 0 0;
+ margin-right: 3px;
+ position: static !important;
+}
+
+.ace_static_highlight .ace_line { clear: both; }
+
+.ace_static_highlight .ace_gutter-cell {
+ -moz-user-select: -moz-none;
+ -khtml-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/static_highlight.js b/src/fauxton/assets/js/libs/ace/ext/static_highlight.js
new file mode 100644
index 000000000..2119653ac
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/static_highlight.js
@@ -0,0 +1,180 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var TextLayer = require("../layer/text").Text;
+var baseStyles = require("../requirejs/text!./static.css");
+var config = require("../config");
+var dom = require("../lib/dom");
+/**
+ * Transforms a given input code snippet into HTML using the given mode
+ *
+ * @param {string} input Code snippet
+ * @param {string|mode} mode String specifying the mode to load such as
+ * `ace/mode/javascript` or, a mode loaded from `/ace/mode`
+ * (use 'ServerSideHiglighter.getMode').
+ * @param {string|theme} theme String specifying the theme to load such as
+ * `ace/theme/twilight` or, a theme loaded from `/ace/theme`.
+ * @param {number} lineStart A number indicating the first line number. Defaults
+ * to 1.
+ * @param {boolean} disableGutter Specifies whether or not to disable the gutter.
+ * `true` disables the gutter, `false` enables the gutter. Defaults to `false`.
+ * @param {function} callback When specifying the mode or theme as a string,
+ * this method has no return value and you must specify a callback function. The
+ * callback will receive the rendered object containing the properties `html`
+ * and `css`.
+ * @returns {object} An object containing the properties `html` and `css`.
+ */
+
+exports.render = function(input, mode, theme, lineStart, disableGutter, callback) {
+ var waiting = 0;
+ var modeCache = EditSession.prototype.$modes;
+
+ // if either the theme or the mode were specified as objects
+ // then we need to lazily load them.
+ if (typeof theme == "string") {
+ waiting++;
+ config.loadModule(['theme', theme], function(m) {
+ theme = m;
+ --waiting || done();
+ });
+ }
+
+ if (typeof mode == "string") {
+ waiting++;
+ config.loadModule(['mode', mode], function(m) {
+ if (!modeCache[mode]) modeCache[mode] = new m.Mode();
+ mode = modeCache[mode];
+ --waiting || done();
+ });
+ }
+
+ // loads or passes the specified mode module then calls renderer
+ function done() {
+ var result = exports.renderSync(input, mode, theme, lineStart, disableGutter);
+ return callback ? callback(result) : result;
+ }
+ return waiting || done();
+};
+
+/*
+ * Transforms a given input code snippet into HTML using the given mode
+ * @param {string} input Code snippet
+ * @param {mode} mode Mode loaded from /ace/mode (use 'ServerSideHiglighter.getMode')
+ * @param {string} r Code snippet
+ * @returns {object} An object containing: html, css
+ */
+
+exports.renderSync = function(input, mode, theme, lineStart, disableGutter) {
+ lineStart = parseInt(lineStart || 1, 10);
+
+ var session = new EditSession("");
+ session.setUseWorker(false);
+ session.setMode(mode);
+
+ var textLayer = new TextLayer(document.createElement("div"));
+ textLayer.setSession(session);
+ textLayer.config = {
+ characterWidth: 10,
+ lineHeight: 20
+ };
+
+ session.setValue(input);
+
+ var stringBuilder = [];
+ var length = session.getLength();
+
+ for(var ix = 0; ix < length; ix++) {
+ stringBuilder.push("<div class='ace_line'>");
+ if (!disableGutter)
+ stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + (ix + lineStart) + "</span>");
+ textLayer.$renderLine(stringBuilder, ix, true, false);
+ stringBuilder.push("</div>");
+ }
+
+ // let's prepare the whole html
+ var html = "<div class='" + theme.cssClass + "'>" +
+ "<div class='ace_static_highlight'>" +
+ stringBuilder.join("") +
+ "</div>" +
+ "</div>";
+
+ textLayer.destroy();
+
+ return {
+ css: baseStyles + theme.cssText,
+ html: html
+ };
+};
+
+
+
+exports.highlight = function(el, opts, callback) {
+ var m = el.className.match(/lang-(\w+)/);
+ var mode = opts.mode || m && ("ace/mode/" + m[1]);
+ if (!mode)
+ return false;
+ var theme = opts.theme || "ace/theme/textmate";
+
+ var data = "";
+ var nodes = [];
+
+ if (el.firstElementChild) {
+ var textLen = 0;
+ for (var i = 0; i < el.childNodes.length; i++) {
+ var ch = el.childNodes[i];
+ if (ch.nodeType == 3) {
+ textLen += ch.data.length;
+ data += ch.data;
+ } else {
+ nodes.push(textLen, ch);
+ }
+ }
+ } else {
+ data = dom.getInnerText(el);
+ }
+
+ exports.render(data, mode, theme, 1, true, function (highlighted) {
+ dom.importCssString(highlighted.css, "ace_highlight");
+ el.innerHTML = highlighted.html;
+ var container = el.firstChild.firstChild
+ for (var i = 0; i < nodes.length; i += 2) {
+ var pos = highlighted.session.doc.indexToPosition(nodes[i])
+ var node = nodes[i + 1];
+ var lineEl = container.children[pos.row];
+ lineEl && lineEl.appendChild(nodes[i+1]);
+ }
+ callback && callback();
+ });
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/ext/static_highlight_test.js b/src/fauxton/assets/js/libs/ace/ext/static_highlight_test.js
new file mode 100644
index 000000000..bdbecbfc8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/static_highlight_test.js
@@ -0,0 +1,89 @@
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("../test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("assert");
+var highlighter = require("./static_highlight");
+var JavaScriptMode = require("../mode/javascript").Mode;
+var TextMode = require("../mode/text").Mode;
+
+// Execution ORDER: test.setUpSuite, setUp, testFn, tearDown, test.tearDownSuite
+module.exports = {
+ timeout: 10000,
+
+ "test simple snippet": function(next) {
+ var theme = require("../theme/tomorrow");
+ var snippet = [
+ "/** this is a function",
+ "*",
+ "*/",
+ "function hello (a, b, c) {",
+ " console.log(a * b + c + 'sup$');",
+ "}"
+ ].join("\n");
+ var mode = new JavaScriptMode();
+
+ var result = highlighter.render(snippet, mode, theme);
+ assert.equal(result.html, "<div class='ace-tomorrow'><div class='ace_static_highlight'><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>1</span><span class='ace_comment ace_doc'>/**\xa0this\xa0is\xa0a\xa0function</span></div><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>2</span><span class='ace_comment ace_doc'>*</span></div><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>3</span><span class='ace_comment ace_doc'>*/</span></div><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>4</span><span class='ace_storage ace_type'>function</span>\xa0<span class='ace_entity ace_name ace_function'>hello</span>\xa0<span class='ace_paren ace_lparen'>(</span><span class='ace_variable ace_parameter'>a</span><span class='ace_punctuation ace_operator'>,\xa0</span><span class='ace_variable ace_parameter'>b</span><span class='ace_punctuation ace_operator'>,\xa0</span><span class='ace_variable ace_parameter'>c</span><span class='ace_paren ace_rparen'>)</span>\xa0<span class='ace_paren ace_lparen'>{</span></div><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>5</span>\xa0\xa0\xa0\xa0<span class='ace_storage ace_type'>console</span><span class='ace_punctuation ace_operator'>.</span><span class='ace_support ace_function ace_firebug'>log</span><span class='ace_paren ace_lparen'>(</span><span class='ace_identifier'>a</span>\xa0<span class='ace_keyword ace_operator'>*</span>\xa0<span class='ace_identifier'>b</span>\xa0<span class='ace_keyword ace_operator'>+</span>\xa0<span class='ace_identifier'>c</span>\xa0<span class='ace_keyword ace_operator'>+</span>\xa0<span class='ace_string'>'sup$'</span><span class='ace_paren ace_rparen'>)</span><span class='ace_punctuation ace_operator'>;</span></div><div class='ace_line'><span class='ace_gutter ace_gutter-cell' unselectable='on'>6</span><span class='ace_paren ace_rparen'>}</span></div></div></div>");
+ assert.ok(!!result.css);
+ next();
+ },
+
+ "test css from theme is used": function(next) {
+ var theme = require("../theme/tomorrow");
+ var snippet = [
+ "/** this is a function",
+ "*",
+ "*/",
+ "function hello (a, b, c) {",
+ " console.log(a * b + c + 'sup?');",
+ "}"
+ ].join("\n");
+ var mode = new JavaScriptMode();
+
+ var result = highlighter.render(snippet, mode, theme);
+
+ assert.ok(result.css.indexOf(theme.cssText) !== -1);
+
+ next();
+ },
+
+ "test theme classname should be in output html": function(next) {
+ var theme = require("../theme/tomorrow");
+ var snippet = [
+ "/** this is a function",
+ "*",
+ "*/",
+ "function hello (a, b, c) {",
+ " console.log(a * b + c + 'sup?');",
+ "}"
+ ].join("\n");
+ var mode = new JavaScriptMode();
+
+ var result = highlighter.render(snippet, mode, theme);
+ assert.equal(!!result.html.match(/<div class='ace-tomorrow'>/), true);
+
+ next();
+ },
+
+ "test js string replace specials": function(next) {
+ var theme = require("../theme/tomorrow");
+ var snippet = "$'$1$2$$$&";
+ var mode = new TextMode();
+
+ var result = highlighter.render(snippet, mode, theme);
+ assert.ok(result.html.indexOf(snippet) != -1);
+
+ next();
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/ext/statusbar.js b/src/fauxton/assets/js/libs/ace/ext/statusbar.js
new file mode 100644
index 000000000..666febfa8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/statusbar.js
@@ -0,0 +1,49 @@
+define(function(require, exports, module) {
+"use strict";
+/** simple statusbar **/
+var dom = require("ace/lib/dom");
+var lang = require("ace/lib/lang");
+
+var StatusBar = function(editor, parentNode) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_status-indicator";
+ this.element.style.cssText = "display: inline-block;";
+ parentNode.appendChild(this.element);
+
+ var statusUpdate = lang.delayedCall(function(){
+ this.updateStatus(editor)
+ }.bind(this));
+ editor.on("changeStatus", function() {
+ statusUpdate.schedule(100);
+ });
+ editor.on("changeSelection", function() {
+ statusUpdate.schedule(100);
+ });
+};
+
+(function(){
+ this.updateStatus = function(editor) {
+ var status = [];
+ function add(str, separator) {
+ str && status.push(str, separator || "|");
+ }
+
+ if (editor.$vimModeHandler)
+ add(editor.$vimModeHandler.getStatusText());
+ else if (editor.commands.recording)
+ add("REC");
+
+ var c = editor.selection.lead;
+ add(c.row + ":" + c.column, " ");
+ if (!editor.selection.isEmpty()) {
+ var r = editor.getSelectionRange();
+ add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");
+ }
+ status.pop();
+ this.element.textContent = status.join("");
+ };
+}).call(StatusBar.prototype);
+
+exports.StatusBar = StatusBar;
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/textarea.js b/src/fauxton/assets/js/libs/ace/ext/textarea.js
new file mode 100644
index 000000000..86b299e61
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/textarea.js
@@ -0,0 +1,547 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var UA = require("../lib/useragent");
+var net = require("../lib/net");
+var ace = require("../ace");
+
+require("../theme/textmate");
+
+module.exports = exports = ace;
+
+/*
+ * Returns the CSS property of element.
+ * 1) If the CSS property is on the style object of the element, use it, OR
+ * 2) Compute the CSS property
+ *
+ * If the property can't get computed, is 'auto' or 'intrinsic', the former
+ * calculated property is used (this can happen in cases where the textarea
+ * is hidden and has no dimension styles).
+ */
+var getCSSProperty = function(element, container, property) {
+ var ret = element.style[property];
+
+ if (!ret) {
+ if (window.getComputedStyle) {
+ ret = window.getComputedStyle(element, '').getPropertyValue(property);
+ } else {
+ ret = element.currentStyle[property];
+ }
+ }
+
+ if (!ret || ret == 'auto' || ret == 'intrinsic') {
+ ret = container.style[property];
+ }
+ return ret;
+};
+
+function applyStyles(elm, styles) {
+ for (var style in styles) {
+ elm.style[style] = styles[style];
+ }
+}
+
+function setupContainer(element, getValue) {
+ if (element.type != 'textarea') {
+ throw new Error("Textarea required!");
+ }
+
+ var parentNode = element.parentNode;
+
+ // This will hold the editor.
+ var container = document.createElement('div');
+
+ // To put Ace in the place of the textarea, we have to copy a few of the
+ // textarea's style attributes to the div container.
+ //
+ // The problem is that the properties have to get computed (they might be
+ // defined by a CSS file on the page - you can't access such rules that
+ // apply to an element via elm.style). Computed properties are converted to
+ // pixels although the dimension might be given as percentage. When the
+ // window resizes, the dimensions defined by percentages changes, so the
+ // properties have to get recomputed to get the new/true pixels.
+ var resizeEvent = function() {
+ var style = 'position:relative;';
+ [
+ 'margin-top', 'margin-left', 'margin-right', 'margin-bottom'
+ ].forEach(function(item) {
+ style += item + ':' +
+ getCSSProperty(element, container, item) + ';';
+ });
+
+ // Calculating the width/height of the textarea is somewhat tricky. To
+ // do it right, you have to include the paddings to the sides as well
+ // (eg. width = width + padding-left, -right). This works well, as
+ // long as the width of the element is not set or given in pixels. In
+ // this case and after the textarea is hidden, getCSSProperty(element,
+ // container, 'width') will still return pixel value. If the element
+ // has realtiv dimensions (e.g. width='95<percent>')
+ // getCSSProperty(...) will return pixel values only as long as the
+ // textarea is visible. After it is hidden getCSSProperty will return
+ // the relative dimensions as they are set on the element (in the case
+ // of width, 95<percent>).
+ // Making the sum of pixel vaules (e.g. padding) and realtive values
+ // (e.g. <percent>) is not possible. As such the padding styles are
+ // ignored.
+
+ // The complete width is the width of the textarea + the padding
+ // to the left and right.
+ var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px");
+ var height = getCSSProperty(element, container, 'height') || (element.clientHeight + "px");
+ style += 'height:' + height + ';width:' + width + ';';
+
+ // Set the display property to 'inline-block'.
+ style += 'display:inline-block;';
+ container.setAttribute('style', style);
+ };
+ event.addListener(window, 'resize', resizeEvent);
+
+ // Call the resizeEvent once, so that the size of the container is
+ // calculated.
+ resizeEvent();
+
+ // Insert the div container after the element.
+ parentNode.insertBefore(container, element.nextSibling);
+
+ // Override the forms onsubmit function. Set the innerHTML and value
+ // of the textarea before submitting.
+ while (parentNode !== document) {
+ if (parentNode.tagName.toUpperCase() === 'FORM') {
+ var oldSumit = parentNode.onsubmit;
+ // Override the onsubmit function of the form.
+ parentNode.onsubmit = function(evt) {
+ element.value = getValue();
+ // If there is a onsubmit function already, then call
+ // it with the current context and pass the event.
+ if (oldSumit) {
+ oldSumit.call(this, evt);
+ }
+ };
+ break;
+ }
+ parentNode = parentNode.parentNode;
+ }
+ return container;
+}
+
+exports.transformTextarea = function(element, loader) {
+ var session;
+ var container = setupContainer(element, function() {
+ return session.getValue();
+ });
+
+ // Hide the element.
+ element.style.display = 'none';
+ container.style.background = 'white';
+
+ //
+ var editorDiv = document.createElement("div");
+ applyStyles(editorDiv, {
+ top: "0px",
+ left: "0px",
+ right: "0px",
+ bottom: "0px",
+ border: "1px solid gray",
+ position: "absolute"
+ });
+ container.appendChild(editorDiv);
+
+ var settingOpener = document.createElement("div");
+ applyStyles(settingOpener, {
+ position: "absolute",
+ right: "0px",
+ bottom: "0px",
+ background: "red",
+ cursor: "nw-resize",
+ borderStyle: "solid",
+ borderWidth: "9px 8px 10px 9px",
+ width: "2px",
+ borderColor: "lightblue gray gray lightblue",
+ zIndex: 101
+ });
+
+ var settingDiv = document.createElement("div");
+ var settingDivStyles = {
+ top: "0px",
+ left: "20%",
+ right: "0px",
+ bottom: "0px",
+ position: "absolute",
+ padding: "5px",
+ zIndex: 100,
+ color: "white",
+ display: "none",
+ overflow: "auto",
+ fontSize: "14px",
+ boxShadow: "-5px 2px 3px gray"
+ };
+ if (!UA.isOldIE) {
+ settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)";
+ } else {
+ settingDivStyles.backgroundColor = "#333";
+ }
+
+ applyStyles(settingDiv, settingDivStyles);
+ container.appendChild(settingDiv);
+
+ // Power up ace on the textarea:
+ var options = {};
+
+ var editor = ace.edit(editorDiv);
+ session = editor.getSession();
+
+ session.setValue(element.value || element.innerHTML);
+ editor.focus();
+
+ // Add the settingPanel opener to the editor's div.
+ container.appendChild(settingOpener);
+
+ // Create the API.
+ setupApi(editor, editorDiv, settingDiv, ace, options, loader);
+
+ // Create the setting's panel.
+ setupSettingPanel(settingDiv, settingOpener, editor, options);
+
+ var state = "";
+ event.addListener(settingOpener, "mousemove", function(e) {
+ var rect = this.getBoundingClientRect();
+ var x = e.clientX - rect.left, y = e.clientY - rect.top;
+ if (x + y < (rect.width + rect.height)/2) {
+ this.style.cursor = "pointer";
+ state = "toggle";
+ } else {
+ state = "resize";
+ this.style.cursor = "nw-resize";
+ }
+ });
+
+ event.addListener(settingOpener, "mousedown", function(e) {
+ if (state == "toggle") {
+ editor.setDisplaySettings();
+ return;
+ }
+ container.style.zIndex = 100000;
+ var rect = container.getBoundingClientRect();
+ var startX = rect.width + rect.left - e.clientX;
+ var startY = rect.height + rect.top - e.clientY;
+ event.capture(settingOpener, function(e) {
+ container.style.width = e.clientX - rect.left + startX + "px";
+ container.style.height = e.clientY - rect.top + startY + "px";
+ editor.resize();
+ }, function() {});
+ });
+
+ return editor;
+};
+
+function load(url, module, callback) {
+ net.loadScript(url, function() {
+ require([module], callback);
+ });
+}
+
+function setupApi(editor, editorDiv, settingDiv, ace, options, loader) {
+ var session = editor.getSession();
+ var renderer = editor.renderer;
+ loader = loader || load;
+
+ function toBool(value) {
+ return value === "true" || value == true;
+ }
+
+ editor.setDisplaySettings = function(display) {
+ if (display == null)
+ display = settingDiv.style.display == "none";
+ if (display) {
+ settingDiv.style.display = "block";
+ settingDiv.hideButton.focus();
+ editor.on("focus", function onFocus() {
+ editor.removeListener("focus", onFocus);
+ settingDiv.style.display = "none";
+ });
+ } else {
+ editor.focus();
+ }
+ };
+
+ editor.$setOption = editor.setOption;
+ editor.setOption = function(key, value) {
+ if (options[key] == value) return;
+
+ switch (key) {
+ case "mode":
+ if (value != "text") {
+ // Load the required mode file. Files get loaded only once.
+ loader("mode-" + value + ".js", "ace/mode/" + value, function() {
+ var aceMode = require("../mode/" + value).Mode;
+ session.setMode(new aceMode());
+ });
+ } else {
+ session.setMode(new (require("../mode/text").Mode));
+ }
+ break;
+
+ case "theme":
+ if (value != "textmate") {
+ // Load the required theme file. Files get loaded only once.
+ loader("theme-" + value + ".js", "ace/theme/" + value, function() {
+ editor.setTheme("ace/theme/" + value);
+ });
+ } else {
+ editor.setTheme("ace/theme/textmate");
+ }
+ break;
+
+ case "fontSize":
+ editorDiv.style.fontSize = value;
+ break;
+
+ case "keybindings":
+ switch (value) {
+ case "vim":
+ editor.setKeyboardHandler("ace/keyboard/vim");
+ break;
+ case "emacs":
+ editor.setKeyboardHandler("ace/keyboard/emacs");
+ break;
+ default:
+ editor.setKeyboardHandler(null);
+ }
+ break;
+
+ case "softWrap":
+ switch (value) {
+ case "off":
+ session.setUseWrapMode(false);
+ renderer.setPrintMarginColumn(80);
+ break;
+ case "40":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(40, 40);
+ renderer.setPrintMarginColumn(40);
+ break;
+ case "80":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(80, 80);
+ renderer.setPrintMarginColumn(80);
+ break;
+ case "free":
+ session.setUseWrapMode(true);
+ session.setWrapLimitRange(null, null);
+ renderer.setPrintMarginColumn(80);
+ break;
+ }
+ break;
+
+ default:
+ editor.$setOption(key, toBool(value));
+ }
+
+ options[key] = value;
+ };
+
+ editor.getOption = function(key) {
+ return options[key];
+ };
+
+ editor.getOptions = function() {
+ return options;
+ };
+
+ editor.setOptions(exports.options);
+
+ return editor;
+}
+
+function setupSettingPanel(settingDiv, settingOpener, editor, options) {
+ var BOOL = null;
+
+ var desc = {
+ mode: "Mode:",
+ gutter: "Display Gutter:",
+ theme: "Theme:",
+ fontSize: "Font Size:",
+ softWrap: "Soft Wrap:",
+ keybindings: "Keyboard",
+ showPrintMargin: "Show Print Margin:",
+ useSoftTabs: "Use Soft Tabs:",
+ showInvisibles: "Show Invisibles"
+ };
+
+ var optionValues = {
+ mode: {
+ text: "Plain",
+ javascript: "JavaScript",
+ xml: "XML",
+ html: "HTML",
+ css: "CSS",
+ scss: "SCSS",
+ python: "Python",
+ php: "PHP",
+ java: "Java",
+ ruby: "Ruby",
+ c_cpp: "C/C++",
+ coffee: "CoffeeScript",
+ json: "json",
+ perl: "Perl",
+ clojure: "Clojure",
+ ocaml: "OCaml",
+ csharp: "C#",
+ haxe: "haXe",
+ svg: "SVG",
+ textile: "Textile",
+ groovy: "Groovy",
+ liquid: "Liquid",
+ Scala: "Scala"
+ },
+ theme: {
+ clouds: "Clouds",
+ clouds_midnight: "Clouds Midnight",
+ cobalt: "Cobalt",
+ crimson_editor: "Crimson Editor",
+ dawn: "Dawn",
+ eclipse: "Eclipse",
+ idle_fingers: "Idle Fingers",
+ kr_theme: "Kr Theme",
+ merbivore: "Merbivore",
+ merbivore_soft: "Merbivore Soft",
+ mono_industrial: "Mono Industrial",
+ monokai: "Monokai",
+ pastel_on_dark: "Pastel On Dark",
+ solarized_dark: "Solarized Dark",
+ solarized_light: "Solarized Light",
+ textmate: "Textmate",
+ twilight: "Twilight",
+ vibrant_ink: "Vibrant Ink"
+ },
+ gutter: BOOL,
+ fontSize: {
+ "10px": "10px",
+ "11px": "11px",
+ "12px": "12px",
+ "14px": "14px",
+ "16px": "16px"
+ },
+ softWrap: {
+ off: "Off",
+ 40: "40",
+ 80: "80",
+ free: "Free"
+ },
+ keybindings: {
+ ace: "ace",
+ vim: "vim",
+ emacs: "emacs"
+ },
+ showPrintMargin: BOOL,
+ useSoftTabs: BOOL,
+ showInvisibles: BOOL
+ };
+
+ var table = [];
+ table.push("<table><tr><th>Setting</th><th>Value</th></tr>");
+
+ function renderOption(builder, option, obj, cValue) {
+ if (!obj) {
+ builder.push(
+ "<input type='checkbox' title='", option, "' ",
+ cValue == "true" ? "checked='true'" : "",
+ "'></input>"
+ );
+ return;
+ }
+ builder.push("<select title='" + option + "'>");
+ for (var value in obj) {
+ builder.push("<option value='" + value + "' ");
+
+ if (cValue == value) {
+ builder.push(" selected ");
+ }
+
+ builder.push(">",
+ obj[value],
+ "</option>");
+ }
+ builder.push("</select>");
+ }
+
+ for (var option in options) {
+ table.push("<tr><td>", desc[option], "</td>");
+ table.push("<td>");
+ renderOption(table, option, optionValues[option], options[option]);
+ table.push("</td></tr>");
+ }
+ table.push("</table>");
+ settingDiv.innerHTML = table.join("");
+
+ var onChange = function(e) {
+ var select = e.currentTarget;
+ editor.setOption(select.title, select.value);
+ };
+ var onClick = function(e) {
+ var cb = e.currentTarget;
+ editor.setOption(cb.title, cb.checked);
+ };
+ var selects = settingDiv.getElementsByTagName("select");
+ for (var i = 0; i < selects.length; i++)
+ selects[i].onchange = onChange;
+ var cbs = settingDiv.getElementsByTagName("input");
+ for (var i = 0; i < cbs.length; i++)
+ cbs[i].onclick = onClick;
+
+
+ var button = document.createElement("input");
+ button.type = "button";
+ button.value = "Hide";
+ event.addListener(button, "click", function() {
+ editor.setDisplaySettings(false);
+ });
+ settingDiv.appendChild(button);
+ settingDiv.hideButton = button;
+}
+
+// Default startup options.
+exports.options = {
+ mode: "text",
+ theme: "textmate",
+ gutter: "false",
+ fontSize: "12px",
+ softWrap: "off",
+ keybindings: "ace",
+ showPrintMargin: "false",
+ useSoftTabs: "true",
+ showInvisibles: "false"
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/ext/themelist.js b/src/fauxton/assets/js/libs/ace/ext/themelist.js
new file mode 100644
index 000000000..1032f72c1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/themelist.js
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013 Matthew Christopher Kastor-Inare III, Atropa Inc. Intl
+ * All rights reserved.
+ *
+ * Contributed to Ajax.org under the BSD license.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*jslint indent: 4, maxerr: 50, white: true, browser: true, vars: true*/
+/*global define, require */
+
+/**
+ * Generates a list of themes available when ace was built.
+ * @fileOverview Generates a list of themes available when ace was built.
+ * @author <a href="mailto:matthewkastor@gmail.com">
+ * Matthew Christopher Kastor-Inare III </a><br />
+ * ☭ Hial Atropa!! ☭
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+/**
+ * An array containing information about available themes.
+ */
+module.exports.themes = require('ace/ext/themelist_utils/themes').themes;
+
+/**
+ * Creates a theme description.
+ * @param {string} name The file name of the theme.
+ * @returns {ThemeDescription} Returns a theme description object which has
+ * three properties: the name gives the filename, the desc gives a menu
+ * friendly name, and the theme gives the string to set the theme with
+ * `setTheme`
+ */
+module.exports.ThemeDescription = function(name) {
+ this.name = name;
+ this.desc = name.split('_'
+ ).map(
+ function(namePart) {
+ return namePart[0].toUpperCase() + namePart.slice(1);
+ }
+ ).join(' ');
+ this.theme = "ace/theme/" + name;
+};
+
+module.exports.themesByName = {};
+
+module.exports.themes = module.exports.themes.map(function(name) {
+ module.exports.themesByName[name] = new module.exports.ThemeDescription(name);
+ return module.exports.themesByName[name];
+});
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/ext/themelist_utils/themes.js b/src/fauxton/assets/js/libs/ace/ext/themelist_utils/themes.js
new file mode 100644
index 000000000..2e490c9f4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/themelist_utils/themes.js
@@ -0,0 +1,36 @@
+define(function(require, exports, module) {
+
+module.exports.themes = [
+ "ambiance",
+ "chaos",
+ "chrome",
+ "clouds",
+ "clouds_midnight",
+ "cobalt",
+ "crimson_editor",
+ "dawn",
+ "dreamweaver",
+ "eclipse",
+ "github",
+ "idle_fingers",
+ "kr_theme",
+ "merbivore",
+ "merbivore_soft",
+ "mono_industrial",
+ "monokai",
+ "pastel_on_dark",
+ "solarized_dark",
+ "solarized_light",
+ "terminal",
+ "textmate",
+ "tomorrow",
+ "tomorrow_night",
+ "tomorrow_night_blue",
+ "tomorrow_night_bright",
+ "tomorrow_night_eighties",
+ "twilight",
+ "vibrant_ink",
+ "xcode"
+];
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/ext/whitespace.js b/src/fauxton/assets/js/libs/ace/ext/whitespace.js
new file mode 100644
index 000000000..83486fb09
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/ext/whitespace.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+
+// based on http://www.freehackers.org/Indent_Finder
+exports.$detectIndentation = function(lines, fallback) {
+ var stats = [];
+ var changes = [];
+ var tabIndents = 0;
+ var prevSpaces = 0;
+ var max = Math.min(lines.length, 1000);
+ for (var i = 0; i < max; i++) {
+ var line = lines[i];
+ // ignore empty and comment lines
+ if (!/^\s*[^*+\-\s]/.test(line))
+ continue;
+
+ var tabs = line.match(/^\t*/)[0].length;
+ if (line[0] == "\t")
+ tabIndents++;
+
+ var spaces = line.match(/^ */)[0].length;
+ if (spaces && line[spaces] != "\t") {
+ var diff = spaces - prevSpaces;
+ if (diff > 0 && !(prevSpaces%diff) && !(spaces%diff))
+ changes[diff] = (changes[diff] || 0) + 1;
+
+ stats[spaces] = (stats[spaces] || 0) + 1;
+ }
+ prevSpaces = spaces;
+
+ // ignore lines ending with backslash
+ while (line[line.length - 1] == "\\")
+ line = lines[i++];
+ }
+
+ function getScore(indent) {
+ var score = 0;
+ for (var i = indent; i < stats.length; i += indent)
+ score += stats[i] || 0;
+ return score;
+ }
+
+ var changesTotal = changes.reduce(function(a,b){return a+b}, 0);
+
+ var first = {score: 0, length: 0};
+ var spaceIndents = 0;
+ for (var i = 1; i < 12; i++) {
+ if (i == 1) {
+ spaceIndents = getScore(i);
+ var score = 1;
+ } else
+ var score = getScore(i) / spaceIndents;
+
+ if (changes[i]) {
+ score += changes[i] / changesTotal;
+ }
+
+ if (score > first.score)
+ first = {score: score, length: i};
+ }
+
+ if (first.score && first.score > 1.4)
+ var tabLength = first.length;
+
+ if (tabIndents > spaceIndents + 1)
+ return {ch: "\t", length: tabLength};
+
+ if (spaceIndents + 1 > tabIndents)
+ return {ch: " ", length: tabLength};
+};
+
+exports.detectIndentation = function(session) {
+ var lines = session.getLines(0, 1000);
+ var indent = exports.$detectIndentation(lines) || {};
+
+ if (indent.ch)
+ session.setUseSoftTabs(indent.ch == " ");
+
+ if (indent.length)
+ session.setTabSize(indent.length);
+ return indent;
+};
+
+exports.trimTrailingSpace = function(session, trimEmpty) {
+ var doc = session.getDocument();
+ var lines = doc.getAllLines();
+
+ var min = trimEmpty ? -1 : 0;
+
+ for (var i = 0, l=lines.length; i < l; i++) {
+ var line = lines[i];
+ var index = line.search(/\s+$/);
+
+ if (index > min)
+ doc.removeInLine(i, index, line.length);
+ }
+};
+
+exports.convertIndentation = function(session, ch, len) {
+ var oldCh = session.getTabString()[0];
+ var oldLen = session.getTabSize();
+ if (!len) len = oldLen;
+ if (!ch) ch = oldCh;
+
+ var tab = ch == "\t" ? ch: lang.stringRepeat(ch, len);
+
+ var doc = session.doc;
+ var lines = doc.getAllLines();
+
+ var cache = {};
+ var spaceCache = {};
+ for (var i = 0, l=lines.length; i < l; i++) {
+ var line = lines[i];
+ var match = line.match(/^\s*/)[0];
+ if (match) {
+ var w = session.$getStringScreenWidth(match)[0];
+ var tabCount = Math.floor(w/oldLen);
+ var reminder = w%oldLen;
+ var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount));
+ toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder));
+
+ if (toInsert != match) {
+ doc.removeInLine(i, 0, match.length);
+ doc.insertInLine({row: i, column: 0}, toInsert);
+ }
+ }
+ }
+ session.setTabSize(len);
+ session.setUseSoftTabs(ch == " ");
+};
+
+exports.$parseStringArg = function(text) {
+ var indent = {};
+ if (/t/.test(text))
+ indent.ch = "\t";
+ else if (/s/.test(text))
+ indent.ch = " ";
+ var m = text.match(/\d+/);
+ if (m)
+ indent.length = parseInt(m[0], 10);
+ return indent;
+};
+
+exports.$parseArg = function(arg) {
+ if (!arg)
+ return {};
+ if (typeof arg == "string")
+ return exports.$parseStringArg(arg);
+ if (typeof arg.text == "string")
+ return exports.$parseStringArg(arg.text);
+ return arg;
+};
+
+exports.commands = [{
+ name: "detectIndentation",
+ exec: function(editor) {
+ exports.detectIndentation(editor.session);
+ // todo show message?
+ }
+}, {
+ name: "trimTrailingSpace",
+ exec: function(editor) {
+ exports.trimTrailingSpace(editor.session);
+ }
+}, {
+ name: "convertIndentation",
+ exec: function(editor, arg) {
+ var indent = exports.$parseArg(arg);
+ exports.convertIndentation(editor.session, indent.ch, indent.length);
+ }
+}, {
+ name: "setIndentation",
+ exec: function(editor, arg) {
+ var indent = exports.$parseArg(arg);
+ indent.length && editor.session.setTabSize(indent.length);
+ indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");
+ }
+}];
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/incremental_search.js b/src/fauxton/assets/js/libs/ace/incremental_search.js
new file mode 100644
index 000000000..e6fa8928d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/incremental_search.js
@@ -0,0 +1,259 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+var iSearchCommandModule = require("./commands/incremental_search_commands");
+var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler;
+
+/**
+ * @class IncrementalSearch
+ *
+ * Implements immediate searching while the user is typing. When incremental
+ * search is activated, keystrokes into the editor will be used for composing
+ * a search term. Immediately after every keystroke the search is updated:
+ * - so-far-matching characters are highlighted
+ * - the cursor is moved to the next match
+ *
+ **/
+
+
+/**
+ *
+ *
+ * Creates a new `IncrementalSearch` object.
+ *
+ * @constructor
+ **/
+function IncrementalSearch() {
+ this.$options = {wrap: false, skipCurrent: false};
+ this.$keyboardHandler = new ISearchKbd(this);
+}
+
+oop.inherits(IncrementalSearch, Search);
+
+;(function() {
+
+ this.activate = function(ed, backwards) {
+ this.$editor = ed;
+ this.$startPos = this.$currentPos = ed.getCursorPosition();
+ this.$options.needle = '';
+ this.$options.backwards = backwards;
+ ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
+ this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
+ this.selectionFix(ed);
+ this.statusMessage(true);
+ }
+
+ this.deactivate = function(reset) {
+ this.cancelSearch(reset);
+ this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
+ if (this.$mousedownHandler) {
+ this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
+ delete this.$mousedownHandler;
+ }
+ this.message('');
+ }
+
+ this.selectionFix = function(editor) {
+ // Fix selection bug: When clicked inside the editor
+ // editor.selection.$isEmpty is false even if the mouse click did not
+ // open a selection. This is interpreted by the move commands to
+ // extend the selection. To only extend the selection when there is
+ // one, we clear it here
+ if (editor.selection.isEmpty() && !editor.session.$emacsMark) {
+ editor.clearSelection();
+ }
+ }
+
+ this.highlight = function(regexp) {
+ var sess = this.$editor.session,
+ hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_isearch-result", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ }
+
+ this.cancelSearch = function(reset) {
+ var e = this.$editor;
+ this.$prevNeedle = this.$options.needle;
+ this.$options.needle = '';
+ if (reset) {
+ e.moveCursorToPosition(this.$startPos);
+ this.$currentPos = this.$startPos;
+ } else {
+ e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false);
+ }
+ this.highlight(null);
+ return Range.fromPoints(this.$currentPos, this.$currentPos);
+ }
+
+ this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
+ if (!this.$editor) return null;
+ var options = this.$options;
+
+ // get search term
+ if (needleUpdateFunc) {
+ options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
+ }
+ if (options.needle.length === 0) {
+ this.statusMessage(true);
+ return this.cancelSearch(true);
+ };
+
+ // try to find the next occurence and enable highlighting marker
+ options.start = this.$currentPos;
+ var session = this.$editor.session,
+ found = this.find(session);
+ if (found) {
+ if (options.backwards) found = Range.fromPoints(found.end, found.start);
+ this.$editor.moveCursorToPosition(found.end);
+ if (moveToNext) this.$currentPos = found.end;
+ // highlight after cursor move, so selection works properly
+ this.highlight(options.re)
+ }
+
+ this.statusMessage(found);
+
+ return found;
+ }
+
+ this.addChar = function(c) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return needle + c;
+ });
+ }
+
+ this.removeChar = function(c) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return needle.length > 0 ? needle.substring(0, needle.length-1) : needle;
+ });
+ }
+
+ this.next = function(options) {
+ // try to find the next occurence of whatever we have searched for
+ // earlier.
+ // options = {[backwards: BOOL], [useCurrentOrPrevSearch: BOOL]}
+ options = options || {};
+ this.$options.backwards = !!options.backwards;
+ this.$currentPos = this.$editor.getCursorPosition();
+ return this.highlightAndFindWithNeedle(true, function(needle) {
+ return options.useCurrentOrPrevSearch && needle.length === 0 ?
+ this.$prevNeedle || '' : needle;
+ });
+ }
+
+ this.onMouseDown = function(evt) {
+ // when mouse interaction happens then we quit incremental search
+ this.deactivate();
+ return true;
+ }
+
+ this.statusMessage = function(found) {
+ var options = this.$options, msg = '';
+ msg += options.backwards ? 'reverse-' : '';
+ msg += 'isearch: ' + options.needle;
+ msg += found ? '' : ' (not found)';
+ this.message(msg);
+ }
+
+ this.message = function(msg) {
+ if (this.$editor.showCommandLine) {
+ this.$editor.showCommandLine(msg);
+ this.$editor.focus();
+ } else {
+ console.log(msg);
+ }
+ }
+
+}).call(IncrementalSearch.prototype);
+
+
+exports.IncrementalSearch = IncrementalSearch;
+
+
+/**
+ *
+ * Config settings for enabling/disabling [[IncrementalSearch `IncrementalSearch`]].
+ *
+ **/
+
+var dom = require('./lib/dom');
+dom.importCssString && dom.importCssString("\
+.ace_marker-layer .ace_isearch-result {\
+ position: absolute;\
+ z-index: 6;\
+ -moz-box-sizing: border-box;\
+ -webkit-box-sizing: border-box;\
+ box-sizing: border-box;\
+}\
+div.ace_isearch-result {\
+ border-radius: 4px;\
+ background-color: rgba(255, 200, 0, 0.5);\
+ box-shadow: 0 0 4px rgb(255, 200, 0);\
+}\
+.ace_dark div.ace_isearch-result {\
+ background-color: rgb(100, 110, 160);\
+ box-shadow: 0 0 4px rgb(80, 90, 140);\
+}", "incremental-search-highlighting");
+
+// support for default keyboard handler
+var commands = require("./commands/command_manager");
+(function() {
+ this.setupIncrementalSearch = function(editor, val) {
+ if (this.usesIncrementalSearch == val) return;
+ this.usesIncrementalSearch = val;
+ var iSearchCommands = iSearchCommandModule.iSearchStartCommands;
+ var method = val ? 'addCommands' : 'removeCommands';
+ this[method](iSearchCommands);
+ };
+}).call(commands.CommandManager.prototype);
+
+// incremental search config option
+var Editor = require("./editor").Editor;
+require("./config").defineOptions(Editor.prototype, "editor", {
+ useIncrementalSearch: {
+ set: function(val) {
+ this.keyBinding.$handlers.forEach(function(handler) {
+ if (handler.setupIncrementalSearch) {
+ handler.setupIncrementalSearch(this, val);
+ }
+ });
+ this._emit('incrementalSearchSettingChanged', {isEnabled: val});
+ }
+ }
+});
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/incremental_search_test.js b/src/fauxton/assets/js/libs/ace/incremental_search_test.js
new file mode 100644
index 000000000..c351d8e23
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/incremental_search_test.js
@@ -0,0 +1,208 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+var IncrementalSearch = require("./incremental_search").IncrementalSearch;
+
+var editor, iSearch;
+function testRanges(str, ranges) {
+ ranges = ranges || editor.selection.getAllRanges();
+ assert.equal(ranges + "", str + "");
+}
+
+// force "rerender"
+function callHighlighterUpdate() {
+ var session = editor.session,
+ ranges = [],
+ mockMarkerLayer = {
+ drawSingleLineMarker: function(_, markerRanges) {
+ ranges = ranges.concat(markerRanges);
+ }
+ }
+ session.$isearchHighlight.update([], mockMarkerLayer, session, {
+ firstRow: 0, lastRow: session.getRowLength()});
+ return ranges;
+}
+
+module.exports = {
+
+ name: "ACE incremental_search.js",
+
+ setUp: function() {
+ var session = new EditSession(["abc123", "xyz124"]);
+ editor = new Editor(new MockRenderer(), session);
+ iSearch = new IncrementalSearch();
+ },
+
+ "test: keyboard handler setup" : function() {
+ iSearch.activate(editor);
+ assert.equal(editor.getKeyboardHandler(), iSearch.$keyboardHandler);
+ iSearch.deactivate();
+ assert.notEqual(editor.getKeyboardHandler(), iSearch.$keyboardHandler);
+ },
+
+ "test: isearch highlight setup" : function() {
+ var sess = editor.session;
+ iSearch.activate(editor);
+ iSearch.highlight('foo');
+ var highl = sess.$isearchHighlight.id;
+ assert.ok(sess.$isearchHighlight, 'session has no isearch highlighter');
+ assert.equal(sess.getMarkers()[highl.id], highl.id, 'isearch highlight not in markers');
+ iSearch.deactivate();
+ iSearch.activate(editor);
+ iSearch.highlight('bar');
+ var highl2 = sess.$isearchHighlight.id;
+ assert.equal(highl2, highl, 'multiple isearch highlights');
+ },
+
+ "test: find simple text incrementally" : function() {
+ iSearch.activate(editor);
+ var range = iSearch.addChar('1'), // "1"
+ highlightRanges = callHighlighterUpdate(editor.session);
+ testRanges("Range: [0/3] -> [0/4]", [range], "range");
+ testRanges("Range: [0/3] -> [0/4],Range: [1/3] -> [1/4]", highlightRanges, "highlight");
+
+ range = iSearch.addChar('2'); // "12"
+ highlightRanges = callHighlighterUpdate(editor.session);
+ testRanges("Range: [0/3] -> [0/5]", [range], "range");
+ testRanges("Range: [0/3] -> [0/5],Range: [1/3] -> [1/5]", highlightRanges, "highlight");
+
+ range = iSearch.addChar('3'); // "123"
+ highlightRanges = callHighlighterUpdate(editor.session);
+ testRanges("Range: [0/3] -> [0/6]", [range], "range");
+ testRanges("Range: [0/3] -> [0/6]", highlightRanges, "highlight");
+
+ range = iSearch.removeChar(); // "12"
+ highlightRanges = callHighlighterUpdate(editor.session);
+ testRanges("Range: [0/3] -> [0/5]", [range], "range");
+ testRanges("Range: [0/3] -> [0/5],Range: [1/3] -> [1/5]", highlightRanges, "highlight");
+ },
+
+ "test: forward / backward" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');
+ var range = iSearch.next();
+ testRanges("Range: [1/3] -> [1/5]", [range], "range");
+
+ range = iSearch.next(); // nothing to find
+ testRanges("", [range], "range");
+
+ range = iSearch.next({backwards: true}); // backwards
+ testRanges("Range: [1/5] -> [1/3]", [range], "range");
+ },
+
+ "test: cancelSearch" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');
+ var range = iSearch.cancelSearch(true);
+ testRanges("Range: [0/0] -> [0/0]", [range], "range");
+
+ iSearch.addChar('1'); range = iSearch.addChar('2');
+ testRanges("Range: [0/3] -> [0/5]", [range], "range");
+ },
+
+ "test: failing search keeps pos" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');
+ var range = iSearch.addChar('x');
+ testRanges("", [range], "range");
+ assert.position(editor.getCursorPosition(), 0, 5);
+ },
+
+ "test: backwards search" : function() {
+ editor.moveCursorTo(1,0);
+ iSearch.activate(editor, true);
+ iSearch.addChar('1'); var range = iSearch.addChar('2');;
+ testRanges("Range: [0/5] -> [0/3]", [range], "range");
+ assert.position(editor.getCursorPosition(), 0, 3);
+ },
+
+ "test: forwards then backwards, same result, reoriented range" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); var range = iSearch.addChar('2');;
+ testRanges("Range: [0/3] -> [0/5]", [range], "range");
+ assert.position(editor.getCursorPosition(), 0, 5);
+
+ range = iSearch.next({backwards: true});
+ testRanges("Range: [0/5] -> [0/3]", [range], "range");
+ assert.position(editor.getCursorPosition(), 0, 3);
+ },
+
+ "test: reuse prev search via option" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');;
+ assert.position(editor.getCursorPosition(), 0, 5);
+ iSearch.deactivate();
+
+ iSearch.activate(editor);
+ iSearch.next({backwards: false, useCurrentOrPrevSearch: true});
+ assert.position(editor.getCursorPosition(), 1, 5);
+ },
+
+ "test: don't extend selection range if selection is empty" : function() {
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');;
+ testRanges("Range: [0/5] -> [0/5]", [editor.getSelectionRange()], "sel range");
+ },
+
+ "test: extend selection range if selection exists" : function() {
+ iSearch.activate(editor);
+ editor.selection.selectTo(0, 1);
+ iSearch.addChar('1'); iSearch.addChar('2');;
+ testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
+ },
+
+ "test: extend selection in emacs mark mode" : function() {
+ var emacs = require('./keyboard/emacs');
+ editor.keyBinding.addKeyboardHandler(emacs.handler);
+ emacs.handler.commands.setMark.exec(editor);
+ iSearch.activate(editor);
+ iSearch.addChar('1'); iSearch.addChar('2');;
+ testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/emacs.js b/src/fauxton/assets/js/libs/ace/keyboard/emacs.js
new file mode 100644
index 000000000..166c6857a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/emacs.js
@@ -0,0 +1,599 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+require("../incremental_search");
+var iSearchCommandModule = require("../commands/incremental_search_commands");
+
+
+var screenToTextBlockCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var col = Math.floor(
+ (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
+ );
+ var row = Math.floor(
+ (y + this.scrollTop - canvasPos.top) / this.lineHeight
+ );
+
+ return this.session.screenToDocumentPosition(row, col);
+};
+
+var HashHandler = require("./hash_handler").HashHandler;
+exports.handler = new HashHandler();
+
+exports.handler.isEmacs = true;
+exports.handler.$id = "ace/keyboard/emacs";
+
+var initialized = false;
+var $formerLongWords;
+var $formerLineStart;
+
+exports.handler.attach = function(editor) {
+ if (!initialized) {
+ initialized = true;
+ dom.importCssString('\
+ .emacs-mode .ace_cursor{\
+ border: 2px rgba(50,250,50,0.8) solid!important;\
+ -moz-box-sizing: border-box!important;\
+ -webkit-box-sizing: border-box!important;\
+ box-sizing: border-box!important;\
+ background-color: rgba(0,250,0,0.9);\
+ opacity: 0.5;\
+ }\
+ .emacs-mode .ace_hidden-cursors .ace_cursor{\
+ opacity: 1;\
+ background-color: transparent;\
+ }\
+ .emacs-mode .ace_overwrite-cursors .ace_cursor {\
+ opacity: 1;\
+ background-color: transparent;\
+ border-width: 0 0 2px 2px !important;\
+ }\
+ .emacs-mode .ace_text-layer {\
+ z-index: 4\
+ }\
+ .emacs-mode .ace_cursor-layer {\
+ z-index: 2\
+ }', 'emacsMode'
+ );
+ }
+ // in emacs, gotowordleft/right should not count a space as a word..
+ $formerLongWords = editor.session.$selectLongWords;
+ editor.session.$selectLongWords = true;
+ // CTRL-A should go to actual beginning of line
+ $formerLineStart = editor.session.$useEmacsStyleLineStart;
+ editor.session.$useEmacsStyleLineStart = true;
+
+ editor.session.$emacsMark = null; // the active mark
+ editor.session.$emacsMarkRing = editor.session.$emacsMarkRing || [];
+
+ editor.emacsMark = function() {
+ return this.session.$emacsMark;
+ }
+
+ editor.setEmacsMark = function(p) {
+ // to deactivate pass in a falsy value
+ this.session.$emacsMark = p;
+ }
+
+ editor.pushEmacsMark = function(p, activate) {
+ var prevMark = this.session.$emacsMark;
+ if (prevMark)
+ this.session.$emacsMarkRing.push(prevMark);
+ if (!p || activate) this.setEmacsMark(p)
+ else this.session.$emacsMarkRing.push(p);
+ }
+
+ editor.popEmacsMark = function() {
+ var mark = this.emacsMark();
+ if (mark) { this.setEmacsMark(null); return mark; }
+ return this.session.$emacsMarkRing.pop();
+ }
+
+ editor.getLastEmacsMark = function(p) {
+ return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0];
+ }
+
+ editor.on("click", $resetMarkMode);
+ editor.on("changeSession", $kbSessionChange);
+ editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates;
+ editor.setStyle("emacs-mode");
+ editor.commands.addCommands(commands);
+ exports.handler.platform = editor.commands.platform;
+ editor.$emacsModeHandler = this;
+ editor.addEventListener('copy', this.onCopy);
+ editor.addEventListener('paste', this.onPaste);
+};
+
+exports.handler.detach = function(editor) {
+ delete editor.renderer.screenToTextCoordinates;
+ editor.session.$selectLongWords = $formerLongWords;
+ editor.session.$useEmacsStyleLineStart = $formerLineStart;
+ editor.removeEventListener("click", $resetMarkMode);
+ editor.removeEventListener("changeSession", $kbSessionChange);
+ editor.unsetStyle("emacs-mode");
+ editor.commands.removeCommands(commands);
+ editor.removeEventListener('copy', this.onCopy);
+ editor.removeEventListener('paste', this.onPaste);
+};
+
+var $kbSessionChange = function(e) {
+ if (e.oldSession) {
+ e.oldSession.$selectLongWords = $formerLongWords;
+ e.oldSession.$useEmacsStyleLineStart = $formerLineStart;
+ }
+
+ $formerLongWords = e.session.$selectLongWords;
+ e.session.$selectLongWords = true;
+ $formerLineStart = e.session.$useEmacsStyleLineStart;
+ e.session.$useEmacsStyleLineStart = true;
+
+ if (!e.session.hasOwnProperty('$emacsMark'))
+ e.session.$emacsMark = null;
+ if (!e.session.hasOwnProperty('$emacsMarkRing'))
+ e.session.$emacsMarkRing = [];
+}
+
+var $resetMarkMode = function(e) {
+ e.editor.session.$emacsMark = null;
+}
+
+var keys = require("../lib/keys").KEY_MODS,
+ eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"},
+ combinations = ["C-S-M-CMD",
+ "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M",
+ "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S",
+ "CMD", "M", "S", "C"];
+combinations.forEach(function(c) {
+ var hashId = 0;
+ c.split("-").forEach(function(c) {
+ hashId = hashId | keys[eMods[c]];
+ });
+ eMods[hashId] = c.toLowerCase() + "-";
+});
+
+exports.handler.onCopy = function(e, editor) {
+ if (editor.$handlesEmacsOnCopy) return;
+ editor.$handlesEmacsOnCopy = true;
+ exports.handler.commands.killRingSave.exec(editor);
+ delete editor.$handlesEmacsOnCopy;
+}
+
+exports.handler.onPaste = function(e, editor) {
+ editor.pushEmacsMark(editor.getCursorPosition());
+}
+
+exports.handler.bindKey = function(key, command) {
+ if (!key)
+ return;
+
+ var ckb = this.commandKeyBinding;
+ key.split("|").forEach(function(keyPart) {
+ keyPart = keyPart.toLowerCase();
+ ckb[keyPart] = command;
+ // register all partial key combos as null commands
+ // to be able to activate key combos with arbitrary length
+ // Example: if keyPart is "C-c C-l t" then "C-c C-l t" will
+ // get command assigned and "C-c" and "C-c C-l" will get
+ // a null command assigned in this.commandKeyBinding. For
+ // the lookup logic see handleKeyboard()
+ var keyParts = keyPart.split(" ").slice(0,-1);
+ keyParts.reduce(function(keyMapKeys, keyPart, i) {
+ var prefix = keyMapKeys[i-1] ? keyMapKeys[i-1] + ' ' : '';
+ return keyMapKeys.concat([prefix + keyPart]);
+ }, []).forEach(function(keyPart) {
+ if (!ckb[keyPart]) ckb[keyPart] = "null";
+ });
+ }, this);
+}
+
+exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
+ var editor = data.editor;
+ // insertstring data.count times
+ if (hashId == -1) {
+ editor.pushEmacsMark();
+ if (data.count) {
+ var str = Array(data.count + 1).join(key);
+ data.count = null;
+ return {command: "insertstring", args: str};
+ }
+ }
+
+ if (key == "\x00") return undefined;
+
+ var modifier = eMods[hashId];
+
+ // CTRL + number / universalArgument for setting data.count
+ if (modifier == "c-" || data.universalArgument) {
+ var prevCount = String(data.count || 0);
+ var count = parseInt(key[key.length - 1]);
+ if (typeof count === 'number' && !isNaN(count)) {
+ data.count = parseInt(prevCount + count);
+ return {command: "null"};
+ } else if (data.universalArgument) {
+ // if no number pressed use emacs defaults for universalArgument
+ // which is 4
+ data.count = 4;
+ }
+ }
+ data.universalArgument = false;
+
+ // this.commandKeyBinding maps key specs like "c-p" (for CTRL + P) to
+ // command objects, for lookup key needs to include the modifier
+ if (modifier) key = modifier + key;
+
+ // Key combos like CTRL+X H build up the data.keyChain
+ if (data.keyChain) key = data.keyChain += " " + key;
+
+ // Key combo prefixes get stored as "null" (String!) in this
+ // this.commandKeyBinding. When encountered no command is invoked but we
+ // buld up data.keyChain
+ var command = this.commandKeyBinding[key];
+ data.keyChain = command == "null" ? key : "";
+
+ // there really is no command
+ if (!command) return undefined;
+
+ // we pass b/c of key combo or universalArgument
+ if (command === "null") return {command: "null"};
+
+ if (command === "universalArgument") {
+ data.universalArgument = true;
+ return {command: "null"};
+ }
+
+ // lookup command
+ // TODO extract special handling of markmode
+ // TODO special case command.command is really unnecessary, remove
+ var args;
+ if (typeof command !== "string") {
+ args = command.args;
+ if (command.command) command = command.command;
+ if (command === "goorselect") {
+ command = editor.emacsMark() ? args[1] : args[0];
+ args = null;
+ }
+ }
+
+ if (typeof command === "string") {
+ if (command === "insertstring" ||
+ command === "splitline" ||
+ command === "togglecomment") {
+ editor.pushEmacsMark();
+ }
+ command = this.commands[command] || editor.commands.commands[command];
+ if (!command) return undefined;
+ }
+
+ if (!command.readonly && !command.isYank)
+ data.lastCommand = null;
+
+ if (data.count) {
+ var count = data.count;
+ data.count = 0;
+ if (!command || !command.handlesCount) {
+ return {
+ args: args,
+ command: {
+ exec: function(editor, args) {
+ for (var i = 0; i < count; i++)
+ command.exec(editor, args);
+ }
+ }
+ };
+ } else {
+ if (!args) args = {}
+ if (typeof args === 'object') args.count = count;
+ }
+ }
+
+ return {command: command, args: args};
+};
+
+exports.emacsKeys = {
+ // movement
+ "Up|C-p" : {command: "goorselect", args: ["golineup","selectup"]},
+ "Down|C-n" : {command: "goorselect", args: ["golinedown","selectdown"]},
+ "Left|C-b" : {command: "goorselect", args: ["gotoleft","selectleft"]},
+ "Right|C-f" : {command: "goorselect", args: ["gotoright","selectright"]},
+ "C-Left|M-b" : {command: "goorselect", args: ["gotowordleft","selectwordleft"]},
+ "C-Right|M-f" : {command: "goorselect", args: ["gotowordright","selectwordright"]},
+ "Home|C-a" : {command: "goorselect", args: ["gotolinestart","selecttolinestart"]},
+ "End|C-e" : {command: "goorselect", args: ["gotolineend","selecttolineend"]},
+ "C-Home|S-M-,": {command: "goorselect", args: ["gotostart","selecttostart"]},
+ "C-End|S-M-." : {command: "goorselect", args: ["gotoend","selecttoend"]},
+
+ // selection
+ "S-Up|S-C-p" : "selectup",
+ "S-Down|S-C-n" : "selectdown",
+ "S-Left|S-C-b" : "selectleft",
+ "S-Right|S-C-f" : "selectright",
+ "S-C-Left|S-M-b" : "selectwordleft",
+ "S-C-Right|S-M-f" : "selectwordright",
+ "S-Home|S-C-a" : "selecttolinestart",
+ "S-End|S-C-e" : "selecttolineend",
+ "S-C-Home" : "selecttostart",
+ "S-C-End" : "selecttoend",
+
+ "C-l" : "recenterTopBottom",
+ "M-s" : "centerselection",
+ "M-g": "gotoline",
+ "C-x C-p": "selectall",
+
+ // todo fix these
+ "C-Down": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
+ "C-Up": {command: "goorselect", args: ["gotopageup","selectpageup"]},
+ "PageDown|C-v": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
+ "PageUp|M-v": {command: "goorselect", args: ["gotopageup","selectpageup"]},
+ "S-C-Down": "selectpagedown",
+ "S-C-Up": "selectpageup",
+
+ "C-s": "iSearch",
+ "C-r": "iSearchBackwards",
+
+ "M-C-s": "findnext",
+ "M-C-r": "findprevious",
+ "S-M-5": "replace",
+
+ // basic editing
+ "Backspace": "backspace",
+ "Delete|C-d": "del",
+ "Return|C-m": {command: "insertstring", args: "\n"}, // "newline"
+ "C-o": "splitline",
+
+ "M-d|C-Delete": {command: "killWord", args: "right"},
+ "C-Backspace|M-Backspace|M-Delete": {command: "killWord", args: "left"},
+ "C-k": "killLine",
+
+ "C-y|S-Delete": "yank",
+ "M-y": "yankRotate",
+ "C-g": "keyboardQuit",
+
+ "C-w": "killRegion",
+ "M-w": "killRingSave",
+ "C-Space": "setMark",
+ "C-x C-x": "exchangePointAndMark",
+
+ "C-t": "transposeletters",
+ "M-u": "touppercase", // Doesn't work
+ "M-l": "tolowercase",
+ "M-/": "autocomplete", // Doesn't work
+ "C-u": "universalArgument",
+
+ "M-;": "togglecomment",
+
+ "C-/|C-x u|S-C--|C-z": "undo",
+ "S-C-/|S-C-x u|C--|S-C-z": "redo", //infinite undo?
+ // vertical editing
+ "C-x r": "selectRectangularRegion",
+ "M-x": {command: "focusCommandLine", args: "M-x "}
+ // todo
+ // "C-x C-t" "M-t" "M-c" "F11" "C-M- "M-q"
+};
+
+
+exports.handler.bindKeys(exports.emacsKeys);
+
+exports.handler.addCommands({
+ recenterTopBottom: function(editor) {
+ var renderer = editor.renderer;
+ var pos = renderer.$cursorLayer.getPixelPosition();
+ var h = renderer.$size.scrollerHeight - renderer.lineHeight;
+ var scrollTop = renderer.scrollTop;
+ if (Math.abs(pos.top - scrollTop) < 2) {
+ scrollTop = pos.top - h;
+ } else if (Math.abs(pos.top - scrollTop - h * 0.5) < 2) {
+ scrollTop = pos.top;
+ } else {
+ scrollTop = pos.top - h * 0.5;
+ }
+ editor.session.setScrollTop(scrollTop);
+ },
+ selectRectangularRegion: function(editor) {
+ editor.multiSelect.toggleBlockSelection();
+ },
+ setMark: {
+ exec: function(editor, args) {
+ // Sets mark-mode and clears current selection.
+ // When mark is set, keyboard cursor movement commands become
+ // selection modification commands. That is,
+ // "goto" commands become "select" commands.
+ // Any insertion or mouse click resets mark-mode.
+ // setMark twice in a row at the same place resets markmode
+ if (args && args.count) {
+ var mark = editor.popEmacsMark();
+ mark && editor.selection.moveCursorToPosition(mark);
+ return;
+ }
+
+ var mark = editor.emacsMark(),
+ transientMarkModeActive = true;
+
+ // if transientMarkModeActive then mark behavior is a little
+ // different. Deactivate the mark when setMark is run with active
+ // mark
+ if (transientMarkModeActive && (mark || !editor.selection.isEmpty())) {
+ editor.pushEmacsMark();
+ editor.clearSelection();
+ return;
+ }
+
+ if (mark) {
+ var cp = editor.getCursorPosition();
+ if (editor.selection.isEmpty() &&
+ mark.row == cp.row && mark.column == cp.column) {
+ editor.pushEmacsMark();
+ return;
+ }
+ }
+ // turn on mark mode
+ mark = editor.getCursorPosition();
+ editor.setEmacsMark(mark);
+ editor.selection.setSelectionAnchor(mark.row, mark.column);
+ },
+ readonly: true,
+ handlesCount: true,
+ multiSelectAction: "forEach"
+ },
+ exchangePointAndMark: {
+ exec: function(editor, args) {
+ var sel = editor.selection;
+ if (args.count) {
+ var pos = editor.getCursorPosition();
+ sel.clearSelection();
+ sel.moveCursorToPosition(editor.popEmacsMark());
+ editor.pushEmacsMark(pos);
+ return;
+ }
+ var lastMark = editor.getLastEmacsMark();
+ var range = sel.getRange();
+ if (range.isEmpty()) {
+ sel.selectToPosition(lastMark);
+ return;
+ }
+ sel.setSelectionRange(range, !sel.isBackwards());
+ },
+ readonly: true,
+ handlesCount: true,
+ multiSelectAction: "forEach"
+ },
+ killWord: {
+ exec: function(editor, dir) {
+ editor.clearSelection();
+ if (dir == "left")
+ editor.selection.selectWordLeft();
+ else
+ editor.selection.selectWordRight();
+
+ var range = editor.getSelectionRange();
+ var text = editor.session.getTextRange(range);
+ exports.killRing.add(text);
+
+ editor.session.remove(range);
+ editor.clearSelection();
+ },
+ multiSelectAction: "forEach"
+ },
+ killLine: function(editor) {
+ editor.pushEmacsMark(null);
+ var pos = editor.getCursorPosition();
+ if (pos.column == 0 &&
+ editor.session.doc.getLine(pos.row).length == 0) {
+ // If an already empty line is killed, remove
+ // the line entirely
+ editor.selection.selectLine();
+ } else {
+ // otherwise just remove from the current cursor position
+ // to the end (but don't delete the selection if it's before
+ // the cursor)
+ editor.clearSelection();
+ editor.selection.selectLineEnd();
+ }
+ var range = editor.getSelectionRange();
+ var text = editor.session.getTextRange(range);
+ exports.killRing.add(text);
+
+ editor.session.remove(range);
+ editor.clearSelection();
+ },
+ yank: function(editor) {
+ editor.onPaste(exports.killRing.get() || '');
+ editor.keyBinding.$data.lastCommand = "yank";
+ },
+ yankRotate: function(editor) {
+ if (editor.keyBinding.$data.lastCommand != "yank")
+ return;
+ editor.undo();
+ editor.onPaste(exports.killRing.rotate());
+ editor.keyBinding.$data.lastCommand = "yank";
+ },
+ killRegion: {
+ exec: function(editor) {
+ exports.killRing.add(editor.getCopyText());
+ editor.commands.byName.cut.exec(editor);
+ },
+ readonly: true,
+ multiSelectAction: "forEach"
+ },
+ killRingSave: {
+ exec: function(editor) {
+ exports.killRing.add(editor.getCopyText());
+ setTimeout(function() {
+ var sel = editor.selection,
+ range = sel.getRange();
+ editor.pushEmacsMark(sel.isBackwards() ? range.end : range.start);
+ sel.clearSelection();
+ }, 0);
+ },
+ readonly: true
+ },
+ keyboardQuit: function(editor) {
+ editor.selection.clearSelection();
+ editor.setEmacsMark(null);
+ },
+ focusCommandLine: function(editor, arg) {
+ if (editor.showCommandLine)
+ editor.showCommandLine(arg);
+ }
+});
+
+exports.handler.addCommands(iSearchCommandModule.iSearchStartCommands);
+
+var commands = exports.handler.commands;
+commands.yank.isYank = true;
+commands.yankRotate.isYank = true;
+
+exports.killRing = {
+ $data: [],
+ add: function(str) {
+ str && this.$data.push(str);
+ if (this.$data.length > 30)
+ this.$data.shift();
+ },
+ get: function(n) {
+ n = n || 1;
+ return this.$data.slice(this.$data.length-n, this.$data.length).reverse().join('\n');
+ },
+ pop: function() {
+ if (this.$data.length > 1)
+ this.$data.pop();
+ return this.get();
+ },
+ rotate: function() {
+ this.$data.unshift(this.$data.pop());
+ return this.get();
+ }
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/emacs_test.js b/src/fauxton/assets/js/libs/ace/keyboard/emacs_test.js
new file mode 100644
index 000000000..d1aba564d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/emacs_test.js
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./../edit_session").EditSession,
+ Editor = require("./../editor").Editor,
+ MockRenderer = require("./../test/mockrenderer").MockRenderer,
+ emacs = require('./emacs'),
+ assert = require("./../test/assertions"),
+ editor;
+
+function initEditor(docString) {
+ var doc = new EditSession(docString.split("\n"));
+ editor = new Editor(new MockRenderer(), doc);
+ editor.setKeyboardHandler(emacs.handler);
+}
+
+module.exports = {
+
+ "test: detach removes emacs commands from command manager": function() {
+ initEditor('');
+ assert.ok(!!editor.commands.byName["keyboardQuit"], 'setup error: emacs commands not installed');
+ editor.keyBinding.removeKeyboardHandler(editor.getKeyboardHandler());
+ assert.ok(!editor.commands.byName["keyboardQuit"], 'emacs commands not removed');
+ },
+
+ "test: keyboardQuit clears selection": function() {
+ initEditor('foo');
+ editor.selectAll();
+ editor.execCommand('keyboardQuit');
+ assert.ok(editor.selection.isEmpty(), 'selection non-empty');
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/hash_handler.js b/src/fauxton/assets/js/libs/ace/keyboard/hash_handler.js
new file mode 100644
index 000000000..baa88158d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/hash_handler.js
@@ -0,0 +1,195 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var keyUtil = require("../lib/keys");
+var useragent = require("../lib/useragent");
+
+function HashHandler(config, platform) {
+ this.platform = platform || (useragent.isMac ? "mac" : "win");
+ this.commands = {};
+ this.commandKeyBinding = {};
+
+ // todo remove this after a while
+ if (this.__defineGetter__ && this.__defineSetter__ && typeof console != "undefined" && console.error) {
+ var warned = false;
+ var warn = function() {
+ if (!warned) {
+ warned = true;
+ console.error("commmandKeyBinding has too many m's. use commandKeyBinding");
+ }
+ };
+ this.__defineGetter__("commmandKeyBinding", function() {
+ warn();
+ return this.commandKeyBinding;
+ });
+ this.__defineSetter__("commmandKeyBinding", function(val) {
+ warn();
+ return this.commandKeyBinding = val;
+ });
+ } else {
+ this.commmandKeyBinding = this.commandKeyBinding;
+ }
+
+ this.addCommands(config);
+};
+
+(function() {
+
+ this.addCommand = function(command) {
+ if (this.commands[command.name])
+ this.removeCommand(command);
+
+ this.commands[command.name] = command;
+
+ if (command.bindKey)
+ this._buildKeyHash(command);
+ };
+
+ this.removeCommand = function(command) {
+ var name = (typeof command === 'string' ? command : command.name);
+ command = this.commands[name];
+ delete this.commands[name];
+
+ // exhaustive search is brute force but since removeCommand is
+ // not a performance critical operation this should be OK
+ var ckb = this.commandKeyBinding;
+ for (var hashId in ckb) {
+ for (var key in ckb[hashId]) {
+ if (ckb[hashId][key] == command)
+ delete ckb[hashId][key];
+ }
+ }
+ };
+
+ this.bindKey = function(key, command) {
+ if(!key)
+ return;
+ if (typeof command == "function") {
+ this.addCommand({exec: command, bindKey: key, name: command.name || key});
+ return;
+ }
+
+ var ckb = this.commandKeyBinding;
+ key.split("|").forEach(function(keyPart) {
+ var binding = this.parseKeys(keyPart, command);
+ var hashId = binding.hashId;
+ (ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
+ }, this);
+ };
+
+ this.addCommands = function(commands) {
+ commands && Object.keys(commands).forEach(function(name) {
+ var command = commands[name];
+ if (!command)
+ return;
+
+ if (typeof command === "string")
+ return this.bindKey(command, name);
+
+ if (typeof command === "function")
+ command = { exec: command };
+
+ if (!command.name)
+ command.name = name;
+
+ this.addCommand(command);
+ }, this);
+ };
+
+ this.removeCommands = function(commands) {
+ Object.keys(commands).forEach(function(name) {
+ this.removeCommand(commands[name]);
+ }, this);
+ };
+
+ this.bindKeys = function(keyList) {
+ Object.keys(keyList).forEach(function(key) {
+ this.bindKey(key, keyList[key]);
+ }, this);
+ };
+
+ this._buildKeyHash = function(command) {
+ var binding = command.bindKey;
+ if (!binding)
+ return;
+
+ var key = typeof binding == "string" ? binding: binding[this.platform];
+ this.bindKey(key, command);
+ };
+
+ // accepts keys in the form ctrl+Enter or ctrl-Enter
+ // keys without modifiers or shift only
+ this.parseKeys = function(keys) {
+ // todo support keychains
+ if (keys.indexOf(" ") != -1)
+ keys = keys.split(/\s+/).pop();
+
+ var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x});
+ var key = parts.pop();
+
+ var keyCode = keyUtil[key];
+ if (keyUtil.FUNCTION_KEYS[keyCode])
+ key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();
+ else if (!parts.length)
+ return {key: key, hashId: -1};
+ else if (parts.length == 1 && parts[0] == "shift")
+ return {key: key.toUpperCase(), hashId: -1};
+
+ var hashId = 0;
+ for (var i = parts.length; i--;) {
+ var modifier = keyUtil.KEY_MODS[parts[i]];
+ if (modifier == null) {
+ if (typeof console != "undefined")
+ console.error("invalid modifier " + parts[i] + " in " + keys);
+ return false;
+ }
+ hashId |= modifier;
+ }
+ return {key: key, hashId: hashId};
+ };
+
+ this.findKeyCommand = function findKeyCommand(hashId, keyString) {
+ var ckbr = this.commandKeyBinding;
+ return ckbr[hashId] && ckbr[hashId][keyString];
+ };
+
+ this.handleKeyboard = function(data, hashId, keyString, keyCode) {
+ return {
+ command: this.findKeyCommand(hashId, keyString)
+ };
+ };
+
+}).call(HashHandler.prototype)
+
+exports.HashHandler = HashHandler;
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/keybinding.js b/src/fauxton/assets/js/libs/ace/keyboard/keybinding.js
new file mode 100644
index 000000000..2a1a22306
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/keybinding.js
@@ -0,0 +1,136 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var keyUtil = require("../lib/keys");
+var event = require("../lib/event");
+
+var KeyBinding = function(editor) {
+ this.$editor = editor;
+ this.$data = { };
+ this.$handlers = [];
+ this.setDefaultHandler(editor.commands);
+};
+
+(function() {
+ this.setDefaultHandler = function(kb) {
+ this.removeKeyboardHandler(this.$defaultHandler);
+ this.$defaultHandler = kb;
+ this.addKeyboardHandler(kb, 0);
+ this.$data = {editor: this.$editor};
+ };
+
+ this.setKeyboardHandler = function(kb) {
+ var h = this.$handlers;
+ if (h[h.length - 1] == kb)
+ return;
+
+ while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)
+ this.removeKeyboardHandler(h[h.length - 1]);
+
+ this.addKeyboardHandler(kb, 1);
+ };
+
+ this.addKeyboardHandler = function(kb, pos) {
+ if (!kb)
+ return;
+ var i = this.$handlers.indexOf(kb);
+ if (i != -1)
+ this.$handlers.splice(i, 1);
+
+ if (pos == undefined)
+ this.$handlers.push(kb);
+ else
+ this.$handlers.splice(pos, 0, kb);
+
+ if (i == -1 && kb.attach)
+ kb.attach(this.$editor);
+ };
+
+ this.removeKeyboardHandler = function(kb) {
+ var i = this.$handlers.indexOf(kb);
+ if (i == -1)
+ return false;
+ this.$handlers.splice(i, 1);
+ kb.detach && kb.detach(this.$editor);
+ return true;
+ };
+
+ this.getKeyboardHandler = function() {
+ return this.$handlers[this.$handlers.length - 1];
+ };
+
+ this.$callKeyboardHandlers = function (hashId, keyString, keyCode, e) {
+ var toExecute;
+ var success = false;
+ var commands = this.$editor.commands;
+
+ for (var i = this.$handlers.length; i--;) {
+ toExecute = this.$handlers[i].handleKeyboard(
+ this.$data, hashId, keyString, keyCode, e
+ );
+ if (!toExecute || !toExecute.command)
+ continue;
+
+ // allow keyboardHandler to consume keys
+ if (toExecute.command == "null") {
+ success = true;
+ } else {
+ success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);
+ }
+ // do not stop input events to not break repeating
+ if (success && e && hashId != -1 &&
+ toExecute.passEvent != true && toExecute.command.passEvent != true
+ ) {
+ event.stopEvent(e);
+ }
+ if (success)
+ break;
+ }
+ return success;
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
+ };
+
+ this.onTextInput = function(text) {
+ var success = this.$callKeyboardHandlers(-1, text);
+ if (!success)
+ this.$editor.commands.exec("insertstring", this.$editor, text);
+ };
+
+}).call(KeyBinding.prototype);
+
+exports.KeyBinding = KeyBinding;
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/keybinding_test.js b/src/fauxton/assets/js/libs/ace/keyboard/keybinding_test.js
new file mode 100644
index 000000000..617d99c43
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/keybinding_test.js
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./../edit_session").EditSession,
+ Editor = require("./../editor").Editor,
+ MockRenderer = require("./../test/mockrenderer").MockRenderer,
+ assert = require("./../test/assertions"),
+ HashHandler = require('./hash_handler').HashHandler,
+ keys = require('../lib/keys'),
+ editor;
+
+function initEditor(docString) {
+ var doc = new EditSession(docString.split("\n"));
+ editor = new Editor(new MockRenderer(), doc);
+}
+
+module.exports = {
+
+ "test: adding a new keyboard handler does not remove the default handler": function() {
+ initEditor('abc');
+ var handler = new HashHandler({'del': 'f1'});
+ editor.keyBinding.setKeyboardHandler(handler);
+ editor.onCommandKey({}, 0, keys['f1']);
+ assert.equal('bc', editor.getValue(), "binding of new handler");
+ editor.onCommandKey({}, 0, keys['delete']);
+ assert.equal('c', editor.getValue(), "bindings of the old handler should still work");
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/state_handler.js b/src/fauxton/assets/js/libs/ace/keyboard/state_handler.js
new file mode 100644
index 000000000..8265bbe13
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/state_handler.js
@@ -0,0 +1,249 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+// If you're developing a new keymapping and want to get an idea what's going
+// on, then enable debugging.
+var DEBUG = false;
+
+function StateHandler(keymapping) {
+ this.keymapping = this.$buildKeymappingRegex(keymapping);
+}
+
+StateHandler.prototype = {
+ /*
+ * Build the RegExp from the keymapping as RegExp can't stored directly
+ * in the metadata JSON and as the RegExp used to match the keys/buffer
+ * need to be adapted.
+ */
+ $buildKeymappingRegex: function(keymapping) {
+ for (var state in keymapping) {
+ this.$buildBindingsRegex(keymapping[state]);
+ }
+ return keymapping;
+ },
+
+ $buildBindingsRegex: function(bindings) {
+ // Escape a given Regex string.
+ bindings.forEach(function(binding) {
+ if (binding.key) {
+ binding.key = new RegExp('^' + binding.key + '$');
+ } else if (Array.isArray(binding.regex)) {
+ if (!('key' in binding))
+ binding.key = new RegExp('^' + binding.regex[1] + '$');
+ binding.regex = new RegExp(binding.regex.join('') + '$');
+ } else if (binding.regex) {
+ binding.regex = new RegExp(binding.regex + '$');
+ }
+ });
+ },
+
+ $composeBuffer: function(data, hashId, key, e) {
+ // Initialize the data object.
+ if (data.state == null || data.buffer == null) {
+ data.state = "start";
+ data.buffer = "";
+ }
+
+ var keyArray = [];
+ if (hashId & 1) keyArray.push("ctrl");
+ if (hashId & 8) keyArray.push("command");
+ if (hashId & 2) keyArray.push("option");
+ if (hashId & 4) keyArray.push("shift");
+ if (key) keyArray.push(key);
+
+ var symbolicName = keyArray.join("-");
+ var bufferToUse = data.buffer + symbolicName;
+
+ // Don't add the symbolic name to the key buffer if the alt_ key is
+ // part of the symbolic name. If it starts with alt_, this means
+ // that the user hit an alt keycombo and there will be a single,
+ // new character detected after this event, which then will be
+ // added to the buffer (e.g. alt_j will result in ∆).
+ //
+ // We test for 2 and not for & 2 as we only want to exclude the case where
+ // the option key is pressed alone.
+ if (hashId != 2) {
+ data.buffer = bufferToUse;
+ }
+
+ var bufferObj = {
+ bufferToUse: bufferToUse,
+ symbolicName: symbolicName
+ };
+
+ if (e) {
+ bufferObj.keyIdentifier = e.keyIdentifier;
+ }
+
+ return bufferObj;
+ },
+
+ $find: function(data, buffer, symbolicName, hashId, key, keyIdentifier) {
+ // Holds the command to execute and the args if a command matched.
+ var result = {};
+
+ // Loop over all the bindings of the keymap until a match is found.
+ this.keymapping[data.state].some(function(binding) {
+ var match;
+
+ // Check if the key matches.
+ if (binding.key && !binding.key.test(symbolicName)) {
+ return false;
+ }
+
+ // Check if the regex matches.
+ if (binding.regex && !(match = binding.regex.exec(buffer))) {
+ return false;
+ }
+
+ // Check if the match function matches.
+ if (binding.match && !binding.match(buffer, hashId, key, symbolicName, keyIdentifier)) {
+ return false;
+ }
+
+ // Check for disallowed matches.
+ if (binding.disallowMatches) {
+ for (var i = 0; i < binding.disallowMatches.length; i++) {
+ if (!!match[binding.disallowMatches[i]]) {
+ return false;
+ }
+ }
+ }
+
+ // If there is a command to execute, then figure out the
+ // command and the arguments.
+ if (binding.exec) {
+ result.command = binding.exec;
+
+ // Build the arguments.
+ if (binding.params) {
+ var value;
+ result.args = {};
+ binding.params.forEach(function(param) {
+ if (param.match != null && match != null) {
+ value = match[param.match] || param.defaultValue;
+ } else {
+ value = param.defaultValue;
+ }
+
+ if (param.type === 'number') {
+ value = parseInt(value);
+ }
+
+ result.args[param.name] = value;
+ });
+ }
+ data.buffer = "";
+ }
+
+ // Handle the 'then' property.
+ if (binding.then) {
+ data.state = binding.then;
+ data.buffer = "";
+ }
+
+ // If no command is set, then execute the "null" fake command.
+ if (result.command == null) {
+ result.command = "null";
+ }
+
+ if (DEBUG) {
+ console.log("KeyboardStateMapper#find", binding);
+ }
+ return true;
+ });
+
+ if (result.command) {
+ return result;
+ } else {
+ data.buffer = "";
+ return false;
+ }
+ },
+
+ /*
+ * This function is called by keyBinding.
+ */
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
+ if (hashId == -1)
+ hashId = 0
+ // If we pressed any command key but no other key, then ignore the input.
+ // Otherwise "shift-" is added to the buffer, and later on "shift-g"
+ // which results in "shift-shift-g" which doesn't make sense.
+ if (hashId != 0 && (key == "" || key == String.fromCharCode(0))) {
+ return null;
+ }
+
+ // Compute the current value of the keyboard input buffer.
+ var r = this.$composeBuffer(data, hashId, key, e);
+ var buffer = r.bufferToUse;
+ var symbolicName = r.symbolicName;
+ var keyId = r.keyIdentifier;
+
+ r = this.$find(data, buffer, symbolicName, hashId, key, keyId);
+ if (DEBUG) {
+ console.log("KeyboardStateMapper#match", buffer, symbolicName, r);
+ }
+
+ return r;
+ }
+}
+
+/*
+ * This is a useful matching function and therefore is defined here so that
+ * users of KeyboardStateMapper can use it.
+ *
+ * @return {Boolean} If no command key (Command|Option|Shift|Ctrl) is pressed, it
+ * returns true. If the only the Shift key is pressed + a character
+ * true is returned as well. Otherwise, false is returned.
+ * Summing up, the function returns true whenever the user typed
+ * a normal character on the keyboard and no shortcut.
+ */
+exports.matchCharacterOnly = function(buffer, hashId, key, symbolicName) {
+ // If no command keys are pressed, then catch the input.
+ if (hashId == 0) {
+ return true;
+ }
+ // If only the shift key is pressed and a character key, then
+ // catch that input as well.
+ else if ((hashId == 4) && key.length == 1) {
+ return true;
+ }
+ // Otherwise, we let the input got through.
+ else {
+ return false;
+ }
+};
+
+exports.StateHandler = StateHandler;
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/textinput.js b/src/fauxton/assets/js/libs/ace/keyboard/textinput.js
new file mode 100644
index 000000000..ee09b2096
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/textinput.js
@@ -0,0 +1,503 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var BROKEN_SETDATA = useragent.isChrome < 18;
+
+var TextInput = function(parentNode, host) {
+ var text = dom.createElement("textarea");
+ text.className = "ace_text-input";
+
+ if (useragent.isTouchPad)
+ text.setAttribute("x-palm-disable-auto-cap", true);
+
+ text.wrap = "off";
+ text.autocorrect = "off";
+ text.autocapitalize = "off";
+ text.spellcheck = false;
+
+ text.style.opacity = "0";
+ parentNode.insertBefore(text, parentNode.firstChild);
+
+ var PLACEHOLDER = "\x01\x01";
+
+ var cut = false;
+ var copied = false;
+ var pasted = false;
+ var inComposition = false;
+ var tempStyle = '';
+ var isSelectionEmpty = true;
+
+ // FOCUS
+ // ie9 throws error if document.activeElement is accessed too soon
+ try { var isFocused = document.activeElement === text; } catch(e) {}
+
+ event.addListener(text, "blur", function() {
+ host.onBlur();
+ isFocused = false;
+ });
+ event.addListener(text, "focus", function() {
+ isFocused = true;
+ host.onFocus();
+ resetSelection();
+ });
+ this.focus = function() { text.focus(); };
+ this.blur = function() { text.blur(); };
+ this.isFocused = function() {
+ return isFocused;
+ };
+
+ // modifying selection of blured textarea can focus it (chrome mac/linux)
+ var syncSelection = lang.delayedCall(function() {
+ isFocused && resetSelection(isSelectionEmpty);
+ });
+ var syncValue = lang.delayedCall(function() {
+ if (!inComposition) {
+ text.value = PLACEHOLDER;
+ isFocused && resetSelection();
+ }
+ });
+
+ function resetSelection(isEmpty) {
+ if (inComposition)
+ return;
+ if (inputHandler) {
+ selectionStart = 0;
+ selectionEnd = isEmpty ? 0 : text.value.length - 1;
+ } else {
+ var selectionStart = isEmpty ? 2 : 1;
+ var selectionEnd = 2;
+ }
+ // on firefox this throws if textarea is hidden
+ try {
+ text.setSelectionRange(selectionStart, selectionEnd);
+ } catch(e){}
+ }
+
+ function resetValue() {
+ if (inComposition)
+ return;
+ text.value = PLACEHOLDER;
+ //http://code.google.com/p/chromium/issues/detail?id=76516
+ if (useragent.isWebKit)
+ syncValue.schedule();
+ }
+
+ useragent.isWebKit || host.addEventListener('changeSelection', function() {
+ if (host.selection.isEmpty() != isSelectionEmpty) {
+ isSelectionEmpty = !isSelectionEmpty;
+ syncSelection.schedule();
+ }
+ });
+
+ resetValue();
+ if (isFocused)
+ host.onFocus();
+
+
+ var isAllSelected = function(text) {
+ return text.selectionStart === 0 && text.selectionEnd === text.value.length;
+ };
+ // IE8 does not support setSelectionRange
+ if (!text.setSelectionRange && text.createTextRange) {
+ text.setSelectionRange = function(selectionStart, selectionEnd) {
+ var range = this.createTextRange();
+ range.collapse(true);
+ range.moveStart('character', selectionStart);
+ range.moveEnd('character', selectionEnd);
+ range.select();
+ };
+ isAllSelected = function(text) {
+ try {
+ var range = text.ownerDocument.selection.createRange();
+ }catch(e) {}
+ if (!range || range.parentElement() != text) return false;
+ return range.text == text.value;
+ }
+ }
+ if (useragent.isOldIE) {
+ var inPropertyChange = false;
+ var onPropertyChange = function(e){
+ if (inPropertyChange)
+ return;
+ var data = text.value;
+ if (inComposition || !data || data == PLACEHOLDER)
+ return;
+ // can happen either after delete or during insert operation
+ if (e && data == PLACEHOLDER[0])
+ return syncProperty.schedule();
+
+ sendText(data);
+ // ie8 calls propertychange handlers synchronously!
+ inPropertyChange = true;
+ resetValue();
+ inPropertyChange = false;
+ };
+ var syncProperty = lang.delayedCall(onPropertyChange);
+ event.addListener(text, "propertychange", onPropertyChange);
+
+ var keytable = { 13:1, 27:1 };
+ event.addListener(text, "keyup", function (e) {
+ if (inComposition && (!text.value || keytable[e.keyCode]))
+ setTimeout(onCompositionEnd, 0);
+ if ((text.value.charCodeAt(0)||0) < 129) {
+ return syncProperty.call();
+ }
+ inComposition ? onCompositionUpdate() : onCompositionStart();
+ });
+ // when user presses backspace after focusing the editor
+ // propertychange isn't called for the next character
+ event.addListener(text, "keydown", function (e) {
+ syncProperty.schedule(50);
+ });
+ }
+
+ var onSelect = function(e) {
+ if (cut) {
+ cut = false;
+ } else if (copied) {
+ copied = false;
+ } else if (isAllSelected(text)) {
+ host.selectAll();
+ resetSelection();
+ } else if (inputHandler) {
+ resetSelection(host.selection.isEmpty());
+ }
+ };
+
+ var inputHandler = null;
+ this.setInputHandler = function(cb) {inputHandler = cb};
+ this.getInputHandler = function() {return inputHandler};
+ var afterContextMenu = false;
+
+ var sendText = function(data) {
+ if (inputHandler) {
+ data = inputHandler(data);
+ inputHandler = null;
+ }
+ if (pasted) {
+ resetSelection();
+ if (data)
+ host.onPaste(data);
+ pasted = false;
+ } else if (data == PLACEHOLDER.charAt(0)) {
+ if (afterContextMenu)
+ host.execCommand("del", {source: "ace"});
+ } else {
+ if (data.substring(0, 2) == PLACEHOLDER)
+ data = data.substr(2);
+ else if (data.charAt(0) == PLACEHOLDER.charAt(0))
+ data = data.substr(1);
+ else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+ // can happen if undo in textarea isn't stopped
+ if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+
+ if (data)
+ host.onTextInput(data);
+ }
+ if (afterContextMenu)
+ afterContextMenu = false;
+ };
+ var onInput = function(e) {
+ // console.log("onInput", inComposition)
+ if (inComposition)
+ return;
+ var data = text.value;
+ sendText(data);
+ resetValue();
+ };
+
+ var onCut = function(e) {
+ var data = host.getCopyText();
+ if (!data) {
+ event.preventDefault(e);
+ return;
+ }
+
+ var clipboardData = e.clipboardData || window.clipboardData;
+
+ if (clipboardData && !BROKEN_SETDATA) {
+ // Safari 5 has clipboardData object, but does not handle setData()
+ var supported = clipboardData.setData("Text", data);
+ if (supported) {
+ host.onCut();
+ event.preventDefault(e);
+ }
+ }
+
+ if (!supported) {
+ cut = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ cut = false;
+ resetValue();
+ resetSelection();
+ host.onCut();
+ });
+ }
+ };
+
+ var onCopy = function(e) {
+ var data = host.getCopyText();
+ if (!data) {
+ event.preventDefault(e);
+ return;
+ }
+
+ var clipboardData = e.clipboardData || window.clipboardData;
+ if (clipboardData && !BROKEN_SETDATA) {
+ // Safari 5 has clipboardData object, but does not handle setData()
+ var supported = clipboardData.setData("Text", data);
+ if (supported) {
+ host.onCopy();
+ event.preventDefault(e);
+ }
+ }
+ if (!supported) {
+ copied = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ copied = false;
+ resetValue();
+ resetSelection();
+ host.onCopy();
+ });
+ }
+ };
+
+ var onPaste = function(e) {
+ var clipboardData = e.clipboardData || window.clipboardData;
+
+ if (clipboardData) {
+ var data = clipboardData.getData("Text");
+ if (data)
+ host.onPaste(data);
+ if (useragent.isIE)
+ setTimeout(resetSelection);
+ event.preventDefault(e);
+ }
+ else {
+ text.value = "";
+ pasted = true;
+ }
+ };
+
+ event.addCommandKeyListener(text, host.onCommandKey.bind(host));
+
+ event.addListener(text, "select", onSelect);
+
+ event.addListener(text, "input", onInput);
+
+ event.addListener(text, "cut", onCut);
+ event.addListener(text, "copy", onCopy);
+ event.addListener(text, "paste", onPaste);
+
+
+ // Opera has no clipboard events
+ if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)){
+ event.addListener(parentNode, "keydown", function(e) {
+ if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)
+ return;
+
+ switch (e.keyCode) {
+ case 67:
+ onCopy(e);
+ break;
+ case 86:
+ onPaste(e);
+ break;
+ case 88:
+ onCut(e);
+ break;
+ }
+ });
+ }
+
+
+ // COMPOSITION
+ var onCompositionStart = function(e) {
+ if (inComposition) return;
+ // console.log("onCompositionStart", inComposition)
+ inComposition = {};
+ host.onCompositionStart();
+ setTimeout(onCompositionUpdate, 0);
+ host.on("mousedown", onCompositionEnd);
+ if (!host.selection.isEmpty()) {
+ host.insert("");
+ host.session.markUndoGroup();
+ host.selection.clearSelection();
+ }
+ host.session.markUndoGroup();
+ };
+
+ var onCompositionUpdate = function() {
+ // console.log("onCompositionUpdate", inComposition && JSON.stringify(text.value))
+ if (!inComposition) return;
+ var val = text.value.replace(/\x01/g, "");
+ if (inComposition.lastValue === val) return;
+
+ host.onCompositionUpdate(val);
+ if (inComposition.lastValue)
+ host.undo();
+ inComposition.lastValue = val;
+ if (inComposition.lastValue) {
+ var r = host.selection.getRange();
+ host.insert(inComposition.lastValue);
+ host.session.markUndoGroup();
+ inComposition.range = host.selection.getRange();
+ host.selection.setRange(r);
+ host.selection.clearSelection();
+ }
+ };
+
+ var onCompositionEnd = function(e) {
+ // console.log("onCompositionEnd", inComposition &&inComposition.lastValue)
+ var c = inComposition;
+ inComposition = false;
+ var timer = setTimeout(function() {
+ timer = null;
+ var str = text.value.replace(/\x01/g, "");
+ // console.log(str, c.lastValue)
+ if (inComposition)
+ return
+ else if (str == c.lastValue)
+ resetValue();
+ else if (!c.lastValue && str) {
+ resetValue();
+ sendText(str);
+ }
+ });
+ inputHandler = function compositionInputHandler(str) {
+ // console.log("onCompositionEnd", str, c.lastValue)
+ if (timer)
+ clearTimeout(timer);
+ str = str.replace(/\x01/g, "");
+ if (str == c.lastValue)
+ return "";
+ if (c.lastValue && timer)
+ host.undo();
+ return str;
+ };
+ host.onCompositionEnd();
+ host.removeListener("mousedown", onCompositionEnd);
+ if (e.type == "compositionend" && c.range) {
+ host.selection.setRange(c.range);
+ }
+ };
+
+
+
+ var syncComposition = lang.delayedCall(onCompositionUpdate, 50);
+
+ event.addListener(text, "compositionstart", onCompositionStart);
+ if (useragent.isGecko) {
+ event.addListener(text, "text", function(){syncComposition.schedule()});
+ } else {
+ event.addListener(text, "keyup", function(){syncComposition.schedule()});
+ event.addListener(text, "keydown", function(){syncComposition.schedule()});
+ }
+ event.addListener(text, "compositionend", onCompositionEnd);
+
+ this.getElement = function() {
+ return text;
+ };
+
+ this.setReadOnly = function(readOnly) {
+ text.readOnly = readOnly;
+ };
+
+ this.onContextMenu = function(e) {
+ afterContextMenu = true;
+ if (!tempStyle)
+ tempStyle = text.style.cssText;
+
+ text.style.cssText = "z-index:100000;" + (useragent.isIE ? "opacity:0.1;" : "");
+
+ resetSelection(host.selection.isEmpty());
+ host._emit("nativecontextmenu", {target: host, domEvent: e});
+ var rect = host.container.getBoundingClientRect();
+ var style = dom.computedStyle(host.container);
+ var top = rect.top + (parseInt(style.borderTopWidth) || 0);
+ var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
+ var maxTop = rect.bottom - top - text.clientHeight;
+ var move = function(e) {
+ text.style.left = e.clientX - left - 2 + "px";
+ text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
+ };
+ move(e);
+
+ if (e.type != "mousedown")
+ return;
+
+ if (host.renderer.$keepTextAreaAtCursor)
+ host.renderer.$keepTextAreaAtCursor = null;
+
+ // on windows context menu is opened after mouseup
+ if (useragent.isWin)
+ event.capture(host.container, move, onContextMenuClose);
+ };
+
+ this.onContextMenuClose = onContextMenuClose;
+ function onContextMenuClose() {
+ setTimeout(function () {
+ if (tempStyle) {
+ text.style.cssText = tempStyle;
+ tempStyle = '';
+ }
+ if (host.renderer.$keepTextAreaAtCursor == null) {
+ host.renderer.$keepTextAreaAtCursor = true;
+ host.renderer.$moveTextAreaToCursor();
+ }
+ }, 0);
+ }
+
+ // firefox fires contextmenu event after opening it
+ if (!useragent.isGecko || useragent.isMac) {
+ var onContextMenu = function(e) {
+ host.textInput.onContextMenu(e);
+ onContextMenuClose();
+ };
+ event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
+ event.addListener(text, "contextmenu", onContextMenu);
+ }
+};
+
+exports.TextInput = TextInput;
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim.js b/src/fauxton/assets/js/libs/ace/keyboard/vim.js
new file mode 100644
index 000000000..7af83b05e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim.js
@@ -0,0 +1,195 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var cmds = require("./vim/commands");
+var coreCommands = cmds.coreCommands;
+var util = require("./vim/maps/util");
+var useragent = require("../lib/useragent");
+
+var startCommands = {
+ "i": {
+ command: coreCommands.start
+ },
+ "I": {
+ command: coreCommands.startBeginning
+ },
+ "a": {
+ command: coreCommands.append
+ },
+ "A": {
+ command: coreCommands.appendEnd
+ },
+ "ctrl-f": {
+ command: "gotopagedown"
+ },
+ "ctrl-b": {
+ command: "gotopageup"
+ }
+};
+
+exports.handler = {
+ $id: "ace/keyboard/vim",
+ // workaround for j not repeating with `defaults write -g ApplePressAndHoldEnabled -bool true`
+ handleMacRepeat: function(data, hashId, key) {
+ if (hashId == -1) {
+ // record key
+ data.inputChar = key;
+ data.lastEvent = "input";
+ } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) {
+ // check for repeated keypress
+ if (data.lastEvent == "input") {
+ data.lastEvent = "input1";
+ } else if (data.lastEvent == "input1") {
+ // simulate textinput
+ return true;
+ }
+ } else {
+ // reset
+ data.$lastHash = hashId;
+ data.$lastKey = key;
+ data.lastEvent = "keypress";
+ }
+ },
+ // on mac, with some keyboard layouts (e.g swedish) ^ starts composition, we don't need it in normal mode
+ updateMacCompositionHandlers: function(editor, enable) {
+ var onCompositionUpdateOverride = function(text) {
+ if (util.currentMode !== "insert") {
+ var el = this.textInput.getElement();
+ el.blur();
+ el.focus();
+ el.value = text;
+ } else {
+ this.onCompositionUpdateOrig(text);
+ }
+ };
+ var onCompositionStartOverride = function(text) {
+ if (util.currentMode === "insert") {
+ this.onCompositionStartOrig(text);
+ }
+ }
+ if (enable) {
+ if (!editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdateOrig = editor.onCompositionUpdate;
+ editor.onCompositionUpdate = onCompositionUpdateOverride;
+ editor.onCompositionStartOrig = editor.onCompositionStart;
+ editor.onCompositionStart = onCompositionStartOverride;
+ }
+ } else {
+ if (editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdate = editor.onCompositionUpdateOrig;
+ editor.onCompositionUpdateOrig = null;
+ editor.onCompositionStart = editor.onCompositionStartOrig;
+ editor.onCompositionStartOrig = null;
+ }
+ }
+ },
+
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
+ // ignore command keys (shift, ctrl etc.)
+ if (hashId != 0 && (key == "" || key == "\x00"))
+ return null;
+
+ var editor = data.editor;
+
+ if (hashId == 1)
+ key = "ctrl-" + key;
+ if (key == "ctrl-c") {
+ if (!useragent.isMac && editor.getCopyText()) {
+ editor.once("copy", function() {
+ if (data.state == "start")
+ coreCommands.stop.exec(editor);
+ else
+ editor.selection.clearSelection();
+ });
+ return {command: "null", passEvent: true};
+ }
+ return {command: coreCommands.stop};
+ } else if ((key == "esc" && hashId == 0) || key == "ctrl-[") {
+ return {command: coreCommands.stop};
+ } else if (data.state == "start") {
+ if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
+ hashId = -1;
+ key = data.inputChar;
+ }
+
+ if (hashId == -1 || hashId == 1 || hashId == 0 && key.length > 1) {
+ if (cmds.inputBuffer.idle && startCommands[key])
+ return startCommands[key];
+ cmds.inputBuffer.push(editor, key);
+ return {command: "null", passEvent: false};
+ } // if no modifier || shift: wait for input.
+ else if (key.length == 1 && (hashId == 0 || hashId == 4)) {
+ return {command: "null", passEvent: true};
+ } else if (key == "esc" && hashId == 0) {
+ return {command: coreCommands.stop};
+ }
+ } else {
+ if (key == "ctrl-w") {
+ return {command: "removewordleft"};
+ }
+ }
+ },
+
+ attach: function(editor) {
+ editor.on("click", exports.onCursorMove);
+ if (util.currentMode !== "insert")
+ cmds.coreCommands.stop.exec(editor);
+ editor.$vimModeHandler = this;
+
+ this.updateMacCompositionHandlers(editor, true);
+ },
+
+ detach: function(editor) {
+ editor.removeListener("click", exports.onCursorMove);
+ util.noMode(editor);
+ util.currentMode = "normal";
+ this.updateMacCompositionHandlers(editor, false);
+ },
+
+ actions: cmds.actions,
+ getStatusText: function() {
+ if (util.currentMode == "insert")
+ return "INSERT";
+ if (util.onVisualMode)
+ return (util.onVisualLineMode ? "VISUAL LINE " : "VISUAL ") + cmds.inputBuffer.status;
+ return cmds.inputBuffer.status;
+ }
+};
+
+
+exports.onCursorMove = function(e) {
+ cmds.onCursorMove(e.editor, e);
+ exports.onCursorMove.scheduled = false;
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/commands.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/commands.js
new file mode 100644
index 000000000..dd3357d6d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/commands.js
@@ -0,0 +1,613 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+"never use strict";
+
+var lang = require("../../lib/lang");
+var util = require("./maps/util");
+var motions = require("./maps/motions");
+var operators = require("./maps/operators");
+var alias = require("./maps/aliases");
+var registers = require("./registers");
+
+var NUMBER = 1;
+var OPERATOR = 2;
+var MOTION = 3;
+var ACTION = 4;
+var HMARGIN = 8; // Minimum amount of line separation between margins;
+
+var repeat = function repeat(fn, count, args) {
+ while (0 < count--)
+ fn.apply(this, args);
+};
+
+var ensureScrollMargin = function(editor) {
+ var renderer = editor.renderer;
+ var pos = renderer.$cursorLayer.getPixelPosition();
+
+ var top = pos.top;
+
+ var margin = HMARGIN * renderer.layerConfig.lineHeight;
+ if (2 * margin > renderer.$size.scrollerHeight)
+ margin = renderer.$size.scrollerHeight / 2;
+
+ if (renderer.scrollTop > top - margin) {
+ renderer.session.setScrollTop(top - margin);
+ }
+
+ if (renderer.scrollTop + renderer.$size.scrollerHeight < top + margin + renderer.lineHeight) {
+ renderer.session.setScrollTop(top + margin + renderer.lineHeight - renderer.$size.scrollerHeight);
+ }
+};
+
+var actions = exports.actions = {
+ "z": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ switch (param) {
+ case "z":
+ editor.renderer.alignCursor(null, 0.5);
+ break;
+ case "t":
+ editor.renderer.alignCursor(null, 0);
+ break;
+ case "b":
+ editor.renderer.alignCursor(null, 1);
+ break;
+ case "c":
+ editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});
+ break;
+ case "o":
+ editor.session.onFoldWidgetClick(range.start.row, {domEvent:{target :{}}});
+ break;
+ case "C":
+ editor.session.foldAll();
+ break;
+ case "O":
+ editor.session.unfold();
+ break;
+ }
+ }
+ },
+ "r": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ if (param && param.length) {
+ if (param.length > 1)
+ param = param == "return" ? "\n" : param == "tab" ? "\t" : param;
+ repeat(function() { editor.insert(param); }, count || 1);
+ editor.navigateLeft();
+ }
+ }
+ },
+ "R": {
+ fn: function(editor, range, count, param) {
+ util.insertMode(editor);
+ editor.setOverwrite(true);
+ }
+ },
+ "~": {
+ fn: function(editor, range, count) {
+ repeat(function() {
+ var range = editor.selection.getRange();
+ if (range.isEmpty())
+ range.end.column++;
+ var text = editor.session.getTextRange(range);
+ var toggled = text.toUpperCase();
+ if (toggled == text)
+ editor.navigateRight();
+ else
+ editor.session.replace(range, toggled);
+ }, count || 1);
+ }
+ },
+ "*": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectWord();
+ editor.findNext();
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "#": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectWord();
+ editor.findPrevious();
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "m": {
+ param: true,
+ fn: function(editor, range, count, param) {
+ var s = editor.session;
+ var markers = s.vimMarkers || (s.vimMarkers = {});
+ var c = editor.getCursorPosition();
+ if (!markers[param]) {
+ markers[param] = editor.session.doc.createAnchor(c);
+ }
+ markers[param].setPosition(c.row, c.column, true);
+ }
+ },
+ "n": {
+ fn: function(editor, range, count, param) {
+ var options = editor.getLastSearchOptions();
+ options.backwards = false;
+
+ editor.selection.moveCursorRight();
+ editor.selection.clearSelection();
+ editor.findNext(options);
+
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ r.end.row = r.start.row;
+ r.end.column = r.start.column;
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "N": {
+ fn: function(editor, range, count, param) {
+ var options = editor.getLastSearchOptions();
+ options.backwards = true;
+
+ editor.findPrevious(options);
+ ensureScrollMargin(editor);
+ var r = editor.selection.getRange();
+ r.end.row = r.start.row;
+ r.end.column = r.start.column;
+ editor.selection.setSelectionRange(r, true);
+ }
+ },
+ "v": {
+ fn: function(editor, range, count, param) {
+ editor.selection.selectRight();
+ util.visualMode(editor, false);
+ },
+ acceptsMotion: true
+ },
+ "V": {
+ fn: function(editor, range, count, param) {
+ //editor.selection.selectLine();
+ //editor.selection.selectLeft();
+ var row = editor.getCursorPosition().row;
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(row, 0);
+ editor.selection.selectLineEnd();
+ editor.selection.visualLineStart = row;
+
+ util.visualMode(editor, true);
+ },
+ acceptsMotion: true
+ },
+ "Y": {
+ fn: function(editor, range, count, param) {
+ util.copyLine(editor);
+ }
+ },
+ "p": {
+ fn: function(editor, range, count, param) {
+ var defaultReg = registers._default;
+
+ editor.setOverwrite(false);
+ if (defaultReg.isLine) {
+ var pos = editor.getCursorPosition();
+ pos.column = editor.session.getLine(pos.row).length;
+ var text = lang.stringRepeat("\n" + defaultReg.text, count || 1);
+ editor.session.insert(pos, text);
+ editor.moveCursorTo(pos.row + 1, 0);
+ }
+ else {
+ editor.navigateRight();
+ editor.insert(lang.stringRepeat(defaultReg.text, count || 1));
+ editor.navigateLeft();
+ }
+ editor.setOverwrite(true);
+ editor.selection.clearSelection();
+ }
+ },
+ "P": {
+ fn: function(editor, range, count, param) {
+ var defaultReg = registers._default;
+ editor.setOverwrite(false);
+
+ if (defaultReg.isLine) {
+ var pos = editor.getCursorPosition();
+ pos.column = 0;
+ var text = lang.stringRepeat(defaultReg.text + "\n", count || 1);
+ editor.session.insert(pos, text);
+ editor.moveCursorToPosition(pos);
+ }
+ else {
+ editor.insert(lang.stringRepeat(defaultReg.text, count || 1));
+ }
+ editor.setOverwrite(true);
+ editor.selection.clearSelection();
+ }
+ },
+ "J": {
+ fn: function(editor, range, count, param) {
+ var session = editor.session;
+ range = editor.getSelectionRange();
+ var pos = {row: range.start.row, column: range.start.column};
+ count = count || range.end.row - range.start.row;
+ var maxRow = Math.min(pos.row + (count || 1), session.getLength() - 1);
+
+ range.start.column = session.getLine(pos.row).length;
+ range.end.column = session.getLine(maxRow).length;
+ range.end.row = maxRow;
+
+ var text = "";
+ for (var i = pos.row; i < maxRow; i++) {
+ var nextLine = session.getLine(i + 1);
+ text += " " + /^\s*(.*)$/.exec(nextLine)[1] || "";
+ }
+
+ session.replace(range, text);
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+ },
+ "u": {
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ for (var i = 0; i < count; i++) {
+ editor.undo();
+ }
+ editor.selection.clearSelection();
+ }
+ },
+ "ctrl-r": {
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ for (var i = 0; i < count; i++) {
+ editor.redo();
+ }
+ editor.selection.clearSelection();
+ }
+ },
+ ":": {
+ fn: function(editor, range, count, param) {
+ var val = ":";
+ if (count > 1)
+ val = ".,.+" + count + val;
+ if (editor.showCommandLine)
+ editor.showCommandLine(val);
+ }
+ },
+ "/": {
+ fn: function(editor, range, count, param) {
+ if (editor.showCommandLine)
+ editor.showCommandLine("/");
+ }
+ },
+ "?": {
+ fn: function(editor, range, count, param) {
+ if (editor.showCommandLine)
+ editor.showCommandLine("?");
+ }
+ },
+ ".": {
+ fn: function(editor, range, count, param) {
+ util.onInsertReplaySequence = inputBuffer.lastInsertCommands;
+ var previous = inputBuffer.previous;
+ if (previous) // If there is a previous action
+ inputBuffer.exec(editor, previous.action, previous.param);
+ }
+ },
+ "ctrl-x": {
+ fn: function(editor, range, count, param) {
+ editor.modifyNumber(-(count || 1));
+ }
+ },
+ "ctrl-a": {
+ fn: function(editor, range, count, param) {
+ editor.modifyNumber(count || 1);
+ }
+ }
+};
+
+var inputBuffer = exports.inputBuffer = {
+ accepting: [NUMBER, OPERATOR, MOTION, ACTION],
+ currentCmd: null,
+ //currentMode: 0,
+ currentCount: "",
+ status: "",
+
+ // Types
+ operator: null,
+ motion: null,
+
+ lastInsertCommands: [],
+
+ push: function(editor, ch, keyId) {
+ var status = this.status;
+ var isKeyHandled = true;
+ this.idle = false;
+ var wObj = this.waitingForParam;
+ if (/^numpad\d+$/i.test(ch))
+ ch = ch.substr(6);
+
+ if (wObj) {
+ this.exec(editor, wObj, ch);
+ }
+ // If input is a number (that doesn't start with 0)
+ else if (!(ch === "0" && !this.currentCount.length) &&
+ (/^\d+$/.test(ch) && this.isAccepting(NUMBER))) {
+ // Assuming that ch is always of type String, and not Number
+ this.currentCount += ch;
+ this.currentCmd = NUMBER;
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
+ }
+ else if (!this.operator && this.isAccepting(OPERATOR) && operators[ch]) {
+ this.operator = {
+ ch: ch,
+ count: this.getCount()
+ };
+ this.currentCmd = OPERATOR;
+ this.accepting = [NUMBER, MOTION, ACTION];
+ this.exec(editor, { operator: this.operator });
+ }
+ else if (motions[ch] && this.isAccepting(MOTION)) {
+ this.currentCmd = MOTION;
+
+ var ctx = {
+ operator: this.operator,
+ motion: {
+ ch: ch,
+ count: this.getCount()
+ }
+ };
+
+ if (motions[ch].param)
+ this.waitForParam(ctx);
+ else
+ this.exec(editor, ctx);
+ }
+ else if (alias[ch] && this.isAccepting(MOTION)) {
+ alias[ch].operator.count = this.getCount();
+ this.exec(editor, alias[ch]);
+ }
+ else if (actions[ch] && this.isAccepting(ACTION)) {
+ var actionObj = {
+ action: {
+ fn: actions[ch].fn,
+ count: this.getCount()
+ }
+ };
+
+ if (actions[ch].param) {
+ this.waitForParam(actionObj);
+ }
+ else {
+ this.exec(editor, actionObj);
+ }
+
+ if (actions[ch].acceptsMotion)
+ this.idle = false;
+ }
+ else if (this.operator) {
+ this.operator.count = this.getCount();
+ this.exec(editor, { operator: this.operator }, ch);
+ }
+ else {
+ isKeyHandled = ch.length == 1;
+ this.reset();
+ }
+
+ if (this.waitingForParam || this.motion || this.operator) {
+ this.status += ch;
+ } else if (this.currentCount) {
+ this.status = this.currentCount;
+ } else if (this.status) {
+ this.status = "";
+ }
+ if (this.status != status)
+ editor._emit("changeStatus");
+ return isKeyHandled;
+ },
+
+ waitForParam: function(cmd) {
+ this.waitingForParam = cmd;
+ },
+
+ getCount: function() {
+ var count = this.currentCount;
+ this.currentCount = "";
+ return count && parseInt(count, 10);
+ },
+
+ exec: function(editor, action, param) {
+ var m = action.motion;
+ var o = action.operator;
+ var a = action.action;
+
+ if (!param)
+ param = action.param;
+
+ if (o) {
+ this.previous = {
+ action: action,
+ param: param
+ };
+ }
+
+ if (o && !editor.selection.isEmpty()) {
+ if (operators[o.ch].selFn) {
+ operators[o.ch].selFn(editor, editor.getSelectionRange(), o.count, param);
+ this.reset();
+ }
+ return;
+ }
+
+ // There is an operator, but no motion or action. We try to pass the
+ // current ch to the operator to see if it responds to it (an example
+ // of this is the 'dd' operator).
+ else if (!m && !a && o && param) {
+ operators[o.ch].fn(editor, null, o.count, param);
+ this.reset();
+ }
+ else if (m) {
+ var run = function(fn) {
+ if (fn && typeof fn === "function") { // There should always be a motion
+ if (m.count && !motionObj.handlesCount)
+ repeat(fn, m.count, [editor, null, m.count, param]);
+ else
+ fn(editor, null, m.count, param);
+ }
+ };
+
+ var motionObj = motions[m.ch];
+ var selectable = motionObj.sel;
+
+ if (!o) {
+ if ((util.onVisualMode || util.onVisualLineMode) && selectable)
+ run(motionObj.sel);
+ else
+ run(motionObj.nav);
+ }
+ else if (selectable) {
+ repeat(function() {
+ run(motionObj.sel);
+ operators[o.ch].fn(editor, editor.getSelectionRange(), o.count, param);
+ }, o.count || 1);
+ }
+ this.reset();
+ }
+ else if (a) {
+ a.fn(editor, editor.getSelectionRange(), a.count, param);
+ this.reset();
+ }
+ handleCursorMove(editor);
+ },
+
+ isAccepting: function(type) {
+ return this.accepting.indexOf(type) !== -1;
+ },
+
+ reset: function() {
+ this.operator = null;
+ this.motion = null;
+ this.currentCount = "";
+ this.status = "";
+ this.accepting = [NUMBER, OPERATOR, MOTION, ACTION];
+ this.idle = true;
+ this.waitingForParam = null;
+ }
+};
+
+function setPreviousCommand(fn) {
+ inputBuffer.previous = { action: { action: { fn: fn } } };
+}
+
+exports.coreCommands = {
+ start: {
+ exec: function start(editor) {
+ util.insertMode(editor);
+ setPreviousCommand(start);
+ }
+ },
+ startBeginning: {
+ exec: function startBeginning(editor) {
+ editor.navigateLineStart();
+ util.insertMode(editor);
+ setPreviousCommand(startBeginning);
+ }
+ },
+ // Stop Insert mode as soon as possible. Works like typing <Esc> in
+ // insert mode.
+ stop: {
+ exec: function stop(editor) {
+ inputBuffer.reset();
+ util.onVisualMode = false;
+ util.onVisualLineMode = false;
+ inputBuffer.lastInsertCommands = util.normalMode(editor);
+ }
+ },
+ append: {
+ exec: function append(editor) {
+ var pos = editor.getCursorPosition();
+ var lineLen = editor.session.getLine(pos.row).length;
+ if (lineLen)
+ editor.navigateRight();
+ util.insertMode(editor);
+ setPreviousCommand(append);
+ }
+ },
+ appendEnd: {
+ exec: function appendEnd(editor) {
+ editor.navigateLineEnd();
+ util.insertMode(editor);
+ setPreviousCommand(appendEnd);
+ }
+ }
+};
+
+var handleCursorMove = exports.onCursorMove = function(editor, e) {
+ if (util.currentMode === 'insert' || handleCursorMove.running)
+ return;
+ else if(!editor.selection.isEmpty()) {
+ handleCursorMove.running = true;
+ if (util.onVisualLineMode) {
+ var originRow = editor.selection.visualLineStart;
+ var cursorRow = editor.getCursorPosition().row;
+ if(originRow <= cursorRow) {
+ var endLine = editor.session.getLine(cursorRow);
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(originRow, 0);
+ editor.selection.selectTo(cursorRow, endLine.length);
+ } else {
+ var endLine = editor.session.getLine(originRow);
+ editor.selection.clearSelection();
+ editor.selection.moveCursorTo(originRow, endLine.length);
+ editor.selection.selectTo(cursorRow, 0);
+ }
+ }
+ handleCursorMove.running = false;
+ return;
+ }
+ else {
+ if (e && (util.onVisualLineMode || util.onVisualMode)) {
+ editor.selection.clearSelection();
+ util.normalMode(editor);
+ }
+
+ handleCursorMove.running = true;
+ var pos = editor.getCursorPosition();
+ var lineLen = editor.session.getLine(pos.row).length;
+
+ if (lineLen && pos.column === lineLen)
+ editor.navigateLeft();
+ handleCursorMove.running = false;
+ }
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/aliases.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/aliases.js
new file mode 100644
index 000000000..1a5f32f7d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/aliases.js
@@ -0,0 +1,94 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict"
+
+define(function(require, exports, module) {
+module.exports = {
+ "x": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "l",
+ count: 1
+ }
+ },
+ "X": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "h",
+ count: 1
+ }
+ },
+ "D": {
+ operator: {
+ ch: "d",
+ count: 1
+ },
+ motion: {
+ ch: "$",
+ count: 1
+ }
+ },
+ "C": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ motion: {
+ ch: "$",
+ count: 1
+ }
+ },
+ "s": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ motion: {
+ ch: "l",
+ count: 1
+ }
+ },
+ "S": {
+ operator: {
+ ch: "c",
+ count: 1
+ },
+ param: "c"
+ }
+};
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/motions.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/motions.js
new file mode 100644
index 000000000..91c8b8af9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/motions.js
@@ -0,0 +1,664 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var util = require("./util");
+
+var keepScrollPosition = function(editor, fn) {
+ var scrollTopRow = editor.renderer.getScrollTopRow();
+ var initialRow = editor.getCursorPosition().row;
+ var diff = initialRow - scrollTopRow;
+ fn && fn.call(editor);
+ editor.renderer.scrollToRow(editor.getCursorPosition().row - diff);
+};
+
+function Motion(m) {
+ if (typeof m == "function") {
+ var getPos = m;
+ m = this;
+ } else {
+ var getPos = m.getPos;
+ }
+ m.nav = function(editor, range, count, param) {
+ var a = getPos(editor, range, count, param, false);
+ if (!a)
+ return;
+ editor.clearSelection();
+ editor.moveCursorTo(a.row, a.column);
+ };
+ m.sel = function(editor, range, count, param) {
+ var a = getPos(editor, range, count, param, true);
+ if (!a)
+ return;
+ editor.selection.selectTo(a.row, a.column);
+ };
+ return m;
+}
+
+var nonWordRe = /[\s.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
+var wordSeparatorRe = /[.\/\\()\"'-:,.;<>~!@#$%^&*|+=\[\]{}`~?]/;
+var whiteRe = /\s/;
+var StringStream = function(editor, cursor) {
+ var sel = editor.selection;
+ this.range = sel.getRange();
+ cursor = cursor || sel.selectionLead;
+ this.row = cursor.row;
+ this.col = cursor.column;
+ var line = editor.session.getLine(this.row);
+ var maxRow = editor.session.getLength();
+ this.ch = line[this.col] || '\n';
+ this.skippedLines = 0;
+
+ this.next = function() {
+ this.ch = line[++this.col] || this.handleNewLine(1);
+ //this.debug()
+ return this.ch;
+ };
+ this.prev = function() {
+ this.ch = line[--this.col] || this.handleNewLine(-1);
+ //this.debug()
+ return this.ch;
+ };
+ this.peek = function(dir) {
+ var ch = line[this.col + dir];
+ if (ch)
+ return ch;
+ if (dir == -1)
+ return '\n';
+ if (this.col == line.length - 1)
+ return '\n';
+ return editor.session.getLine(this.row + 1)[0] || '\n';
+ };
+
+ this.handleNewLine = function(dir) {
+ if (dir == 1){
+ if (this.col == line.length)
+ return '\n';
+ if (this.row == maxRow - 1)
+ return '';
+ this.col = 0;
+ this.row ++;
+ line = editor.session.getLine(this.row);
+ this.skippedLines++;
+ return line[0] || '\n';
+ }
+ if (dir == -1) {
+ if (this.row === 0)
+ return '';
+ this.row --;
+ line = editor.session.getLine(this.row);
+ this.col = line.length;
+ this.skippedLines--;
+ return '\n';
+ }
+ };
+ this.debug = function() {
+ console.log(line.substring(0, this.col)+'|'+this.ch+'\''+this.col+'\''+line.substr(this.col+1));
+ };
+};
+
+var Search = require("../../../search").Search;
+var search = new Search();
+
+function find(editor, needle, dir) {
+ search.$options.needle = needle;
+ search.$options.backwards = dir == -1;
+ return search.find(editor.session);
+}
+
+var Range = require("../../../range").Range;
+
+var LAST_SEARCH_MOTION = {};
+
+module.exports = {
+ "w": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.next();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.next();
+ }
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines < 2)
+ str.next();
+
+ str.skippedLines == 2 && str.prev();
+ return {column: str.col, row: str.row};
+ }),
+ "W": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ while(str.ch && !(whiteRe.test(str.ch) && !whiteRe.test(str.peek(1))) && str.skippedLines < 2)
+ str.next();
+ if (str.skippedLines == 2)
+ str.prev();
+ else
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+ "b": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ str.prev();
+ while (str.ch && whiteRe.test(str.ch) && str.skippedLines > -2)
+ str.prev();
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.prev();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.prev();
+ }
+ str.ch && str.next();
+ return {column: str.col, row: str.row};
+ }),
+ "B": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ str.prev();
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(-1))) && str.skippedLines > -2)
+ str.prev();
+
+ if (str.skippedLines == -2)
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+ "e": new Motion(function(editor) {
+ var str = new StringStream(editor);
+
+ str.next();
+ while (str.ch && whiteRe.test(str.ch))
+ str.next();
+
+ if (str.ch && wordSeparatorRe.test(str.ch)) {
+ while (str.ch && wordSeparatorRe.test(str.ch))
+ str.next();
+ } else {
+ while (str.ch && !nonWordRe.test(str.ch))
+ str.next();
+ }
+ str.ch && str.prev();
+ return {column: str.col, row: str.row};
+ }),
+ "E": new Motion(function(editor) {
+ var str = new StringStream(editor);
+ str.next();
+ while(str.ch && !(!whiteRe.test(str.ch) && whiteRe.test(str.peek(1))))
+ str.next();
+
+ return {column: str.col, row: str.row};
+ }),
+
+ "l": {
+ nav: function(editor) {
+ var pos = editor.getCursorPosition();
+ var col = pos.column;
+ var lineLen = editor.session.getLine(pos.row).length;
+ if (lineLen && col !== lineLen)
+ editor.navigateRight();
+ },
+ sel: function(editor) {
+ var pos = editor.getCursorPosition();
+ var col = pos.column;
+ var lineLen = editor.session.getLine(pos.row).length;
+
+ // Solving the behavior at the end of the line due to the
+ // different 0 index-based colum positions in ACE.
+ if (lineLen && col !== lineLen) //In selection mode you can select the newline
+ editor.selection.selectRight();
+ }
+ },
+ "h": {
+ nav: function(editor) {
+ var pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.navigateLeft();
+ },
+ sel: function(editor) {
+ var pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.selection.selectLeft();
+ }
+ },
+ "H": {
+ nav: function(editor) {
+ var row = editor.renderer.getScrollTopRow();
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var row = editor.renderer.getScrollTopRow();
+ editor.selection.selectTo(row);
+ }
+ },
+ "M": {
+ nav: function(editor) {
+ var topRow = editor.renderer.getScrollTopRow();
+ var bottomRow = editor.renderer.getScrollBottomRow();
+ var row = topRow + ((bottomRow - topRow) / 2);
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var topRow = editor.renderer.getScrollTopRow();
+ var bottomRow = editor.renderer.getScrollBottomRow();
+ var row = topRow + ((bottomRow - topRow) / 2);
+ editor.selection.selectTo(row);
+ }
+ },
+ "L": {
+ nav: function(editor) {
+ var row = editor.renderer.getScrollBottomRow();
+ editor.moveCursorTo(row);
+ },
+ sel: function(editor) {
+ var row = editor.renderer.getScrollBottomRow();
+ editor.selection.selectTo(row);
+ }
+ },
+ "k": {
+ nav: function(editor) {
+ editor.navigateUp();
+ },
+ sel: function(editor) {
+ editor.selection.selectUp();
+ }
+ },
+ "j": {
+ nav: function(editor) {
+ editor.navigateDown();
+ },
+ sel: function(editor) {
+ editor.selection.selectDown();
+ }
+ },
+
+ "i": {
+ param: true,
+ sel: function(editor, range, count, param) {
+ switch (param) {
+ case "w":
+ editor.selection.selectWord();
+ break;
+ case "W":
+ editor.selection.selectAWord();
+ break;
+ case "(":
+ case "{":
+ case "[":
+ var cursor = editor.getCursorPosition();
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
+ if (!end)
+ return;
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
+ if (!start)
+ return;
+ start.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
+ break;
+ case "'":
+ case '"':
+ case "/":
+ var end = find(editor, param, 1);
+ if (!end)
+ return;
+ var start = find(editor, param, -1);
+ if (!start)
+ return;
+ editor.selection.setSelectionRange(Range.fromPoints(start.end, end.start));
+ break;
+ }
+ }
+ },
+ "a": {
+ param: true,
+ sel: function(editor, range, count, param) {
+ switch (param) {
+ case "w":
+ editor.selection.selectAWord();
+ break;
+ case "W":
+ editor.selection.selectAWord();
+ break;
+ case "(":
+ case "{":
+ case "[":
+ var cursor = editor.getCursorPosition();
+ var end = editor.session.$findClosingBracket(param, cursor, /paren/);
+ if (!end)
+ return;
+ var start = editor.session.$findOpeningBracket(editor.session.$brackets[param], cursor, /paren/);
+ if (!start)
+ return;
+ end.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start, end));
+ break;
+ case "'":
+ case "\"":
+ case "/":
+ var end = find(editor, param, 1);
+ if (!end)
+ return;
+ var start = find(editor, param, -1);
+ if (!start)
+ return;
+ end.column ++;
+ editor.selection.setSelectionRange(Range.fromPoints(start.start, end.end));
+ break;
+ }
+ }
+ },
+
+ "f": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel, isRepeat) {
+ if (!isRepeat)
+ LAST_SEARCH_MOTION = {ch: "f", param: param};
+ var cursor = editor.getCursorPosition();
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column += column + (isSel ? 2 : 1);
+ return cursor;
+ }
+ }
+ }),
+ "F": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel, isRepeat) {
+ if (!isRepeat)
+ LAST_SEARCH_MOTION = {ch: "F", param: param};
+ var cursor = editor.getCursorPosition();
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
+
+ if (typeof column === "number") {
+ cursor.column -= column + 1;
+ return cursor;
+ }
+ }
+ }),
+ "t": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel, isRepeat) {
+ if (!isRepeat)
+ LAST_SEARCH_MOTION = {ch: "t", param: param};
+ var cursor = editor.getCursorPosition();
+ var column = util.getRightNthChar(editor, cursor, param, count || 1);
+
+ if (isRepeat && column == 0 && !(count > 1))
+ var column = util.getRightNthChar(editor, cursor, param, 2);
+
+ if (typeof column === "number") {
+ cursor.column += column + (isSel ? 1 : 0);
+ return cursor;
+ }
+ }
+ }),
+ "T": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel, isRepeat) {
+ if (!isRepeat)
+ LAST_SEARCH_MOTION = {ch: "T", param: param};
+ var cursor = editor.getCursorPosition();
+ var column = util.getLeftNthChar(editor, cursor, param, count || 1);
+
+ if (isRepeat && column == 0 && !(count > 1))
+ var column = util.getLeftNthChar(editor, cursor, param, 2);
+
+ if (typeof column === "number") {
+ cursor.column -= column;
+ return cursor;
+ }
+ }
+ }),
+ ";": new Motion({
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var ch = LAST_SEARCH_MOTION.ch;
+ if (!ch)
+ return;
+ return module.exports[ch].getPos(
+ editor, range, count, LAST_SEARCH_MOTION.param, isSel, true
+ );
+ }
+ }),
+ ",": new Motion({
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var ch = LAST_SEARCH_MOTION.ch;
+ if (!ch)
+ return;
+ var up = ch.toUpperCase();
+ ch = ch === up ? ch.toLowerCase() : up;
+
+ return module.exports[ch].getPos(
+ editor, range, count, LAST_SEARCH_MOTION.param, isSel, true
+ );
+ }
+ }),
+
+ "^": {
+ nav: function(editor) {
+ editor.navigateLineStart();
+ },
+ sel: function(editor) {
+ editor.selection.selectLineStart();
+ }
+ },
+ "$": {
+ nav: function(editor) {
+ editor.navigateLineEnd();
+ },
+ sel: function(editor) {
+ editor.selection.selectLineEnd();
+ }
+ },
+ "0": new Motion(function(ed) {
+ return {row: ed.selection.lead.row, column: 0};
+ }),
+ "G": {
+ nav: function(editor, range, count, param) {
+ if (!count && count !== 0) { // Stupid JS
+ count = editor.session.getLength();
+ }
+ editor.gotoLine(count);
+ },
+ sel: function(editor, range, count, param) {
+ if (!count && count !== 0) { // Stupid JS
+ count = editor.session.getLength();
+ }
+ editor.selection.selectTo(count, 0);
+ }
+ },
+ "g": {
+ param: true,
+ nav: function(editor, range, count, param) {
+ switch(param) {
+ case "m":
+ console.log("Middle line");
+ break;
+ case "e":
+ console.log("End of prev word");
+ break;
+ case "g":
+ editor.gotoLine(count || 0);
+ case "u":
+ editor.gotoLine(count || 0);
+ case "U":
+ editor.gotoLine(count || 0);
+ }
+ },
+ sel: function(editor, range, count, param) {
+ switch(param) {
+ case "m":
+ console.log("Middle line");
+ break;
+ case "e":
+ console.log("End of prev word");
+ break;
+ case "g":
+ editor.selection.selectTo(count || 0, 0);
+ }
+ }
+ },
+ "o": {
+ nav: function(editor, range, count, param) {
+ count = count || 1;
+ var content = "";
+ while (0 < count--)
+ content += "\n";
+
+ if (content.length) {
+ editor.navigateLineEnd()
+ editor.insert(content);
+ util.insertMode(editor);
+ }
+ }
+ },
+ "O": {
+ nav: function(editor, range, count, param) {
+ var row = editor.getCursorPosition().row;
+ count = count || 1;
+ var content = "";
+ while (0 < count--)
+ content += "\n";
+
+ if (content.length) {
+ if(row > 0) {
+ editor.navigateUp();
+ editor.navigateLineEnd()
+ editor.insert(content);
+ } else {
+ editor.session.insert({row: 0, column: 0}, content);
+ editor.navigateUp();
+ }
+ util.insertMode(editor);
+ }
+ }
+ },
+ "%": new Motion(function(editor){
+ var brRe = /[\[\]{}()]/g;
+ var cursor = editor.getCursorPosition();
+ var ch = editor.session.getLine(cursor.row)[cursor.column];
+ if (!brRe.test(ch)) {
+ var range = find(editor, brRe);
+ if (!range)
+ return;
+ cursor = range.start;
+ }
+ var match = editor.session.findMatchingBracket({
+ row: cursor.row,
+ column: cursor.column + 1
+ });
+
+ return match;
+ }),
+ "{": new Motion(function(ed) {
+ var session = ed.session;
+ var row = session.selection.lead.row;
+ while(row > 0 && !/\S/.test(session.getLine(row)))
+ row--;
+ while(/\S/.test(session.getLine(row)))
+ row--;
+ return {column: 0, row: row};
+ }),
+ "}": new Motion(function(ed) {
+ var session = ed.session;
+ var l = session.getLength();
+ var row = session.selection.lead.row;
+ while(row < l && !/\S/.test(session.getLine(row)))
+ row++;
+ while(/\S/.test(session.getLine(row)))
+ row++;
+ return {column: 0, row: row};
+ }),
+ "ctrl-d": {
+ nav: function(editor, range, count, param) {
+ editor.selection.clearSelection();
+ keepScrollPosition(editor, editor.gotoPageDown);
+ },
+ sel: function(editor, range, count, param) {
+ keepScrollPosition(editor, editor.selectPageDown);
+ }
+ },
+ "ctrl-u": {
+ nav: function(editor, range, count, param) {
+ editor.selection.clearSelection();
+ keepScrollPosition(editor, editor.gotoPageUp);
+ },
+ sel: function(editor, range, count, param) {
+ keepScrollPosition(editor, editor.selectPageUp);
+ }
+ },
+ "`": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var s = editor.session;
+ var marker = s.vimMarkers && s.vimMarkers[param];
+ if (marker) {
+ return marker.getPosition();
+ }
+ }
+ }),
+ "'": new Motion({
+ param: true,
+ handlesCount: true,
+ getPos: function(editor, range, count, param, isSel) {
+ var s = editor.session;
+ var marker = s.vimMarkers && s.vimMarkers[param];
+ if (marker) {
+ var pos = marker.getPosition();
+ var line = editor.session.getLine(pos.row);
+ pos.column = line.search(/\S/);
+ if (pos.column == -1)
+ pos.column = line.length;
+ return pos;
+ }
+ }
+ })
+};
+
+module.exports.backspace = module.exports.left = module.exports.h;
+module.exports.space = module.exports['return'] = module.exports.right = module.exports.l;
+module.exports.up = module.exports.k;
+module.exports.down = module.exports.j;
+module.exports.pagedown = module.exports["ctrl-d"];
+module.exports.pageup = module.exports["ctrl-u"];
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/operators.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/operators.js
new file mode 100644
index 000000000..067562a07
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/operators.js
@@ -0,0 +1,195 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+"use strict";
+
+var util = require("./util");
+var registers = require("../registers");
+
+module.exports = {
+ "d": {
+ selFn: function(editor, range, count, param) {
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = util.onVisualLineMode;
+ if(util.onVisualLineMode)
+ editor.removeLines();
+ else
+ editor.session.remove(range);
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "d":
+ registers._default.text = "";
+ registers._default.isLine = true;
+ for (var i = 0; i < count; i++) {
+ editor.selection.selectLine();
+ registers._default.text += editor.getCopyText();
+ var selRange = editor.getSelectionRange();
+ // check if end of the document was reached
+ if (!selRange.isMultiLine()) {
+ var row = selRange.start.row - 1;
+ var col = editor.session.getLine(row).length
+ selRange.setStart(row, col);
+ editor.session.remove(selRange);
+ editor.selection.clearSelection();
+ break;
+ }
+ editor.session.remove(selRange);
+ editor.selection.clearSelection();
+ }
+ registers._default.text = registers._default.text.replace(/\n$/, "");
+ break;
+ default:
+ if (range) {
+ editor.selection.setSelectionRange(range);
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = false;
+ editor.session.remove(range);
+ editor.selection.clearSelection();
+ }
+ }
+ }
+ },
+ "c": {
+ selFn: function(editor, range, count, param) {
+ editor.session.remove(range);
+ util.insertMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "c":
+ for (var i = 0; i < count; i++) {
+ editor.removeLines();
+ util.insertMode(editor);
+ }
+
+ break;
+ default:
+ if (range) {
+
+ // range.end.column ++;
+ editor.session.remove(range);
+ util.insertMode(editor);
+ }
+ }
+ }
+ },
+ "y": {
+ selFn: function(editor, range, count, param) {
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = util.onVisualLineMode;
+ editor.selection.clearSelection();
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "y":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
+ editor.selection.clearSelection();
+ registers._default.isLine = true;
+ editor.moveCursorToPosition(pos);
+ break;
+ default:
+ if (range) {
+ var pos = editor.getCursorPosition();
+ editor.selection.setSelectionRange(range);
+ registers._default.text = editor.getCopyText();
+ registers._default.isLine = false;
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+ }
+ }
+ },
+ ">": {
+ selFn: function(editor, range, count, param) {
+ count = count || 1;
+ for (var i = 0; i < count; i++) {
+ editor.indent();
+ }
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = parseInt(count || 1, 10);
+ switch (param) {
+ case ">":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ editor.indent();
+ editor.selection.clearSelection();
+ editor.moveCursorToPosition(pos);
+ editor.navigateLineEnd();
+ editor.navigateLineStart();
+ break;
+ }
+ }
+ },
+ "<": {
+ selFn: function(editor, range, count, param) {
+ count = count || 1;
+ for (var i = 0; i < count; i++) {
+ editor.blockOutdent();
+ }
+ util.normalMode(editor);
+ },
+ fn: function(editor, range, count, param) {
+ count = count || 1;
+ switch (param) {
+ case "<":
+ var pos = editor.getCursorPosition();
+ editor.selection.selectLine();
+ for (var i = 0; i < count - 1; i++) {
+ editor.selection.moveCursorDown();
+ }
+ editor.blockOutdent();
+ editor.selection.clearSelection();
+ editor.moveCursorToPosition(pos);
+ editor.navigateLineEnd();
+ editor.navigateLineStart();
+ break;
+ }
+ }
+ }
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/util.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/util.js
new file mode 100644
index 000000000..af0e07c70
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/maps/util.js
@@ -0,0 +1,134 @@
+define(function(require, exports, module) {
+var registers = require("../registers");
+
+var dom = require("../../../lib/dom");
+dom.importCssString('.insert-mode .ace_cursor{\
+ border-left: 2px solid #333333;\
+}\
+.ace_dark.insert-mode .ace_cursor{\
+ border-left: 2px solid #eeeeee;\
+}\
+.normal-mode .ace_cursor{\
+ border: 0!important;\
+ background-color: red;\
+ opacity: 0.5;\
+}', 'vimMode');
+
+module.exports = {
+ onVisualMode: false,
+ onVisualLineMode: false,
+ currentMode: 'normal',
+ noMode: function(editor) {
+ editor.unsetStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+ if (editor.commands.recording)
+ editor.commands.toggleRecording(editor);
+ editor.setOverwrite(false);
+ },
+ insertMode: function(editor) {
+ this.currentMode = 'insert';
+ // Switch editor to insert mode
+ editor.setStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+
+ editor.setOverwrite(false);
+ editor.keyBinding.$data.buffer = "";
+ editor.keyBinding.$data.state = "insertMode";
+ this.onVisualMode = false;
+ this.onVisualLineMode = false;
+ if(this.onInsertReplaySequence) {
+ // Ok, we're apparently replaying ("."), so let's do it
+ editor.commands.macro = this.onInsertReplaySequence;
+ editor.commands.replay(editor);
+ this.onInsertReplaySequence = null;
+ this.normalMode(editor);
+ } else {
+ editor._emit("changeStatus");
+ // Record any movements, insertions in insert mode
+ if(!editor.commands.recording)
+ editor.commands.toggleRecording(editor);
+ }
+ },
+ normalMode: function(editor) {
+ // Switch editor to normal mode
+ this.currentMode = 'normal';
+
+ editor.unsetStyle('insert-mode');
+ editor.setStyle('normal-mode');
+ editor.clearSelection();
+
+ var pos;
+ if (!editor.getOverwrite()) {
+ pos = editor.getCursorPosition();
+ if (pos.column > 0)
+ editor.navigateLeft();
+ }
+
+ editor.setOverwrite(true);
+ editor.keyBinding.$data.buffer = "";
+ editor.keyBinding.$data.state = "start";
+ this.onVisualMode = false;
+ this.onVisualLineMode = false;
+ editor._emit("changeStatus");
+ // Save recorded keystrokes
+ if (editor.commands.recording) {
+ editor.commands.toggleRecording(editor);
+ return editor.commands.macro;
+ }
+ else {
+ return [];
+ }
+ },
+ visualMode: function(editor, lineMode) {
+ if (
+ (this.onVisualLineMode && lineMode)
+ || (this.onVisualMode && !lineMode)
+ ) {
+ this.normalMode(editor);
+ return;
+ }
+
+ editor.setStyle('insert-mode');
+ editor.unsetStyle('normal-mode');
+
+ editor._emit("changeStatus");
+ if (lineMode) {
+ this.onVisualLineMode = true;
+ } else {
+ this.onVisualMode = true;
+ this.onVisualLineMode = false;
+ }
+ },
+ getRightNthChar: function(editor, cursor, ch, n) {
+ var line = editor.getSession().getLine(cursor.row);
+ var matches = line.substr(cursor.column + 1).split(ch);
+
+ return n < matches.length ? matches.slice(0, n).join(ch).length : null;
+ },
+ getLeftNthChar: function(editor, cursor, ch, n) {
+ var line = editor.getSession().getLine(cursor.row);
+ var matches = line.substr(0, cursor.column).split(ch);
+
+ return n < matches.length ? matches.slice(-1 * n).join(ch).length : null;
+ },
+ toRealChar: function(ch) {
+ if (ch.length === 1)
+ return ch;
+
+ if (/^shift-./.test(ch))
+ return ch[ch.length - 1].toUpperCase();
+ else
+ return "";
+ },
+ copyLine: function(editor) {
+ var pos = editor.getCursorPosition();
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ editor.selection.selectLine();
+ registers._default.isLine = true;
+ registers._default.text = editor.getCopyText().replace(/\n$/, "");
+ editor.selection.clearSelection();
+ editor.moveCursorTo(pos.row, pos.column);
+ }
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/keyboard/vim/registers.js b/src/fauxton/assets/js/libs/ace/keyboard/vim/registers.js
new file mode 100644
index 000000000..ef929a356
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/keyboard/vim/registers.js
@@ -0,0 +1,42 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+"never use strict";
+
+module.exports = {
+ _default: {
+ text: "",
+ isLine: false
+ }
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/layer/cursor.js b/src/fauxton/assets/js/libs/ace/layer/cursor.js
new file mode 100644
index 000000000..26ade52be
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/layer/cursor.js
@@ -0,0 +1,217 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+
+var Cursor = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_cursor-layer";
+ parentEl.appendChild(this.element);
+
+ this.isVisible = false;
+ this.isBlinking = true;
+ this.blinkInterval = 1000;
+ this.smoothBlinking = false;
+
+ this.cursors = [];
+ this.cursor = this.addCursor();
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+};
+
+(function() {
+
+ this.$padding = 0;
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setBlinking = function(blinking) {
+ if (blinking != this.isBlinking){
+ this.isBlinking = blinking;
+ this.restartTimer();
+ }
+ };
+
+ this.setBlinkInterval = function(blinkInterval) {
+ if (blinkInterval != this.blinkInterval){
+ this.blinkInterval = blinkInterval;
+ this.restartTimer();
+ }
+ };
+
+ this.setSmoothBlinking = function(smoothBlinking) {
+ if (smoothBlinking != this.smoothBlinking) {
+ this.smoothBlinking = smoothBlinking;
+ if (smoothBlinking)
+ dom.addCssClass(this.element, "ace_smooth-blinking");
+ else
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ this.restartTimer();
+ }
+ };
+
+ this.addCursor = function() {
+ var el = dom.createElement("div");
+ el.className = "ace_cursor";
+ this.element.appendChild(el);
+ this.cursors.push(el);
+ return el;
+ };
+
+ this.removeCursor = function() {
+ if (this.cursors.length > 1) {
+ var el = this.cursors.pop();
+ el.parentNode.removeChild(el);
+ return el;
+ }
+ };
+
+ this.hideCursor = function() {
+ this.isVisible = false;
+ dom.addCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.showCursor = function() {
+ this.isVisible = true;
+ dom.removeCssClass(this.element, "ace_hidden-cursors");
+ this.restartTimer();
+ };
+
+ this.restartTimer = function() {
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ if (this.smoothBlinking)
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ for (var i = this.cursors.length; i--; )
+ this.cursors[i].style.opacity = "";
+
+ if (!this.isBlinking || !this.blinkInterval || !this.isVisible)
+ return;
+
+ if (this.smoothBlinking)
+ setTimeout(function(){
+ dom.addCssClass(this.element, "ace_smooth-blinking");
+ }.bind(this));
+
+ var blink = function(){
+ this.timeoutId = setTimeout(function() {
+ for (var i = this.cursors.length; i--; ) {
+ this.cursors[i].style.opacity = 0;
+ }
+ }.bind(this), 0.6 * this.blinkInterval);
+ }.bind(this);
+
+ this.intervalId = setInterval(function() {
+ for (var i = this.cursors.length; i--; ) {
+ this.cursors[i].style.opacity = "";
+ }
+ blink();
+ }.bind(this), this.blinkInterval);
+
+ blink();
+ };
+
+ this.getPixelPosition = function(position, onScreen) {
+ if (!this.config || !this.session)
+ return {left : 0, top : 0};
+
+ if (!position)
+ position = this.session.selection.getCursor();
+ var pos = this.session.documentToScreenPosition(position);
+ var cursorLeft = this.$padding + pos.column * this.config.characterWidth;
+ var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *
+ this.config.lineHeight;
+
+ return {left : cursorLeft, top : cursorTop};
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var selections = this.session.$selectionMarkers;
+ var i = 0, cursorIndex = 0;
+
+ if (selections === undefined || selections.length === 0){
+ selections = [{cursor: null}];
+ }
+
+ for (var i = 0, n = selections.length; i < n; i++) {
+ var pixelPos = this.getPixelPosition(selections[i].cursor, true);
+ if ((pixelPos.top > config.height + config.offset ||
+ pixelPos.top < -config.offset) && i > 1) {
+ continue;
+ }
+
+ var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
+
+ style.left = pixelPos.left + "px";
+ style.top = pixelPos.top + "px";
+ style.width = config.characterWidth + "px";
+ style.height = config.lineHeight + "px";
+ }
+ while (this.cursors.length > cursorIndex)
+ this.removeCursor();
+
+ var overwrite = this.session.getOverwrite();
+ this.$setOverwrite(overwrite);
+
+ // cache for textarea and gutter highlight
+ this.$pixelPos = pixelPos;
+ this.restartTimer();
+ };
+
+ this.$setOverwrite = function(overwrite) {
+ if (overwrite != this.overwrite) {
+ this.overwrite = overwrite;
+ if (overwrite)
+ dom.addCssClass(this.element, "ace_overwrite-cursors");
+ else
+ dom.removeCssClass(this.element, "ace_overwrite-cursors");
+ }
+ };
+
+ this.destroy = function() {
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ };
+
+}).call(Cursor.prototype);
+
+exports.Cursor = Cursor;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/layer/gutter.js b/src/fauxton/assets/js/libs/ace/layer/gutter.js
new file mode 100644
index 000000000..c1130d8f6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/layer/gutter.js
@@ -0,0 +1,265 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Gutter = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_gutter-layer";
+ parentEl.appendChild(this.element);
+ this.setShowFoldWidgets(this.$showFoldWidgets);
+
+ this.gutterWidth = 0;
+
+ this.$annotations = [];
+ this.$updateAnnotations = this.$updateAnnotations.bind(this);
+
+ this.$cells = [];
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.setSession = function(session) {
+ if (this.session)
+ this.session.removeEventListener("change", this.$updateAnnotations);
+ this.session = session;
+ session.on("change", this.$updateAnnotations);
+ };
+
+ this.addGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.addGutterDecoration");
+ this.session.addGutterDecoration(row, className);
+ };
+
+ this.removeGutterDecoration = function(row, className){
+ if (window.console)
+ console.warn && console.warn("deprecated use session.removeGutterDecoration");
+ this.session.removeGutterDecoration(row, className);
+ };
+
+ this.setAnnotations = function(annotations) {
+ // iterate over sparse array
+ this.$annotations = []
+ var rowInfo, row;
+ for (var i = 0; i < annotations.length; i++) {
+ var annotation = annotations[i];
+ var row = annotation.row;
+ var rowInfo = this.$annotations[row];
+ if (!rowInfo)
+ rowInfo = this.$annotations[row] = {text: []};
+
+ var annoText = annotation.text;
+ annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || "";
+
+ if (rowInfo.text.indexOf(annoText) === -1)
+ rowInfo.text.push(annoText);
+
+ var type = annotation.type;
+ if (type == "error")
+ rowInfo.className = " ace_error";
+ else if (type == "warning" && rowInfo.className != " ace_error")
+ rowInfo.className = " ace_warning";
+ else if (type == "info" && (!rowInfo.className))
+ rowInfo.className = " ace_info";
+ }
+ };
+
+ this.$updateAnnotations = function (e) {
+ if (!this.$annotations.length)
+ return;
+ var delta = e.data;
+ var range = delta.range;
+ var firstRow = range.start.row;
+ var len = range.end.row - firstRow;
+ if (len === 0) {
+ // do nothing
+ } else if (delta.action == "removeText" || delta.action == "removeLines") {
+ this.$annotations.splice(firstRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.$annotations.splice.apply(this.$annotations, args);
+ }
+ };
+
+ this.update = function(config) {
+ var firstRow = config.firstRow;
+ var lastRow = config.lastRow;
+ var fold = this.session.getNextFoldLine(firstRow);
+ var foldStart = fold ? fold.start.row : Infinity;
+ var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
+ var breakpoints = this.session.$breakpoints;
+ var decorations = this.session.$decorations;
+ var firstLineNumber = this.session.$firstLineNumber;
+ var lastLineNumber = 0;
+
+ var cell = null;
+ var index = -1;
+ var row = firstRow;
+ while (true) {
+ if (row > foldStart) {
+ row = fold.end.row + 1;
+ fold = this.session.getNextFoldLine(row, fold);
+ foldStart = fold ? fold.start.row : Infinity;
+ }
+ if (row > lastRow) {
+ while (this.$cells.length > index + 1) {
+ cell = this.$cells.pop();
+ this.element.removeChild(cell.element);
+ }
+ break;
+ }
+
+ cell = this.$cells[++index];
+ if (!cell) {
+ cell = {element: null, textNode: null, foldWidget: null};
+ cell.element = dom.createElement("div");
+ cell.textNode = document.createTextNode('');
+ cell.element.appendChild(cell.textNode);
+ this.element.appendChild(cell.element);
+ this.$cells[index] = cell;
+ }
+
+ var className = "ace_gutter-cell ";
+ if (breakpoints[row])
+ className += breakpoints[row];
+ if (decorations[row])
+ className += decorations[row];
+ if (this.$annotations[row])
+ className += this.$annotations[row].className;
+ if (cell.element.className != className)
+ cell.element.className = className;
+
+ var height = this.session.getRowLength(row) * config.lineHeight + "px";
+ if (height != cell.element.style.height)
+ cell.element.style.height = height;
+
+ var text = lastLineNumber = row + firstLineNumber;
+ if (text != cell.textNode.data)
+ cell.textNode.data = text;
+
+ if (foldWidgets) {
+ var c = foldWidgets[row];
+ // check if cached value is invalidated and we need to recompute
+ if (c == null)
+ c = foldWidgets[row] = this.session.getFoldWidget(row);
+ }
+
+ if (c) {
+ if (!cell.foldWidget) {
+ cell.foldWidget = dom.createElement("span");
+ cell.element.appendChild(cell.foldWidget);
+ }
+ var className = "ace_fold-widget ace_" + c;
+ if (c == "start" && row == foldStart && row < fold.end.row)
+ className += " ace_closed";
+ else
+ className += " ace_open";
+ if (cell.foldWidget.className != className)
+ cell.foldWidget.className = className;
+
+ var height = config.lineHeight + "px";
+ if (cell.foldWidget.style.height != height)
+ cell.foldWidget.style.height = height;
+ } else {
+ if (cell.foldWidget != null) {
+ cell.element.removeChild(cell.foldWidget);
+ cell.foldWidget = null;
+ }
+ }
+
+ row++;
+ }
+
+ this.element.style.height = config.minHeight + "px";
+
+ if (this.$fixedWidth || this.session.$useWrapMode)
+ lastLineNumber = this.session.getLength();
+
+ var gutterWidth = lastLineNumber.toString().length * config.characterWidth;
+ var padding = this.$padding || this.$computePadding();
+ gutterWidth += padding.left + padding.right;
+ if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
+ this.gutterWidth = gutterWidth;
+ this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+ this._emit("changeGutterWidth", gutterWidth);
+ }
+ };
+
+ this.$fixedWidth = false;
+
+ this.$showFoldWidgets = true;
+ this.setShowFoldWidgets = function(show) {
+ if (show)
+ dom.addCssClass(this.element, "ace_folding-enabled");
+ else
+ dom.removeCssClass(this.element, "ace_folding-enabled");
+
+ this.$showFoldWidgets = show;
+ this.$padding = null;
+ };
+
+ this.getShowFoldWidgets = function() {
+ return this.$showFoldWidgets;
+ };
+
+ this.$computePadding = function() {
+ if (!this.element.firstChild)
+ return {left: 0, right: 0};
+ var style = dom.computedStyle(this.element.firstChild);
+ this.$padding = {};
+ this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;
+ this.$padding.right = parseInt(style.paddingRight) || 0;
+ return this.$padding;
+ };
+
+ this.getRegion = function(point) {
+ var padding = this.$padding || this.$computePadding();
+ var rect = this.element.getBoundingClientRect();
+ if (point.x < padding.left + rect.left)
+ return "markers";
+ if (this.$showFoldWidgets && point.x > rect.right - padding.right)
+ return "foldWidgets";
+ };
+
+}).call(Gutter.prototype);
+
+exports.Gutter = Gutter;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/layer/marker.js b/src/fauxton/assets/js/libs/ace/layer/marker.js
new file mode 100644
index 000000000..cd1b992db
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/layer/marker.js
@@ -0,0 +1,218 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var dom = require("../lib/dom");
+
+var Marker = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_marker-layer";
+ parentEl.appendChild(this.element);
+};
+
+(function() {
+
+ this.$padding = 0;
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ };
+ this.setSession = function(session) {
+ this.session = session;
+ };
+
+ this.setMarkers = function(markers) {
+ this.markers = markers;
+ };
+
+ this.update = function(config) {
+ var config = config || this.config;
+ if (!config)
+ return;
+
+ this.config = config;
+
+
+ var html = [];
+ for (var key in this.markers) {
+ var marker = this.markers[key];
+
+ if (!marker.range) {
+ marker.update(html, this, this.session, config);
+ continue;
+ }
+
+ var range = marker.range.clipRows(config.firstRow, config.lastRow);
+ if (range.isEmpty()) continue;
+
+ range = range.toScreenRange(this.session);
+ if (marker.renderer) {
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+ marker.renderer(html, range, left, top, config);
+ } else if (marker.type == "fullLine") {
+ this.drawFullLineMarker(html, range, marker.clazz, config);
+ } else if (marker.type == "screenLine") {
+ this.drawScreenLineMarker(html, range, marker.clazz, config);
+ } else if (range.isMultiLine()) {
+ if (marker.type == "text")
+ this.drawTextMarker(html, range, marker.clazz, config);
+ else
+ this.drawMultiLineMarker(html, range, marker.clazz, config);
+ } else {
+ this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config);
+ }
+ }
+ this.element = dom.setInnerHtml(this.element, html.join(""));
+ };
+
+ this.$getTop = function(row, layerConfig) {
+ return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+ };
+
+ // Draws a marker, which spans a range of text on multiple lines
+ this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
+ // selection start
+ var row = range.start.row;
+
+ var lineRange = new Range(
+ row, range.start.column,
+ row, this.session.getScreenLastRowColumn(row)
+ );
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle);
+
+ // selection end
+ row = range.end.row;
+ lineRange = new Range(row, 0, row, range.end.column);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle);
+
+ for (row = range.start.row + 1; row < range.end.row; row++) {
+ lineRange.start.row = row;
+ lineRange.end.row = row;
+ lineRange.end.column = this.session.getScreenLastRowColumn(row);
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle);
+ }
+ };
+
+ // Draws a multi line marker, where lines span the full width
+ this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ // from selection start to the end of the line
+ var padding = this.$padding;
+ var height = config.lineHeight;
+ var top = this.$getTop(range.start.row, config);
+ var left = padding + range.start.column * config.characterWidth;
+ extraStyle = extraStyle || "";
+
+ stringBuilder.push(
+ "<div class='", clazz, " ace_start' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", left, "px;", extraStyle, "'></div>"
+ );
+
+ // from start of the last line to the selection end
+ top = this.$getTop(range.end.row, config);
+ var width = range.end.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+
+ // all the complete lines
+ height = (range.end.row - range.start.row - 1) * config.lineHeight;
+ if (height < 0)
+ return;
+ top = this.$getTop(range.start.row + 1, config);
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+ };
+
+ // Draws a marker which covers part or whole width of a single screen line
+ this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
+ var height = config.lineHeight;
+ var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;
+
+ var top = this.$getTop(range.start.row, config);
+ var left = this.$padding + range.start.column * config.characterWidth;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", left, "px;", extraStyle || "", "'></div>"
+ );
+ };
+
+ this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+ if (range.start.row != range.end.row)
+ height += this.$getTop(range.end.row, config) - top;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;", extraStyle || "", "'></div>"
+ );
+ };
+
+ this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;", extraStyle || "", "'></div>"
+ );
+ };
+
+}).call(Marker.prototype);
+
+exports.Marker = Marker;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/layer/text.js b/src/fauxton/assets/js/libs/ace/layer/text.js
new file mode 100644
index 000000000..54f0ef468
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/layer/text.js
@@ -0,0 +1,661 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var useragent = require("../lib/useragent");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var Text = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_text-layer";
+ parentEl.appendChild(this.element);
+
+ this.$characterSize = {width: 0, height: 0};
+ this.checkForSizeChanges();
+ this.$pollSizeChanges();
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.EOF_CHAR = "\xB6"; //"&para;";
+ this.EOL_CHAR = "\xAC"; //"&not;";
+ this.TAB_CHAR = "\u2192"; //"&rarr;" "\u21E5";
+ this.SPACE_CHAR = "\xB7"; //"&middot;";
+ this.$padding = 0;
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.element.style.padding = "0 " + padding + "px";
+ };
+
+ this.getLineHeight = function() {
+ return this.$characterSize.height || 0;
+ };
+
+ this.getCharacterWidth = function() {
+ return this.$characterSize.width || 0;
+ };
+
+ this.checkForSizeChanges = function() {
+ var size = this.$measureSizes();
+ if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
+ this.$measureNode.style.fontWeight = "bold";
+ var boldSize = this.$measureSizes();
+ this.$measureNode.style.fontWeight = "";
+ this.$characterSize = size;
+ this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+ this._emit("changeCharacterSize", {data: size});
+ }
+ };
+
+ this.$pollSizeChanges = function() {
+ var self = this;
+ this.$pollSizeChangesTimer = setInterval(function() {
+ self.checkForSizeChanges();
+ }, 500);
+ };
+
+ this.$fontStyles = {
+ fontFamily : 1,
+ fontSize : 1,
+ fontWeight : 1,
+ fontStyle : 1,
+ lineHeight : 1
+ };
+
+ this.$measureSizes = useragent.isIE || useragent.isOldGecko ? function() {
+ var n = 1000;
+ if (!this.$measureNode) {
+ var measureNode = this.$measureNode = dom.createElement("div");
+ var style = measureNode.style;
+
+ style.width = style.height = "auto";
+ style.left = style.top = (-n * 40) + "px";
+
+ style.visibility = "hidden";
+ style.position = "fixed";
+ style.overflow = "visible";
+ style.whiteSpace = "nowrap";
+
+ // in FF 3.6 monospace fonts can have a fixed sub pixel width.
+ // that's why we have to measure many characters
+ // Note: characterWidth can be a float!
+ measureNode.innerHTML = lang.stringRepeat("Xy", n);
+
+ if (this.element.ownerDocument.body) {
+ this.element.ownerDocument.body.appendChild(measureNode);
+ } else {
+ var container = this.element.parentNode;
+ while (!dom.hasCssClass(container, "ace_editor"))
+ container = container.parentNode;
+ container.appendChild(measureNode);
+ }
+ }
+
+ // Size and width can be null if the editor is not visible or
+ // detached from the document
+ if (!this.element.offsetWidth)
+ return null;
+
+ var style = this.$measureNode.style;
+ var computedStyle = dom.computedStyle(this.element);
+ for (var prop in this.$fontStyles)
+ style[prop] = computedStyle[prop];
+
+ var size = {
+ height: this.$measureNode.offsetHeight,
+ width: this.$measureNode.offsetWidth / (n * 2)
+ };
+
+ // Size and width can be null if the editor is not visible or
+ // detached from the document
+ if (size.width == 0 || size.height == 0)
+ return null;
+
+ return size;
+ }
+ : function() {
+ if (!this.$measureNode) {
+ var measureNode = this.$measureNode = dom.createElement("div");
+ var style = measureNode.style;
+
+ style.width = style.height = "auto";
+ style.left = style.top = -100 + "px";
+
+ style.visibility = "hidden";
+ style.position = "fixed";
+ style.overflow = "visible";
+ style.whiteSpace = "nowrap";
+
+ // fixes fractional fixed-width fonts; see http://git.io/CavZNw
+ measureNode.innerHTML = lang.stringRepeat("X", 100);
+
+ var container = this.element.parentNode;
+ while (container && !dom.hasCssClass(container, "ace_editor"))
+ container = container.parentNode;
+
+ if (!container)
+ return this.$measureNode = null;
+
+ container.appendChild(measureNode);
+ }
+
+ var rect = this.$measureNode.getBoundingClientRect();
+
+ var size = {
+ height: rect.height,
+ width: rect.width / 100
+ };
+
+ // Size and width can be null if the editor is not visible or
+ // detached from the document
+ if (size.width == 0 || size.height == 0)
+ return null;
+
+ return size;
+ };
+
+ this.setSession = function(session) {
+ this.session = session;
+ this.$computeTabString();
+ };
+
+ this.showInvisibles = false;
+ this.setShowInvisibles = function(showInvisibles) {
+ if (this.showInvisibles == showInvisibles)
+ return false;
+
+ this.showInvisibles = showInvisibles;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.displayIndentGuides = true;
+ this.setDisplayIndentGuides = function(display) {
+ if (this.displayIndentGuides == display)
+ return false;
+
+ this.displayIndentGuides = display;
+ this.$computeTabString();
+ return true;
+ };
+
+ this.$tabStrings = [];
+ this.onChangeTabSize =
+ this.$computeTabString = function() {
+ var tabSize = this.session.getTabSize();
+ this.tabSize = tabSize;
+ var tabStr = this.$tabStrings = [0];
+ for (var i = 1; i < tabSize + 1; i++) {
+ if (this.showInvisibles) {
+ tabStr.push("<span class='ace_invisible'>"
+ + this.TAB_CHAR
+ + lang.stringRepeat("\xa0", i - 1)
+ + "</span>");
+ } else {
+ tabStr.push(lang.stringRepeat("\xa0", i));
+ }
+ }
+ if (this.displayIndentGuides) {
+ this.$indentGuideRe = /\s\S| \t|\t |\s$/;
+ var className = "ace_indent-guide";
+ if (this.showInvisibles) {
+ className += " ace_invisible";
+ var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
+ var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1);
+ } else{
+ var spaceContent = lang.stringRepeat("\xa0", this.tabSize);
+ var tabContent = spaceContent;
+ }
+
+ this.$tabStrings[" "] = "<span class='" + className + "'>" + spaceContent + "</span>";
+ this.$tabStrings["\t"] = "<span class='" + className + "'>" + tabContent + "</span>";
+ }
+ };
+
+ this.updateLines = function(config, firstRow, lastRow) {
+ // Due to wrap line changes there can be new lines if e.g.
+ // the line to updated wrapped in the meantime.
+ if (this.config.lastRow != config.lastRow ||
+ this.config.firstRow != config.firstRow) {
+ this.scrollLines(config);
+ }
+ this.config = config;
+
+ var first = Math.max(firstRow, config.firstRow);
+ var last = Math.min(lastRow, config.lastRow);
+
+ var lineElements = this.element.childNodes;
+ var lineElementsIdx = 0;
+
+ for (var row = config.firstRow; row < first; row++) {
+ var foldLine = this.session.getFoldLine(row);
+ if (foldLine) {
+ if (foldLine.containsRow(first)) {
+ first = foldLine.start.row;
+ break;
+ } else {
+ row = foldLine.end.row;
+ }
+ }
+ lineElementsIdx ++;
+ }
+
+ var row = first;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > last)
+ break;
+
+ var lineElement = lineElements[lineElementsIdx++];
+ if (lineElement) {
+ var html = [];
+ this.$renderLine(
+ html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false
+ );
+ dom.setInnerHtml(lineElement, html.join(""));
+ }
+ row++;
+ }
+ };
+
+ this.scrollLines = function(config) {
+ var oldConfig = this.config;
+ this.config = config;
+
+ if (!oldConfig || oldConfig.lastRow < config.firstRow)
+ return this.update(config);
+
+ if (config.lastRow < oldConfig.firstRow)
+ return this.update(config);
+
+ var el = this.element;
+ if (oldConfig.firstRow < config.firstRow)
+ for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)
+ el.removeChild(el.firstChild);
+
+ if (oldConfig.lastRow > config.lastRow)
+ for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)
+ el.removeChild(el.lastChild);
+
+ if (config.firstRow < oldConfig.firstRow) {
+ var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);
+ if (el.firstChild)
+ el.insertBefore(fragment, el.firstChild);
+ else
+ el.appendChild(fragment);
+ }
+
+ if (config.lastRow > oldConfig.lastRow) {
+ var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);
+ el.appendChild(fragment);
+ }
+ };
+
+ this.$renderLinesFragment = function(config, firstRow, lastRow) {
+ var fragment = this.element.ownerDocument.createDocumentFragment();
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row : Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ var container = dom.createElement("div");
+
+ var html = [];
+ // Get the tokens per line as there might be some lines in between
+ // beeing folded.
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+ // don't use setInnerHtml since we are working with an empty DIV
+ container.innerHTML = html.join("");
+ if (this.$useLineGroups()) {
+ container.className = 'ace_line_group';
+ fragment.appendChild(container);
+ } else {
+ var lines = container.childNodes
+ while(lines.length)
+ fragment.appendChild(lines[0]);
+ }
+
+ row++;
+ }
+ return fragment;
+ };
+
+ this.update = function(config) {
+ this.config = config;
+
+ var html = [];
+ var firstRow = config.firstRow, lastRow = config.lastRow;
+
+ var row = firstRow;
+ var foldLine = this.session.getNextFoldLine(row);
+ var foldStart = foldLine ? foldLine.start.row : Infinity;
+
+ while (true) {
+ if (row > foldStart) {
+ row = foldLine.end.row+1;
+ foldLine = this.session.getNextFoldLine(row, foldLine);
+ foldStart = foldLine ? foldLine.start.row :Infinity;
+ }
+ if (row > lastRow)
+ break;
+
+ if (this.$useLineGroups())
+ html.push("<div class='ace_line_group'>")
+
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+ if (this.$useLineGroups())
+ html.push("</div>"); // end the line group
+
+ row++;
+ }
+ this.element = dom.setInnerHtml(this.element, html.join(""));
+ };
+
+ this.$textToken = {
+ "text": true,
+ "rparen": true,
+ "lparen": true
+ };
+
+ this.$renderToken = function(stringBuilder, screenColumn, token, value) {
+ var self = this;
+ var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
+ var replaceFunc = function(c, a, b, tabIdx, idx4) {
+ if (a) {
+ return self.showInvisibles ?
+ "<span class='ace_invisible'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>" :
+ lang.stringRepeat("\xa0", c.length);
+ } else if (c == "&") {
+ return "&#38;";
+ } else if (c == "<") {
+ return "&#60;";
+ } else if (c == "\t") {
+ var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);
+ screenColumn += tabSize - 1;
+ return self.$tabStrings[tabSize];
+ } else if (c == "\u3000") {
+ // U+3000 is both invisible AND full-width, so must be handled uniquely
+ var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
+ var space = self.showInvisibles ? self.SPACE_CHAR : "";
+ screenColumn += 1;
+ return "<span class='" + classToUse + "' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + space + "</span>";
+ } else if (b) {
+ return "<span class='ace_invisible ace_invalid'>" + self.SPACE_CHAR + "</span>";
+ } else {
+ screenColumn += 1;
+ return "<span class='ace_cjk' style='width:" +
+ (self.config.characterWidth * 2) +
+ "px'>" + c + "</span>";
+ }
+ };
+
+ var output = value.replace(replaceReg, replaceFunc);
+
+ if (!this.$textToken[token.type]) {
+ var classes = "ace_" + token.type.replace(/\./g, " ace_");
+ var style = "";
+ if (token.type == "fold")
+ style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' ";
+ stringBuilder.push("<span class='", classes, "'", style, ">", output, "</span>");
+ }
+ else {
+ stringBuilder.push(output);
+ }
+ return screenColumn + value.length;
+ };
+
+ this.renderIndentGuide = function(stringBuilder, value, max) {
+ var cols = value.search(this.$indentGuideRe);
+ if (cols <= 0 || cols >= max)
+ return value;
+ if (value[0] == " ") {
+ cols -= cols % this.tabSize;
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize));
+ return value.substr(cols);
+ } else if (value[0] == "\t") {
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols));
+ return value.substr(cols);
+ }
+ return value;
+ };
+
+ this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {
+ var chars = 0;
+ var split = 0;
+ var splitChars = splits[0];
+ var screenColumn = 0;
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ var value = token.value;
+ if (i == 0 && this.displayIndentGuides) {
+ chars = value.length;
+ value = this.renderIndentGuide(stringBuilder, value, splitChars);
+ if (!value)
+ continue;
+ chars -= value.length;
+ }
+
+ if (chars + value.length < splitChars) {
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ chars += value.length;
+ } else {
+ while (chars + value.length >= splitChars) {
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn,
+ token, value.substring(0, splitChars - chars)
+ );
+ value = value.substring(splitChars - chars);
+ chars = splitChars;
+
+ if (!onlyContents) {
+ stringBuilder.push("</div>",
+ "<div class='ace_line' style='height:",
+ this.config.lineHeight, "px'>"
+ );
+ }
+
+ split ++;
+ screenColumn = 0;
+ splitChars = splits[split] || Number.MAX_VALUE;
+ }
+ if (value.length != 0) {
+ chars += value.length;
+ screenColumn = this.$renderToken(
+ stringBuilder, screenColumn, token, value
+ );
+ }
+ }
+ }
+ };
+
+ this.$renderSimpleLine = function(stringBuilder, tokens) {
+ var screenColumn = 0;
+ var token = tokens[0];
+ var value = token.value;
+ if (this.displayIndentGuides)
+ value = this.renderIndentGuide(stringBuilder, value);
+ if (value)
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ for (var i = 1; i < tokens.length; i++) {
+ token = tokens[i];
+ value = token.value;
+ screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);
+ }
+ };
+
+ // row is either first row of foldline or not in fold
+ this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {
+ if (!foldLine && foldLine != false)
+ foldLine = this.session.getFoldLine(row);
+
+ if (foldLine)
+ var tokens = this.$getFoldLineTokens(row, foldLine);
+ else
+ var tokens = this.session.getTokens(row);
+
+
+ if (!onlyContents) {
+ stringBuilder.push(
+ "<div class='ace_line' style='height:", this.config.lineHeight, "px'>"
+ );
+ }
+
+ if (tokens.length) {
+ var splits = this.session.getRowSplitData(row);
+ if (splits && splits.length)
+ this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);
+ else
+ this.$renderSimpleLine(stringBuilder, tokens);
+ }
+
+ if (this.showInvisibles) {
+ if (foldLine)
+ row = foldLine.end.row
+
+ stringBuilder.push(
+ "<span class='ace_invisible'>",
+ row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
+ "</span>"
+ );
+ }
+ if (!onlyContents)
+ stringBuilder.push("</div>");
+ };
+
+ this.$getFoldLineTokens = function(row, foldLine) {
+ var session = this.session;
+ var renderTokens = [];
+
+ function addTokens(tokens, from, to) {
+ var idx = 0, col = 0;
+ while ((col + tokens[idx].value.length) < from) {
+ col += tokens[idx].value.length;
+ idx++;
+
+ if (idx == tokens.length)
+ return;
+ }
+ if (col != from) {
+ var value = tokens[idx].value.substring(from - col);
+ // Check if the token value is longer then the from...to spacing.
+ if (value.length > (to - from))
+ value = value.substring(0, to - from);
+
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value
+ });
+
+ col = from + value.length;
+ idx += 1;
+ }
+
+ while (col < to && idx < tokens.length) {
+ var value = tokens[idx].value;
+ if (value.length + col > to) {
+ renderTokens.push({
+ type: tokens[idx].type,
+ value: value.substring(0, to - col)
+ });
+ } else
+ renderTokens.push(tokens[idx]);
+ col += value.length;
+ idx += 1;
+ }
+ }
+
+ var tokens = session.getTokens(row);
+ foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {
+ if (placeholder != null) {
+ renderTokens.push({
+ type: "fold",
+ value: placeholder
+ });
+ } else {
+ if (isNewRow)
+ tokens = session.getTokens(row);
+
+ if (tokens.length)
+ addTokens(tokens, lastColumn, column);
+ }
+ }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);
+
+ return renderTokens;
+ };
+
+ this.$useLineGroups = function() {
+ // For the updateLines function to work correctly, it's important that the
+ // child nodes of this.element correspond on a 1-to-1 basis to rows in the
+ // document (as distinct from lines on the screen). For sessions that are
+ // wrapped, this means we need to add a layer to the node hierarchy (tagged
+ // with the class name ace_line_group).
+ return this.session.getUseWrapMode();
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.$measureNode)
+ this.$measureNode.parentNode.removeChild(this.$measureNode);
+ delete this.$measureNode;
+ };
+
+}).call(Text.prototype);
+
+exports.Text = Text;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/layer/text_test.js b/src/fauxton/assets/js/libs/ace/layer/text_test.js
new file mode 100644
index 000000000..a14a37e6b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/layer/text_test.js
@@ -0,0 +1,126 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("../test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+var EditSession = require("../edit_session").EditSession;
+var TextLayer = require("./text").Text;
+var JavaScriptMode = require("../mode/javascript").Mode;
+
+module.exports = {
+
+ setUp: function(next) {
+ this.session = new EditSession("");
+ this.session.setMode(new JavaScriptMode());
+ this.textLayer = new TextLayer(document.createElement("div"));
+ this.textLayer.setSession(this.session);
+ this.textLayer.config = {
+ characterWidth: 10,
+ lineHeight: 20
+ };
+ next()
+ },
+
+ "test: render line with hard tabs should render the same as lines with soft tabs" : function() {
+ this.session.setValue("a\ta\ta\t\na a a \n");
+ this.textLayer.$computeTabString();
+
+ // row with hard tabs
+ var stringBuilder = [];
+ this.textLayer.$renderLine(stringBuilder, 0);
+
+ // row with soft tabs
+ var stringBuilder2 = [];
+ this.textLayer.$renderLine(stringBuilder2, 1);
+ assert.equal(stringBuilder.join(""), stringBuilder2.join(""));
+ },
+
+ "test rendering width of ideographic space (U+3000)" : function() {
+ this.session.setValue("\u3000");
+
+ var stringBuilder = [];
+ this.textLayer.$renderLine(stringBuilder, 0, true);
+ assert.equal(stringBuilder.join(""), "<span class='ace_cjk' style='width:20px'></span>");
+
+ this.textLayer.setShowInvisibles(true);
+ var stringBuilder = [];
+ this.textLayer.$renderLine(stringBuilder, 0, true);
+ assert.equal(
+ stringBuilder.join(""),
+ "<span class='ace_cjk ace_invisible' style='width:20px'>" + this.textLayer.SPACE_CHAR + "</span>"
+ + "<span class='ace_invisible'>\xB6</span>"
+ );
+ },
+
+ "test rendering of indent guides" : function() {
+ var textLayer = this.textLayer
+ var EOL = "<span class='ace_invisible'>" + textLayer.EOL_CHAR + "</span>";
+ var SPACE = function(i) {return Array(i+1).join("\xa0")}
+ var DOT = function(i) {return Array(i+1).join(textLayer.SPACE_CHAR)}
+ var TAB = function(i) {return textLayer.TAB_CHAR + SPACE(i-1)}
+ function testRender(results) {
+ for (var i = results.length; i--; ) {
+ var stringBuilder = [];
+ textLayer.$renderLine(stringBuilder, i, true);
+ assert.equal(stringBuilder.join(""), results[i]);
+ }
+ }
+
+ this.session.setValue(" \n\t\tf\n ");
+ testRender([
+ "<span class='ace_indent-guide'>" + SPACE(4) + "</span>" + SPACE(2),
+ "<span class='ace_indent-guide'>" + SPACE(4) + "</span>" + SPACE(4) + "<span class='ace_identifier'>f</span>",
+ SPACE(3)
+ ]);
+ this.textLayer.setShowInvisibles(true);
+ testRender([
+ "<span class='ace_indent-guide ace_invisible'>" + DOT(4) + "</span><span class='ace_invisible'>" + DOT(2) + "</span>" + EOL,
+ "<span class='ace_indent-guide ace_invisible'>" + TAB(4) + "</span><span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL,
+ ]);
+ this.textLayer.setDisplayIndentGuides(false);
+ testRender([
+ "<span class='ace_invisible'>" + DOT(6) + "</span>" + EOL,
+ "<span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL
+ ]);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/lib/dom.js b/src/fauxton/assets/js/libs/ace/lib/dom.js
new file mode 100644
index 000000000..b37240099
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/dom.js
@@ -0,0 +1,283 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+if (typeof document == "undefined")
+ return;
+
+var XHTML_NS = "http://www.w3.org/1999/xhtml";
+
+exports.getDocumentHead = function(doc) {
+ if (!doc)
+ doc = document;
+ return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement;
+}
+
+exports.createElement = function(tag, ns) {
+ return document.createElementNS ?
+ document.createElementNS(ns || XHTML_NS, tag) :
+ document.createElement(tag);
+};
+
+exports.hasCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g);
+ return classes.indexOf(name) !== -1;
+};
+
+/*
+* Add a CSS class to the list of classes on the given node
+*/
+exports.addCssClass = function(el, name) {
+ if (!exports.hasCssClass(el, name)) {
+ el.className += " " + name;
+ }
+};
+
+/*
+* Remove a CSS class from the list of classes on the given node
+*/
+exports.removeCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g);
+ while (true) {
+ var index = classes.indexOf(name);
+ if (index == -1) {
+ break;
+ }
+ classes.splice(index, 1);
+ }
+ el.className = classes.join(" ");
+};
+
+exports.toggleCssClass = function(el, name) {
+ var classes = el.className.split(/\s+/g), add = true;
+ while (true) {
+ var index = classes.indexOf(name);
+ if (index == -1) {
+ break;
+ }
+ add = false;
+ classes.splice(index, 1);
+ }
+ if(add)
+ classes.push(name);
+
+ el.className = classes.join(" ");
+ return add;
+};
+
+/*
+ * Add or remove a CSS class from the list of classes on the given node
+ * depending on the value of <tt>include</tt>
+ */
+exports.setCssClass = function(node, className, include) {
+ if (include) {
+ exports.addCssClass(node, className);
+ } else {
+ exports.removeCssClass(node, className);
+ }
+};
+
+exports.hasCssString = function(id, doc) {
+ var index = 0, sheets;
+ doc = doc || document;
+
+ if (doc.createStyleSheet && (sheets = doc.styleSheets)) {
+ while (index < sheets.length)
+ if (sheets[index++].owningElement.id === id) return true;
+ } else if ((sheets = doc.getElementsByTagName("style"))) {
+ while (index < sheets.length)
+ if (sheets[index++].id === id) return true;
+ }
+
+ return false;
+};
+
+exports.importCssString = function importCssString(cssText, id, doc) {
+ doc = doc || document;
+ // If style is already imported return immediately.
+ if (id && exports.hasCssString(id, doc))
+ return null;
+
+ var style;
+
+ if (doc.createStyleSheet) {
+ style = doc.createStyleSheet();
+ style.cssText = cssText;
+ if (id)
+ style.owningElement.id = id;
+ } else {
+ style = doc.createElementNS
+ ? doc.createElementNS(XHTML_NS, "style")
+ : doc.createElement("style");
+
+ style.appendChild(doc.createTextNode(cssText));
+ if (id)
+ style.id = id;
+
+ exports.getDocumentHead(doc).appendChild(style);
+ }
+};
+
+exports.importCssStylsheet = function(uri, doc) {
+ if (doc.createStyleSheet) {
+ doc.createStyleSheet(uri);
+ } else {
+ var link = exports.createElement('link');
+ link.rel = 'stylesheet';
+ link.href = uri;
+
+ exports.getDocumentHead(doc).appendChild(link);
+ }
+};
+
+exports.getInnerWidth = function(element) {
+ return (
+ parseInt(exports.computedStyle(element, "paddingLeft"), 10) +
+ parseInt(exports.computedStyle(element, "paddingRight"), 10) +
+ element.clientWidth
+ );
+};
+
+exports.getInnerHeight = function(element) {
+ return (
+ parseInt(exports.computedStyle(element, "paddingTop"), 10) +
+ parseInt(exports.computedStyle(element, "paddingBottom"), 10) +
+ element.clientHeight
+ );
+};
+
+if (window.pageYOffset !== undefined) {
+ exports.getPageScrollTop = function() {
+ return window.pageYOffset;
+ };
+
+ exports.getPageScrollLeft = function() {
+ return window.pageXOffset;
+ };
+}
+else {
+ exports.getPageScrollTop = function() {
+ return document.body.scrollTop;
+ };
+
+ exports.getPageScrollLeft = function() {
+ return document.body.scrollLeft;
+ };
+}
+
+if (window.getComputedStyle)
+ exports.computedStyle = function(element, style) {
+ if (style)
+ return (window.getComputedStyle(element, "") || {})[style] || "";
+ return window.getComputedStyle(element, "") || {};
+ };
+else
+ exports.computedStyle = function(element, style) {
+ if (style)
+ return element.currentStyle[style];
+ return element.currentStyle;
+ };
+
+exports.scrollbarWidth = function(document) {
+ var inner = exports.createElement("ace_inner");
+ inner.style.width = "100%";
+ inner.style.minWidth = "0px";
+ inner.style.height = "200px";
+ inner.style.display = "block";
+
+ var outer = exports.createElement("ace_outer");
+ var style = outer.style;
+
+ style.position = "absolute";
+ style.left = "-10000px";
+ style.overflow = "hidden";
+ style.width = "200px";
+ style.minWidth = "0px";
+ style.height = "150px";
+ style.display = "block";
+
+ outer.appendChild(inner);
+
+ var body = document.documentElement;
+ body.appendChild(outer);
+
+ var noScrollbar = inner.offsetWidth;
+
+ style.overflow = "scroll";
+ var withScrollbar = inner.offsetWidth;
+
+ if (noScrollbar == withScrollbar) {
+ withScrollbar = outer.clientWidth;
+ }
+
+ body.removeChild(outer);
+
+ return noScrollbar-withScrollbar;
+};
+
+/*
+ * Optimized set innerHTML. This is faster than plain innerHTML if the element
+ * already contains a lot of child elements.
+ *
+ * See http://blog.stevenlevithan.com/archives/faster-than-innerhtml for details
+ */
+exports.setInnerHtml = function(el, innerHtml) {
+ var element = el.cloneNode(false);//document.createElement("div");
+ element.innerHTML = innerHtml;
+ el.parentNode.replaceChild(element, el);
+ return element;
+};
+
+if ("textContent" in document.documentElement) {
+ exports.setInnerText = function(el, innerText) {
+ el.textContent = innerText;
+ };
+
+ exports.getInnerText = function(el) {
+ return el.textContent;
+ };
+}
+else {
+ exports.setInnerText = function(el, innerText) {
+ el.innerText = innerText;
+ };
+
+ exports.getInnerText = function(el) {
+ return el.innerText;
+ };
+}
+
+exports.getParentWindow = function(document) {
+ return document.defaultView || document.parentWindow;
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/es5-shim.js b/src/fauxton/assets/js/libs/ace/lib/es5-shim.js
new file mode 100644
index 000000000..217bdc616
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/es5-shim.js
@@ -0,0 +1,1062 @@
+// https://github.com/kriskowal/es5-shim
+// Copyright 2009-2012 by contributors, MIT License
+
+define(function(require, exports, module) {
+
+/*
+ * Brings an environment as close to ECMAScript 5 compliance
+ * as is possible with the facilities of erstwhile engines.
+ *
+ * Annotated ES5: http://es5.github.com/ (specific links below)
+ * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
+ * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/
+ */
+
+//
+// Function
+// ========
+//
+
+// ES-5 15.3.4.5
+// http://es5.github.com/#x15.3.4.5
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ // 1. Let Target be the this value.
+ var target = this;
+ // 2. If IsCallable(Target) is false, throw a TypeError exception.
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ // 3. Let A be a new (possibly empty) internal list of all of the
+ // argument values provided after thisArg (arg1, arg2 etc), in order.
+ // XXX slicedArgs will stand in for "A" if used
+ var args = slice.call(arguments, 1); // for normal call
+ // 4. Let F be a new native ECMAScript object.
+ // 11. Set the [[Prototype]] internal property of F to the standard
+ // built-in Function prototype object as specified in 15.3.3.1.
+ // 12. Set the [[Call]] internal property of F as described in
+ // 15.3.4.5.1.
+ // 13. Set the [[Construct]] internal property of F as described in
+ // 15.3.4.5.2.
+ // 14. Set the [[HasInstance]] internal property of F as described in
+ // 15.3.4.5.3.
+ var bound = function () {
+
+ if (this instanceof bound) {
+ // 15.3.4.5.2 [[Construct]]
+ // When the [[Construct]] internal method of a function object,
+ // F that was created using the bind function is called with a
+ // list of arguments ExtraArgs, the following steps are taken:
+ // 1. Let target be the value of F's [[TargetFunction]]
+ // internal property.
+ // 2. If target has no [[Construct]] internal method, a
+ // TypeError exception is thrown.
+ // 3. Let boundArgs be the value of F's [[BoundArgs]] internal
+ // property.
+ // 4. Let args be a new list containing the same values as the
+ // list boundArgs in the same order followed by the same
+ // values as the list ExtraArgs in the same order.
+ // 5. Return the result of calling the [[Construct]] internal
+ // method of target providing args as the arguments.
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ // 15.3.4.5.1 [[Call]]
+ // When the [[Call]] internal method of a function object, F,
+ // which was created using the bind function is called with a
+ // this value and a list of arguments ExtraArgs, the following
+ // steps are taken:
+ // 1. Let boundArgs be the value of F's [[BoundArgs]] internal
+ // property.
+ // 2. Let boundThis be the value of F's [[BoundThis]] internal
+ // property.
+ // 3. Let target be the value of F's [[TargetFunction]] internal
+ // property.
+ // 4. Let args be a new list containing the same values as the
+ // list boundArgs in the same order followed by the same
+ // values as the list ExtraArgs in the same order.
+ // 5. Return the result of calling the [[Call]] internal method
+ // of target providing boundThis as the this value and
+ // providing args as the arguments.
+
+ // equiv: target.call(this, ...boundArgs, ...args)
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ // Clean up dangling references.
+ Empty.prototype = null;
+ }
+ // XXX bound.length is never writable, so don't even try
+ //
+ // 15. If the [[Class]] internal property of Target is "Function", then
+ // a. Let L be the length property of Target minus the length of A.
+ // b. Set the length own property of F to either 0 or L, whichever is
+ // larger.
+ // 16. Else set the length own property of F to 0.
+ // 17. Set the attributes of the length own property of F to the values
+ // specified in 15.3.5.1.
+
+ // TODO
+ // 18. Set the [[Extensible]] internal property of F to true.
+
+ // TODO
+ // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3).
+ // 20. Call the [[DefineOwnProperty]] internal method of F with
+ // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]:
+ // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and
+ // false.
+ // 21. Call the [[DefineOwnProperty]] internal method of F with
+ // arguments "arguments", PropertyDescriptor {[[Get]]: thrower,
+ // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false},
+ // and false.
+
+ // TODO
+ // NOTE Function objects created using Function.prototype.bind do not
+ // have a prototype property or the [[Code]], [[FormalParameters]], and
+ // [[Scope]] internal properties.
+ // XXX can't delete prototype in pure-js.
+
+ // 22. Return F.
+ return bound;
+ };
+}
+
+// Shortcut to an often accessed properties, in order to avoid multiple
+// dereference that costs universally.
+// _Please note: Shortcuts are defined after `Function.prototype.bind` as we
+// us it in defining shortcuts.
+var call = Function.prototype.call;
+var prototypeOfArray = Array.prototype;
+var prototypeOfObject = Object.prototype;
+var slice = prototypeOfArray.slice;
+// Having a toString local variable name breaks in Opera so use _toString.
+var _toString = call.bind(prototypeOfObject.toString);
+var owns = call.bind(prototypeOfObject.hasOwnProperty);
+
+// If JS engine supports accessors creating shortcuts.
+var defineGetter;
+var defineSetter;
+var lookupGetter;
+var lookupSetter;
+var supportsAccessors;
+if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) {
+ defineGetter = call.bind(prototypeOfObject.__defineGetter__);
+ defineSetter = call.bind(prototypeOfObject.__defineSetter__);
+ lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);
+ lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);
+}
+
+//
+// Array
+// =====
+//
+
+// ES5 15.4.4.12
+// http://es5.github.com/#x15.4.4.12
+// Default value for second param
+// [bugfix, ielt9, old browsers]
+// IE < 9 bug: [1,2].splice(0).join("") == "" but should be "12"
+if ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ // else {
+ // IE8 bug
+ // }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ // taken from http://docs.sencha.com/ext-js/4-1/source/Array2.html
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+
+ // we try to use Array.push when we can for efficiency...
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+
+// ES5 15.4.3.2
+// http://es5.github.com/#x15.4.3.2
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+
+// The IsCallable() check in the Array functions
+// has been replaced with a strict check on the
+// internal class of the object to trap cases where
+// the provided function was actually a regular
+// expression literal, which in V8 and
+// JavaScriptCore is a typeof "function". Only in
+// V8 are regular expression literals permitted as
+// reduce parameters, so it is desirable in the
+// general case for the shim to match the more
+// strict and common behavior of rejecting regular
+// expressions.
+
+// ES5 15.4.4.18
+// http://es5.github.com/#x15.4.4.18
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach
+
+// Check failure of by-index access of string characters (IE < 9)
+// and failure of `0 in boxedString` (Rhino)
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ length = self.length >>> 0;
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(); // TODO message
+ }
+
+ while (++i < length) {
+ if (i in self) {
+ // Invoke the callback function with call, passing arguments:
+ // context, property value, property key, thisArg object
+ // context
+ fun.call(thisp, self[i], i, object);
+ }
+ }
+ };
+}
+
+// ES5 15.4.4.19
+// http://es5.github.com/#x15.4.4.19
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+
+// ES5 15.4.4.20
+// http://es5.github.com/#x15.4.4.20
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+
+// ES5 15.4.4.16
+// http://es5.github.com/#x15.4.4.16
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+
+// ES5 15.4.4.17
+// http://es5.github.com/#x15.4.4.17
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+
+// ES5 15.4.4.21
+// http://es5.github.com/#x15.4.4.21
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ // no value to return if no initial value and an empty array
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ var i = 0;
+ var result;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i++];
+ break;
+ }
+
+ // if array contains no values, no initial value to return
+ if (++i >= length) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+
+// ES5 15.4.4.22
+// http://es5.github.com/#x15.4.4.22
+// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+
+ // If no callback function or if callback is not a callable function
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ // no value to return if no initial value, empty array
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ var result, i = length - 1;
+ if (arguments.length >= 2) {
+ result = arguments[1];
+ } else {
+ do {
+ if (i in self) {
+ result = self[i--];
+ break;
+ }
+
+ // if array contains no values, no initial value to return
+ if (--i < 0) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+
+// ES5 15.4.4.14
+// http://es5.github.com/#x15.4.4.14
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+
+ var i = 0;
+ if (arguments.length > 1) {
+ i = toInteger(arguments[1]);
+ }
+
+ // handle negative indices
+ i = i >= 0 ? i : Math.max(0, length + i);
+ for (; i < length; i++) {
+ if (i in self && self[i] === sought) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+
+// ES5 15.4.4.15
+// http://es5.github.com/#x15.4.4.15
+// https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
+if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ toObject(this),
+ length = self.length >>> 0;
+
+ if (!length) {
+ return -1;
+ }
+ var i = length - 1;
+ if (arguments.length > 1) {
+ i = Math.min(i, toInteger(arguments[1]));
+ }
+ // handle negative indices
+ i = i >= 0 ? i : length - Math.abs(i);
+ for (; i >= 0; i--) {
+ if (i in self && sought === self[i]) {
+ return i;
+ }
+ }
+ return -1;
+ };
+}
+
+//
+// Object
+// ======
+//
+
+// ES5 15.2.3.2
+// http://es5.github.com/#x15.2.3.2
+if (!Object.getPrototypeOf) {
+ // https://github.com/kriskowal/es5-shim/issues#issue/2
+ // http://ejohn.org/blog/objectgetprototypeof/
+ // recommended by fschaefer on github
+ Object.getPrototypeOf = function getPrototypeOf(object) {
+ return object.__proto__ || (
+ object.constructor ?
+ object.constructor.prototype :
+ prototypeOfObject
+ );
+ };
+}
+
+// ES5 15.2.3.3
+// http://es5.github.com/#x15.2.3.3
+if (!Object.getOwnPropertyDescriptor) {
+ var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " +
+ "non-object: ";
+ Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT + object);
+ // If object does not owns property return undefined immediately.
+ if (!owns(object, property))
+ return;
+
+ var descriptor, getter, setter;
+
+ // If object has a property then it's for sure both `enumerable` and
+ // `configurable`.
+ descriptor = { enumerable: true, configurable: true };
+
+ // If JS engine supports accessor properties then property may be a
+ // getter or setter.
+ if (supportsAccessors) {
+ // Unfortunately `__lookupGetter__` will return a getter even
+ // if object has own non getter property along with a same named
+ // inherited getter. To avoid misbehavior we temporary remove
+ // `__proto__` so that `__lookupGetter__` will return getter only
+ // if it's owned by an object.
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+
+ var getter = lookupGetter(object, property);
+ var setter = lookupSetter(object, property);
+
+ // Once we have getter and setter we can put values back.
+ object.__proto__ = prototype;
+
+ if (getter || setter) {
+ if (getter) descriptor.get = getter;
+ if (setter) descriptor.set = setter;
+
+ // If it was accessor property we're done and return here
+ // in order to avoid adding `value` to the descriptor.
+ return descriptor;
+ }
+ }
+
+ // If we got this far we know that object has an own property that is
+ // not an accessor so we set it as a value and return descriptor.
+ descriptor.value = object[property];
+ return descriptor;
+ };
+}
+
+// ES5 15.2.3.4
+// http://es5.github.com/#x15.2.3.4
+if (!Object.getOwnPropertyNames) {
+ Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ return Object.keys(object);
+ };
+}
+
+// ES5 15.2.3.5
+// http://es5.github.com/#x15.2.3.5
+if (!Object.create) {
+ var createEmpty;
+ if (Object.prototype.__proto__ === null) {
+ createEmpty = function () {
+ return { "__proto__": null };
+ };
+ } else {
+ // In old IE __proto__ can't be used to manually set `null`
+ createEmpty = function () {
+ var empty = {};
+ for (var i in empty)
+ empty[i] = null;
+ empty.constructor =
+ empty.hasOwnProperty =
+ empty.propertyIsEnumerable =
+ empty.isPrototypeOf =
+ empty.toLocaleString =
+ empty.toString =
+ empty.valueOf =
+ empty.__proto__ = null;
+ return empty;
+ }
+ }
+
+ Object.create = function create(prototype, properties) {
+ var object;
+ if (prototype === null) {
+ object = createEmpty();
+ } else {
+ if (typeof prototype != "object")
+ throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'");
+ var Type = function () {};
+ Type.prototype = prototype;
+ object = new Type();
+ // IE has no built-in implementation of `Object.getPrototypeOf`
+ // neither `__proto__`, but this manually setting `__proto__` will
+ // guarantee that `Object.getPrototypeOf` will work as expected with
+ // objects created using `Object.create`
+ object.__proto__ = prototype;
+ }
+ if (properties !== void 0)
+ Object.defineProperties(object, properties);
+ return object;
+ };
+}
+
+// ES5 15.2.3.6
+// http://es5.github.com/#x15.2.3.6
+
+// Patch for WebKit and IE8 standard mode
+// Designed by hax <hax.github.com>
+// related issue: https://github.com/kriskowal/es5-shim/issues#issue/5
+// IE8 Reference:
+// http://msdn.microsoft.com/en-us/library/dd282900.aspx
+// http://msdn.microsoft.com/en-us/library/dd229916.aspx
+// WebKit Bugs:
+// https://bugs.webkit.org/show_bug.cgi?id=36423
+
+function doesDefinePropertyWork(object) {
+ try {
+ Object.defineProperty(object, "sentinel", {});
+ return "sentinel" in object;
+ } catch (exception) {
+ // returns falsy
+ }
+}
+
+// check whether defineProperty works if it's given. Otherwise,
+// shim partially.
+if (Object.defineProperty) {
+ var definePropertyWorksOnObject = doesDefinePropertyWork({});
+ var definePropertyWorksOnDom = typeof document == "undefined" ||
+ doesDefinePropertyWork(document.createElement("div"));
+ if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {
+ var definePropertyFallback = Object.defineProperty;
+ }
+}
+
+if (!Object.defineProperty || definePropertyFallback) {
+ var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: ";
+ var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: "
+ var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " +
+ "on this javascript engine";
+
+ Object.defineProperty = function defineProperty(object, property, descriptor) {
+ if ((typeof object != "object" && typeof object != "function") || object === null)
+ throw new TypeError(ERR_NON_OBJECT_TARGET + object);
+ if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null)
+ throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
+
+ // make a valiant attempt to use the real defineProperty
+ // for I8's DOM elements.
+ if (definePropertyFallback) {
+ try {
+ return definePropertyFallback.call(Object, object, property, descriptor);
+ } catch (exception) {
+ // try the shim if the real one doesn't work
+ }
+ }
+
+ // If it's a data property.
+ if (owns(descriptor, "value")) {
+ // fail silently if "writable", "enumerable", or "configurable"
+ // are requested but not supported
+ /*
+ // alternate approach:
+ if ( // can't implement these features; allow false but not true
+ !(owns(descriptor, "writable") ? descriptor.writable : true) ||
+ !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) ||
+ !(owns(descriptor, "configurable") ? descriptor.configurable : true)
+ )
+ throw new RangeError(
+ "This implementation of Object.defineProperty does not " +
+ "support configurable, enumerable, or writable."
+ );
+ */
+
+ if (supportsAccessors && (lookupGetter(object, property) ||
+ lookupSetter(object, property)))
+ {
+ // As accessors are supported only on engines implementing
+ // `__proto__` we can safely override `__proto__` while defining
+ // a property to make sure that we don't hit an inherited
+ // accessor.
+ var prototype = object.__proto__;
+ object.__proto__ = prototypeOfObject;
+ // Deleting a property anyway since getter / setter may be
+ // defined on object itself.
+ delete object[property];
+ object[property] = descriptor.value;
+ // Setting original `__proto__` back now.
+ object.__proto__ = prototype;
+ } else {
+ object[property] = descriptor.value;
+ }
+ } else {
+ if (!supportsAccessors)
+ throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);
+ // If we got that far then getters and setters can be defined !!
+ if (owns(descriptor, "get"))
+ defineGetter(object, property, descriptor.get);
+ if (owns(descriptor, "set"))
+ defineSetter(object, property, descriptor.set);
+ }
+
+ return object;
+ };
+}
+
+// ES5 15.2.3.7
+// http://es5.github.com/#x15.2.3.7
+if (!Object.defineProperties) {
+ Object.defineProperties = function defineProperties(object, properties) {
+ for (var property in properties) {
+ if (owns(properties, property))
+ Object.defineProperty(object, property, properties[property]);
+ }
+ return object;
+ };
+}
+
+// ES5 15.2.3.8
+// http://es5.github.com/#x15.2.3.8
+if (!Object.seal) {
+ Object.seal = function seal(object) {
+ // this is misleading and breaks feature-detection, but
+ // allows "securable" code to "gracefully" degrade to working
+ // but insecure code.
+ return object;
+ };
+}
+
+// ES5 15.2.3.9
+// http://es5.github.com/#x15.2.3.9
+if (!Object.freeze) {
+ Object.freeze = function freeze(object) {
+ // this is misleading and breaks feature-detection, but
+ // allows "securable" code to "gracefully" degrade to working
+ // but insecure code.
+ return object;
+ };
+}
+
+// detect a Rhino bug and patch it
+try {
+ Object.freeze(function () {});
+} catch (exception) {
+ Object.freeze = (function freeze(freezeObject) {
+ return function freeze(object) {
+ if (typeof object == "function") {
+ return object;
+ } else {
+ return freezeObject(object);
+ }
+ };
+ })(Object.freeze);
+}
+
+// ES5 15.2.3.10
+// http://es5.github.com/#x15.2.3.10
+if (!Object.preventExtensions) {
+ Object.preventExtensions = function preventExtensions(object) {
+ // this is misleading and breaks feature-detection, but
+ // allows "securable" code to "gracefully" degrade to working
+ // but insecure code.
+ return object;
+ };
+}
+
+// ES5 15.2.3.11
+// http://es5.github.com/#x15.2.3.11
+if (!Object.isSealed) {
+ Object.isSealed = function isSealed(object) {
+ return false;
+ };
+}
+
+// ES5 15.2.3.12
+// http://es5.github.com/#x15.2.3.12
+if (!Object.isFrozen) {
+ Object.isFrozen = function isFrozen(object) {
+ return false;
+ };
+}
+
+// ES5 15.2.3.13
+// http://es5.github.com/#x15.2.3.13
+if (!Object.isExtensible) {
+ Object.isExtensible = function isExtensible(object) {
+ // 1. If Type(O) is not Object throw a TypeError exception.
+ if (Object(object) === object) {
+ throw new TypeError(); // TODO message
+ }
+ // 2. Return the Boolean value of the [[Extensible]] internal property of O.
+ var name = '';
+ while (owns(object, name)) {
+ name += '?';
+ }
+ object[name] = true;
+ var returnValue = owns(object, name);
+ delete object[name];
+ return returnValue;
+ };
+}
+
+// ES5 15.2.3.14
+// http://es5.github.com/#x15.2.3.14
+if (!Object.keys) {
+ // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
+ var hasDontEnumBug = true,
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ for (var key in {"toString": null}) {
+ hasDontEnumBug = false;
+ }
+
+ Object.keys = function keys(object) {
+
+ if (
+ (typeof object != "object" && typeof object != "function") ||
+ object === null
+ ) {
+ throw new TypeError("Object.keys called on a non-object");
+ }
+
+ var keys = [];
+ for (var name in object) {
+ if (owns(object, name)) {
+ keys.push(name);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (var i = 0, ii = dontEnumsLength; i < ii; i++) {
+ var dontEnum = dontEnums[i];
+ if (owns(object, dontEnum)) {
+ keys.push(dontEnum);
+ }
+ }
+ }
+ return keys;
+ };
+
+}
+
+//
+// most of es5-shim Date section is removed since ace doesn't need it, it is too intrusive and it causes problems for users
+// ====
+//
+
+// ES5 15.9.4.4
+// http://es5.github.com/#x15.9.4.4
+if (!Date.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+
+
+//
+// String
+// ======
+//
+
+// ES5 15.5.4.20
+// http://es5.github.com/#x15.5.4.20
+var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" +
+ "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" +
+ "\u2029\uFEFF";
+if (!String.prototype.trim || ws.trim()) {
+ // http://blog.stevenlevithan.com/archives/faster-trim-javascript
+ // http://perfectionkills.com/whitespace-deviations/
+ ws = "[" + ws + "]";
+ var trimBeginRegexp = new RegExp("^" + ws + ws + "*"),
+ trimEndRegexp = new RegExp(ws + ws + "*$");
+ String.prototype.trim = function trim() {
+ return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, "");
+ };
+}
+
+//
+// Util
+// ======
+//
+
+// ES5 9.4
+// http://es5.github.com/#x9.4
+// http://jsperf.com/to-integer
+
+function toInteger(n) {
+ n = +n;
+ if (n !== n) { // isNaN
+ n = 0;
+ } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {
+ n = (n > 0 || -1) * Math.floor(Math.abs(n));
+ }
+ return n;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+
+// ES5 9.9
+// http://es5.github.com/#x9.9
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/event.js b/src/fauxton/assets/js/libs/ace/lib/event.js
new file mode 100644
index 000000000..691d0019d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/event.js
@@ -0,0 +1,353 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var keys = require("./keys");
+var useragent = require("./useragent");
+var dom = require("./dom");
+
+exports.addListener = function(elem, type, callback) {
+ if (elem.addEventListener) {
+ return elem.addEventListener(type, callback, false);
+ }
+ if (elem.attachEvent) {
+ var wrapper = function() {
+ callback.call(elem, window.event);
+ };
+ callback._wrapper = wrapper;
+ elem.attachEvent("on" + type, wrapper);
+ }
+};
+
+exports.removeListener = function(elem, type, callback) {
+ if (elem.removeEventListener) {
+ return elem.removeEventListener(type, callback, false);
+ }
+ if (elem.detachEvent) {
+ elem.detachEvent("on" + type, callback._wrapper || callback);
+ }
+};
+
+/*
+* Prevents propagation and clobbers the default action of the passed event
+*/
+exports.stopEvent = function(e) {
+ exports.stopPropagation(e);
+ exports.preventDefault(e);
+ return false;
+};
+
+exports.stopPropagation = function(e) {
+ if (e.stopPropagation)
+ e.stopPropagation();
+ else
+ e.cancelBubble = true;
+};
+
+exports.preventDefault = function(e) {
+ if (e.preventDefault)
+ e.preventDefault();
+ else
+ e.returnValue = false;
+};
+
+/*
+ * @return {Number} 0 for left button, 1 for middle button, 2 for right button
+ */
+exports.getButton = function(e) {
+ if (e.type == "dblclick")
+ return 0;
+ if (e.type == "contextmenu" || (e.ctrlKey && useragent.isMac))
+ return 2;
+
+ // DOM Event
+ if (e.preventDefault) {
+ return e.button;
+ }
+ // old IE
+ else {
+ return {1:0, 2:2, 4:1}[e.button];
+ }
+};
+
+exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+ function onMouseUp(e) {
+ eventHandler && eventHandler(e);
+ releaseCaptureHandler && releaseCaptureHandler(e);
+
+ exports.removeListener(document, "mousemove", eventHandler, true);
+ exports.removeListener(document, "mouseup", onMouseUp, true);
+ exports.removeListener(document, "dragstart", onMouseUp, true);
+ }
+
+ exports.addListener(document, "mousemove", eventHandler, true);
+ exports.addListener(document, "mouseup", onMouseUp, true);
+ exports.addListener(document, "dragstart", onMouseUp, true);
+};
+
+exports.addMouseWheelListener = function(el, callback) {
+ if ("onmousewheel" in el) {
+ var factor = 8;
+ exports.addListener(el, "mousewheel", function(e) {
+ if (e.wheelDeltaX !== undefined) {
+ e.wheelX = -e.wheelDeltaX / factor;
+ e.wheelY = -e.wheelDeltaY / factor;
+ } else {
+ e.wheelX = 0;
+ e.wheelY = -e.wheelDelta / factor;
+ }
+ callback(e);
+ });
+ } else if ("onwheel" in el) {
+ exports.addListener(el, "wheel", function(e) {
+ e.wheelX = (e.deltaX || 0) * 5;
+ e.wheelY = (e.deltaY || 0) * 5;
+ callback(e);
+ });
+ } else {
+ exports.addListener(el, "DOMMouseScroll", function(e) {
+ if (e.axis && e.axis == e.HORIZONTAL_AXIS) {
+ e.wheelX = (e.detail || 0) * 5;
+ e.wheelY = 0;
+ } else {
+ e.wheelX = 0;
+ e.wheelY = (e.detail || 0) * 5;
+ }
+ callback(e);
+ });
+ }
+};
+
+exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) {
+ var clicks = 0;
+ var startX, startY, timer;
+ var eventNames = {
+ 2: "dblclick",
+ 3: "tripleclick",
+ 4: "quadclick"
+ };
+
+ exports.addListener(el, "mousedown", function(e) {
+ if (exports.getButton(e) != 0) {
+ clicks = 0;
+ } else if (e.detail > 1) {
+ clicks++;
+ if (clicks > 4)
+ clicks = 1;
+ } else {
+ clicks = 1;
+ }
+ if (useragent.isIE) {
+ var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
+ if (isNewClick) {
+ clicks = 1;
+ }
+ if (clicks == 1) {
+ startX = e.clientX;
+ startY = e.clientY;
+ }
+ }
+
+ eventHandler[callbackName]("mousedown", e);
+
+ if (clicks > 4)
+ clicks = 0;
+ else if (clicks > 1)
+ return eventHandler[callbackName](eventNames[clicks], e);
+ });
+
+ if (useragent.isOldIE) {
+ exports.addListener(el, "dblclick", function(e) {
+ clicks = 2;
+ if (timer)
+ clearTimeout(timer);
+ timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+ eventHandler[callbackName]("mousedown", e);
+ eventHandler[callbackName](eventNames[clicks], e);
+ });
+ }
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+ var hashId = 0;
+ if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
+ hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
+ | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
+ } else {
+ hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
+ | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+ }
+
+ if (!useragent.isMac && pressedKeys) {
+ if (pressedKeys[91] || pressedKeys[92])
+ hashId |= 8;
+ if (pressedKeys.altGr) {
+ if ((3 & hashId) != 3)
+ pressedKeys.altGr = 0
+ else
+ return;
+ }
+ if (keyCode === 18 || keyCode === 17) {
+ var location = e.location || e.keyLocation;
+ if (keyCode === 17 && location === 1) {
+ ts = e.timeStamp;
+ } else if (keyCode === 18 && hashId === 3 && location === 2) {
+ var dt = -ts;
+ ts = e.timeStamp;
+ dt += ts;
+ if (dt < 3)
+ pressedKeys.altGr = true;
+ }
+ }
+ }
+
+ if (keyCode in keys.MODIFIER_KEYS) {
+ switch (keys.MODIFIER_KEYS[keyCode]) {
+ case "Alt":
+ hashId = 2;
+ break;
+ case "Shift":
+ hashId = 4;
+ break;
+ case "Ctrl":
+ hashId = 1;
+ break;
+ default:
+ hashId = 8;
+ break;
+ }
+ keyCode = 0;
+ }
+
+ if (hashId & 8 && (keyCode === 91 || keyCode === 93)) {
+ keyCode = 0;
+ }
+
+ if (!hashId && keyCode === 13) {
+ if (e.location || e.keyLocation === 3) {
+ callback(e, hashId, -keyCode)
+ if (e.defaultPrevented)
+ return;
+ }
+ }
+
+
+ // If there is no hashId and the keyCode is not a function key, then
+ // we don't call the callback as we don't handle a command key here
+ // (it's a normal key/character input).
+ if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {
+ return false;
+ }
+
+
+
+ return callback(e, hashId, keyCode);
+}
+
+var pressedKeys = null;
+var ts = 0;
+exports.addCommandKeyListener = function(el, callback) {
+ var addListener = exports.addListener;
+ if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) {
+ // Old versions of Gecko aka. Firefox < 4.0 didn't repeat the keydown
+ // event if the user pressed the key for a longer time. Instead, the
+ // keydown event was fired once and later on only the keypress event.
+ // To emulate the 'right' keydown behavior, the keyCode of the initial
+ // keyDown event is stored and in the following keypress events the
+ // stores keyCode is used to emulate a keyDown event.
+ var lastKeyDownKeyCode = null;
+ addListener(el, "keydown", function(e) {
+ lastKeyDownKeyCode = e.keyCode;
+ });
+ addListener(el, "keypress", function(e) {
+ return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);
+ });
+ } else {
+ var lastDefaultPrevented = null;
+
+ addListener(el, "keydown", function(e) {
+ pressedKeys[e.keyCode] = true;
+ var result = normalizeCommandKeys(callback, e, e.keyCode);
+ lastDefaultPrevented = e.defaultPrevented;
+ return result;
+ });
+
+ addListener(el, "keypress", function(e) {
+ if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {
+ exports.stopEvent(e);
+ lastDefaultPrevented = null;
+ }
+ });
+
+ addListener(el, "keyup", function(e) {
+ pressedKeys[e.keyCode] = null;
+ });
+
+ if (!pressedKeys) {
+ pressedKeys = Object.create(null);
+ addListener(window, "focus", function(e) {
+ pressedKeys = Object.create(null);
+ });
+ }
+ }
+};
+
+if (window.postMessage && !useragent.isOldIE) {
+ var postMessageId = 1;
+ exports.nextTick = function(callback, win) {
+ win = win || window;
+ var messageName = "zero-timeout-message-" + postMessageId;
+ exports.addListener(win, "message", function listener(e) {
+ if (e.data == messageName) {
+ exports.stopPropagation(e);
+ exports.removeListener(win, "message", listener);
+ callback();
+ }
+ });
+ win.postMessage(messageName, "*");
+ };
+}
+
+
+exports.nextFrame = window.requestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.msRequestAnimationFrame ||
+ window.oRequestAnimationFrame;
+
+if (exports.nextFrame)
+ exports.nextFrame = exports.nextFrame.bind(window);
+else
+ exports.nextFrame = function(callback) {
+ setTimeout(callback, 17);
+ };
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/event_emitter.js b/src/fauxton/assets/js/libs/ace/lib/event_emitter.js
new file mode 100644
index 000000000..b98601450
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/event_emitter.js
@@ -0,0 +1,155 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+EventEmitter._emit =
+EventEmitter._dispatchEvent = function(eventName, e) {
+ this._eventRegistry || (this._eventRegistry = {});
+ this._defaultHandlers || (this._defaultHandlers = {});
+
+ var listeners = this._eventRegistry[eventName] || [];
+ var defaultHandler = this._defaultHandlers[eventName];
+ if (!listeners.length && !defaultHandler)
+ return;
+
+ if (typeof e != "object" || !e)
+ e = {};
+
+ if (!e.type)
+ e.type = eventName;
+ if (!e.stopPropagation)
+ e.stopPropagation = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+EventEmitter.removeListener =
+EventEmitter.removeEventListener = function(eventName, callback) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ return;
+
+ var index = listeners.indexOf(callback);
+ if (index !== -1)
+ listeners.splice(index, 1);
+};
+
+EventEmitter.removeAllListeners = function(eventName) {
+ if (this._eventRegistry) this._eventRegistry[eventName] = [];
+};
+
+exports.EventEmitter = EventEmitter;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/event_emitter_test.js b/src/fauxton/assets/js/libs/ace/lib/event_emitter_test.js
new file mode 100644
index 000000000..cc2804e8d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/event_emitter_test.js
@@ -0,0 +1,65 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var EventEmitter = require("./event_emitter").EventEmitter;
+var assert = require("../test/assertions");
+
+var Emitter = function() {};
+
+oop.implement(Emitter.prototype, EventEmitter);
+
+module.exports = {
+ "test: dispatch event with no data" : function() {
+ var emitter = new Emitter();
+
+ var called = false;
+ emitter.addEventListener("juhu", function(e) {
+ called = true;
+ assert.equal(e.type, "juhu");
+ });
+
+ emitter._emit("juhu");
+ assert.ok(called);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/lib/fixoldbrowsers.js b/src/fauxton/assets/js/libs/ace/lib/fixoldbrowsers.js
new file mode 100644
index 000000000..2da9b100c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/fixoldbrowsers.js
@@ -0,0 +1,19 @@
+// vim:set ts=4 sts=4 sw=4 st:
+// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License
+// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
+// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified
+// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
+// -- Irakli Gozalishvili Copyright (C) 2010 MIT License
+
+/*!
+ Copyright (c) 2009, 280 North Inc. http://280north.com/
+ MIT License. http://github.com/280north/narwhal/blob/master/README.md
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+require("./regexp");
+require("./es5-shim");
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/keys.js b/src/fauxton/assets/js/libs/ace/lib/keys.js
new file mode 100644
index 000000000..42d427b19
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/keys.js
@@ -0,0 +1,138 @@
+/*! @license
+==========================================================================
+SproutCore -- JavaScript Application Framework
+copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+
+SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
+
+For more information about SproutCore, visit http://www.sproutcore.com
+
+
+==========================================================================
+@license */
+
+// Most of the following code is taken from SproutCore with a few changes.
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./oop");
+
+/*
+ * Helper functions and hashes for key handling.
+ */
+var Keys = (function() {
+ var ret = {
+ MODIFIER_KEYS: {
+ 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'
+ },
+
+ KEY_MODS: {
+ "ctrl": 1, "alt": 2, "option" : 2,
+ "shift": 4, "meta": 8, "command": 8, "cmd": 8
+ },
+
+ FUNCTION_KEYS : {
+ 8 : "Backspace",
+ 9 : "Tab",
+ 13 : "Return",
+ 19 : "Pause",
+ 27 : "Esc",
+ 32 : "Space",
+ 33 : "PageUp",
+ 34 : "PageDown",
+ 35 : "End",
+ 36 : "Home",
+ 37 : "Left",
+ 38 : "Up",
+ 39 : "Right",
+ 40 : "Down",
+ 44 : "Print",
+ 45 : "Insert",
+ 46 : "Delete",
+ 96 : "Numpad0",
+ 97 : "Numpad1",
+ 98 : "Numpad2",
+ 99 : "Numpad3",
+ 100: "Numpad4",
+ 101: "Numpad5",
+ 102: "Numpad6",
+ 103: "Numpad7",
+ 104: "Numpad8",
+ 105: "Numpad9",
+ '-13': "NumpadEnter",
+ 112: "F1",
+ 113: "F2",
+ 114: "F3",
+ 115: "F4",
+ 116: "F5",
+ 117: "F6",
+ 118: "F7",
+ 119: "F8",
+ 120: "F9",
+ 121: "F10",
+ 122: "F11",
+ 123: "F12",
+ 144: "Numlock",
+ 145: "Scrolllock"
+ },
+
+ PRINTABLE_KEYS: {
+ 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',
+ 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',
+ 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',
+ 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
+ 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
+ 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
+ 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
+ 221: ']', 222: '\''
+ }
+ };
+
+ // A reverse map of FUNCTION_KEYS
+ for (var i in ret.FUNCTION_KEYS) {
+ var name = ret.FUNCTION_KEYS[i].toLowerCase();
+ ret[name] = parseInt(i, 10);
+ }
+
+ // Add the MODIFIER_KEYS, FUNCTION_KEYS and PRINTABLE_KEYS to the KEY
+ // variables as well.
+ oop.mixin(ret, ret.MODIFIER_KEYS);
+ oop.mixin(ret, ret.PRINTABLE_KEYS);
+ oop.mixin(ret, ret.FUNCTION_KEYS);
+
+ // aliases
+ ret.enter = ret["return"];
+ ret.escape = ret.esc;
+ ret.del = ret["delete"];
+
+ // workaround for firefox bug
+ ret[173] = '-';
+
+ return ret;
+})();
+oop.mixin(exports, Keys);
+
+exports.keyCodeToString = function(keyCode) {
+ return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
+}
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/lang.js b/src/fauxton/assets/js/libs/ace/lib/lang.js
new file mode 100644
index 000000000..4e6ebf2c1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/lang.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+var trimBeginRegexp = /^\s\s*/;
+var trimEndRegexp = /\s\s*$/;
+
+exports.stringTrimLeft = function (string) {
+ return string.replace(trimBeginRegexp, '');
+};
+
+exports.stringTrimRight = function (string) {
+ return string.replace(trimEndRegexp, '');
+};
+
+exports.copyObject = function(obj) {
+ var copy = {};
+ for (var key in obj) {
+ copy[key] = obj[key];
+ }
+ return copy;
+};
+
+exports.copyArray = function(array){
+ var copy = [];
+ for (var i=0, l=array.length; i<l; i++) {
+ if (array[i] && typeof array[i] == "object")
+ copy[i] = this.copyObject( array[i] );
+ else
+ copy[i] = array[i];
+ }
+ return copy;
+};
+
+exports.deepCopy = function (obj) {
+ if (typeof obj != "object") {
+ return obj;
+ }
+
+ var copy = obj.constructor();
+ for (var key in obj) {
+ if (typeof obj[key] == "object") {
+ copy[key] = this.deepCopy(obj[key]);
+ } else {
+ copy[key] = obj[key];
+ }
+ }
+ return copy;
+};
+
+exports.arrayToMap = function(arr) {
+ var map = {};
+ for (var i=0; i<arr.length; i++) {
+ map[arr[i]] = 1;
+ }
+ return map;
+
+};
+
+exports.createMap = function(props) {
+ var map = Object.create(null);
+ for (var i in props) {
+ map[i] = props[i];
+ }
+ return map;
+};
+
+/*
+ * splice out of 'array' anything that === 'value'
+ */
+exports.arrayRemove = function(array, value) {
+ for (var i = 0; i <= array.length; i++) {
+ if (value === array[i]) {
+ array.splice(i, 1);
+ }
+ }
+};
+
+exports.escapeRegExp = function(str) {
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
+};
+
+exports.escapeHTML = function(str) {
+ return str.replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
+};
+
+exports.getMatchOffsets = function(string, regExp) {
+ var matches = [];
+
+ string.replace(regExp, function(str) {
+ matches.push({
+ offset: arguments[arguments.length-2],
+ length: str.length
+ });
+ });
+
+ return matches;
+};
+
+/* deprecated */
+exports.deferredCall = function(fcn) {
+
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var deferred = function(timeout) {
+ deferred.cancel();
+ timer = setTimeout(callback, timeout || 0);
+ return deferred;
+ };
+
+ deferred.schedule = deferred;
+
+ deferred.call = function() {
+ this.cancel();
+ fcn();
+ return deferred;
+ };
+
+ deferred.cancel = function() {
+ clearTimeout(timer);
+ timer = null;
+ return deferred;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = _self;
+ _self.schedule = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || 0);
+ };
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/net.js b/src/fauxton/assets/js/libs/ace/lib/net.js
new file mode 100644
index 000000000..3869da45f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/net.js
@@ -0,0 +1,41 @@
+/*
+ * based on code from:
+ *
+ * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/requirejs for details
+ */
+define(function(require, exports, module) {
+"use strict";
+var dom = require("./dom");
+
+exports.get = function (url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.onreadystatechange = function () {
+ //Do not explicitly handle errors, those should be
+ //visible via console output in the browser.
+ if (xhr.readyState === 4) {
+ callback(xhr.responseText);
+ }
+ };
+ xhr.send(null);
+};
+
+exports.loadScript = function(path, callback) {
+ var head = dom.getDocumentHead();
+ var s = document.createElement('script');
+
+ s.src = path;
+ head.appendChild(s);
+
+ s.onload = s.onreadystatechange = function(_, isAbort) {
+ if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
+ s = s.onload = s.onreadystatechange = null;
+ if (!isAbort)
+ callback();
+ }
+ };
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/oop.js b/src/fauxton/assets/js/libs/ace/lib/oop.js
new file mode 100644
index 000000000..f3dbb1d9a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/oop.js
@@ -0,0 +1,55 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+exports.inherits = (function() {
+ var tempCtor = function() {};
+ return function(ctor, superCtor) {
+ tempCtor.prototype = superCtor.prototype;
+ ctor.super_ = superCtor.prototype;
+ ctor.prototype = new tempCtor();
+ ctor.prototype.constructor = ctor;
+ };
+}());
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/regexp.js b/src/fauxton/assets/js/libs/ace/lib/regexp.js
new file mode 100644
index 000000000..369f74fc2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/regexp.js
@@ -0,0 +1,113 @@
+/*
+ * Based on code from:
+ *
+ * XRegExp 1.5.0
+ * (c) 2007-2010 Steven Levithan
+ * MIT License
+ * <http://xregexp.com>
+ * Provides an augmented, extensible, cross-browser implementation of regular expressions,
+ * including support for additional syntax, flags, and methods
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+ //---------------------------------
+ // Private variables
+ //---------------------------------
+
+ var real = {
+ exec: RegExp.prototype.exec,
+ test: RegExp.prototype.test,
+ match: String.prototype.match,
+ replace: String.prototype.replace,
+ split: String.prototype.split
+ },
+ compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups
+ compliantLastIndexIncrement = function () {
+ var x = /^/g;
+ real.test.call(x, "");
+ return !x.lastIndex;
+ }();
+
+ if (compliantLastIndexIncrement && compliantExecNpcg)
+ return;
+
+ //---------------------------------
+ // Overriden native methods
+ //---------------------------------
+
+ // Adds named capture support (with backreferences returned as `result.name`), and fixes two
+ // cross-browser issues per ES3:
+ // - Captured values for nonparticipating capturing groups should be returned as `undefined`,
+ // rather than the empty string.
+ // - `lastIndex` should not be incremented after zero-length matches.
+ RegExp.prototype.exec = function (str) {
+ var match = real.exec.apply(this, arguments),
+ name, r2;
+ if ( typeof(str) == 'string' && match) {
+ // Fix browsers whose `exec` methods don't consistently return `undefined` for
+ // nonparticipating capturing groups
+ if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) {
+ r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", ""));
+ // Using `str.slice(match.index)` rather than `match[0]` in case lookahead allowed
+ // matching due to characters outside the match
+ real.replace.call(str.slice(match.index), r2, function () {
+ for (var i = 1; i < arguments.length - 2; i++) {
+ if (arguments[i] === undefined)
+ match[i] = undefined;
+ }
+ });
+ }
+ // Attach named capture properties
+ if (this._xregexp && this._xregexp.captureNames) {
+ for (var i = 1; i < match.length; i++) {
+ name = this._xregexp.captureNames[i - 1];
+ if (name)
+ match[name] = match[i];
+ }
+ }
+ // Fix browsers that increment `lastIndex` after zero-length matches
+ if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ }
+ return match;
+ };
+
+ // Don't override `test` if it won't change anything
+ if (!compliantLastIndexIncrement) {
+ // Fix browser bug in native method
+ RegExp.prototype.test = function (str) {
+ // Use the native `exec` to skip some processing overhead, even though the overriden
+ // `exec` would take care of the `lastIndex` fix
+ var match = real.exec.call(this, str);
+ // Fix browsers that increment `lastIndex` after zero-length matches
+ if (match && this.global && !match[0].length && (this.lastIndex > match.index))
+ this.lastIndex--;
+ return !!match;
+ };
+ }
+
+ //---------------------------------
+ // Private helper functions
+ //---------------------------------
+
+ function getNativeFlags (regex) {
+ return (regex.global ? "g" : "") +
+ (regex.ignoreCase ? "i" : "") +
+ (regex.multiline ? "m" : "") +
+ (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3
+ (regex.sticky ? "y" : "");
+ }
+
+ function indexOf (array, item, from) {
+ if (Array.prototype.indexOf) // Use the native array method if available
+ return array.indexOf(item, from);
+ for (var i = from || 0; i < array.length; i++) {
+ if (array[i] === item)
+ return i;
+ }
+ return -1;
+ }
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/lib/useragent.js b/src/fauxton/assets/js/libs/ace/lib/useragent.js
new file mode 100644
index 000000000..b6989a8c1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/lib/useragent.js
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+/*
+ * I hate doing this, but we need some way to determine if the user is on a Mac
+ * The reason is that users have different expectations of their key combinations.
+ *
+ * Take copy as an example, Mac people expect to use CMD or APPLE + C
+ * Windows folks expect to use CTRL + C
+ */
+exports.OS = {
+ LINUX: "LINUX",
+ MAC: "MAC",
+ WINDOWS: "WINDOWS"
+};
+
+/*
+ * Return an exports.OS constant
+ */
+exports.getOS = function() {
+ if (exports.isMac) {
+ return exports.OS.MAC;
+ } else if (exports.isLinux) {
+ return exports.OS.LINUX;
+ } else {
+ return exports.OS.WINDOWS;
+ }
+};
+
+// this can be called in non browser environments (e.g. from ace/requirejs/text)
+if (typeof navigator != "object")
+ return;
+
+var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase();
+var ua = navigator.userAgent;
+
+// Is the user using a browser that identifies itself as Windows
+exports.isWin = (os == "win");
+
+// Is the user using a browser that identifies itself as Mac OS
+exports.isMac = (os == "mac");
+
+// Is the user using a browser that identifies itself as Linux
+exports.isLinux = (os == "linux");
+
+// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead.
+exports.isIE =
+ (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
+ && parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
+
+exports.isOldIE = exports.isIE && exports.isIE < 9;
+
+// Is this Firefox or related?
+exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko";
+
+// oldGecko == rev < 2.0
+exports.isOldGecko = exports.isGecko && parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1], 10) < 4;
+
+// Is this Opera
+exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]";
+
+// Is the user using a browser that identifies itself as WebKit
+exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined;
+
+exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined;
+
+exports.isAIR = ua.indexOf("AdobeAIR") >= 0;
+
+exports.isIPad = ua.indexOf("iPad") >= 0;
+
+exports.isTouchPad = ua.indexOf("TouchPad") >= 0;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/Readme.md b/src/fauxton/assets/js/libs/ace/mode/_test/Readme.md
new file mode 100644
index 000000000..c2871c0dd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/Readme.md
@@ -0,0 +1,9 @@
+`tokens_<modeName>.json` files keep information about correct tokens and tokenizer states for all modes supported by ace.
+They are generated from `text_<modeName>.txt` or `demo/kitchen-sink/doc/*` with
+
+```sh
+node highlight_rules_test.js -gen
+```
+
+command.
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/highlight_rules_test.js b/src/fauxton/assets/js/libs/ace/mode/_test/highlight_rules_test.js
new file mode 100644
index 000000000..be6656d86
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/highlight_rules_test.js
@@ -0,0 +1,152 @@
+var fs = require("fs");
+if (!fs.existsSync)
+ fs.existsSync = require("path").existsSync;
+
+require("amd-loader");
+
+var cwd = __dirname + "/";
+
+function generateTestData() {
+ var root = Array(5).join("../") + "/demo/kitchen-sink/docs";
+ var docs = fs.readdirSync(cwd + root);
+ var specialDocs = fs.readdirSync(cwd);
+ var modes = fs.readdirSync(cwd + "../").filter(function(x){
+ return !/(_highlight_rules|behaviour|worker)\.js$/.test(x) && /\.js$/.test(x);
+ }).map(function(x) {
+ return x.replace(/\.js$/, "");
+ });
+
+ console.log("Docs:", docs);
+ console.log("Modes:", modes);
+
+ docs.forEach(function(docName) {
+ var p = docName.toLowerCase().split(".");
+ if (!p[1])
+ return;
+ var modeName;
+ if (modes.indexOf(p[0]) != -1)
+ modeName = p[0];
+ else if (modes.indexOf(p[1]) != -1)
+ modeName = p[1];
+ else
+ modeName = {"txt": "text", cpp: "c_cpp"}[p[1]];
+
+ var filePath = "text_" + modeName + ".txt";
+ if (specialDocs.indexOf(filePath) == -1) {
+ filePath = root + "/" + docName;
+ }
+
+ var text = fs.readFileSync(cwd + filePath, "utf8");
+ try {
+ var Mode = require("../" + modeName).Mode;
+ } catch(e) {
+ console.warn("Can't load mode :" + modeName, p, e);
+ return;
+ }
+ var tokenizer = new Mode().getTokenizer();
+
+ var state = "start";
+ var data = text.split(/\n|\r|\r\n/).map(function(line) {
+ var data = tokenizer.getLineTokens(line, state);
+ var tmp = [];
+ tmp.push(JSON.stringify(data.state));
+ data.tokens.forEach(function(x) {
+ tmp.push(JSON.stringify([x.type, x.value]));
+ });
+ state = data.state;
+ return tmp.join(",\n ");
+ });
+
+ jsonStr = "[[\n " + data.join("\n],[\n ") + "\n]]";
+ fs.writeFileSync(cwd + "tokens_" + modeName + ".json", jsonStr, "utf8");
+ });
+}
+
+function test(startAt) {
+ var modes = fs.readdirSync(cwd).map(function(x) {
+ return (x.match(/tokens_(.*).json/) || {})[1];
+ }).filter(function(x){return !!x});
+
+ for (var i = Math.max(0, startAt||0); i < modes.length; i++)
+ testMode(modes[i], i);
+
+ console.log("\u001b[32m" + "all ok" + "\u001b[0m");
+}
+function testMode(modeName, i) {
+ console.log(padNumber(i+1, 3) + ") testing: \u001b[33m" + modeName + "\u001b[0m");
+
+ var text = fs.readFileSync(cwd + "tokens_" + modeName + ".json", "utf8");
+ var data = JSON.parse(text);
+ var Mode = require("../" + modeName).Mode;
+ var tokenizer = new Mode().getTokenizer();
+
+ var state = "start";
+ data.forEach(function(lineData) {
+ lineData.values = [];
+ lineData.types = [];
+ lineData.state = lineData.shift();
+ lineData.forEach(function(x) {
+ lineData.types.push(x[0]);
+ lineData.values.push(x[1]);
+ });
+
+ var line = lineData.values.join("");
+
+ var tokens = tokenizer.getLineTokens(line, state);
+ var values = tokens.tokens.map(function(x) {return x.value;});
+ var types = tokens.tokens.map(function(x) {return x.type;});
+
+ var success = true;
+ var err = testEqual([
+ lineData.state, tokens.state,
+ lineData.types, types,
+ lineData.values, values]);
+
+ if (err) {
+ console.log(line)
+ throw "error";
+ }
+
+ state = lineData.state;
+ });
+}
+function testEqual(a) {
+ var err;
+ if (a[0] + "" !== a[1] + "") {
+ console.log(a[0],a[1]);
+ err = 1;
+ }
+
+ if ( a[2] + "" !== a[3] + "" || a[4] + "" !== a[5] + "") {
+ arrayDiff(a[2],a[3]);
+ arrayDiff(a[4],a[5]);
+ err = 1;
+ }
+ return err;
+}
+function arrayDiff(a1, a2) {
+ var l = Math.max(a1.length, a2.length);
+ var out = [];
+ for (var i = 0; i < l; i++) {
+ out.push("\n", padNumber(i+1, 3), ") ");
+ if (a1[i] !== a2[i])
+ out.push("\u001b[31m", a1[i], "\u001b[0m != \u001b[32m", a2[i], "\u001b[0m");
+ else
+ out.push(a1[i]);
+ }
+ console.log(out.join(""));
+}
+function padNumber(num, digits) {
+ return (" " + num).slice(-digits);
+}
+
+// cli
+var arg = process.argv[2];
+if (!arg)
+ test()
+else if (/--?g(en)?/.test(arg))
+ generateTestData(process.argv.splice(3));
+else if (/\d+/.test(arg))
+ test(parseInt(process.argv[2],10) || 0);
+else
+ testMode(arg, -1) \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/package.json b/src/fauxton/assets/js/libs/ace/mode/_test/package.json
new file mode 100644
index 000000000..3fdc706de
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "ace-mode-creator",
+ "version": "0.1.0",
+ "dependencies": {
+ "connect": "",
+ "socket.io": ""
+ }
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_asciidoc.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_asciidoc.txt
new file mode 100644
index 000000000..af7eaecc0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_asciidoc.txt
@@ -0,0 +1,111 @@
+------------------------------------
+-----------------------------------
+_ita_lic_, *bo*ld*, +mo+no+, normal.
+``double quoted'', `single quoted'.
+ normal, ^super^, ~sub~.
+
+''''
+Escaped:
+\_italic_, +++_italic_+++,
+t\__e__st, +++t__e__st+++,
++++<b>bold</b>+++, $$<b>normal</b>$$
+\&#182; &#182;
+\`not single quoted'
+\`\`not double quoted''
+
+
+[fffff]
++++++++++++++++++++++++++++++++++++++
+(C) {ss} ss
++++++++++++++++++++++++++++++++++++++
+
+.............
+callout <1>
+..............
+
+> 1
+1> 2
+<2> 3
+
+Escaped:
+\_italic_,
+t\__e__st, o__
+
+.optional title
+.............
+callout <1>
+..............
+
+
+:macro: dddd
+
+.lists
+. 1
+.. 2
+... d
+..... big
++
+continue +
+next line
+xi) no ++la+tin++
+
+xi) la++tin++
+2. num__ber__ [red]#red#
+--
+ 5. f <<x6,ssss>> {macro}
+--
+image::path[beauty] ->--<= -- replacements
+
+ image::s
+sssss
+sss
+sssss
+
+
+== 1
+ heading
+=== not a heading
+====================================
+
+==================================
+====4
+NOTE: above
+
+NOTE: above
+
+[[x6]]
+WARNING:
+
+[options[]]
+---------------------------
+literal
+---------------------------
+
+
+= Tables
+|====================================
+| _italic_ | *bold* | text | (R)
+
+|====================================
+
+
+[more, options]
+///////////
+comment
+///////////
+// one line comment
+
+
+
+[red]#red text# [yellow-background]#on yellow#
+[big]#large# [red yellow-background big]*all bold*
+
+
+https://site text <mail@i.am> callto:ace http://ace.ajaxorg.com[awesome]
+ .still normal text
+.break out thoug should not
+---------------------------
+///////////////////////////
+---------------------------
+
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_coffee.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_coffee.txt
new file mode 100644
index 000000000..094e61b71
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_coffee.txt
@@ -0,0 +1,56 @@
+#test: tokenize keyword
+ for (i 1..2)
+#test: tokenize regexp
+/"[a]/
+#test: tokenize functions
+foo = ({args}) ->
+ foo = ({a1, a2}) ->
+ foo = ({@a1, a2}) ->
+ foo : ({args}) ->
+ foo = ({args}) ->
+ foo = ({0abc}) ->
+ foo = ({/abc}) =>
+ foo = ({abc/}) ->
+ foo = ({#abc}) ->
+ foo = ({abc#}) ->
+ foo = ({)abc}) ->
+ foo = ({abc)}) ->
+ foo = ({a{bc}) ->
+ foo = ({}) ->
+ foo = ({ }) ->
+ foo : ({}) ->
+ foo = (args) ->
+ foo = (arg1, arg2) ->
+ foo = (arg1 = 1, arg2 = 'name') ->
+ foo = (@arg1 = /abc/, arg2 = 'name') ->
+ #test: tokenize function: invalid case:
+ foo=(/args) ->
+ foo = () ->
+ foo = ( ) ->
+ foo : ( ) ->
+ window.foo = (args) ->
+ foo = ->
+ foo = ->
+ foo : ->
+ #test: tokenize callback function
+ foo bar: 1, (args) ->
+ foo = (1, 2 (x) ->
+#test: tokenize class
+class Foo
+class Foo extends Bar
+#test: tokenize illegal name property
+foo.static.function
+#!test tokenize string with interpolation
+a = "#{ 22 / 7 + {x: "#{a + b}"} + 2}"
+"""heredoc
+ """
+do ->
+ ###
+ herecomment
+ ###
+ re = /regex/imgy.test ///
+ heregex # comment
+ ///imgy
+ this isnt: `just
+ JavaScript`
+ undefined
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_curly.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_curly.txt
new file mode 100644
index 000000000..1be54b59a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_curly.txt
@@ -0,0 +1,9 @@
+tokenize Curly template{{test}}
+tokenize embedded script
+<script a='a'>var</script>'123'
+tokenize multiline attribute value with double quotes
+<a href="abc{{xyz}}
+def">
+tokenize multiline attribute value with single quotes
+<a href='abc
+def\"'>
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_html.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_html.txt
new file mode 100644
index 000000000..64a32cb2e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_html.txt
@@ -0,0 +1,8 @@
+<html>
+<script a='a'>var</script>'123'
+<a href="abc
+ def">
+<a href='abc
+def\'>
+
+</html> \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_javascript.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_javascript.txt
new file mode 100644
index 000000000..6e180795f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_javascript.txt
@@ -0,0 +1,86 @@
+//test: tokenize 'standard' functions
+string.charCodeAt(23); document.getElementById('test'); console.log('Here it is');";
+test: /**tokenize doc*/ comment
+/**tokenize doc comment with @tag {}*/
+//test: tokenize parens
+ var line = "[{( )}]";
+//test tokenize arithmetic expression which looks like a regexp
+a/b/c
+a/=b/c
+//test tokenize reg exps
+a=/b/g
+a+/b/g
+a = 1 + /2 + 1/b
+a=/a/ / /a/
+case /a/.test(c)
+//test tokenize multi-line comment containing a single line comment
+noRegex
+/* foo // bar */
+canBeRegex;
+/* foo // bar */
+// test tokenize identifier with umlauts
+fu?e
+// test // is not a regexp
+{ // 123
+//test skipping escaped chars
+'Meh\\nNeh'
+console.log('\\u1232Feh'
+"test multiline\
+ strings"
+a='
+b="\
+still a string
+
+
+function foo(items, nada) {
+ for (var i=0; i<items.length; i++) {
+ alert(items[i] + "juhu\n");
+ } // Real Tab.
+}
+
+regexp = /p|p/ // ends here
+
+r = /d{1,2}?f{e}++r*?\d+?[]r[^r-o\f\f[\f]?r{7}+r\{7}+rr--rr$^(?:d|s)(?=a|)(?!y)[]|$?|^*/ o
+a=/a/ jk = / / / / /
+ /************************************/
+/** total mess, tricky to highlight**/
+
+function () {
+ /**
+ * docComment
+ **/
+ r = /u\t*/
+ g = 1.00E^1, y = 1.2 + .2 + 052 + 0x25
+ t = ['d', '']
+}
+function () {
+ /* eee */
+}
+
+"s\
+s\u7824sss\u1"
+
+'\
+string'
+
+'
+string'
+
+"trailing space\
+" " /not a regexp/g
+
+/**
+ *doc
+ */
+
+a = {
+ 'a': b,
+ 'g': function(t)
+ gta:function(a,b)
+}
+
+
+foo.protoype.d = function(a, b,
+ c, d)
+foo.d =function(a, b)
+foo.d =function(a, /*****/ d"string"
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_livescript.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_livescript.txt
new file mode 100644
index 000000000..308ec1db4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_livescript.txt
@@ -0,0 +1 @@
+# comment
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_lucene.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_lucene.txt
new file mode 100644
index 000000000..c71f2680d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_lucene.txt
@@ -0,0 +1,16 @@
+test: recognises AND as keyword
+test: recognises OR as keyword
+test: recognises NOT as keyword
+test: recognises "hello this is dog" as string
+test: recognises -"hello this is dog" as negation with string
+test: recognises ~100 as text with proximity
+test: recognises "hello this is dog"~100 as string with proximity
+test: recognises raw:"hello this is dog" as keyword
+test: recognises raw:foo as"keyword'
+test: recognises "(" as opening parenthesis
+test: recognises ")" as closing parenthesis
+test: recognises foo* as text with asterisk
+test: recognises foo? as text with interro
+test: recognises single word as text
+ foo
+ \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_markdown.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_markdown.txt
new file mode 100644
index 000000000..0450c8203
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_markdown.txt
@@ -0,0 +1,22 @@
+test: header 1
+#f
+test: header 2
+## foo
+test: header ends with ' #'
+# # #
+test: header ends with '#'
+#foo#
+test: 6+ #s is not a valid header
+####### foo
+test: # followed be only space is not a valid header
+#
+test: only space between #s is not a valid header
+# #
+
+# test links [Cloud9 IDE](http://www.c9.io/) #
+* [demo](http://ajaxorg.github.com/ace/) [+](escape(\) ) [+](a "title") [+](a "space" )
+* usually *work* fine (_em_)
+in lists
+
+in plain text <b>http://ace.ajaxorg.com<b>
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_ruby.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_ruby.txt
new file mode 100644
index 000000000..1343a2702
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_ruby.txt
@@ -0,0 +1,34 @@
+ #test: symbol tokenizer
+ [:@thing, :$thing, :_thing, :thing, :Thing, :thing1, :thing_a,
+ :THING, :thing!, :thing=, :thing?, :t?,
+ :, :@, :$, :1, :1thing, :th?ing, :thi=ng, :1thing,
+ :th!ing, :thing#
+ ]
+
+ #test: namespaces aren't symbols" : function() {
+ Namespaced::Class
+ #test: hex tokenizer
+ 0x9a, 0XA1, 0x9_a, 0x, 0x_9a, 0x9a_,
+ #test: float tokenizer
+ [1, +1, -1, 12_345, 0.000_1,
+ _, 3_1, 1_2, 1_.0, 0._1];
+
+{:id => 34, :key => "value"}
+
+=begin
+=end
+
+=begin x
+=end-
+=end x
+
+ herDocs = [<<'FOO', <<BAR, <<-BAZ, <<-`EXEC`] #comment
+ FOO #{literal}
+FOO
+ BAR #{fact(10)}
+BAR
+ BAZ indented
+ BAZ
+ echo hi
+ EXEC
+puts herDocs \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/text_xml.txt b/src/fauxton/assets/js/libs/ace/mode/_test/text_xml.txt
new file mode 100644
index 000000000..01f7b8a6f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/text_xml.txt
@@ -0,0 +1,7 @@
+<Juhu>//Juhu Kinners</Kinners>
+test: two tags in the same lines should be in separate tokens"
+<Juhu><Kinners>
+test: multiline attributes"
+<copy set="{
+}" undo="{
+}"/> \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_abap.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_abap.json
new file mode 100644
index 000000000..95f2f811f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_abap.json
@@ -0,0 +1,189 @@
+[[
+ "start",
+ ["doc.comment","***************************************"]
+],[
+ "start",
+ ["doc.comment","** Program: EXAMPLE **"]
+],[
+ "start",
+ ["doc.comment","** Author: Joe Byte, 07-Jul-2007 **"]
+],[
+ "start",
+ ["doc.comment","***************************************"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["keyword","REPORT"],
+ ["text"," BOOKINGS"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["doc.comment","* Read flight bookings from the database"]
+],[
+ "start",
+ ["keyword","SELECT"],
+ ["keyword.operator"," * "],
+ ["keyword","FROM"],
+ ["text"," FLIGHTINFO"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","WHERE"],
+ ["text"," "],
+ ["keyword","CLASS"],
+ ["keyword.operator"," = "],
+ ["string","'Y'"],
+ ["text"," "],
+ ["comment","\"Y = economy"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","OR"],
+ ["text"," "],
+ ["keyword","CLASS"],
+ ["keyword.operator"," = "],
+ ["string","'C'"],
+ ["keyword.operator","."],
+ ["text"," "],
+ ["comment","\"C = business"]
+],[
+ "start",
+ ["paren.lparen","("],
+ ["invalid","..."],
+ ["paren.rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","REPORT"],
+ ["text"," TEST"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["keyword","WRITE"],
+ ["text"," "],
+ ["string","'Hello World'"],
+ ["keyword.operator","."]
+],[
+ "start"
+],[
+ "start",
+ ["text","USERPROMPT"],
+ ["keyword.operator"," = "],
+ ["string","'Please double-click on a line in the output list '"],
+ ["text"," "],
+ ["keyword.operator","&"]
+],[
+ "start",
+ ["text"," "],
+ ["string","'to see the complete details of the transaction.'"],
+ ["keyword.operator","."]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword","DATA"],
+ ["text"," LAST_EOM "],
+ ["keyword","TYPE"],
+ ["text"," "],
+ ["support.type","D"],
+ ["keyword.operator","."],
+ ["text"," "],
+ ["comment","\"last end-of-month date"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["doc.comment","* Start from today's date"]
+],[
+ "start",
+ ["text"," LAST_EOM"],
+ ["keyword.operator"," = "],
+ ["variable.parameter","SY"],
+ ["keyword.operator","-"],
+ ["text","DATUM"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["doc.comment","* Set characters 6 and 7 (0-relative) of the YYYYMMDD string to \"01\","]
+],[
+ "start",
+ ["doc.comment","* giving the first day of the current month"]
+],[
+ "start",
+ ["text"," LAST_EOM"],
+ ["constant.numeric","+6"],
+ ["paren.lparen","("],
+ ["constant.numeric","2"],
+ ["paren.rparen",")"],
+ ["keyword.operator"," = "],
+ ["string","'01'"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["doc.comment","* Subtract one day"]
+],[
+ "start",
+ ["text"," LAST_EOM"],
+ ["keyword.operator"," = "],
+ ["text","LAST_EOM"],
+ ["keyword.operator"," - "],
+ ["constant.numeric","1"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","WRITE"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["string","'Last day of previous month was'"],
+ ["keyword.operator",","],
+ ["text"," LAST_EOM"],
+ ["keyword.operator","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["keyword","DATA"],
+ ["text"," "],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["keyword","BEGIN OF"],
+ ["text"," I_VBRK "],
+ ["keyword","OCCURS"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["keyword.operator",","]
+],[
+ "start",
+ ["text"," VBELN "],
+ ["keyword","LIKE"],
+ ["text"," "],
+ ["variable.parameter","VBRK-VBELN"],
+ ["keyword.operator",","]
+],[
+ "start",
+ ["text"," ZUONR "],
+ ["keyword","LIKE"],
+ ["text"," "],
+ ["variable.parameter","VBRK-ZUONR"],
+ ["keyword.operator",","]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","END OF"],
+ ["text"," I_VBRK"],
+ ["keyword.operator","."]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_actionscript.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_actionscript.json
new file mode 100644
index 000000000..e3fad38fb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_actionscript.json
@@ -0,0 +1,263 @@
+[[
+ "start",
+ ["text","package code"]
+],[
+ "start",
+ ["text","{"]
+],[
+ "punctuation.definition.comment.actionscript.2",
+ ["text"," "],
+ ["punctuation.definition.comment.actionscript.2","/*"],
+ ["comment.block.actionscript.2","****************************************"]
+],[
+ "punctuation.definition.comment.actionscript.2",
+ ["comment.block.actionscript.2","\t * based on textmate actionscript bundle"]
+],[
+ "start",
+ ["comment.block.actionscript.2","\t ***************************************"],
+ ["punctuation.definition.comment.actionscript.2","*/"]
+],[
+ "start",
+ ["text","\t "]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.actionscript.2","import"],
+ ["text"," fl.events.SliderEvent;"]
+],[
+ "start",
+ ["text","\t"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.actionscript.2","public"],
+ ["text"," "],
+ ["storage.type.class.actionscript.2","class"],
+ ["meta.class.actionscript.2"," "],
+ ["entity.name.type.class.actionscript.2","Foo"],
+ ["meta.class.actionscript.2"," "],
+ ["storage.modifier.extends.actionscript.2","extends"],
+ ["meta.class.actionscript.2"," "],
+ ["entity.other.inherited-class.actionscript.2","MovieClip"]
+],[
+ "start",
+ ["text","\t{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["punctuation.definition.comment.actionscript.2","//*************************"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Properties:"]
+],[
+ "start",
+ ["text","\t\t"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword.control.actionscript.2","public"],
+ ["text"," "],
+ ["keyword.control.actionscript.2","var"],
+ ["text"," activeSwatch"],
+ ["keyword.operator.symbolic.actionscript.2",":"],
+ ["support.class.actionscript.2","MovieClip"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Color offsets"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword.control.actionscript.2","public"],
+ ["text"," "],
+ ["keyword.control.actionscript.2","var"],
+ ["text"," c1"],
+ ["keyword.operator.symbolic.actionscript.2",":"],
+ ["storage.type.actionscript.2","Number"],
+ ["text"," "],
+ ["keyword.operator.symbolic.actionscript.2","="],
+ ["text"," "],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",";\t"],
+ ["punctuation.definition.comment.actionscript.2","// R"]
+],[
+ "start",
+ ["text","\t\t"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["punctuation.definition.comment.actionscript.2","//*************************"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Constructor:"]
+],[
+ "start",
+ ["text","\t\t"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword.control.actionscript.2","public"],
+ ["text"," "],
+ ["storage.type.function.actionscript.2","function"],
+ ["meta.function.actionscript.2"," "],
+ ["entity.name.function.actionscript.2","Foo"],
+ ["punctuation.definition.parameters.begin.actionscript.2","("],
+ ["punctuation.definition.parameters.end.actionscript.2",")"]
+],[
+ "start",
+ ["text","\t\t{"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Respond to mouse events"]
+],[
+ "start",
+ ["text","\t\t\tswatch1_btn."],
+ ["support.function.actionscript.2","addEventListener"],
+ ["text","(MouseEvent.CLICK,swatchHandler,"],
+ ["constant.language.actionscript.2","false"],
+ ["text",","],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",","],
+ ["constant.language.actionscript.2","false"],
+ ["text",");"]
+],[
+ "start",
+ ["text","\t\t\tpreviewBox_btn."],
+ ["support.function.actionscript.2","addEventListener"],
+ ["text","(MouseEvent.MOUSE_DOWN,dragPressHandler);"]
+],[
+ "start",
+ ["text","\t\t\t"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Respond to drag events"]
+],[
+ "start",
+ ["text","\t\t\tred_slider."],
+ ["support.function.actionscript.2","addEventListener"],
+ ["text","(SliderEvent.THUMB_DRAG,sliderHandler);"]
+],[
+ "start",
+ ["text","\t\t\t"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["punctuation.definition.comment.actionscript.2","// Draw a frame later"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["support.function.actionscript.2","addEventListener"],
+ ["text","(Event.ENTER_FRAME,"],
+ ["support.function.actionscript.2","draw"],
+ ["text",");"]
+],[
+ "start",
+ ["text","\t\t}"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text","\t\tprotected "],
+ ["storage.type.function.actionscript.2","function"],
+ ["meta.function.actionscript.2"," "],
+ ["entity.name.function.actionscript.2","clickHandler"],
+ ["punctuation.definition.parameters.begin.actionscript.2","("],
+ ["variable.parameter.function.actionscript.2","event:MouseEvent"],
+ ["punctuation.definition.parameters.end.actionscript.2",")"],
+ ["keyword.operator.symbolic.actionscript.2",":"],
+ ["support.function.actionscript.2","void"]
+],[
+ "start",
+ ["text","\t\t{"]
+],[
+ "start",
+ ["text","\t\t\tcar.transform.colorTransform "],
+ ["keyword.operator.symbolic.actionscript.2","="],
+ ["text"," "],
+ ["keyword.control.actionscript.2","new"],
+ ["text"," ColorTransform("],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",","],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",","],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",","],
+ ["constant.numeric.actionscript.2","1"],
+ ["text",",c1,c2,c3);"]
+],[
+ "start",
+ ["text","\t\t}"]
+],[
+ "start",
+ ["text","\t\t"]
+],[
+ "start",
+ ["text","\t\tprotected "],
+ ["storage.type.function.actionscript.2","function"],
+ ["meta.function.actionscript.2"," "],
+ ["entity.name.function.actionscript.2","changeRGBHandler"],
+ ["punctuation.definition.parameters.begin.actionscript.2","("],
+ ["variable.parameter.function.actionscript.2","event:Event"],
+ ["punctuation.definition.parameters.end.actionscript.2",")"],
+ ["keyword.operator.symbolic.actionscript.2",":"],
+ ["support.function.actionscript.2","void"]
+],[
+ "start",
+ ["text","\t\t{"]
+],[
+ "start",
+ ["text","\t\t\tc1 "],
+ ["keyword.operator.symbolic.actionscript.2","="],
+ ["text"," "],
+ ["storage.type.actionscript.2","Number"],
+ ["text","(c1_txt."],
+ ["support.function.actionscript.2","text"],
+ ["text",");"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["keyword.control.actionscript.2","if"],
+ ["text","("],
+ ["keyword.operator.symbolic.actionscript.2","!"],
+ ["text","(c1>"],
+ ["keyword.operator.symbolic.actionscript.2","="],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",")){"]
+],[
+ "start",
+ ["text","\t\t\t\tc1 "],
+ ["keyword.operator.symbolic.actionscript.2","="],
+ ["text"," "],
+ ["constant.numeric.actionscript.2","0"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t\t}\t\t\t"]
+],[
+ "start",
+ ["text","\t\t\t"]
+],[
+ "start",
+ ["text","\t\t\tupdateSliders();"]
+],[
+ "start",
+ ["text","\t\t}"]
+],[
+ "start",
+ ["text","\t}"]
+],[
+ "start",
+ ["text","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_asciidoc.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_asciidoc.json
new file mode 100644
index 000000000..f54c355e3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_asciidoc.json
@@ -0,0 +1,422 @@
+[[
+ "literalBlock",
+ ["support.function","------------------------------------"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function","-----------------------------------"]
+],[
+ "text",
+ ["string.italic","_ita_lic_"],
+ ["text",", "],
+ ["keyword.bold","*bo*ld*"],
+ ["text",", "],
+ ["support.function","+mo+no+"],
+ ["text",", normal. "]
+],[
+ "text",
+ ["keyword","``"],
+ ["text","double quoted"],
+ ["keyword","''"],
+ ["text",", `single quoted'."]
+],[
+ "text",
+ ["text"," normal, ^super^, "],
+ ["keyword","~sub~"],
+ ["text","."]
+],[
+ "start"
+],[
+ "text",
+ ["text","''''"]
+],[
+ "text",
+ ["text","Escaped:"]
+],[
+ "text",
+ ["constant.language.escape","\\_"],
+ ["text","italic_, "],
+ ["support.function","+++"],
+ ["text","_italic_"],
+ ["support.function","+++"],
+ ["text",","]
+],[
+ "smallPassthrough",
+ ["text","t"],
+ ["constant.language.escape","\\_"],
+ ["text","_e"],
+ ["string.italic","__st, +++t__"],
+ ["text","e__st"],
+ ["support.function","+++"],
+ ["text",","]
+],[
+ "smallPassthrough",
+ ["support.function","+++"],
+ ["text","<b>bold</b>"],
+ ["support.function","+++"],
+ ["text",", $$<"],
+ ["support.function","b"],
+ ["text",">"],
+ ["support.function","normal"],
+ ["text","</"],
+ ["support.function","b"],
+ ["text",">$$"]
+],[
+ "smallPassthrough",
+ ["text","\\&#"],
+ ["support.function","182"],
+ ["text","; &#"],
+ ["support.function","182"],
+ ["text",";"]
+],[
+ "smallPassthrough",
+ ["text","\\`"],
+ ["support.function","not"],
+ ["text"," "],
+ ["support.function","single"],
+ ["text"," "],
+ ["support.function","quoted"],
+ ["text","'"]
+],[
+ "smallPassthrough",
+ ["text","\\`\\`"],
+ ["support.function","not"],
+ ["text"," "],
+ ["support.function","double"],
+ ["text"," "],
+ ["support.function","quoted"],
+ ["text","''"]
+],[
+ "dissallowDelimitedBlock"
+],[
+ "text"
+],[
+ "start",
+ ["string.regexp","[fffff]"]
+],[
+ "passthroughBlock",
+ ["string","+++++++++++++++++++++++++++++++++++++"]
+],[
+ "passthroughBlock",
+ ["support.function","(C) "],
+ ["constant.character","{ss}"],
+ ["support.function"," ss"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function","+++++++++++++++++++++++++++++++++++++"]
+],[
+ "text"
+],[
+ "listingBlock",
+ ["support.function","............."]
+],[
+ "listingBlock",
+ ["support.function","callout "],
+ ["constant.numeric","<1>"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function",".............."]
+],[
+ "text"
+],[
+ "text",
+ ["text","> 1"]
+],[
+ "text",
+ ["text","1> 2"]
+],[
+ "text",
+ ["text","<2> 3"]
+],[
+ "start"
+],[
+ "text",
+ ["text","Escaped:"]
+],[
+ "text",
+ ["constant.language.escape","\\_"],
+ ["text","italic_,"]
+],[
+ "text",
+ ["text","t"],
+ ["constant.language.escape","\\_"],
+ ["text","_e"],
+ ["string.italic","__st, o__"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric",".optional title"]
+],[
+ "listingBlock",
+ ["support.function","............."]
+],[
+ "listingBlock",
+ ["support.function","callout "],
+ ["constant.numeric","<1>"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function",".............."]
+],[
+ "text"
+],[
+ "start"
+],[
+ "text",
+ ["keyword",":macro:"],
+ ["text"," dddd"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric",".lists"]
+],[
+ "listText",
+ ["keyword",". "],
+ ["text","1"]
+],[
+ "listText",
+ ["keyword",".. "],
+ ["text","2"]
+],[
+ "listText",
+ ["keyword","... "],
+ ["text","d"]
+],[
+ "listText",
+ ["keyword","..... "],
+ ["text","big"]
+],[
+ "start",
+ ["keyword","+"]
+],[
+ "text",
+ ["text","continue"],
+ ["keyword"," +"]
+],[
+ "text",
+ ["text","next line"]
+],[
+ "text",
+ ["text","xi) no "],
+ ["support.function","++la+tin++"]
+],[
+ "start"
+],[
+ "listText",
+ ["keyword","xi) "],
+ ["text","la"],
+ ["support.function","++tin++"]
+],[
+ "listText",
+ ["keyword","2. "],
+ ["text","num"],
+ ["string.italic","__ber__"],
+ ["text"," [red]"],
+ ["keyword","#"],
+ ["text","red"],
+ ["keyword","#"]
+],[
+ "start",
+ ["keyword","--"]
+],[
+ "listText",
+ ["keyword"," 5. "],
+ ["text","f "],
+ ["keyword","<<x6,"],
+ ["string","ssss"],
+ ["keyword",">>"],
+ ["text"," "],
+ ["constant.character","{macro}"]
+],[
+ "start",
+ ["keyword","--"]
+],[
+ "text",
+ ["markup.list.macro","image::"],
+ ["keyword","path"],
+ ["string","[beauty]"],
+ ["text"," "],
+ ["constant.language.escape","->"],
+ ["text","--"],
+ ["constant.language.escape","<= --"],
+ ["text"," replacements"]
+],[
+ "start"
+],[
+ "indentedBlock",
+ ["support.function"," image::s"]
+],[
+ "indentedBlock",
+ ["support.function","sssss"]
+],[
+ "indentedBlock",
+ ["support.function","sss "]
+],[
+ "indentedBlock",
+ ["support.function","sssss"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading","== 1"]
+],[
+ "indentedBlock",
+ ["support.function"," heading"]
+],[
+ "start",
+ ["markup.heading","=== not a heading"]
+],[
+ "start",
+ ["keyword","===================================="]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","=================================="]
+],[
+ "text",
+ ["text","====4 "]
+],[
+ "text",
+ ["text","NOTE: above"]
+],[
+ "start"
+],[
+ "text",
+ ["keyword","NOTE:"],
+ ["text"," above"]
+],[
+ "start"
+],[
+ "start",
+ ["string.regexp","[[x6]]"]
+],[
+ "text",
+ ["keyword","WARNING:"],
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["string.regexp","[options[]]"]
+],[
+ "literalBlock",
+ ["support.function","---------------------------"]
+],[
+ "literalBlock",
+ ["support.function","literal"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function","---------------------------"]
+],[
+ "text"
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading","= Tables"]
+],[
+ "tableBlock",
+ ["doc.comment","|===================================="]
+],[
+ "tableBlock",
+ ["doc.comment","|"],
+ ["text"," "],
+ ["string.italic","_italic_"],
+ ["text"," "],
+ ["doc.comment","|"],
+ ["text"," "],
+ ["keyword.bold","*bold*"],
+ ["text"," "],
+ ["doc.comment","|"],
+ ["text"," text "],
+ ["doc.comment","|"],
+ ["text"," "],
+ ["constant.language.escape","(R)"]
+],[
+ "tableBlock"
+],[
+ "dissallowDelimitedBlock",
+ ["doc.comment","|===================================="]
+],[
+ "text"
+],[
+ "start"
+],[
+ "start",
+ ["string.regexp","[more, options]"]
+],[
+ "commentBlock",
+ ["doc.comment","///////////"]
+],[
+ "commentBlock",
+ ["doc.comment","comment"]
+],[
+ "dissallowDelimitedBlock",
+ ["doc.comment","///////////"]
+],[
+ "text",
+ ["comment","// one line comment"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start"
+],[
+ "text",
+ ["text","[red]"],
+ ["keyword","#"],
+ ["text","red text"],
+ ["keyword","#"],
+ ["text"," [yellow-background]"],
+ ["keyword","#"],
+ ["text","on yellow"],
+ ["keyword","#"]
+],[
+ "text",
+ ["text","[big]"],
+ ["keyword","#"],
+ ["text","large"],
+ ["keyword","#"],
+ ["text"," [red yellow-background big]"],
+ ["keyword.bold","*all bold*"]
+],[
+ "start"
+],[
+ "start",
+ ["text","\t"]
+],[
+ "text",
+ ["markup.underline.list","https://site"],
+ ["text"," text <"],
+ ["markup.underline.list","mail@i.am"],
+ ["text","> "],
+ ["markup.underline.list","callto:ace"],
+ ["text"," "],
+ ["link","http://ace.ajaxorg.com"],
+ ["variable.language","[awesome]"]
+],[
+ "text",
+ ["text"," .still normal text"]
+],[
+ "start",
+ ["constant.numeric",".break out thoug should not"]
+],[
+ "literalBlock",
+ ["support.function","---------------------------"]
+],[
+ "literalBlock",
+ ["support.function","///////////////////////////"]
+],[
+ "dissallowDelimitedBlock",
+ ["support.function","---------------------------"]
+],[
+ "text"
+],[
+ "start"
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_assembly_x86.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_assembly_x86.json
new file mode 100644
index 000000000..5da0470e8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_assembly_x86.json
@@ -0,0 +1,114 @@
+[[
+ "start",
+ ["support.function.directive.assembly","section"],
+ ["text","\t.text"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.directive.assembly","global"],
+ ["text"," "],
+ ["entity.name.function.assembly","main"],
+ ["text"," "],
+ ["comment.assembly",";must be declared for using gcc"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.function.assembly","main:"],
+ ["text","\t "],
+ ["comment.assembly",";tell linker entry point"]
+],[
+ "start"
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","mov"],
+ ["text","\t"],
+ ["variable.parameter.register.assembly","edx"],
+ ["text",", len\t "],
+ ["comment.assembly",";message length"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","mov"],
+ ["text","\t"],
+ ["variable.parameter.register.assembly","ecx"],
+ ["text",", msg\t "],
+ ["comment.assembly",";message to write"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","mov"],
+ ["text","\t"],
+ ["variable.parameter.register.assembly","ebx"],
+ ["text",", "],
+ ["constant.character.decimal.assembly","1"],
+ ["text","\t "],
+ ["comment.assembly",";file descriptor (stdout)"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","mov"],
+ ["text","\t"],
+ ["variable.parameter.register.assembly","eax"],
+ ["text",", "],
+ ["constant.character.decimal.assembly","4"],
+ ["text","\t "],
+ ["comment.assembly",";system call number (sys_write)"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","int"],
+ ["text","\t"],
+ ["constant.character.hexadecimal.assembly","0x80"],
+ ["text","\t "],
+ ["comment.assembly",";call kernel"]
+],[
+ "start"
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","mov"],
+ ["text","\t"],
+ ["variable.parameter.register.assembly","eax"],
+ ["text",", "],
+ ["constant.character.decimal.assembly","1"],
+ ["text","\t "],
+ ["comment.assembly",";system call number (sys_exit)"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.assembly","int"],
+ ["text","\t"],
+ ["constant.character.hexadecimal.assembly","0x80"],
+ ["text","\t "],
+ ["comment.assembly",";call kernel"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function.directive.assembly","section"],
+ ["text","\t.data"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.function.assembly","msg"],
+ ["text","\t"],
+ ["support.function.directive.assembly","db"],
+ ["text","\t"],
+ ["string.assembly","'Hello, world!'"],
+ ["text",","],
+ ["constant.character.hexadecimal.assembly","0xa"],
+ ["text","\t"],
+ ["comment.assembly",";our dear string"]
+],[
+ "start",
+ ["entity.name.function.assembly","len"],
+ ["text","\t"],
+ ["support.function.directive.assembly","equ"],
+ ["text","\t$ - msg\t\t\t"],
+ ["comment.assembly",";length of our dear string"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_autohotkey.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_autohotkey.json
new file mode 100644
index 000000000..374310fbd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_autohotkey.json
@@ -0,0 +1,261 @@
+[[
+ "start",
+ ["punctuation.ahk","#"],
+ ["keyword.command.ahk","NoEnv"]
+],[
+ "start",
+ ["keyword.command.ahk","SetBatchLines"],
+ ["text"," "],
+ ["constant.numeric","-1"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.command.ahk","CoordMode"],
+ ["text"," "],
+ ["variable.parameter","Mouse"],
+ ["punctuation.ahk",","],
+ ["text"," "],
+ ["variable.parameter","Screen"]
+],[
+ "start",
+ ["keyword.command.ahk","OnExit"],
+ ["text"," "],
+ ["variable.parameter","GuiClose"]
+],[
+ "start"
+],[
+ "start",
+ ["text","zoom "],
+ ["keyword.operator.ahk",":="],
+ ["text"," 9"]
+],[
+ "start"
+],[
+ "start",
+ ["text","computeSize"],
+ ["punctuation.ahk","(){"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.ahk","global"],
+ ["text"," as_x"]
+],[
+ "start",
+ ["text","\tas_x "],
+ ["keyword.operator.ahk",":="],
+ ["text"," "],
+ ["support.function.ahk","Round"],
+ ["punctuation.ahk","("],
+ ["text","ws_x"],
+ ["keyword.operator.ahk","/"],
+ ["text","zoom"],
+ ["keyword.operator.ahk","/"],
+ ["text","2 "],
+ ["keyword.operator.ahk","-"],
+ ["text"," 0.5"],
+ ["punctuation.ahk",")"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.control.ahk","if"],
+ ["text"," "],
+ ["punctuation.ahk","("],
+ ["text","zoom"],
+ ["keyword.operator.ahk",">"],
+ ["text","1"],
+ ["punctuation.ahk",")"],
+ ["text"," "],
+ ["punctuation.ahk","{"]
+],[
+ "start",
+ ["text","\t\tpix "],
+ ["keyword.operator.ahk",":="],
+ ["text"," "],
+ ["support.function.ahk","Round"],
+ ["punctuation.ahk","("],
+ ["text","zoom"],
+ ["punctuation.ahk",")"]
+],[
+ "start",
+ ["text","\t"],
+ ["punctuation.ahk","}"],
+ ["text"," ele "],
+ ["punctuation.ahk","{"]
+],[
+ "start",
+ ["text","\t\tpix "],
+ ["keyword.operator.ahk",":="],
+ ["text"," 1"]
+],[
+ "start",
+ ["text","\t"],
+ ["punctuation.ahk","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.command.ahk","ToolTip"],
+ ["text"," Message "],
+ ["punctuation.ahk","%"],
+ ["text","as_x"],
+ ["punctuation.ahk","%"],
+ ["text"," "],
+ ["punctuation.ahk","%"],
+ ["text","zoom"],
+ ["punctuation.ahk","%"],
+ ["text"," "],
+ ["punctuation.ahk","%"],
+ ["text","ws_x"],
+ ["punctuation.ahk","%"],
+ ["text"," "],
+ ["punctuation.ahk","%"],
+ ["text","hws_x"],
+ ["punctuation.ahk","%"],
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.ahk","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text","hdc_frame "],
+ ["keyword.operator.ahk",":="],
+ ["text"," "],
+ ["support.function.ahk","DllCall"],
+ ["punctuation.ahk","("],
+ ["punctuation.quote.double","\""],
+ ["string.quoted.ahk","GetDC"],
+ ["punctuation.quote.double","\""],
+ ["punctuation.ahk",","],
+ ["text"," UInt"],
+ ["punctuation.ahk",","],
+ ["text"," MagnifierID"],
+ ["punctuation.ahk",")"]
+],[
+ "start"
+],[
+ "start",
+ ["comment.line.ahk","; comment"]
+],[
+ "start",
+ ["text","DrawCross"],
+ ["punctuation.ahk","("],
+ ["keyword.control.ahk","byRef"],
+ ["text"," x"],
+ ["keyword.operator.ahk","="],
+ ["punctuation.quote.double","\""],
+ ["punctuation.quote.double","\""],
+ ["punctuation.ahk",","],
+ ["text"," rX"],
+ ["punctuation.ahk",","],
+ ["text","rY"],
+ ["punctuation.ahk",","],
+ ["text","z"],
+ ["punctuation.ahk",","],
+ ["text"," dc"],
+ ["punctuation.ahk","){"]
+],[
+ "start",
+ ["text"," "],
+ ["comment.line.ahk"," ;specify the style, thickness and color of the cross lines"]
+],[
+ "start",
+ ["text"," h_pen "],
+ ["keyword.operator.ahk",":="],
+ ["text"," "],
+ ["support.function.ahk","DllCall"],
+ ["punctuation.ahk","("],
+ ["text"," "],
+ ["punctuation.quote.double","\""],
+ ["string.quoted.ahk","gdi32.dll\\CreatePen"],
+ ["punctuation.quote.double","\""],
+ ["punctuation.ahk",","],
+ ["text"," "],
+ ["constant.language","Int"],
+ ["punctuation.ahk",","],
+ ["text"," 0"],
+ ["punctuation.ahk",","],
+ ["text"," "],
+ ["constant.language","Int"],
+ ["punctuation.ahk",","],
+ ["text"," 1"],
+ ["punctuation.ahk",","],
+ ["text"," UInt"],
+ ["punctuation.ahk",","],
+ ["text"," 0x0000FF"],
+ ["punctuation.ahk",")"]
+],[
+ "start",
+ ["punctuation.ahk","}"]
+],[
+ "start"
+],[
+ "start",
+ ["comment.line.ahk",";Ctrl ^; Shift +; Win #; Alt !"]
+],[
+ "start",
+ ["text","^"],
+ ["support.constant.ahk","NumPadAdd"],
+ ["keyword.operator.ahk","::"]
+],[
+ "start",
+ ["text","^"],
+ ["support.constant.ahk","WheelUp"],
+ ["keyword.operator.ahk","::"],
+ ["text"," "]
+],[
+ "start",
+ ["text","^;"],
+ ["keyword.operator.ahk","::"],
+ ["text"," "],
+ ["comment.line.ahk"," ;comment"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.ahk","If"],
+ ["punctuation.ahk","("],
+ ["text","zoom "],
+ ["keyword.operator.ahk","<"],
+ ["text"," ws_x "],
+ ["variable.parameter","and"],
+ ["text"," "],
+ ["punctuation.ahk","("],
+ ["text"," "],
+ ["variable.predefined.ahk","A_ThisHotKey"],
+ ["text"," "],
+ ["keyword.operator.ahk","="],
+ ["text"," "],
+ ["punctuation.quote.double","\""],
+ ["string.quoted.ahk","^WheelUp"],
+ ["punctuation.quote.double","\""],
+ ["text"," "],
+ ["variable.parameter","or"],
+ ["text"," "],
+ ["variable.predefined.ahk","A_ThisHotKey"],
+ ["text"," "],
+ ["keyword.operator.ahk","="],
+ ["punctuation.quote.double","\""],
+ ["string.quoted.ahk","^NumPadAdd"],
+ ["punctuation.quote.double","\""],
+ ["punctuation.ahk",")"],
+ ["text"," "],
+ ["punctuation.ahk",")"]
+],[
+ "start",
+ ["text","\t\tzoom "],
+ ["keyword.operator.ahk","*="],
+ ["text"," 1.189207115 "],
+ ["comment.line.ahk"," ; sqrt(sqrt(2))"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.command.ahk","Gosub"],
+ ["punctuation.ahk",","],
+ ["text","setZoom"]
+],[
+ "start",
+ ["keyword.control.ahk","return"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_batchfile.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_batchfile.json
new file mode 100644
index 000000000..0f1f138c8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_batchfile.json
@@ -0,0 +1,70 @@
+[[
+ "start",
+ ["comment.line.colons.dosbatch",":: batch file highlighting in Ace!"]
+],[
+ "start",
+ ["text","@"],
+ ["keyword.command.dosbatch","echo"],
+ ["text"," off"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.control.statement.dosbatch","CALL"],
+ ["text"," "],
+ ["keyword.command.dosbatch","set"],
+ ["text"," var1="],
+ ["constant.numeric","%cd%"]
+],[
+ "start",
+ ["keyword.command.dosbatch","echo"],
+ ["text"," unhide everything in "],
+ ["constant.numeric","%var1%"],
+ ["text","!"]
+],[
+ "start"
+],[
+ "start",
+ ["comment.line.colons.dosbatch",":: FOR loop in bat is super strange!"]
+],[
+ "start",
+ ["keyword.control.repeat.dosbatch","FOR"],
+ ["text"," /f "],
+ ["punctuation.definition.string.begin.shell","\""],
+ ["string.quoted.double.dosbatch","tokens=*"],
+ ["punctuation.definition.string.end.shell","\""],
+ ["text"," "],
+ ["constant.numeric","%%G"],
+ ["text"," IN ('"],
+ ["keyword.command.dosbatch","dir"],
+ ["text"," /A:D /b') DO ("]
+],[
+ "start",
+ ["keyword.command.dosbatch","echo"],
+ ["text"," "],
+ ["constant.numeric","%var1%%%G"]
+],[
+ "start",
+ ["keyword.command.dosbatch","attrib"],
+ ["text"," -r -a -h -s "],
+ ["punctuation.definition.string.begin.shell","\""],
+ ["constant.numeric","%var1%%%G"],
+ ["punctuation.definition.string.end.shell","\""],
+ ["text"," /D /S"]
+],[
+ "start",
+ ["text",")"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.command.dosbatch","pause"]
+],[
+ "start"
+],[
+ "start",
+ ["doc.comment","REM"],
+ ["comment"," that's all"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c9search.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c9search.json
new file mode 100644
index 000000000..980527467
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c9search.json
@@ -0,0 +1,104 @@
+[[
+ "start",
+ ["text","Searching for 'var' in /workspace/configs"]
+],[
+ "start"
+],[
+ "start",
+ ["string","configs/default.js"],
+ ["text",":"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric"," 1"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var fs = require(\"fs\");"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t2"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var argv = require('optimist').argv;"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t3"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var path = require(\"path\");"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t5"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var clientExtensions = {};"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t6"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var clientDirs = fs.readdirSync(__dirname + \"/../plugins-client\");"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t7"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","for (var i = 0; i < clientDirs.length; i++) {"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t8"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var dir = clientDirs[i];"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t12"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var name = dir.split(\".\")[1];"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t16"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var projectDir = (argv.w && path.resolve(process.cwd(), argv.w)) || process.cwd();"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t17"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var fsUrl = \"/workspace\";"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t19"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var port = argv.p || process.env.PORT || 3131;"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t20"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var host = argv.l || \"localhost\";"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t22"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var config = {"]
+],[
+ "start"
+],[
+ "start",
+ ["string","configs/local.js"],
+ ["text",":"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t2"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var config = require(\"./default\");"]
+],[
+ "start"
+],[
+ "start",
+ ["string","configs/packed.js"],
+ ["text",":"]
+],[
+ "start",
+ ["c9searchresults.constant.numeric","\t1"],
+ ["c9searchresults.text",": "],
+ ["c9searchresults.text","var config = require(\"./default\");"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["text","Found 15 matches in 3 files"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c_cpp.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c_cpp.json
new file mode 100644
index 000000000..2818526ff
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_c_cpp.json
@@ -0,0 +1,185 @@
+[[
+ "start",
+ ["comment","// compound assignment operators"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#include"],
+ ["constant.other"," <iostream>"]
+],[
+ "start"
+],[
+ "directive",
+ ["keyword","#include"],
+ ["constant.other.multiline"," \\"]
+],[
+ "start",
+ ["constant.other"," <iostream>"]
+],[
+ "start"
+],[
+ "directive",
+ ["keyword","#include"],
+ ["constant.other.multiline"," \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," \\"]
+],[
+ "start",
+ ["constant.other"," <iostream>"]
+],[
+ "start"
+],[
+ "directive",
+ ["keyword","#include"],
+ ["constant.other.multiline"," \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," \\"]
+],[
+ "start",
+ ["constant.other"," \"iostream\""]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#include"],
+ ["constant.other"," <boost/asio/io_service.hpp>"]
+],[
+ "start",
+ ["keyword","#include"],
+ ["constant.other"," \"boost/asio/io_service.hpp\""]
+],[
+ "start"
+],[
+ "directive",
+ ["keyword","#include"],
+ ["constant.other.multiline"," \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," \"iostream\" \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," \"string\" \\"]
+],[
+ "start",
+ ["constant.other"," <vector>"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["keyword.control","using"],
+ ["text"," "],
+ ["keyword.operator","namespace"],
+ ["text"," "],
+ ["identifier","std"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","main"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","a"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","b"],
+ ["keyword.operator","="],
+ ["constant.numeric","3"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["comment","/* foobar */"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","a"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","b"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","a"],
+ ["keyword.operator","+="],
+ ["constant.numeric","2"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["comment","// equivalent to a=a+2"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","cout"],
+ ["text"," "],
+ ["keyword.operator","<<"],
+ ["text"," "],
+ ["identifier","a"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#if"],
+ ["constant.other"," VERBOSE >= 2"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","prints"],
+ ["paren.lparen","("],
+ ["string","\"trace message\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#endif"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control","return"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","/* Print an error message and get out */"]
+],[
+ "directive",
+ ["keyword","#define"],
+ ["constant.other.multiline"," ABORT \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," do { \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," print( \"Abort\\n\" ); \\"]
+],[
+ "directive",
+ ["constant.other.multiline"," exit(8); \\"]
+],[
+ "start",
+ ["constant.other","} while (0) "],
+ ["comment","/* Note: No semicolon */"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_clojure.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_clojure.json
new file mode 100644
index 000000000..824cba593
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_clojure.json
@@ -0,0 +1,162 @@
+[[
+ "start",
+ ["keyword","("],
+ ["support.function","defn"],
+ ["text"," "],
+ ["identifier","parting"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"returns a String parting in a given language\""]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","([]"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["text"," "],
+ ["string","\"World\""],
+ ["keyword","))"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","(["],
+ ["support.function","name"],
+ ["keyword","]"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["text"," "],
+ ["support.function","name"],
+ ["text"," "],
+ ["string","\"en\""],
+ ["keyword","))"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","(["],
+ ["support.function","name"],
+ ["text"," "],
+ ["identifier","language"],
+ ["keyword","]"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","; condp is similar to a case statement in other languages."]
+],[
+ "start",
+ ["text"," "],
+ ["comment","; It is described in more detail later."]
+],[
+ "start",
+ ["text"," "],
+ ["comment","; It is used here to take different actions based on whether the"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","; parameter \"language\" is set to \"en\", \"es\" or something else."]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","("],
+ ["support.function","condp"],
+ ["text"," "],
+ ["constant.language","="],
+ ["text"," "],
+ ["identifier","language"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"en\""],
+ ["text"," "],
+ ["keyword","("],
+ ["support.function","str"],
+ ["text"," "],
+ ["string","\"Goodbye, \""],
+ ["text"," "],
+ ["support.function","name"],
+ ["keyword",")"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"es\""],
+ ["text"," "],
+ ["keyword","("],
+ ["support.function","str"],
+ ["text"," "],
+ ["string","\"Adios, \""],
+ ["text"," "],
+ ["support.function","name"],
+ ["keyword",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","(throw"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","IllegalArgumentException"],
+ ["text","."]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","("],
+ ["support.function","str"],
+ ["text"," "],
+ ["string","\"unsupported language \""],
+ ["text"," "],
+ ["identifier","language"],
+ ["keyword","))))))"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","("],
+ ["support.function","println"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["keyword","))"],
+ ["text"," "],
+ ["comment","; -> Goodbye, World"]
+],[
+ "start",
+ ["keyword","("],
+ ["support.function","println"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["text"," "],
+ ["string","\"Mark\""],
+ ["keyword","))"],
+ ["text"," "],
+ ["comment","; -> Goodbye, Mark"]
+],[
+ "start",
+ ["keyword","("],
+ ["support.function","println"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["text"," "],
+ ["string","\"Mark\""],
+ ["text"," "],
+ ["string","\"es\""],
+ ["keyword","))"],
+ ["text"," "],
+ ["comment","; -> Adios, Mark"]
+],[
+ "start",
+ ["keyword","("],
+ ["support.function","println"],
+ ["text"," "],
+ ["keyword","("],
+ ["identifier","parting"],
+ ["text"," "],
+ ["string","\"Mark\""],
+ ["text",", "],
+ ["string","\"xy\""],
+ ["keyword","))"],
+ ["text"," "],
+ ["comment","; -> java.lang.IllegalArgumentException: unsupported language xy"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coffee.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coffee.json
new file mode 100644
index 000000000..9c3967e4b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coffee.json
@@ -0,0 +1,528 @@
+[[
+ "start",
+ ["comment","#test: tokenize keyword"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","i"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["punctuation.operator","."],
+ ["constant.numeric",".2"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["comment","#test: tokenize regexp"]
+],[
+ "start",
+ ["string.regex","/\"[a]/"]
+],[
+ "start",
+ ["comment","#test: tokenize functions"]
+],[
+ "start",
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{args}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{a1, a2}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{@a1, a2}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{args}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{args}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{0abc}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren","{"],
+ ["keyword.operator","/"],
+ ["identifier","abc"],
+ ["paren","}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren","{"],
+ ["identifier","abc"],
+ ["keyword.operator","/"],
+ ["paren","}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{#abc}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{abc#}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren","{"],
+ ["paren.rparen",")"],
+ ["identifier","abc"],
+ ["paren","}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren","{"],
+ ["identifier","abc"],
+ ["paren.rparen",")"],
+ ["paren","}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{a{bc}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{ }"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","{}"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","args"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","arg1, arg2"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","arg1 = 1, arg2 = 'name'"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","@arg1 = /abc/, arg2 = 'name'"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","#test: tokenize function: invalid case:"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["keyword.operator","="],
+ ["paren.lparen","("],
+ ["keyword.operator","/"],
+ ["identifier","args"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter"," "],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter"," "],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.language","window"],
+ ["punctuation.operator","."],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","args"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["text"," "],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","#test: tokenize callback function"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["identifier","bar"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","args"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter","x"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "start",
+ ["comment","#test: tokenize class"]
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["language.support.class","Foo"]
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["language.support.class","Foo"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["language.support.class","Bar"]
+],[
+ "start",
+ ["comment","#test: tokenize illegal name property"]
+],[
+ "start",
+ ["identifier","foo"],
+ ["punctuation.operator","."],
+ ["identifier","static"],
+ ["punctuation.operator","."],
+ ["identifier","function"]
+],[
+ "start",
+ ["comment","#!test tokenize string with interpolation"]
+],[
+ "start",
+ ["identifier","a"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.start","\""],
+ ["paren.string","#{"],
+ ["text"," "],
+ ["constant.numeric","22"],
+ ["text"," "],
+ ["keyword.operator","/"],
+ ["text"," "],
+ ["constant.numeric","7"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["paren","{"],
+ ["identifier","x"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["string.start","\""],
+ ["paren.string","#{"],
+ ["identifier","a"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["identifier","b"],
+ ["paren.string","}"],
+ ["string.end","\""],
+ ["paren","}"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["paren.string","}"],
+ ["string.end","\""]
+],[
+ "qqdoc",
+ ["string","\"\"\"heredoc"]
+],[
+ "start",
+ ["string"," \"\"\""]
+],[
+ "start",
+ ["keyword","do"],
+ ["text"," "],
+ ["storage.type","->"]
+],[
+ "comment",
+ ["text"," "],
+ ["comment","###"]
+],[
+ "comment",
+ ["comment"," herecomment"]
+],[
+ "start",
+ ["comment"," ###"]
+],[
+ "heregex",
+ ["text"," "],
+ ["identifier","re"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.regex","/regex/imgy"],
+ ["punctuation.operator","."],
+ ["identifier","test"],
+ ["text"," "],
+ ["string.regex","///"]
+],[
+ "heregex",
+ ["comment.regex"," "],
+ ["string.regex","heregex"],
+ ["comment.regex"," # comment"]
+],[
+ "start",
+ ["string.regex"," ///imgy"]
+],[
+ "js",
+ ["text"," "],
+ ["keyword","this"],
+ ["text"," "],
+ ["keyword","isnt"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["string","`just "]
+],[
+ "start",
+ ["string"," JavaScript`"]
+],[
+ "start",
+ ["text"," "],
+ ["constant.language","undefined"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coldfusion.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coldfusion.json
new file mode 100644
index 000000000..02f2c3f70
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_coldfusion.json
@@ -0,0 +1,26 @@
+[[
+ "start",
+ ["comment","<!--- hello world --->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","cfset"],
+ ["text"," "],
+ ["entity.other.attribute-name","welcome"],
+ ["keyword.operator.separator","="],
+ ["string","\"Hello World!\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","cfoutput"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","#welcome#"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","cfoutput"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_csharp.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_csharp.json
new file mode 100644
index 000000000..dcc6d0e90
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_csharp.json
@@ -0,0 +1,31 @@
+[[
+ "start",
+ ["keyword","public"],
+ ["text"," "],
+ ["keyword","void"],
+ ["text"," "],
+ ["identifier","HelloWorld"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","//Say Hello!"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","Console"],
+ ["punctuation.operator","."],
+ ["identifier","WriteLine"],
+ ["paren.lparen","("],
+ ["string.start","\""],
+ ["string","Hello World"],
+ ["string.end","\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_css.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_css.json
new file mode 100644
index 000000000..e1a7ba053
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_css.json
@@ -0,0 +1,148 @@
+[[
+ "ruleset",
+ ["variable",".text-layer"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","font-family"],
+ ["text",": Monaco, "],
+ ["string","\"Courier New\""],
+ ["text",", "],
+ ["support.constant.fonts","monospace"],
+ ["text",";"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","font-size"],
+ ["text",": "],
+ ["constant.numeric","12"],
+ ["keyword","pX"],
+ ["text",";"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","cursor"],
+ ["text",": "],
+ ["support.constant","text"],
+ ["text",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "ruleset",
+ ["variable",".blinker"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","animation-duration"],
+ ["text",": "],
+ ["constant.numeric","1"],
+ ["keyword","s"],
+ ["text",";"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","animation-name"],
+ ["text",": blink;"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","animation-iteration-count"],
+ ["text",": infinite;"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","animation-direction"],
+ ["text",": alternate;"]
+],[
+ "ruleset",
+ ["text"," "],
+ ["support.type","animation-timing-function"],
+ ["text",": "],
+ ["support.constant","linear"],
+ ["text",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "media",
+ ["string","@keyframes blink {"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["constant","0"],
+ ["text","% "],
+ ["paren.lparen","{"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["support.type","opacity"],
+ ["text",": "],
+ ["constant.numeric","0"],
+ ["text",";"]
+],[
+ "media",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["constant","40"],
+ ["text","% "],
+ ["paren.lparen","{"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["support.type","opacity"],
+ ["text",": "],
+ ["constant.numeric","0"],
+ ["text",";"]
+],[
+ "media",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["constant","40"],
+ ["variable",".5"],
+ ["text","% "],
+ ["paren.lparen","{"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["support.type","opacity"],
+ ["text",": "],
+ ["constant.numeric","1"]
+],[
+ "media",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["constant","100"],
+ ["text","% "],
+ ["paren.lparen","{"]
+],[
+ ["ruleset","media"],
+ ["text"," "],
+ ["support.type","opacity"],
+ ["text",": "],
+ ["constant.numeric","1"]
+],[
+ "media",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["string","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_curly.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_curly.json
new file mode 100644
index 000000000..110574b6c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_curly.json
@@ -0,0 +1,56 @@
+[[
+ "start",
+ ["text","tokenize Curly template"],
+ ["variable","{{"],
+ ["text","test"],
+ ["variable","}}"]
+],[
+ "start",
+ ["text","tokenize embedded script"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.script","script"],
+ ["text"," "],
+ ["entity.other.attribute-name","a"],
+ ["keyword.operator.separator","="],
+ ["string","'a'"],
+ ["meta.tag.punctuation.end",">"],
+ ["storage.type","var"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","'123'"]
+],[
+ "start",
+ ["text","tokenize multiline attribute value with double quotes"]
+],[
+ ["qqstring_inner","start_tag_stuff"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\"abc{{xyz}}"]
+],[
+ "start",
+ ["string","def\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","tokenize multiline attribute value with single quotes"]
+],[
+ ["qstring_inner","start_tag_stuff"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","'abc"]
+],[
+ "start",
+ ["string","def\\\"'"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dart.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dart.json
new file mode 100644
index 000000000..5964791ab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dart.json
@@ -0,0 +1,368 @@
+[[
+ "start",
+ ["identifier","main"],
+ ["text","() {"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","print"],
+ ["text","("],
+ ["string","'Hello World!'"],
+ ["text",");"]
+],[
+ "start",
+ ["text","}"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.primitive.dart","int"],
+ ["text"," "],
+ ["identifier","fib"],
+ ["text","("],
+ ["storage.type.primitive.dart","int"],
+ ["text"," "],
+ ["identifier","n"],
+ ["text",") "],
+ ["keyword.operator.assignment.dart","="],
+ ["keyword.operator.comparison.dart",">"],
+ ["text"," ("],
+ ["identifier","n"],
+ ["text"," "],
+ ["keyword.operator.comparison.dart",">"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text",") "],
+ ["keyword.control.ternary.dart","?"],
+ ["text"," ("],
+ ["identifier","fib"],
+ ["text","("],
+ ["identifier","n"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","-"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text",") "],
+ ["keyword.operator.arithmetic.dart","+"],
+ ["text"," "],
+ ["identifier","fib"],
+ ["text","("],
+ ["identifier","n"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","-"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text",")) "],
+ ["keyword.control.ternary.dart",":"],
+ ["text"," "],
+ ["identifier","n"],
+ ["text",";"]
+],[
+ "start",
+ ["identifier","main"],
+ ["text","() {"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","print"],
+ ["text","("],
+ ["string","'fib(20) = ${fib(20)}'"],
+ ["text",");"]
+],[
+ "start",
+ ["text","}"]
+],[
+ "comment",
+ ["comment","/*asd"]
+],[
+ "comment",
+ ["comment","asdad"]
+],[
+ "start",
+ ["comment","*/"]
+],[
+ "start",
+ ["constant.numeric","0.67"]
+],[
+ "start",
+ ["constant.numeric","77"]
+],[
+ "start",
+ ["text","."],
+ ["constant.numeric","86"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.other.import.dart","import"],
+ ["text","("],
+ ["string","\"http://dartwatch.com/myOtherLibrary.dart\""],
+ ["text",");"]
+],[
+ "start",
+ ["keyword.other.import.dart","import"],
+ ["text","("],
+ ["string","\"myOtherLibrary.dart\""],
+ ["text",", "],
+ ["keyword.other.import.dart","prefix"],
+ ["text",":"],
+ ["string","\"lib1\""],
+ ["text",");"]
+],[
+ "start"
+],[
+ "qqdoc",
+ ["string","\"\"\"asdasdads"]
+],[
+ "qqdoc",
+ ["string","asdadsadsasd"]
+],[
+ "start",
+ ["string","asdasdasdad\"\"\""]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["string","'23424'"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","0x234"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","foo"],
+ ["text"," "],
+ ["keyword.operator.dart","is"],
+ ["text"," "],
+ ["identifier","bar"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.primitive.dart","int"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["keyword.operator.bitwise.dart","<<"],
+ ["text"," "],
+ ["constant.numeric","10"],
+ ["text"," "]
+],[
+ "start",
+ ["comment","// Create a class for Point."]
+],[
+ "start",
+ ["keyword.declaration.dart","class"],
+ ["text"," "],
+ ["identifier","Point"],
+ ["text"," {"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// Final variables cannot be changed once they are assigned."]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// Create two instance variables."]
+],[
+ "start",
+ ["text"," "],
+ ["storage.modifier.dart","final"],
+ ["text"," "],
+ ["storage.type.primitive.dart","num"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text",", "],
+ ["identifier","y"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// A constructor, with syntactic sugar for setting instance variables."]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","Point"],
+ ["text","("],
+ ["variable.language.dart","this"],
+ ["text","."],
+ ["identifier","x"],
+ ["text",", "],
+ ["variable.language.dart","this"],
+ ["text","."],
+ ["identifier","y"],
+ ["text",");"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// A named constructor with an initializer list."]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","Point"],
+ ["text","."],
+ ["identifier","origin"],
+ ["text","() "],
+ ["keyword.control.ternary.dart",":"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text",", "],
+ ["identifier","y"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// A method."]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.primitive.dart","num"],
+ ["text"," "],
+ ["identifier","distanceTo"],
+ ["text","("],
+ ["identifier","Point"],
+ ["text"," "],
+ ["identifier","other"],
+ ["text",") {"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.primitive.dart","var"],
+ ["text"," "],
+ ["identifier","dx"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","-"],
+ ["text"," "],
+ ["identifier","other"],
+ ["text","."],
+ ["identifier","x"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.primitive.dart","var"],
+ ["text"," "],
+ ["identifier","dy"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["identifier","y"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","-"],
+ ["text"," "],
+ ["identifier","other"],
+ ["text","."],
+ ["identifier","y"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.dart","return"],
+ ["text"," "],
+ ["identifier","sqrt"],
+ ["text","("],
+ ["identifier","dx"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","*"],
+ ["text"," "],
+ ["identifier","dx"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","+"],
+ ["text"," "],
+ ["identifier","dy"],
+ ["text"," "],
+ ["keyword.operator.arithmetic.dart","*"],
+ ["text"," "],
+ ["identifier","dy"],
+ ["text",");"]
+],[
+ "start",
+ ["text"," }"]
+],[
+ "start",
+ ["text","}"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// Check for null."]
+],[
+ "start",
+ ["storage.type.primitive.dart","var"],
+ ["text"," "],
+ ["identifier","unicorn"],
+ ["text",";"]
+],[
+ "start",
+ ["identifier","assert"],
+ ["text","("],
+ ["identifier","unicorn"],
+ ["text"," "],
+ ["keyword.operator.comparison.dart","=="],
+ ["text"," "],
+ ["constant.language.dart","null"],
+ ["text",");"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","// Check for NaN."]
+],[
+ "start",
+ ["storage.type.primitive.dart","var"],
+ ["text"," "],
+ ["identifier","iMeantToDoThis"],
+ ["text"," "],
+ ["keyword.operator.assignment.dart","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["keyword.operator.arithmetic.dart","/"],
+ ["constant.numeric","0"],
+ ["text",";"]
+],[
+ "start",
+ ["identifier","assert"],
+ ["text","("],
+ ["identifier","iMeantToDoThis"],
+ ["text","."],
+ ["identifier","isNaN"],
+ ["text","());"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_diff.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_diff.json
new file mode 100644
index 000000000..7cf9b7285
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_diff.json
@@ -0,0 +1,398 @@
+[[
+ "start",
+ ["variable","diff"],
+ ["variable"," --git"],
+ ["keyword"," a/lib/ace/edit_session.js"],
+ ["variable"," b/lib/ace/edit_session.js"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","index 23fc3fc..ed3b273 100644"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","---"],
+ ["meta.tag"," a/lib/ace/edit_session.js"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","+++"],
+ ["meta.tag"," b/lib/ace/edit_session.js"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -51,6 +51,7 "],
+ ["constant","@@"],
+ ["comment.doc.tag"," var TextMode = require(\"./mode/text\").Mode;"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," var Range = require(\"./range\").Range;"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," var Document = require(\"./document\").Document;"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," var BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text","var SearchHighlight = require(\"./search_highlight\").SearchHighlight;"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," /**"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," * class EditSession"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -307,6 +308,13 "],
+ ["constant","@@"],
+ ["comment.doc.tag"," var EditSession = function(text, mode) {"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," return token;"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," };"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," this.highlight = function(re) {"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," if (!this.$searchHighlight) {"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," this.$searchHighlight = this.addDynamicMarker(highlight);"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," }"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," this.$searchHighlight.setRegexp(re);"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," }"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," /**"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," * EditSession.setUndoManager(undoManager)"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," * - undoManager (UndoManager): The new undo manager"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -556,7 +564,8 "],
+ ["constant","@@"],
+ ["comment.doc.tag"," var EditSession = function(text, mode) {"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," type : type || \"line\","]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," renderer: typeof type == \"function\" ? type : null,"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," clazz : clazz,"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," inFront: !!inFront"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," inFront: !!inFront,"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," id: id"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," }"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," if (inFront) {"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","diff"],
+ ["variable"," --git"],
+ ["keyword"," a/lib/ace/editor.js"],
+ ["variable"," b/lib/ace/editor.js"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","index 834e603..b27ec73 100644"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","---"],
+ ["meta.tag"," a/lib/ace/editor.js"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","+++"],
+ ["meta.tag"," b/lib/ace/editor.js"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -494,7 +494,7 "],
+ ["constant","@@"],
+ ["comment.doc.tag"," var Editor = function(renderer, session) {"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," * Emitted when a selection has changed."]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," **/"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," this.onSelectionChange = function(e) {"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," var session = this.getSession();"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," var session = this.session;"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," if (session.$selectionMarker) {"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," session.removeMarker(session.$selectionMarker);"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -509,12 +509,40 "],
+ ["constant","@@"],
+ ["comment.doc.tag"," var Editor = function(renderer, session) {"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," this.$updateHighlightActiveLine();"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," }"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," var self = this;"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," if (this.$highlightSelectedWord && !this.$wordHighlightTimer)"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," this.$wordHighlightTimer = setTimeout(function() {"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," self.session.$mode.highlightSelection(self);"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," self.$wordHighlightTimer = null;"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","-"],
+ ["string"," }, 30, this);"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text"," var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible"," };"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","diff"],
+ ["variable"," --git"],
+ ["keyword"," a/lib/ace/search_highlight.js"],
+ ["variable"," b/lib/ace/search_highlight.js"]
+],[
+ "start"
+],[
+ "start",
+ ["invisible","new file mode 100644"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","index 0000000..b2df779"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","---"],
+ ["meta.tag"," /dev/null"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric","+++"],
+ ["meta.tag"," b/lib/ace/search_highlight.js"]
+],[
+ "start"
+],[
+ "start",
+ ["constant","@@"],
+ ["constant.numeric"," -0,0 +1,3 "],
+ ["constant","@@"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text","new"]
+],[
+ "start"
+],[
+ "start",
+ ["support.constant","+"],
+ ["text","empty file"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dot.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dot.json
new file mode 100644
index 000000000..fec8b9697
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_dot.json
@@ -0,0 +1,2254 @@
+[[
+ "start",
+ ["comment","// Original source: http://www.graphviz.org/content/lion_share"]
+],[
+ "start",
+ ["comment","##\"A few people in the field of genetics are using dot to draw \"marriage node diagram\" pedigree drawings. Here is one I have done of a test pedigree from the FTREE pedigree drawing package (Lion Share was a racehorse).\" Contributed by David Duffy."]
+],[
+ "start"
+],[
+ "start",
+ ["comment","##Command to get the layout: \"dot -Tpng thisfile > thisfile.png\""]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","digraph"],
+ ["text"," Ped_Lion_Share "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["comment","# page = \"8.2677165,11.692913\" ;"]
+],[
+ "start",
+ ["variable","ratio"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"auto\""],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text","mincross "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","2.0"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["variable","label"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"Pedigree Lion_Share\""],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["string","\"001\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"002\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"003\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"004\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"005\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"006\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"007\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"009\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"014\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"015\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"016\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"ZZ01\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"ZZ02\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"017\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"012\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"008\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"011\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"013\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"010\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"023\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"020\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"021\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"018\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"025\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"019\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"022\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"024\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"027\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","circle "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"026\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","white "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"028\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","box "],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","regular"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","fillcolor"],
+ ["keyword.operator","="],
+ ["text","grey "],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0001\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"001\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0001\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"007\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0001\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0001\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"017\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0002\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"001\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0002\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"ZZ02\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0002\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0002\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"012\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0003\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"002\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0003\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"003\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0003\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0003\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"008\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0004\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"002\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0004\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"006\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0004\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0004\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"011\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0005\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"002\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0005\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"ZZ01\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0005\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0005\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"013\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0006\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"004\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0006\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"009\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0006\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0006\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"010\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0007\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"005\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0007\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"015\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0007\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0007\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"023\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0008\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"005\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0008\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"016\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0008\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0008\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"020\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0009\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"005\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0009\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"012\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0009\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0009\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"021\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0010\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"008\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0010\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"017\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0010\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0010\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"018\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0011\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"011\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0011\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"023\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0011\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0011\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"025\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0012\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"013\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0012\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"014\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0012\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0012\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"019\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0013\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"010\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0013\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"021\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0013\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0013\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"022\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0014\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"019\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0014\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"020\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0014\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0014\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"024\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0015\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"022\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0015\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"025\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0015\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0015\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"027\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0016\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"024\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0016\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"018\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0016\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0016\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"026\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0017\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","shape"],
+ ["keyword.operator","="],
+ ["text","diamond"],
+ ["punctuation.operator",","],
+ ["variable","style"],
+ ["keyword.operator","="],
+ ["text","filled"],
+ ["punctuation.operator",","],
+ ["variable","label"],
+ ["keyword.operator","="],
+ ["string","\"\""],
+ ["punctuation.operator",","],
+ ["variable","height"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["variable","width"],
+ ["keyword.operator","="],
+ ["text","."],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"026\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0017\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"027\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"marr0017\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["string","\"marr0017\""],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["string","\"028\""],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["variable","dir"],
+ ["keyword.operator","="],
+ ["text","none"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["variable","weight"],
+ ["keyword.operator","="],
+ ["constant.numeric","2"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_erlang.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_erlang.json
new file mode 100644
index 000000000..8a8289760
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_erlang.json
@@ -0,0 +1,166 @@
+[[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.erlang","%% A process whose only job is to keep a counter."]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.erlang","%% First version"]
+],[
+ "start",
+ ["meta.directive.module.erlang"," "],
+ ["punctuation.section.directive.begin.erlang","-"],
+ ["keyword.control.directive.module.erlang","module"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["entity.name.type.class.module.definition.erlang","counter"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.section.directive.end.erlang","."]
+],[
+ "start",
+ ["meta.directive.export.erlang"," "],
+ ["punctuation.section.directive.begin.erlang","-"],
+ ["keyword.control.directive.export.erlang","export"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["punctuation.definition.list.begin.erlang","["],
+ ["entity.name.function.erlang","start"],
+ ["punctuation.separator.function-arity.erlang","/"],
+ ["constant.numeric.integer.decimal.erlang","0"],
+ ["punctuation.separator.list.erlang",","],
+ ["meta.structure.list.function.erlang"," "],
+ ["entity.name.function.erlang","codeswitch"],
+ ["punctuation.separator.function-arity.erlang","/"],
+ ["constant.numeric.integer.decimal.erlang","1"],
+ ["punctuation.definition.list.end.erlang","]"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.section.directive.end.erlang","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["meta.function.erlang"," "],
+ ["entity.name.function.definition.erlang","start"],
+ ["punctuation.section.expression.begin.erlang","("],
+ ["punctuation.section.expression.end.erlang",")"],
+ ["text"," "],
+ ["keyword.operator.symbolic.erlang","->"],
+ ["text"," "],
+ ["entity.name.function.erlang","loop"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["constant.numeric.integer.decimal.erlang","0"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.terminator.function.erlang","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ ["text6","meta.function.erlang"],
+ ["meta.function.erlang"," "],
+ ["entity.name.function.definition.erlang","loop"],
+ ["punctuation.section.expression.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.section.expression.end.erlang",")"],
+ ["text"," "],
+ ["keyword.operator.symbolic.erlang","->"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["text"," "],
+ ["keyword.control.receive.erlang","receive"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.definition.tuple.begin.erlang","{"],
+ ["constant.other.symbol.unquoted.erlang","increment"],
+ ["punctuation.separator.tuple.erlang",","],
+ ["meta.structure.tuple.erlang"," "],
+ ["variable.other.erlang","Count"],
+ ["punctuation.definition.tuple.end.erlang","}"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.separator.clause-head-body.erlang","->"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["entity.name.function.erlang","loop"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["keyword.operator.symbolic.erlang","+"],
+ ["variable.other.erlang","Count"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.separator.clauses.erlang",";"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.definition.tuple.begin.erlang","{"],
+ ["constant.other.symbol.unquoted.erlang","counter"],
+ ["punctuation.separator.tuple.erlang",","],
+ ["meta.structure.tuple.erlang"," "],
+ ["variable.other.erlang","Pid"],
+ ["punctuation.definition.tuple.end.erlang","}"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.separator.clause-head-body.erlang","->"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["variable.other.erlang","Pid"],
+ ["meta.expression.receive.erlang"," "],
+ ["keyword.operator.symbolic.erlang","!"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.definition.tuple.begin.erlang","{"],
+ ["constant.other.symbol.unquoted.erlang","counter"],
+ ["punctuation.separator.tuple.erlang",","],
+ ["meta.structure.tuple.erlang"," "],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.definition.tuple.end.erlang","}"],
+ ["punctuation.separator.expressions.erlang",","]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["entity.name.function.erlang","loop"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.separator.clauses.erlang",";"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["constant.other.symbol.unquoted.erlang","code_switch"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.separator.clause-head-body.erlang","->"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["keyword.operator.macro.erlang","?"],
+ ["entity.name.function.macro.erlang","MODULE"],
+ ["meta.expression.receive.erlang",":"],
+ ["entity.name.function.erlang","codeswitch"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.definition.parameters.end.erlang",")"]
+],[
+ ["keyword.control.receive.erlang","text6","text6","meta.function.erlang"],
+ ["meta.expression.receive.erlang"," "],
+ ["punctuation.definition.comment.erlang","% Force the use of 'codeswitch/1' from the latest MODULE version"]
+],[
+ "start",
+ ["meta.expression.receive.erlang"," "],
+ ["keyword.control.end.erlang","end"],
+ ["punctuation.terminator.function.erlang","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["meta.function.erlang"," "],
+ ["entity.name.function.definition.erlang","codeswitch"],
+ ["punctuation.section.expression.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.section.expression.end.erlang",")"],
+ ["text"," "],
+ ["keyword.operator.symbolic.erlang","->"],
+ ["text"," "],
+ ["entity.name.function.erlang","loop"],
+ ["punctuation.definition.parameters.begin.erlang","("],
+ ["variable.other.erlang","Sum"],
+ ["punctuation.definition.parameters.end.erlang",")"],
+ ["punctuation.terminator.function.erlang","."]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_forth.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_forth.json
new file mode 100644
index 000000000..8c8a007ef
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_forth.json
@@ -0,0 +1,219 @@
+[[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","HELLO"],
+ ["meta.block.forth"," "],
+ ["comment.line.parentheses.forth"," ( -- )"],
+ ["meta.block.forth"," CR "],
+ ["string.quoted.double.forth",".\" Hello, world!\""],
+ ["meta.block.forth"," "],
+ ["keyword.other.compile-only.forth",";"],
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["text","HELLO <cr>"]
+],[
+ "start",
+ ["text","Hello, world!"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","[CHAR]"],
+ ["meta.block.forth"," "],
+ ["keyword.other.non-immediate.forth"," CHAR"],
+ ["meta.block.forth"," "],
+ ["keyword.other.compile-only.forth"," POSTPONE"],
+ ["meta.block.forth"," LITERAL "],
+ ["keyword.other.compile-only.forth",";"],
+ ["keyword.other.immediate.forth"," IMMEDIATE"]
+],[
+ "start"
+],[
+ "start",
+ ["constant.numeric.forth","0"],
+ ["storage.type.forth"," value"],
+ ["text"," ii "],
+ ["constant.numeric.forth"," 0"],
+ ["storage.type.forth"," value"],
+ ["text"," jj"]
+],[
+ "start",
+ ["constant.numeric.forth","0"],
+ ["storage.type.forth"," value"],
+ ["text"," KeyAddr "],
+ ["constant.numeric.forth"," 0"],
+ ["storage.type.forth"," value"],
+ ["text"," KeyLen"]
+],[
+ "start",
+ ["storage.type.forth","create"],
+ ["text"," SArray "],
+ ["constant.numeric.forth"," 256"],
+ ["text"," allot "],
+ ["comment.line.backslash.forth"," \\ state array of 256 bytes"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","KeyArray"],
+ ["meta.block.forth"," KeyLen mod KeyAddr "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","get_byte"],
+ ["meta.block.forth"," + c@ "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","set_byte"],
+ ["meta.block.forth"," + c! "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","as_byte"],
+ ["meta.block.forth"," "],
+ ["constant.numeric.forth"," 255"],
+ ["meta.block.forth"," and "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","reset_ij"],
+ ["meta.block.forth"," "],
+ ["constant.numeric.forth"," 0"],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," ii "],
+ ["constant.numeric.forth"," 0"],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," jj "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","i_update"],
+ ["meta.block.forth"," "],
+ ["constant.numeric.forth"," 1"],
+ ["meta.block.forth"," + as_byte"],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," ii "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","j_update"],
+ ["meta.block.forth"," ii SArray get_byte + as_byte"],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," jj "],
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "keyword.other.compile-only.forth",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","swap_s_ij"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," jj SArray get_byte"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii SArray get_byte jj SArray set_byte"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii SArray set_byte"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "start"
+],[
+ "keyword.other.compile-only.forth",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","rc4_init"],
+ ["comment.line.parentheses.forth"," ( KeyAddr KeyLen -- )"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," "],
+ ["constant.numeric.forth"," 256"],
+ ["meta.block.forth"," min"],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," KeyLen "],
+ ["keyword.other.immediate.forth"," TO"],
+ ["meta.block.forth"," KeyAddr"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," "],
+ ["constant.numeric.forth"," 256 0"],
+ ["keyword.control.compile-only.forth"," DO"],
+ ["meta.block.forth"," "],
+ ["variable.language.forth","i"],
+ ["meta.block.forth"," "],
+ ["variable.language.forth","i"],
+ ["meta.block.forth"," SArray set_byte "],
+ ["keyword.control.compile-only.forth"," LOOP"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," reset_ij"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," "],
+ ["keyword.control.compile-only.forth"," BEGIN"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii KeyArray get_byte jj + j_update"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," swap_s_ij"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii"],
+ ["constant.numeric.forth"," 255"],
+ ["meta.block.forth"," <"],
+ ["keyword.control.compile-only.forth"," WHILE"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii i_update"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," "],
+ ["keyword.control.compile-only.forth"," REPEAT"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," reset_ij"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",";"]
+],[
+ "keyword.other.compile-only.forth",
+ ["keyword.other.compile-only.forth",":"],
+ ["meta.block.forth"," "],
+ ["entity.name.function.forth","rc4_byte"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii i_update jj j_update"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," swap_s_ij"]
+],[
+ "keyword.other.compile-only.forth",
+ ["meta.block.forth"," ii SArray get_byte jj SArray get_byte + as_byte SArray get_byte xor"]
+],[
+ "start",
+ ["keyword.other.compile-only.forth",";"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ftl.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ftl.json
new file mode 100644
index 000000000..eb81f1fbf
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ftl.json
@@ -0,0 +1,341 @@
+[[
+ "start",
+ ["keyword.function","<#ftl"],
+ ["text"," "],
+ ["entity.other.attribute-name","encoding"],
+ ["keyword.operator","="],
+ ["string","\"utf-8\""],
+ ["text"," "],
+ ["keyword","/>"]
+],[
+ "start",
+ ["keyword.function","<#setting"],
+ ["text"," "],
+ ["entity.other.attribute-name","locale"],
+ ["keyword.operator","="],
+ ["string","\"en_US\""],
+ ["text"," "],
+ ["keyword","/>"]
+],[
+ "start",
+ ["keyword.function","<#import"],
+ ["text"," "],
+ ["string","\"library\""],
+ ["text"," "],
+ ["keyword.operator","as"],
+ ["text"," "],
+ ["variable","lib"],
+ ["text"," "],
+ ["keyword","/>"]
+],[
+ "ftl-dcomment",
+ ["comment","<#--"]
+],[
+ "ftl-dcomment",
+ ["comment"," FreeMarker comment"]
+],[
+ "ftl-dcomment",
+ ["comment"," ${abc} <#assign a=12 />"]
+],[
+ "start",
+ ["comment","-->"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.doctype.begin","<!"],
+ ["meta.tag.doctype","DOCTYPE"],
+ ["text"," "],
+ ["xml-pe","html"],
+ ["punctuation.doctype.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["text"," "],
+ ["entity.other.attribute-name","lang"],
+ ["keyword.operator.separator","="],
+ ["string","\"en-us\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","meta"],
+ ["text"," "],
+ ["entity.other.attribute-name","charset"],
+ ["keyword.operator.separator","="],
+ ["string","\"utf-8\""],
+ ["text"," "],
+ ["meta.tag.punctuation.end","/>"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"],
+ ["string.interpolated","${"],
+ ["variable","title"],
+ ["keyword.operator","!"],
+ ["string","\"FreeMarker\""],
+ ["string.interpolated","}"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Hello "],
+ ["string.interpolated","${"],
+ ["variable","name"],
+ ["keyword.operator","!"],
+ ["string","\"\""],
+ ["string.interpolated","}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Today is: "],
+ ["string.interpolated","${"],
+ ["language.variable",".now"],
+ ["support.function","?date"],
+ ["string.interpolated","}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#assign"],
+ ["text"," "],
+ ["variable","x"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","13"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#if"],
+ ["text"," "],
+ ["variable","x"],
+ ["text"," "],
+ ["constant.character.entity","&gt;"],
+ ["text"," "],
+ ["constant.numeric","12"],
+ ["text"," "],
+ ["keyword.operator","&&"],
+ ["text"," "],
+ ["variable","x"],
+ ["text"," "],
+ ["keyword.operator","lt"],
+ ["text"," "],
+ ["constant.numeric","14"],
+ ["keyword",">"],
+ ["text","x equals 13: "],
+ ["string.interpolated","${"],
+ ["variable","x"],
+ ["string.interpolated","}"],
+ ["keyword.function","</#if"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#list"],
+ ["text"," "],
+ ["variable","items"],
+ ["text"," "],
+ ["keyword.operator","as"],
+ ["text"," "],
+ ["variable","item"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"],
+ ["string.interpolated","${"],
+ ["variable","item_index"],
+ ["string.interpolated","}"],
+ ["text",": "],
+ ["string.interpolated","${"],
+ ["variable","item.name"],
+ ["keyword.operator","!"],
+ ["support.function","?split"],
+ ["paren.lparen","("],
+ ["string","\""],
+ ["constant.character.escape","\\n"],
+ ["string","\""],
+ ["paren.rparen",")"],
+ ["paren.lparen","["],
+ ["constant.numeric","0"],
+ ["paren.rparen","]"],
+ ["string.interpolated","}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","</#list"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," User directive: "],
+ ["keyword.other","<@lib.function"],
+ ["text"," "],
+ ["variable","attr1"],
+ ["keyword.operator","="],
+ ["constant.language","true"],
+ ["text"," "],
+ ["variable","attr2"],
+ ["keyword.operator","="],
+ ["string","'value'"],
+ ["text"," "],
+ ["variable","attr3"],
+ ["keyword.operator","="],
+ ["constant.numeric","-42.12"],
+ ["keyword",">"],
+ ["text","Test"],
+ ["keyword.other","</@lib.function"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.other","<@anotherOne"],
+ ["text"," "],
+ ["keyword","/>"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#if"],
+ ["text"," "],
+ ["variable","variable"],
+ ["support.function.deprecated","?exists"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," Deprecated"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#elseif"],
+ ["text"," "],
+ ["variable","variable"],
+ ["support.function","??"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," Better"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","<#else"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," Default"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.function","</#if"],
+ ["keyword",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.image","img"],
+ ["text"," "],
+ ["entity.other.attribute-name","src"],
+ ["keyword.operator.separator","="],
+ ["string","\"images/"],
+ ["string.interpolated","${"],
+ ["variable","user.id"],
+ ["string.interpolated","}"],
+ ["string",".png\""],
+ ["text"," "],
+ ["meta.tag.punctuation.end","/>"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_glsl.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_glsl.json
new file mode 100644
index 000000000..ce8a4d160
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_glsl.json
@@ -0,0 +1,127 @@
+[[
+ "start",
+ ["keyword","uniform"],
+ ["text"," "],
+ ["keyword","float"],
+ ["text"," "],
+ ["identifier","amplitude"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["keyword","attribute"],
+ ["text"," "],
+ ["keyword","float"],
+ ["text"," "],
+ ["identifier","displacement"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["keyword","varying"],
+ ["text"," "],
+ ["keyword","vec3"],
+ ["text"," "],
+ ["identifier","vNormal"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","void"],
+ ["text"," "],
+ ["identifier","main"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["identifier","vNormal"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","normal"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// multiply our displacement by the"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// amplitude. The amp will get animated"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// so we'll have animated displacement"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","vec3"],
+ ["text"," "],
+ ["identifier","newPosition"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","position"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","normal"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","vec3"],
+ ["paren.lparen","("],
+ ["identifier","displacement"],
+ ["text"," "],
+ ["keyword.operator","*"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","amplitude"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["constant.language","gl_Position"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","projectionMatrix"],
+ ["text"," "],
+ ["keyword.operator","*"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","modelViewMatrix"],
+ ["text"," "],
+ ["keyword.operator","*"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","vec4"],
+ ["paren.lparen","("],
+ ["identifier","newPosition"],
+ ["punctuation.operator",","],
+ ["constant.numeric","1.0"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_golang.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_golang.json
new file mode 100644
index 000000000..070c0a17d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_golang.json
@@ -0,0 +1,256 @@
+[[
+ "start",
+ ["comment","// Concurrent computation of pi."]
+],[
+ "start",
+ ["comment","// See http://goo.gl/ZuTZM."]
+],[
+ "start",
+ ["comment","//"]
+],[
+ "start",
+ ["comment","// This demonstrates Go's ability to handle"]
+],[
+ "start",
+ ["comment","// large numbers of concurrent processes."]
+],[
+ "start",
+ ["comment","// It is an unreasonable way to calculate pi."]
+],[
+ "start",
+ ["keyword","package"],
+ ["text"," "],
+ ["identifier","main"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","import"],
+ ["text"," "],
+ ["paren.lparen","("]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"fmt\""]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"math\""]
+],[
+ "start",
+ ["paren.rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","func"],
+ ["text"," "],
+ ["identifier","main"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","fmt"],
+ ["punctuation.operator","."],
+ ["identifier","Println"],
+ ["paren.lparen","("],
+ ["identifier","pi"],
+ ["paren.lparen","("],
+ ["constant.numeric","5000"],
+ ["paren.rparen","))"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","// pi launches n goroutines to compute an"]
+],[
+ "start",
+ ["comment","// approximation of pi."]
+],[
+ "start",
+ ["keyword","func"],
+ ["text"," "],
+ ["identifier","pi"],
+ ["paren.lparen","("],
+ ["identifier","n"],
+ ["text"," "],
+ ["support.type","int"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["support.type","float64"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ch"],
+ ["text"," "],
+ ["punctuation.operator",":"],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.function","make"],
+ ["paren.lparen","("],
+ ["keyword","chan"],
+ ["text"," "],
+ ["support.type","float64"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","k"],
+ ["text"," "],
+ ["punctuation.operator",":"],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","k"],
+ ["text"," "],
+ ["keyword.operator","<="],
+ ["text"," "],
+ ["identifier","n"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","k"],
+ ["keyword.operator","++"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","go"],
+ ["text"," "],
+ ["identifier","term"],
+ ["paren.lparen","("],
+ ["identifier","ch"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["support.type","float64"],
+ ["paren.lparen","("],
+ ["identifier","k"],
+ ["paren.rparen","))"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","f"],
+ ["text"," "],
+ ["punctuation.operator",":"],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0.0"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","k"],
+ ["text"," "],
+ ["punctuation.operator",":"],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","k"],
+ ["text"," "],
+ ["keyword.operator","<="],
+ ["text"," "],
+ ["identifier","n"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","k"],
+ ["keyword.operator","++"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","f"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["keyword.operator","<-"],
+ ["identifier","ch"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["identifier","f"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","func"],
+ ["text"," "],
+ ["identifier","term"],
+ ["paren.lparen","("],
+ ["identifier","ch"],
+ ["text"," "],
+ ["keyword","chan"],
+ ["text"," "],
+ ["support.type","float64"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","k"],
+ ["text"," "],
+ ["support.type","float64"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ch"],
+ ["text"," "],
+ ["keyword.operator","<-"],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "],
+ ["identifier","math"],
+ ["punctuation.operator","."],
+ ["identifier","Pow"],
+ ["paren.lparen","("],
+ ["constant.numeric","-1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","k"],
+ ["paren.rparen",")"],
+ ["text"," / "],
+ ["paren.lparen","("],
+ ["constant.numeric","2"],
+ ["keyword.operator","*"],
+ ["identifier","k"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_groovy.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_groovy.json
new file mode 100644
index 000000000..c7dae6b13
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_groovy.json
@@ -0,0 +1,410 @@
+[[
+ "start",
+ ["comment","//http://groovy.codehaus.org/Martin+Fowler%27s+closure+examples+in+Groovy"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Employee"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","name"],
+ ["text",", "],
+ ["identifier","salary"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","boolean"],
+ ["text"," "],
+ ["identifier","manager"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","String"],
+ ["text"," "],
+ ["identifier","toString"],
+ ["lparen","("],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["identifier","name"],
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","emps"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["lparen","["],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Employee"],
+ ["lparen","("],
+ ["identifier","name"],
+ ["text",":"],
+ ["string","'Guillaume'"],
+ ["text",", "],
+ ["identifier","manager"],
+ ["text",":"],
+ ["constant.language.boolean","true"],
+ ["text",", "],
+ ["identifier","salary"],
+ ["text",":"],
+ ["constant.numeric","200"],
+ ["rparen",")"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Employee"],
+ ["lparen","("],
+ ["identifier","name"],
+ ["text",":"],
+ ["string","'Graeme'"],
+ ["text",", "],
+ ["identifier","manager"],
+ ["text",":"],
+ ["constant.language.boolean","true"],
+ ["text",", "],
+ ["identifier","salary"],
+ ["text",":"],
+ ["constant.numeric","200"],
+ ["rparen",")"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Employee"],
+ ["lparen","("],
+ ["identifier","name"],
+ ["text",":"],
+ ["string","'Dierk'"],
+ ["text",", "],
+ ["identifier","manager"],
+ ["text",":"],
+ ["constant.language.boolean","false"],
+ ["text",", "],
+ ["identifier","salary"],
+ ["text",":"],
+ ["constant.numeric","151"],
+ ["rparen",")"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Employee"],
+ ["lparen","("],
+ ["identifier","name"],
+ ["text",":"],
+ ["string","'Bernd'"],
+ ["text",", "],
+ ["identifier","manager"],
+ ["text",":"],
+ ["constant.language.boolean","false"],
+ ["text",", "],
+ ["identifier","salary"],
+ ["text",":"],
+ ["constant.numeric","50"],
+ ["rparen",")]"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","managers"],
+ ["lparen","("],
+ ["identifier","emps"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","emps"],
+ ["text","."],
+ ["identifier","findAll"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text","."],
+ ["identifier","isManager"],
+ ["lparen","("],
+ ["rparen",")"],
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","assert"],
+ ["text"," "],
+ ["identifier","emps"],
+ ["lparen","["],
+ ["constant.numeric","0"],
+ ["text",".."],
+ ["constant.numeric","1"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["identifier","managers"],
+ ["lparen","("],
+ ["identifier","emps"],
+ ["rparen",")"],
+ ["text"," "],
+ ["comment","// [Guillaume, Graeme]"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","highPaid"],
+ ["lparen","("],
+ ["identifier","emps"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","threshold"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","150"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","emps"],
+ ["text","."],
+ ["identifier","findAll"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text","."],
+ ["identifier","salary"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","threshold"],
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","assert"],
+ ["text"," "],
+ ["identifier","emps"],
+ ["lparen","["],
+ ["constant.numeric","0"],
+ ["text",".."],
+ ["constant.numeric","2"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["identifier","highPaid"],
+ ["lparen","("],
+ ["identifier","emps"],
+ ["rparen",")"],
+ ["text"," "],
+ ["comment","// [Guillaume, Graeme, Dierk]"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","paidMore"],
+ ["lparen","("],
+ ["identifier","amount"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","e"],
+ ["text","."],
+ ["identifier","salary"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","amount"],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","highPaid"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","paidMore"],
+ ["lparen","("],
+ ["constant.numeric","150"],
+ ["rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","assert"],
+ ["text"," "],
+ ["identifier","highPaid"],
+ ["lparen","("],
+ ["identifier","emps"],
+ ["lparen","["],
+ ["constant.numeric","0"],
+ ["rparen","])"],
+ ["text"," "],
+ ["comment","// true"]
+],[
+ "start",
+ ["keyword","assert"],
+ ["text"," "],
+ ["identifier","emps"],
+ ["lparen","["],
+ ["constant.numeric","0"],
+ ["text",".."],
+ ["constant.numeric","2"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["identifier","emps"],
+ ["text","."],
+ ["identifier","findAll"],
+ ["lparen","("],
+ ["identifier","highPaid"],
+ ["rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","filename"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","'test.txt'"]
+],[
+ "start",
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","File"],
+ ["lparen","("],
+ ["identifier","filename"],
+ ["rparen",")"],
+ ["text","."],
+ ["identifier","withReader"],
+ ["lparen","{"],
+ ["text"," "],
+ ["identifier","reader"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","doSomethingWith"],
+ ["lparen","("],
+ ["identifier","reader"],
+ ["rparen",")"],
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","readersText"]
+],[
+ "start",
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","doSomethingWith"],
+ ["lparen","("],
+ ["identifier","reader"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["identifier","readersText"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","reader"],
+ ["text","."],
+ ["identifier","text"],
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","assert"],
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","File"],
+ ["lparen","("],
+ ["identifier","filename"],
+ ["rparen",")"],
+ ["text","."],
+ ["identifier","text"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["identifier","readersText"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haml.json
new file mode 100644
index 000000000..423c3bd55
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haml.json
@@ -0,0 +1,174 @@
+[[
+ "start",
+ ["keyword.other.doctype","!!!5"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.comment","# <!--[if lt IE 7]> <html class=\"no-js lt-ie9 lt-ie8 lt-ie7\" lang=\"en\"> <![endif]-->"]
+],[
+ "start",
+ ["punctuation.section.comment","# <!--[if IE 7]> <html class=\"no-js lt-ie9 lt-ie8\" lang=\"en\"> <![endif]-->"]
+],[
+ "start",
+ ["punctuation.section.comment","# <!--[if IE 8]> <html class=\"no-js lt-ie9\" lang=\"en\"> <![endif]-->"]
+],[
+ "start",
+ ["punctuation.section.comment","# <!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\"> <!--<![endif]-->"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.comment","/adasdasdad"]
+],[
+ "start",
+ ["entity.name.tag.haml","%div"],
+ ["punctuation.section","{"],
+ ["constant.other.symbol.ruby",":id"],
+ ["text"," => "],
+ ["string","\"#{@item.type}_#{@item.number}\""],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":class"],
+ ["text"," => "],
+ ["string","'#{@item.type} #{@item.urgency}'"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":phoney"],
+ ["text"," => "],
+ ["string","`asdasdasd`"],
+ ["punctuation.section","}"]
+],[
+ "start",
+ ["punctuation.section.comment","/ file: app/views/movies/index.html.haml"]
+],[
+ "start",
+ ["meta.escape.haml","\\d"]
+],[
+ "start",
+ ["entity.name.tag.haml","%ads:"],
+ ["punctuation.section","{"],
+ ["constant.other.symbol.ruby",":bleh"],
+ ["text"," => "],
+ ["constant.numeric","33"],
+ ["punctuation.section","}"]
+],[
+ "embedded_ruby",
+ ["entity.name.tag.haml","%p"],
+ ["text","==ddd=="]
+],[
+ "start",
+ ["text"," Date/Time:"]
+],[
+ "embedded_ruby",
+ ["text"," - "],
+ ["identifier","now"],
+ ["text"," = "],
+ ["support.class","DateTime"],
+ ["text","."],
+ ["identifier","now"],
+ ["text"," "]
+],[
+ "start",
+ ["entity.name.tag.haml"," %strong"],
+ ["text","= now"]
+],[
+ "embedded_ruby",
+ ["text"," = "],
+ ["keyword","if"],
+ ["text"," "],
+ ["identifier","now"],
+ ["text"," "],
+ ["support.class","DateTime"],
+ ["text","."],
+ ["identifier","parse"],
+ ["text","(\""],
+ ["support.class","December"],
+ ["text"," "],
+ ["constant.numeric","31"],
+ ["text",", "],
+ ["constant.numeric","2006"],
+ ["text","\")"]
+],[
+ "embedded_ruby",
+ ["text"," = \""],
+ ["support.class","Happy"],
+ ["text"," "],
+ ["identifier","new"],
+ ["text"," \" + \""],
+ ["identifier","year"],
+ ["text","!\""]
+],[
+ "start",
+ ["entity.name.tag.haml","%sfd"],
+ ["entity.other.attribute-name.class.haml",".dfdfg"]
+],[
+ "start",
+ ["punctuation.section.comment","#content"]
+],[
+ "start",
+ ["text"," .title"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %h1"],
+ ["text","= @title"]
+],[
+ "embedded_ruby",
+ ["text"," = "],
+ ["support.function","link_to"],
+ ["text"," '"],
+ ["support.class","Home"],
+ ["text","', "],
+ ["identifier","home_url"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.comment"," #contents"]
+],[
+ "start",
+ ["entity.name.tag.haml","%div"],
+ ["entity.other.attribute-name.id.haml","#content"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %div"],
+ ["entity.other.attribute-name.class.haml",".articles"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %div"],
+ ["entity.other.attribute-name.class.haml",".article.title"],
+ ["text"," Blah"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %div"],
+ ["entity.other.attribute-name.class.haml",".article.date"],
+ ["text"," "],
+ ["constant.numeric","2006-11-05"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %div"],
+ ["entity.other.attribute-name.class.haml",".article.entry"]
+],[
+ "start",
+ ["text"," Neil Patrick Harris "]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.tag.haml","%div"],
+ ["text","[@user, "],
+ ["constant.other.symbol.ruby",":greeting"],
+ ["text","]"]
+],[
+ "start",
+ ["entity.name.tag.haml"," %bar"],
+ ["text","["],
+ ["constant.numeric","290"],
+ ["text","]/"]
+],[
+ "start",
+ ["text"," "],
+ ["string.quoted.double","==Hello!=="]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haskell.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haskell.json
new file mode 100644
index 000000000..8f9a2b38f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haskell.json
@@ -0,0 +1,156 @@
+[[
+ "start",
+ ["punctuation.definition.comment.haskell","-- Type annotation (optional)"]
+],[
+ "start",
+ ["entity.name.function.haskell","fib"],
+ ["meta.function.type-declaration.haskell"," "],
+ ["keyword.other.double-colon.haskell","::"],
+ ["meta.function.type-declaration.haskell"," "],
+ ["support.type.prelude.haskell","Int"],
+ ["meta.function.type-declaration.haskell"," "],
+ ["keyword.other.arrow.haskell","->"],
+ ["meta.function.type-declaration.haskell"," "],
+ ["support.type.prelude.haskell","Integer"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.comment.haskell","-- With self-referencing data"]
+],[
+ "start",
+ ["text","fib n "],
+ ["keyword.operator.haskell","="],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","!!"],
+ ["text"," n"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.other.haskell","where"],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","="],
+ ["text"," "],
+ ["constant.numeric.haskell","0"],
+ ["text"," "],
+ ["keyword.operator.haskell",":"],
+ ["text"," "],
+ ["support.function.prelude.haskell","scanl"],
+ ["text"," "],
+ ["entity.name.function.infix.haskell","(+)"],
+ ["text"," "],
+ ["constant.numeric.haskell","1"],
+ ["text"," fibs"]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.haskell","-- 0,1,1,2,3,5,..."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.comment.haskell","-- Same, coded directly"]
+],[
+ "start",
+ ["text","fib n "],
+ ["keyword.operator.haskell","="],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","!!"],
+ ["text"," n"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.other.haskell","where"],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","="],
+ ["text"," "],
+ ["constant.numeric.haskell","0"],
+ ["text"," "],
+ ["keyword.operator.haskell",":"],
+ ["text"," "],
+ ["constant.numeric.haskell","1"],
+ ["text"," "],
+ ["keyword.operator.haskell",":"],
+ ["text"," next fibs"]
+],[
+ "start",
+ ["text"," next (a "],
+ ["keyword.operator.haskell",":"],
+ ["text"," t@(b"],
+ ["keyword.operator.haskell",":"],
+ ["text","_)) "],
+ ["keyword.operator.haskell","="],
+ ["text"," (a"],
+ ["keyword.operator.haskell","+"],
+ ["text","b) "],
+ ["keyword.operator.haskell",":"],
+ ["text"," next t"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.comment.haskell","-- Similar idea, using zipWith"]
+],[
+ "start",
+ ["text","fib n "],
+ ["keyword.operator.haskell","="],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","!!"],
+ ["text"," n"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.other.haskell","where"],
+ ["text"," fibs "],
+ ["keyword.operator.haskell","="],
+ ["text"," "],
+ ["constant.numeric.haskell","0"],
+ ["text"," "],
+ ["keyword.operator.haskell",":"],
+ ["text"," "],
+ ["constant.numeric.haskell","1"],
+ ["text"," "],
+ ["keyword.operator.haskell",":"],
+ ["text"," "],
+ ["support.function.prelude.haskell","zipWith"],
+ ["text"," "],
+ ["entity.name.function.infix.haskell","(+)"],
+ ["text"," fibs ("],
+ ["support.function.prelude.haskell","tail"],
+ ["text"," fibs)"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.comment.haskell","-- Using a generator function"]
+],[
+ "start",
+ ["text","fib n "],
+ ["keyword.operator.haskell","="],
+ ["text"," fibs ("],
+ ["constant.numeric.haskell","0"],
+ ["punctuation.separator.comma.haskell",","],
+ ["constant.numeric.haskell","1"],
+ ["text",") "],
+ ["keyword.operator.haskell","!!"],
+ ["text"," n"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.other.haskell","where"],
+ ["text"," fibs (a"],
+ ["punctuation.separator.comma.haskell",","],
+ ["text","b) "],
+ ["keyword.operator.haskell","="],
+ ["text"," a "],
+ ["keyword.operator.haskell",":"],
+ ["text"," fibs (b"],
+ ["punctuation.separator.comma.haskell",","],
+ ["text","a"],
+ ["keyword.operator.haskell","+"],
+ ["text","b)"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haxe.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haxe.json
new file mode 100644
index 000000000..f0f79a485
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_haxe.json
@@ -0,0 +1,143 @@
+[[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Haxe"],
+ ["text"," "]
+],[
+ "start",
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","public"],
+ ["text"," "],
+ ["keyword","static"],
+ ["text"," "],
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","main"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// Say Hello!"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","var"],
+ ["text"," "],
+ ["identifier","greeting"],
+ ["punctuation.operator",":"],
+ ["keyword","String"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"Hello World\""],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","trace"],
+ ["paren.lparen","("],
+ ["identifier","greeting"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","var"],
+ ["text"," "],
+ ["identifier","targets"],
+ ["punctuation.operator",":"],
+ ["keyword","Array"],
+ ["keyword.operator","<"],
+ ["keyword","String"],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["string","\"Flash\""],
+ ["punctuation.operator",","],
+ ["string","\"Javascript\""],
+ ["punctuation.operator",","],
+ ["string","\"PHP\""],
+ ["punctuation.operator",","],
+ ["string","\"Neko\""],
+ ["punctuation.operator",","],
+ ["string","\"C++\""],
+ ["punctuation.operator",","],
+ ["string","\"iOS\""],
+ ["punctuation.operator",","],
+ ["string","\"Android\""],
+ ["punctuation.operator",","],
+ ["string","\"webOS\""],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","trace"],
+ ["paren.lparen","("],
+ ["string","\"Haxe is a great language that can target:\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","target"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","targets"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","trace"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["string","\" - \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["identifier","target"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","trace"],
+ ["paren.lparen","("],
+ ["string","\"And many more!\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html.json
new file mode 100644
index 000000000..794ba26d1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html.json
@@ -0,0 +1,51 @@
+[[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.script","script"],
+ ["text"," "],
+ ["entity.other.attribute-name","a"],
+ ["keyword.operator.separator","="],
+ ["string","'a'"],
+ ["meta.tag.punctuation.end",">"],
+ ["storage.type","var"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","'123'"]
+],[
+ ["qqstring_inner","start_tag_stuff"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\"abc"]
+],[
+ "start",
+ ["string"," def\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ ["qstring_inner","start_tag_stuff"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","'abc"]
+],[
+ "start",
+ ["string","def\\'"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html_ruby.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html_ruby.json
new file mode 100644
index 000000000..619fb5dc6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_html_ruby.json
@@ -0,0 +1,247 @@
+[[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Listing Books"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","table"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Title"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Summary"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","th"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["support.ruby_tag","<%"],
+ ["text"," "],
+ ["variable.instance","@books"],
+ ["text","."],
+ ["identifier","each"],
+ ["text"," "],
+ ["keyword","do"],
+ ["text"," |"],
+ ["identifier","book"],
+ ["text","| "],
+ ["support.ruby_tag","%>"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["comment.start.erb","<%#"],
+ ["comment"," comment "],
+ ["comment.end.erb","%>"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"],
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["identifier","book"],
+ ["text","."],
+ ["identifier","title"],
+ ["text"," "],
+ ["support.ruby_tag","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"],
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["identifier","book"],
+ ["text","."],
+ ["identifier","content"],
+ ["text"," "],
+ ["support.ruby_tag","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"],
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["support.function","link_to"],
+ ["text"," "],
+ ["string","'Show'"],
+ ["text",", "],
+ ["identifier","book"],
+ ["text"," "],
+ ["support.ruby_tag","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"],
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["support.function","link_to"],
+ ["text"," "],
+ ["string","'Edit'"],
+ ["text",", "],
+ ["identifier","edit_book_path"],
+ ["paren.lparen","("],
+ ["identifier","book"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["support.ruby_tag","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"],
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["support.function","link_to"],
+ ["text"," "],
+ ["string","'Remove'"],
+ ["text",", "],
+ ["identifier","book"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":confirm"],
+ ["text"," "],
+ ["punctuation.separator.key-value","=>"],
+ ["text"," "],
+ ["string","'Are you sure?'"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":method"],
+ ["text"," "],
+ ["punctuation.separator.key-value","=>"],
+ ["text"," "],
+ ["constant.other.symbol.ruby",":delete"],
+ ["text"," "],
+ ["support.ruby_tag","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["support.ruby_tag","<%"],
+ ["text"," "],
+ ["keyword","end"],
+ ["text"," "],
+ ["support.ruby_tag","%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","table"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","br"],
+ ["text"," "],
+ ["meta.tag.punctuation.end","/>"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["support.ruby_tag","<%="],
+ ["text"," "],
+ ["support.function","link_to"],
+ ["text"," "],
+ ["string","'New book'"],
+ ["text",", "],
+ ["identifier","new_book_path"],
+ ["text"," "],
+ ["support.ruby_tag","%>"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jade.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jade.json
new file mode 100644
index 000000000..5bf45968b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jade.json
@@ -0,0 +1,188 @@
+[[
+ "start",
+ ["keyword.other.doctype.jade","!!!doctype"]
+],[
+ "start",
+ ["keyword.other.doctype.jade","!!!5"]
+],[
+ "start",
+ ["keyword.other.doctype.jade","!!!"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.control.import.include.jade","include"],
+ ["text"," something"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.control.import.include.jade"," include"],
+ ["text"," another_thing"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.comment"," // let's talk about it"]
+],[
+ "start"
+],[
+ ["comment_block",0,"start"],
+ ["comment","// "]
+],[
+ ["comment_block",0,"start"],
+ ["comment"," here it is. a block comment!"]
+],[
+ ["comment_block",0,"start"],
+ ["comment"," and another row!"]
+],[
+ "start",
+ ["meta.tag.any.jade","but"],
+ ["text"," not here."]
+],[
+ "start"
+],[
+ ["comment_block",5,"start"],
+ ["comment"," // "]
+],[
+ ["comment_block",5,"start"],
+ ["comment"," a far spaced"]
+],[
+ "start",
+ ["text"," should be lack of block"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.comment"," // also not a comment"]
+],[
+ "start",
+ ["meta.tag.any.jade"," div"],
+ ["entity.other.attribute-name.class.jade",".attemptAtBlock"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["meta.tag.any.jade"," span"],
+ ["entity.other.attribute-name.id.jade","#myName"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["string.interpolated.jade","#{implicit}"]
+],[
+ "start",
+ ["text"," "],
+ ["string.interpolated.jade","!{more_explicit}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["suport.type.attribute.id.jade","#idDiv"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["suport.type.attribute.class.jade",".idDiv"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.any.jade"," test"],
+ ["punctuation","("],
+ ["entity.other.attribute-name.jade","id"],
+ ["text","="],
+ ["string","\"tag\""],
+ ["punctuation",")"]
+],[
+ "start",
+ ["meta.tag.any.jade"," header"],
+ ["punctuation","("],
+ ["entity.other.attribute-name.jade","id"],
+ ["text","="],
+ ["string","\"tag\""],
+ ["text",", "],
+ ["entity.other.attribute-name.jade","blah"],
+ ["text","="],
+ ["string","\"foo\""],
+ ["text",", "],
+ ["entity.other.attribute-name.jade","meh"],
+ ["text","="],
+ ["string","\"aads\""],
+ ["punctuation",")"]
+],[
+ "start",
+ ["storage.type.function.jade","mixin"],
+ ["entity.name.function.jade"," article"],
+ ["punctuation.definition.parameters.begin.jade","("],
+ ["variable.parameter.function.jade","obj, parents"],
+ ["punctuation.definition.parameters.end.jade",")"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.function.jade"," mixin"],
+ ["entity.name.function.jade"," bleh"],
+ ["punctuation.definition.parameters.begin.jade","("],
+ ["punctuation.definition.parameters.end.jade",")"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.function.jade"," mixin"],
+ ["entity.name.function.jade"," clever-name"]
+],[
+ "start"
+],[
+ "start",
+ ["source.js.embedded.jade"," -"],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"0\""],
+ ["text",";"]
+],[
+ "start",
+ ["source.js.embedded.jade"," -"],
+ ["text"," "],
+ ["identifier","y"],
+ ["text"," "],
+ ["identifier","each"],
+ ["text"," z"]
+],[
+ "start"
+],[
+ "start",
+ ["source.js.embedded.jade"," -"],
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","items"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["string","\"one\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"two\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"three\""],
+ ["text","]"]
+],[
+ "start",
+ ["meta.tag.any.jade"," each"],
+ ["text"," item in items"]
+],[
+ "start",
+ ["meta.tag.any.jade"," li"],
+ ["text","= item"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_java.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_java.json
new file mode 100644
index 000000000..799ebdb5c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_java.json
@@ -0,0 +1,95 @@
+[[
+ "start",
+ ["keyword","public"],
+ ["text"," "],
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","InfiniteLoop"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start"
+],[
+ "comment",
+ ["text"," "],
+ ["comment","/*"]
+],[
+ "comment",
+ ["comment"," * This will cause the program to hang..."]
+],[
+ "comment",
+ ["comment"," *"]
+],[
+ "comment",
+ ["comment"," * Taken from:"]
+],[
+ "comment",
+ ["comment"," * http://www.exploringbinary.com/java-hangs-when-converting-2-2250738585072012e-308/"]
+],[
+ "start",
+ ["comment"," */"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","public"],
+ ["text"," "],
+ ["keyword","static"],
+ ["text"," "],
+ ["keyword","void"],
+ ["text"," "],
+ ["identifier","main"],
+ ["lparen","("],
+ ["support.function","String"],
+ ["lparen","["],
+ ["rparen","]"],
+ ["text"," "],
+ ["identifier","args"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","double"],
+ ["text"," "],
+ ["identifier","d"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.function","Double"],
+ ["text","."],
+ ["identifier","parseDouble"],
+ ["lparen","("],
+ ["string","\"2.2250738585072012e-308\""],
+ ["rparen",")"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment","// unreachable code"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","System"],
+ ["text","."],
+ ["identifier","out"],
+ ["text","."],
+ ["identifier","println"],
+ ["lparen","("],
+ ["string","\"Value: \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["identifier","d"],
+ ["rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_javascript.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_javascript.json
new file mode 100644
index 000000000..5044f21eb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_javascript.json
@@ -0,0 +1,592 @@
+[[
+ "start",
+ ["comment","//test: tokenize 'standard' functions"]
+],[
+ "no_regex",
+ ["identifier","string"],
+ ["punctuation.operator","."],
+ ["support.function","charCodeAt"],
+ ["paren.lparen","("],
+ ["constant.numeric","23"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["variable.language","document"],
+ ["punctuation.operator","."],
+ ["support.function.dom","getElementById"],
+ ["paren.lparen","("],
+ ["string","'test'"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["storage.type","console"],
+ ["punctuation.operator","."],
+ ["support.function.firebug","log"],
+ ["paren.lparen","("],
+ ["string","'Here it is'"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"],
+ ["string","\";"]
+],[
+ "no_regex",
+ ["identifier","test"],
+ ["punctuation.operator",":"],
+ ["text"," "],
+ ["comment.doc","/**tokenize doc*/"],
+ ["text"," "],
+ ["identifier","comment"]
+],[
+ "no_regex",
+ ["comment.doc","/**tokenize doc comment with "],
+ ["comment.doc.tag","@tag"],
+ ["comment.doc"," {}*/"]
+],[
+ "no_regex",
+ ["comment","//test: tokenize parens"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","line"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"[{( )}]\""],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["comment","//test tokenize arithmetic expression which looks like a regexp"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","/"],
+ ["identifier","b"],
+ ["keyword.operator","/"],
+ ["identifier","c"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","/="],
+ ["identifier","b"],
+ ["keyword.operator","/"],
+ ["identifier","c"]
+],[
+ "no_regex",
+ ["comment","//test tokenize reg exps"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","="],
+ ["string.regexp","/b/g"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","+"],
+ ["string.regexp","/b/g"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string.regexp","/2 "],
+ ["constant.language.escape","+"],
+ ["string.regexp"," 1/b"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","="],
+ ["string.regexp","/a/"],
+ ["text"," "],
+ ["keyword.operator","/"],
+ ["text"," "],
+ ["string.regexp","/a/"]
+],[
+ "no_regex",
+ ["keyword","case"],
+ ["text"," "],
+ ["string.regexp","/a/"],
+ ["punctuation.operator","."],
+ ["support.function","test"],
+ ["paren.lparen","("],
+ ["identifier","c"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["comment","//test tokenize multi-line comment containing a single line comment"]
+],[
+ "no_regex",
+ ["identifier","noRegex"]
+],[
+ "no_regex",
+ ["comment","/* foo // bar */"]
+],[
+ "start",
+ ["identifier","canBeRegex"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["comment","/* foo // bar */"]
+],[
+ "start",
+ ["comment","// test tokenize identifier with umlauts"]
+],[
+ "no_regex",
+ ["identifier","fu"],
+ ["punctuation.operator","?"],
+ ["identifier","e"]
+],[
+ "no_regex",
+ ["comment","// test // is not a regexp"]
+],[
+ "start",
+ ["paren.lparen","{"],
+ ["text"," "],
+ ["comment","// 123"]
+],[
+ "start",
+ ["comment","//test skipping escaped chars"]
+],[
+ "no_regex",
+ ["string","'Meh"],
+ ["constant.language.escape","\\\\"],
+ ["string","nNeh'"]
+],[
+ "no_regex",
+ ["storage.type","console"],
+ ["punctuation.operator","."],
+ ["support.function.firebug","log"],
+ ["paren.lparen","("],
+ ["string","'"],
+ ["constant.language.escape","\\\\"],
+ ["string","u1232Feh'"]
+],[
+ "qqstring",
+ ["string","\"test multiline\\"]
+],[
+ "no_regex",
+ ["string"," strings\""]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","="],
+ ["text","'"]
+],[
+ "qqstring",
+ ["identifier","b"],
+ ["keyword.operator","="],
+ ["string","\"\\"]
+],[
+ "no_regex",
+ ["string","still a string"]
+],[
+ "no_regex",
+ ["text"," "]
+],[
+ "no_regex",
+ ["text"," "]
+],[
+ "start",
+ ["storage.type","function"],
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["paren.lparen","("],
+ ["variable.parameter","items"],
+ ["punctuation.operator",", "],
+ ["variable.parameter","nada"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","="],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","<"],
+ ["identifier","items"],
+ ["punctuation.operator","."],
+ ["support.constant","length"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","++"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","alert"],
+ ["paren.lparen","("],
+ ["identifier","items"],
+ ["paren.lparen","["],
+ ["identifier","i"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\"juhu"],
+ ["constant.language.escape","\\n"],
+ ["string","\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"],
+ ["text","\t"],
+ ["comment","// Real Tab."]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "no_regex",
+ ["identifier","regexp"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.regexp","/p"],
+ ["constant.language.delimiter","|"],
+ ["string.regexp","p/"],
+ ["text"," "],
+ ["comment","// ends here"]
+],[
+ "no_regex"
+],[
+ "no_regex",
+ ["identifier","r"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.regexp","/d"],
+ ["constant.language.escape","{1,2}?"],
+ ["string.regexp","f{e}"],
+ ["invalid","++"],
+ ["string.regexp","r"],
+ ["constant.language.escape","*?"],
+ ["regexp.keyword.operator","\\d"],
+ ["constant.language.escape","+?[]"],
+ ["string.regexp","r"],
+ ["constant.language.escape","[^"],
+ ["string.regexp.charachterclass","r"],
+ ["constant.language.escape","-"],
+ ["string.regexp.charachterclass","o"],
+ ["regexp.keyword.operator","\\f\\f"],
+ ["string.regexp.charachterclass","["],
+ ["regexp.keyword.operator","\\f"],
+ ["constant.language.escape","]?"],
+ ["string.regexp","r"],
+ ["invalid","{7}+"],
+ ["string.regexp","r"],
+ ["regexp.keyword.operator","\\{"],
+ ["string.regexp","7}"],
+ ["constant.language.escape","+"],
+ ["string.regexp","rr--rr"],
+ ["constant.language.escape","$^(?:"],
+ ["string.regexp","d"],
+ ["constant.language.delimiter","|"],
+ ["string.regexp","s"],
+ ["constant.language.escape",")(?="],
+ ["string.regexp","a"],
+ ["constant.language.delimiter","|"],
+ ["constant.language.escape",")(?!"],
+ ["string.regexp","y"],
+ ["constant.language.escape",")[]"],
+ ["constant.language.delimiter","|"],
+ ["invalid","$?"],
+ ["constant.language.delimiter","|"],
+ ["invalid","^*"],
+ ["string.regexp","/"],
+ ["text"," "],
+ ["identifier","o"]
+],[
+ "no_regex",
+ ["identifier","a"],
+ ["keyword.operator","="],
+ ["string.regexp","/a/"],
+ ["text"," "],
+ ["identifier","jk"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.regexp","/ /"],
+ ["text"," "],
+ ["keyword.operator","/"],
+ ["text"," "],
+ ["string.regexp","/ /"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["comment.doc","/************************************/"]
+],[
+ "no_regex",
+ ["comment.doc","/** total mess, tricky to highlight**/"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["storage.type","function"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "doc-start",
+ ["text","\t"],
+ ["comment.doc","/**"]
+],[
+ "doc-start",
+ ["comment.doc","\t * docComment"]
+],[
+ "no_regex",
+ ["comment.doc","\t **/"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["identifier","r"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string.regexp","/u"],
+ ["regexp.keyword.operator","\\t"],
+ ["constant.language.escape","*"],
+ ["string.regexp","/"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["identifier","g"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1."],
+ ["text","00"],
+ ["identifier","E"],
+ ["text","^"],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","y"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1.2"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["punctuation.operator","."],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","052"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","0x25"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["identifier","t"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["string","'d'"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","''"],
+ ["paren.rparen","]"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["storage.type","function"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","/* eee */"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "qqstring",
+ ["string","\"s\\"]
+],[
+ "no_regex",
+ ["string","s"],
+ ["constant.language.escape","\\u7824"],
+ ["string","sss"],
+ ["constant.language.escape","\\u"],
+ ["string","1\""]
+],[
+ "no_regex"
+],[
+ "qstring",
+ ["string","'\\"]
+],[
+ "no_regex",
+ ["string","string'"]
+],[
+ "no_regex"
+],[
+ "no_regex",
+ ["text","'"]
+],[
+ "no_regex",
+ ["identifier","string"],
+ ["text","'"]
+],[
+ "no_regex"
+],[
+ "no_regex",
+ ["string","\"trailing space"],
+ ["constant.language.escape","\\ "],
+ ["string"," "]
+],[
+ "no_regex",
+ ["string","\" \""],
+ ["text"," "],
+ ["keyword.operator","/"],
+ ["identifier","not"],
+ ["text"," "],
+ ["identifier","a"],
+ ["text"," "],
+ ["identifier","regexp"],
+ ["keyword.operator","/"],
+ ["identifier","g"]
+],[
+ "no_regex"
+],[
+ "doc-start",
+ ["comment.doc","/**"]
+],[
+ "doc-start",
+ ["comment.doc"," *doc"]
+],[
+ "no_regex",
+ ["comment.doc"," */"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["identifier","a"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["string","'a'"],
+ ["punctuation.operator",":"],
+ ["text"," "],
+ ["identifier","b"],
+ ["punctuation.operator",","]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["string","'g'"],
+ ["text",":"],
+ ["text"," "],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["variable.parameter","t"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["entity.name.function","gta"],
+ ["punctuation.operator",":"],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["variable.parameter","a"],
+ ["punctuation.operator",","],
+ ["variable.parameter","b"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "no_regex"
+],[
+ "function_arguments",
+ ["identifier","foo"],
+ ["punctuation.operator","."],
+ ["storage.type","protoype"],
+ ["punctuation.operator","."],
+ ["entity.name.function","d"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["variable.parameter","a"],
+ ["punctuation.operator",", "],
+ ["variable.parameter","b"],
+ ["punctuation.operator",","]
+],[
+ "no_regex",
+ ["punctuation.operator"," "],
+ ["variable.parameter","c"],
+ ["punctuation.operator",", "],
+ ["variable.parameter","d"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["storage.type","foo"],
+ ["punctuation.operator","."],
+ ["entity.name.function","d"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["variable.parameter","a"],
+ ["punctuation.operator",", "],
+ ["variable.parameter","b"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["storage.type","foo"],
+ ["punctuation.operator","."],
+ ["entity.name.function","d"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["variable.parameter","a"],
+ ["punctuation.operator",", "],
+ ["comment.doc","/*****/"],
+ ["text"," "],
+ ["identifier","d"],
+ ["string","\"string\""],
+ ["text"," "]
+],[
+ "no_regex"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_json.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_json.json
new file mode 100644
index 000000000..4420a740e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_json.json
@@ -0,0 +1,412 @@
+[[
+ "start",
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"query\""],
+ ["text",": "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"count\""],
+ ["text",": "],
+ ["constant.numeric","10"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"created\""],
+ ["text",": "],
+ ["string","\"2011-06-21T08:10:46Z\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"lang\""],
+ ["text",": "],
+ ["string","\"en-US\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"results\""],
+ ["text",": "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"photo\""],
+ ["text",": "],
+ ["paren.lparen","["]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"farm\""],
+ ["text",": "],
+ ["string","\"6\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"id\""],
+ ["text",": "],
+ ["string","\"5855620975\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfamily\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfriend\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"ispublic\""],
+ ["text",": "],
+ ["string","\"1\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"owner\""],
+ ["text",": "],
+ ["string","\"32021554@N04\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"secret\""],
+ ["text",": "],
+ ["string","\"f1f5e8515d\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"server\""],
+ ["text",": "],
+ ["string","\"5110\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"title\""],
+ ["text",": "],
+ ["string","\"7087 bandit cat\""]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"farm\""],
+ ["text",": "],
+ ["string","\"4\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"id\""],
+ ["text",": "],
+ ["string","\"5856170534\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfamily\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfriend\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"ispublic\""],
+ ["text",": "],
+ ["string","\"1\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"owner\""],
+ ["text",": "],
+ ["string","\"32021554@N04\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"secret\""],
+ ["text",": "],
+ ["string","\"ff1efb2a6f\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"server\""],
+ ["text",": "],
+ ["string","\"3217\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"title\""],
+ ["text",": "],
+ ["string","\"6975 rusty cat\""]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"farm\""],
+ ["text",": "],
+ ["string","\"6\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"id\""],
+ ["text",": "],
+ ["string","\"5856172972\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfamily\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfriend\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"ispublic\""],
+ ["text",": "],
+ ["string","\"1\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"owner\""],
+ ["text",": "],
+ ["string","\"51249875@N03\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"secret\""],
+ ["text",": "],
+ ["string","\"6c6887347c\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"server\""],
+ ["text",": "],
+ ["string","\"5192\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"title\""],
+ ["text",": "],
+ ["string","\"watermarked-cats\""]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"farm\""],
+ ["text",": "],
+ ["string","\"6\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"id\""],
+ ["text",": "],
+ ["string","\"5856168328\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfamily\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfriend\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"ispublic\""],
+ ["text",": "],
+ ["string","\"1\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"owner\""],
+ ["text",": "],
+ ["string","\"32021554@N04\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"secret\""],
+ ["text",": "],
+ ["string","\"0c1cfdf64c\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"server\""],
+ ["text",": "],
+ ["string","\"5078\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"title\""],
+ ["text",": "],
+ ["string","\"7020 mandy cat\""]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"farm\""],
+ ["text",": "],
+ ["string","\"3\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"id\""],
+ ["text",": "],
+ ["string","\"5856171774\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfamily\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"isfriend\""],
+ ["text",": "],
+ ["string","\"0\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"ispublic\""],
+ ["text",": "],
+ ["string","\"1\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"owner\""],
+ ["text",": "],
+ ["string","\"32021554@N04\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"secret\""],
+ ["text",": "],
+ ["string","\"7f5a3180ab\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"server\""],
+ ["text",": "],
+ ["string","\"2696\""],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["variable","\"title\""],
+ ["text",": "],
+ ["string","\"7448 bobby cat\""]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","]"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsp.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsp.json
new file mode 100644
index 000000000..cd556e469
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsp.json
@@ -0,0 +1,435 @@
+[[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "js-start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"abc\""],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","function"],
+ ["text"," "],
+ ["identifier","y"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "css-start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.style","style"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["variable",".class"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["support.type","background"],
+ ["text",": "],
+ ["constant.numeric","#124356"],
+ ["text",";"]
+],[
+ "css-start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.style","style"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," Today's date: "],
+ ["meta.tag","<%"],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["lparen","("],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","java"],
+ ["text","."],
+ ["identifier","util"],
+ ["text","."],
+ ["identifier","Date"],
+ ["lparen","("],
+ ["rparen","))"],
+ ["text","."],
+ ["identifier","toLocaleString"],
+ ["lparen","("],
+ ["rparen",")"],
+ ["meta.tag","%>"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag","<%"],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["keyword","int"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text","; "],
+ ["meta.tag","%>"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["meta.tag","<jsp:declaration>"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["keyword","int"],
+ ["text"," "],
+ ["identifier","j"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","10"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag","</jsp:declaration>"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment","<%-- This is JSP comment --%>"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag","<%@"],
+ ["text"," "],
+ ["identifier","directive"],
+ ["text"," "],
+ ["identifier","attribute"],
+ ["keyword.operator","="],
+ ["string","\"value\""],
+ ["text"," "],
+ ["meta.tag","%>"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Select Languages:"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","form"],
+ ["text"," "],
+ ["entity.other.attribute-name","ACTION"],
+ ["keyword.operator.separator","="],
+ ["string","\"jspCheckBox.jsp\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"checkbox\""],
+ ["text"," "],
+ ["entity.other.attribute-name","name"],
+ ["keyword.operator.separator","="],
+ ["string","\"id\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\"Java\""],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," Java"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","BR"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"checkbox\""],
+ ["text"," "],
+ ["entity.other.attribute-name","name"],
+ ["keyword.operator.separator","="],
+ ["string","\"id\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\".NET\""],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," .NET"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","BR"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"checkbox\""],
+ ["text"," "],
+ ["entity.other.attribute-name","name"],
+ ["keyword.operator.separator","="],
+ ["string","\"id\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\"PHP\""],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," PHP"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","BR"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"checkbox\""],
+ ["text"," "],
+ ["entity.other.attribute-name","name"],
+ ["keyword.operator.separator","="],
+ ["string","\"id\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\"C/C++\""],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," C/C++"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","BR"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"checkbox\""],
+ ["text"," "],
+ ["entity.other.attribute-name","name"],
+ ["keyword.operator.separator","="],
+ ["string","\"id\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\"PERL\""],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," PERL "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","BR"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.form","input"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"submit\""],
+ ["text"," "],
+ ["entity.other.attribute-name","value"],
+ ["keyword.operator.separator","="],
+ ["string","\"Submit\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.form","form"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "jsp-start",
+ ["text"," "],
+ ["meta.tag","<%"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["support.function","String"],
+ ["text"," "],
+ ["identifier","select"],
+ ["lparen","["],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["variable.language","request"],
+ ["text","."],
+ ["identifier","getParameterValues"],
+ ["lparen","("],
+ ["string","\"id\""],
+ ["rparen",")"],
+ ["text","; "]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","select"],
+ ["text"," "],
+ ["keyword.operator","!="],
+ ["text"," "],
+ ["constant.language","null"],
+ ["text"," "],
+ ["keyword.operator","&&"],
+ ["text"," "],
+ ["identifier","select"],
+ ["text","."],
+ ["identifier","length"],
+ ["text"," "],
+ ["keyword.operator","!="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["variable.language","out"],
+ ["text","."],
+ ["identifier","println"],
+ ["lparen","("],
+ ["string","\"You have selected: \""],
+ ["rparen",")"],
+ ["text",";"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["lparen","("],
+ ["keyword","int"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text","; "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["text"," "],
+ ["identifier","select"],
+ ["text","."],
+ ["identifier","length"],
+ ["text","; "],
+ ["identifier","i"],
+ ["keyword.operator","++"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["variable.language","out"],
+ ["text","."],
+ ["identifier","println"],
+ ["lparen","("],
+ ["identifier","select"],
+ ["lparen","["],
+ ["identifier","i"],
+ ["rparen","])"],
+ ["text","; "]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "jsp-start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag","%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsx.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsx.json
new file mode 100644
index 000000000..d1a740b09
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_jsx.json
@@ -0,0 +1,51 @@
+[[
+ "comment",
+ ["comment","/*EXPECTED"]
+],[
+ "comment",
+ ["comment","hello world!"]
+],[
+ "start",
+ ["comment","*/"]
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["language.support.class","Test"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","static"],
+ ["text"," "],
+ ["storage.type","function"],
+ ["text"," "],
+ ["entity.name.function","run"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["punctuation.operator",":"],
+ ["text"," "],
+ ["keyword","void"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// console.log(\"hello world!\");"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","log"],
+ ["text"," "],
+ ["string","\"hello world!\""],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_julia.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_julia.json
new file mode 100644
index 000000000..f4ce4eab6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_julia.json
@@ -0,0 +1,105 @@
+[[
+ "start",
+ ["keyword.control.julia","for"],
+ ["text"," op "],
+ ["keyword.operator.update.julia","="],
+ ["text"," ("],
+ ["keyword.operator.ternary.julia",":"],
+ ["keyword.operator.arithmetic.julia","+"],
+ ["text",", "],
+ ["keyword.operator.ternary.julia",":"],
+ ["keyword.operator.arithmetic.julia","*"],
+ ["text",", "],
+ ["keyword.operator.ternary.julia",":"],
+ ["keyword.operator.bitwise.julia","&"],
+ ["text",", "],
+ ["keyword.operator.ternary.julia",":"],
+ ["keyword.operator.bitwise.julia","|"],
+ ["text",", "],
+ ["keyword.operator.ternary.julia",":"],
+ ["keyword.operator.interpolation.julia","$"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.macro.julia","@eval"],
+ ["text"," ("],
+ ["keyword.operator.interpolation.julia","$"],
+ ["text","op)(a,b,c) "],
+ ["keyword.operator.update.julia","="],
+ ["text"," ("],
+ ["keyword.operator.interpolation.julia","$"],
+ ["text","op)(("],
+ ["keyword.operator.interpolation.julia","$"],
+ ["text","op)(a,b),c)"]
+],[
+ "start",
+ ["keyword.control.julia","end"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword.other.julia","function"],
+ ["meta.function.julia"," "],
+ ["entity.name.function.julia","g"],
+ ["text","("],
+ ["text","x,y)"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.julia","return"],
+ ["text"," x "],
+ ["keyword.operator.arithmetic.julia","*"],
+ ["text"," y"]
+],[
+ "start",
+ ["text"," x "],
+ ["keyword.operator.arithmetic.julia","+"],
+ ["text"," y"]
+],[
+ "start",
+ ["keyword.control.julia","end"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function.julia","cd"],
+ ["text","("],
+ ["punctuation.definition.string.begin.julia","\""],
+ ["string.quoted.double.julia","data"],
+ ["punctuation.definition.string.end.julia","\""],
+ ["text",") "],
+ ["keyword.control.julia","do"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.julia","open"],
+ ["text","("],
+ ["punctuation.definition.string.begin.julia","\""],
+ ["string.quoted.double.julia","outfile"],
+ ["punctuation.definition.string.end.julia","\""],
+ ["text",", "],
+ ["punctuation.definition.string.begin.julia","\""],
+ ["string.quoted.double.julia","w"],
+ ["punctuation.definition.string.end.julia","\""],
+ ["text",") "],
+ ["keyword.control.julia","do"],
+ ["text"," f"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.julia","write"],
+ ["text","("],
+ ["text","f, data)"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.julia","end"]
+],[
+ "start",
+ ["keyword.control.julia","end"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_latex.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_latex.json
new file mode 100644
index 000000000..0ac377253
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_latex.json
@@ -0,0 +1,127 @@
+[[
+ "start",
+ ["keyword","\\usepackage"],
+ ["lparen","{"],
+ ["text","amsmath"],
+ ["rparen","}"]
+],[
+ "start",
+ ["keyword","\\title"],
+ ["lparen","{"],
+ ["keyword","\\LaTeX"],
+ ["rparen","}"]
+],[
+ "start",
+ ["keyword","\\date"],
+ ["lparen","{"],
+ ["rparen","}"]
+],[
+ "start",
+ ["keyword","\\begin"],
+ ["lparen","{"],
+ ["text","document"],
+ ["rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\maketitle"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\LaTeX"],
+ ["lparen","{"],
+ ["rparen","}"],
+ ["text"," is a document preparation system for the "],
+ ["keyword","\\TeX"],
+ ["lparen","{"],
+ ["rparen","}"]
+],[
+ "start",
+ ["text"," typesetting program. It offers programmable desktop publishing"]
+],[
+ "start",
+ ["text"," features and extensive facilities for automating most aspects of"]
+],[
+ "start",
+ ["text"," typesetting and desktop publishing, including numbering and"]
+],[
+ "start",
+ ["text"," cross-referencing, tables and figures, page layout, bibliographies,"]
+],[
+ "start",
+ ["text"," and much more. "],
+ ["keyword","\\LaTeX"],
+ ["lparen","{"],
+ ["rparen","}"],
+ ["text"," was originally written in 1984 by Leslie"]
+],[
+ "start",
+ ["text"," Lamport and has become the dominant method for using "],
+ ["keyword","\\TeX"],
+ ["text","; few"]
+],[
+ "start",
+ ["text"," people write in plain "],
+ ["keyword","\\TeX"],
+ ["lparen","{"],
+ ["rparen","}"],
+ ["text"," anymore. The current version is"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\LaTeXe"],
+ ["text","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["comment","% This is a comment; it will not be shown in the final output."]
+],[
+ "start",
+ ["text"," "],
+ ["comment","% The following shows a little of the typesetting power of LaTeX:"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\begin"],
+ ["lparen","{"],
+ ["text","align"],
+ ["rparen","}"]
+],[
+ "start",
+ ["text"," E &= mc^2 "],
+ ["keyword","\\\\"]
+],[
+ "start",
+ ["text"," m &= "],
+ ["keyword","\\frac"],
+ ["lparen","{"],
+ ["text","m_0"],
+ ["rparen","}"],
+ ["lparen","{"],
+ ["keyword","\\sqrt"],
+ ["lparen","{"],
+ ["text","1-"],
+ ["keyword","\\frac"],
+ ["lparen","{"],
+ ["text","v^2"],
+ ["rparen","}"],
+ ["lparen","{"],
+ ["text","c^2"],
+ ["rparen","}}}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\end"],
+ ["lparen","{"],
+ ["text","align"],
+ ["rparen","}"]
+],[
+ "start",
+ ["keyword","\\end"],
+ ["lparen","{"],
+ ["text","document"],
+ ["rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_less.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_less.json
new file mode 100644
index 000000000..81fe0c201
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_less.json
@@ -0,0 +1,204 @@
+[[
+ "start",
+ ["comment","/* styles.less */"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","@base"],
+ ["text",": "],
+ ["constant.numeric","#f938ab"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.language",".box-shadow"],
+ ["paren.lparen","("],
+ ["variable","@style"],
+ ["text",", "],
+ ["variable","@c"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","when"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["support.function","iscolor"],
+ ["paren.lparen","("],
+ ["variable","@c"],
+ ["paren.rparen","))"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," box-shadow: "],
+ ["variable","@style"],
+ ["text"," "],
+ ["variable","@c"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," -webkit-box-shadow: "],
+ ["variable","@style"],
+ ["text"," "],
+ ["variable","@c"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," -moz-box-shadow: "],
+ ["variable","@style"],
+ ["text"," "],
+ ["variable","@c"],
+ ["text",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["variable.language",".box-shadow"],
+ ["paren.lparen","("],
+ ["variable","@style"],
+ ["text",", "],
+ ["variable","@alpha"],
+ ["text",": "],
+ ["constant.numeric","50%"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","when"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["support.function","isnumber"],
+ ["paren.lparen","("],
+ ["variable","@alpha"],
+ ["paren.rparen","))"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.language",".box-shadow"],
+ ["paren.lparen","("],
+ ["variable","@style"],
+ ["text",", "],
+ ["support.function","rgba"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["text",", "],
+ ["constant.numeric","0"],
+ ["text",", "],
+ ["constant.numeric","0"],
+ ["text",", "],
+ ["variable","@alpha"],
+ ["paren.rparen","))"],
+ ["text",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","// Box styles"]
+],[
+ "start",
+ ["variable.language",".box"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","color"],
+ ["text",": "],
+ ["support.function","saturate"],
+ ["paren.lparen","("],
+ ["variable","@base"],
+ ["text",", "],
+ ["constant.numeric","5%"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border-color"],
+ ["text",": "],
+ ["support.function","lighten"],
+ ["paren.lparen","("],
+ ["variable","@base"],
+ ["text",", "],
+ ["constant.numeric","30%"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["variable.language","div"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text"," "],
+ ["variable.language",".box-shadow"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","5px"],
+ ["text",", "],
+ ["constant.numeric","30%"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["variable.language","a"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","color"],
+ ["text",": "],
+ ["variable","@base"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," &"],
+ ["variable.language",":hover"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","color"],
+ ["text",": "],
+ ["support.function","lighten"],
+ ["paren.lparen","("],
+ ["variable","@base"],
+ ["text",", "],
+ ["constant.numeric","50%"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_liquid.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_liquid.json
new file mode 100644
index 000000000..a87c051df
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_liquid.json
@@ -0,0 +1,551 @@
+[[
+ "start",
+ ["text","The following examples can be found in full at http://liquidmarkup.org/"]
+],[
+ "start"
+],[
+ "start",
+ ["text","Liquid is an extraction from the e-commerce system Shopify."]
+],[
+ "start",
+ ["text","Shopify powers many thousands of e-commerce stores which all call for unique designs."]
+],[
+ "start",
+ ["text","For this we developed Liquid which allows our customers complete design freedom while"]
+],[
+ "start",
+ ["text","maintaining the integrity of our servers."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Liquid has been in production use since June 2006 and is now used by many other"]
+],[
+ "start",
+ ["text","hosted web applications."]
+],[
+ "start"
+],[
+ "start",
+ ["text","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"]
+],[
+ "start",
+ ["text","as a plugin but it also works excellently as a stand alone library."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Here's what it looks like:"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","ul"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"products\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","products"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text","."],
+ ["identifier","title"],
+ ["text"," "],
+ ["variable","}}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," Only "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text","."],
+ ["identifier","price"],
+ ["text"," | "],
+ ["identifier","format_as_money"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text","."],
+ ["identifier","description"],
+ ["text"," | "],
+ ["identifier","prettyprint"],
+ ["text"," | "],
+ ["support.function","truncate"],
+ ["text",": "],
+ ["constant.numeric","200"],
+ ["text"," "],
+ ["variable","}}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endfor"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["text","Some more features include:"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Filters"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," The word \"tobi\" in uppercase: "],
+ ["variable","{{"],
+ ["text"," "],
+ ["string","'tobi'"],
+ ["text"," | "],
+ ["support.function","upcase"],
+ ["text"," "],
+ ["variable","}}"],
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","The word \"tobi\" has "],
+ ["variable","{{"],
+ ["text"," "],
+ ["string","'tobi'"],
+ ["text"," | "],
+ ["support.function","size"],
+ ["text"," "],
+ ["variable","}}"],
+ ["text"," letters! "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Change \"Hello world\" to \"Hi world\": "],
+ ["variable","{{"],
+ ["text"," "],
+ ["string","'Hello world'"],
+ ["text"," | "],
+ ["support.function","replace"],
+ ["text",": "],
+ ["string","'Hello'"],
+ ["text",", "],
+ ["string","'Hi'"],
+ ["text"," "],
+ ["variable","}}"],
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","The date today is "],
+ ["variable","{{"],
+ ["text"," "],
+ ["string","'now'"],
+ ["text"," | "],
+ ["support.function","date"],
+ ["text",": "],
+ ["string","\"%Y %b %d\""],
+ ["text"," "],
+ ["variable","}}"],
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","If"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["identifier","user"],
+ ["text","."],
+ ["identifier","name"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["string","'tobi'"],
+ ["text"," "],
+ ["identifier","or"],
+ ["text"," "],
+ ["identifier","user"],
+ ["text","."],
+ ["identifier","name"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["string","'marc'"],
+ ["text"," "],
+ ["variable","%}"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," hi marc or tobi"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endif"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Case"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","template"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","when"],
+ ["text"," "],
+ ["string","'index'"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," Welcome"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","when"],
+ ["text"," "],
+ ["string","'product'"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text","."],
+ ["identifier","vendor"],
+ ["text"," | "],
+ ["identifier","link_to_vendor"],
+ ["text"," "],
+ ["variable","}}"],
+ ["text"," / "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","product"],
+ ["text","."],
+ ["identifier","title"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","page_title"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endcase"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","For Loops"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","array"],
+ ["text"," "],
+ ["variable","%}"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endfor"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Tables"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","tablerow"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","items"],
+ ["text"," "],
+ ["identifier","cols"],
+ ["text",": "],
+ ["constant.numeric","3"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["variable.language","tablerowloop"],
+ ["text","."],
+ ["identifier","col_first"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," First column: "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text","."],
+ ["identifier","variable"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," Different column: "],
+ ["variable","{{"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text","."],
+ ["identifier","variable"],
+ ["text"," "],
+ ["variable","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endif"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","{%"],
+ ["text"," "],
+ ["keyword","endtablerow"],
+ ["text"," "],
+ ["variable","%}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lisp.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lisp.json
new file mode 100644
index 000000000..2e70a5555
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lisp.json
@@ -0,0 +1,248 @@
+[[
+ "start",
+ ["text","("],
+ ["storage.type.function-type.lisp","defun"],
+ ["text"," "],
+ ["entity.name.function.lisp","prompt-for-cd"],
+ ["text"," ()"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"Prompts"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","for"],
+ ["text"," "],
+ ["identifier","CD"],
+ ["text","\""]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","prompt"],
+ ["text","-"],
+ ["identifier","read"],
+ ["text"," "],
+ ["string","\"Title\""],
+ ["text"," "],
+ ["constant.numeric","1.53"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text","/"],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["constant.numeric","1.7"],
+ ["text"," "],
+ ["constant.numeric","1.7e0"],
+ ["text"," "],
+ ["constant.numeric","2.9E-4"],
+ ["text"," "],
+ ["constant.numeric","+42"],
+ ["text"," "],
+ ["constant.numeric","-7"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","b001"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","b001/100"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","o777"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","O777"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","xabc55"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","c"],
+ ["text","("],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","-5.6"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","prompt"],
+ ["text","-"],
+ ["identifier","read"],
+ ["text"," "],
+ ["string","\"Artist\""],
+ ["text"," &"],
+ ["identifier","rest"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.operator","or"],
+ ["text"," ("],
+ ["identifier","parse"],
+ ["text","-"],
+ ["identifier","integer"],
+ ["text"," ("],
+ ["identifier","prompt"],
+ ["text","-"],
+ ["identifier","read"],
+ ["text"," "],
+ ["string","\"Rating\""],
+ ["text",") :"],
+ ["identifier","junk"],
+ ["text","-"],
+ ["identifier","allowed"],
+ ["text"," "],
+ ["support.function","t"],
+ ["text",") "],
+ ["constant.numeric","0"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.control","if"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," ("],
+ ["support.function","format"],
+ ["text"," "],
+ ["support.function","t"],
+ ["text"," "],
+ ["string","\"yes\""],
+ ["text",") ("],
+ ["support.function","format"],
+ ["text"," "],
+ ["support.function","t"],
+ ["text"," "],
+ ["string","\"no\""],
+ ["text"," "],
+ ["constant.language","nil"],
+ ["text",") "],
+ ["comment",";and here comment"]
+],[
+ "start",
+ ["text"," ) "],
+ ["constant.numeric","0xFFLL"],
+ ["text"," "],
+ ["constant.numeric","-23ull"]
+],[
+ "start",
+ ["text"," "],
+ ["comment",";; second line comment"]
+],[
+ "start",
+ ["text"," '(+ "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","defvar"],
+ ["text"," "],
+ ["punctuation.definition.variable.lisp","*"],
+ ["variable.other.global.lisp","lines"],
+ ["punctuation.definition.variable.lisp","*"],
+ ["text",") "],
+ ["comment","; list of all lines"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","position"],
+ ["text","-"],
+ ["keyword.control","if"],
+ ["text","-"],
+ ["identifier","not"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.lisp","#"],
+ ["constant.character.lisp","'sys::whitespacep"],
+ ["text"," "],
+ ["identifier","line"],
+ ["text"," :"],
+ ["identifier","start"],
+ ["text"," "],
+ ["identifier","beg"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["support.function","quote"],
+ ["text"," ("],
+ ["identifier","privet"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," '("],
+ ["identifier","hello"],
+ ["text"," "],
+ ["identifier","world"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," (* "],
+ ["constant.numeric","5"],
+ ["text"," "],
+ ["constant.numeric","7"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","34"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," (:"],
+ ["identifier","use"],
+ ["text"," "],
+ ["string","\"aaaa\""],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.control","let"],
+ ["text"," (("],
+ ["identifier","x"],
+ ["text"," "],
+ ["constant.numeric","10"],
+ ["text",") ("],
+ ["identifier","y"],
+ ["text"," "],
+ ["constant.numeric","20"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","print"],
+ ["text"," (+ "],
+ ["identifier","x"],
+ ["text"," "],
+ ["identifier","y"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ) "],
+ ["support.function","LAmbDa"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["string","\"asdad"],
+ ["constant.character.escape.lisp","\\0"],
+ ["string","eqweqe\""]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_livescript.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_livescript.json
new file mode 100644
index 000000000..c2bd83df3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_livescript.json
@@ -0,0 +1,6 @@
+[[
+ "start",
+ ["comment","# comment"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_logiql.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_logiql.json
new file mode 100644
index 000000000..5f7eda495
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_logiql.json
@@ -0,0 +1,190 @@
+[[
+ "start",
+ ["comment.single","// ancestors"]
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","("],
+ ["string","\"douglas\""],
+ ["keyword.other",","],
+ ["text"," "],
+ ["string","\"john\""],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","("],
+ ["string","\"john\""],
+ ["keyword.other",","],
+ ["text"," "],
+ ["string","\"bob\""],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","("],
+ ["string","\"bob\""],
+ ["keyword.other",","],
+ ["text"," "],
+ ["string","\"ebbon\""],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","("],
+ ["string","\"douglas\""],
+ ["keyword.other",","],
+ ["text"," "],
+ ["string","\"jane\""],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","("],
+ ["string","\"jane\""],
+ ["keyword.other",","],
+ ["text"," "],
+ ["string","\"jan\""],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name","ancestorof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",") "],
+ ["keyword.start","<-"],
+ ["text"," "],
+ ["entity.name","parentof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start",
+ ["entity.name","ancestorof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","C"],
+ ["text",") "],
+ ["keyword.start","<-"],
+ ["text"," "],
+ ["entity.name","ancestorof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",")"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["entity.name","parentof"],
+ ["text","("],
+ ["variable.parameter","B"],
+ ["keyword.other",","],
+ ["variable.parameter","C"],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name","grandparentof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",") "],
+ ["keyword.start","<-"],
+ ["text"," "],
+ ["entity.name","parentof"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","C"],
+ ["text",")"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["entity.name","parentof"],
+ ["text","("],
+ ["variable.parameter","C"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name","cousins"],
+ ["text","("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["variable.parameter","B"],
+ ["text",") "],
+ ["keyword.start","<-"],
+ ["text"," "],
+ ["entity.name","grandparentof"],
+ ["text","("],
+ ["variable.parameter","C"],
+ ["keyword.other",","],
+ ["variable.parameter","A"],
+ ["text",")"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["entity.name","grandparentof"],
+ ["text","("],
+ ["variable.parameter","C"],
+ ["keyword.other",","],
+ ["variable.parameter","B"],
+ ["text",")"],
+ ["keyword.end","."]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name","parentof"],
+ ["text","["],
+ ["entity.name.type.logicblox","`arg"],
+ ["text","]("],
+ ["variable.parameter","A"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["variable.parameter","B"],
+ ["text",") "],
+ ["keyword.start","->"],
+ ["text"," "],
+ ["entity.name","int"],
+ ["text","["],
+ ["constant.numeric","32"],
+ ["text","]("],
+ ["variable.parameter","A"],
+ ["text",")"],
+ ["keyword.other",","],
+ ["text"," "],
+ ["keyword.other","!"],
+ ["entity.name","string"],
+ ["text","("],
+ ["variable.parameter","B"],
+ ["text",")"],
+ ["keyword.end","."]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lsl.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lsl.json
new file mode 100644
index 000000000..83b7352b6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lsl.json
@@ -0,0 +1,495 @@
+[[
+ "comment",
+ ["comment.block.lsl","/*"]
+],[
+ "comment",
+ ["comment.block.lsl"," Testing syntax highlighting"]
+],[
+ "comment",
+ ["comment.block.lsl"," of Ace Editor"]
+],[
+ "comment",
+ ["comment.block.lsl"," for the Linden Scripting Language"]
+],[
+ "start",
+ ["comment.block.lsl","*/"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","someIntNormal"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","3672"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","someIntHex"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","0x00000000"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","someIntMath"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.float.lsl","PI_BY_TWO"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["invalid.unimplemented.lsl","event"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","5673"],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.lsl","key"],
+ ["text.lsl"," "],
+ ["identifier","someKeyTexture"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.string.lsl","TEXTURE_DEFAULT"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["storage.type.lsl","string"],
+ ["text.lsl"," "],
+ ["identifier","someStringSpecial"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.string.lsl","EOF"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","some_user_defined_function_without_return_type"],
+ ["paren.lparen.lsl","("],
+ ["storage.type.lsl","string"],
+ ["text.lsl"," "],
+ ["identifier","inputAsString"],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.lsl","llSay"],
+ ["paren.lparen.lsl","("],
+ ["constant.language.integer.lsl","PUBLIC_CHANNEL"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["identifier","inputAsString"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.lsl","string"],
+ ["text.lsl"," "],
+ ["identifier","user_defined_function_returning_a_string"],
+ ["paren.lparen.lsl","("],
+ ["storage.type.lsl","key"],
+ ["text.lsl"," "],
+ ["identifier","inputAsKey"],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["keyword.control.lsl","return"],
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","("],
+ ["storage.type.lsl","string"],
+ ["paren.rparen.lsl",")"],
+ ["identifier","inputAsKey"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.state.lsl","default"]
+],[
+ "start",
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.event.lsl","state_entry"],
+ ["paren.lparen.lsl","("],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["storage.type.lsl","key"],
+ ["text.lsl"," "],
+ ["identifier","someKey"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.string.lsl","NULL_KEY"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someKey"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["support.function.lsl","llGetOwner"],
+ ["paren.lparen.lsl","("],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["storage.type.lsl","string"],
+ ["text.lsl"," "],
+ ["identifier","someString"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["identifier","user_defined_function_returning_a_string"],
+ ["paren.lparen.lsl","("],
+ ["identifier","someKey"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","some_user_defined_function_without_return_type"],
+ ["paren.lparen.lsl","("],
+ ["identifier","someString"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.event.lsl","touch_start"],
+ ["paren.lparen.lsl","("],
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","num_detected"],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["storage.type.lsl","list"],
+ ["text.lsl"," "],
+ ["identifier","agentsInRegion"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["support.function.lsl","llGetAgentList"],
+ ["paren.lparen.lsl","("],
+ ["constant.language.integer.lsl","AGENT_LIST_REGION"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","["],
+ ["paren.rparen.lsl","])"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","numOfAgents"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["support.function.lsl","llGetListLength"],
+ ["paren.lparen.lsl","("],
+ ["identifier","agentsInRegion"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","index"],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// defaults to 0"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["keyword.control.lsl","for"],
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","("],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["identifier","index"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","<="],
+ ["text.lsl"," "],
+ ["identifier","numOfAgents"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","-"],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","1"],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["identifier","index"],
+ ["keyword.operator.lsl","++"],
+ ["paren.rparen.lsl",")"],
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// for each agent in region"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.lsl","llRegionSayTo"],
+ ["paren.lparen.lsl","("],
+ ["support.function.lsl","llList2Key"],
+ ["paren.lparen.lsl","("],
+ ["identifier","agentsInRegion"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["identifier","index"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["constant.language.integer.lsl","PUBLIC_CHANNEL"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.lsl","Hello, Avatar!"],
+ ["string.quoted.double.lsl.end","\""],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.rparen.lsl","}"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.event.lsl","touch_end"],
+ ["paren.lparen.lsl","("],
+ ["storage.type.lsl","integer"],
+ ["text.lsl"," "],
+ ["identifier","num_detected"],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someIntNormal"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","3672"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someIntHex"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","0x00000000"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someIntMath"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.float.lsl","PI_BY_TWO"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["invalid.unimplemented.lsl","event"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.numeric.lsl","5673"],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someKeyTexture"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.string.lsl","TEXTURE_DEFAULT"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["identifier","someStringSpecial"],
+ ["text.lsl"," "],
+ ["keyword.operator.lsl","="],
+ ["text.lsl"," "],
+ ["constant.language.string.lsl","EOF"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["invalid.deprecated.lsl","llCloud"],
+ ["paren.lparen.lsl","("],
+ ["constant.language.vector.lsl","ZERO_VECTOR"],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"],
+ ["text.lsl"," "],
+ ["comment.line.double-slash.lsl","// invalid deprecated function!"]
+],[
+ "start"
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.lsl","llWhisper"],
+ ["paren.lparen.lsl","("],
+ ["constant.language.integer.lsl","PUBLIC_CHANNEL"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.lsl","Leaving "],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl","default"],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl"," now..."],
+ ["string.quoted.double.lsl.end","\""],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["entity.name.state.lsl","state other"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.rparen.lsl","}"]
+],[
+ "start",
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.state.lsl","state other"]
+],[
+ "start",
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.event.lsl","state_entry"],
+ ["paren.lparen.lsl","("],
+ ["paren.rparen.lsl",")"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.lparen.lsl","{"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["support.function.lsl","llWhisper"],
+ ["paren.lparen.lsl","("],
+ ["constant.language.integer.lsl","PUBLIC_CHANNEL"],
+ ["punctuation.operator.lsl",","],
+ ["text.lsl"," "],
+ ["string.quoted.double.lsl.start","\""],
+ ["string.quoted.double.lsl","Entered "],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl","state other"],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl",", returning to "],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl","default"],
+ ["constant.language.escape.lsl","\\\""],
+ ["string.quoted.double.lsl"," again..."],
+ ["string.quoted.double.lsl.end","\""],
+ ["paren.rparen.lsl",")"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["entity.name.state.lsl","state default"],
+ ["punctuation.operator.lsl",";"]
+],[
+ "start",
+ ["text.lsl"," "],
+ ["paren.rparen.lsl","}"]
+],[
+ "start",
+ ["paren.rparen.lsl","}"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lua.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lua.json
new file mode 100644
index 000000000..276b3ffc0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lua.json
@@ -0,0 +1,348 @@
+[[
+ ["bracketedComment",2,"start"],
+ ["comment","--[[--"]
+],[
+ ["bracketedComment",2,"start"],
+ ["comment","num_args takes in 5.1 byte code and extracts the number of arguments"]
+],[
+ ["bracketedComment",2,"start"],
+ ["comment","from its function header."]
+],[
+ "start",
+ ["comment","--]]--"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","int"],
+ ["paren.lparen","("],
+ ["identifier","t"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","return"],
+ ["text"," "],
+ ["identifier","t"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["constant.numeric","1"],
+ ["paren.rparen",")"],
+ ["keyword.operator","+"],
+ ["identifier","t"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["constant.numeric","2"],
+ ["paren.rparen",")"],
+ ["keyword.operator","*"],
+ ["constant.numeric","0x100"],
+ ["keyword.operator","+"],
+ ["identifier","t"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["constant.numeric","3"],
+ ["paren.rparen",")"],
+ ["keyword.operator","*"],
+ ["constant.numeric","0x10000"],
+ ["keyword.operator","+"],
+ ["identifier","t"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["constant.numeric","4"],
+ ["paren.rparen",")"],
+ ["keyword.operator","*"],
+ ["constant.numeric","0x1000000"]
+],[
+ "start",
+ ["keyword","end"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","num_args"],
+ ["paren.lparen","("],
+ ["identifier","func"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","local"],
+ ["text"," "],
+ ["support.function","dump"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.library","string"],
+ ["text","."],
+ ["support.function","dump"],
+ ["paren.lparen","("],
+ ["identifier","func"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","local"],
+ ["text"," "],
+ ["identifier","offset"],
+ ["text",", "],
+ ["identifier","cursor"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","int"],
+ ["paren.lparen","("],
+ ["support.function","dump"],
+ ["keyword.operator",":"],
+ ["support.function","sub"],
+ ["paren.lparen","("],
+ ["constant.numeric","13"],
+ ["paren.rparen","))"],
+ ["text",", "],
+ ["identifier","offset"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","26"]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","--Get the params and var flag (whether there's a ... in the param)"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","return"],
+ ["text"," "],
+ ["support.function","dump"],
+ ["keyword.operator",":"],
+ ["support.function","sub"],
+ ["paren.lparen","("],
+ ["identifier","cursor"],
+ ["paren.rparen",")"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text",", "],
+ ["support.function","dump"],
+ ["keyword.operator",":"],
+ ["support.function","sub"],
+ ["paren.lparen","("],
+ ["identifier","cursor"],
+ ["keyword.operator","+"],
+ ["constant.numeric","1"],
+ ["paren.rparen",")"],
+ ["keyword.operator",":"],
+ ["support.function","byte"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["keyword","end"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- Usage:"]
+],[
+ "start",
+ ["identifier","num_args"],
+ ["paren.lparen","("],
+ ["keyword","function"],
+ ["paren.lparen","("],
+ ["identifier","a"],
+ ["text",","],
+ ["identifier","b"],
+ ["text",","],
+ ["identifier","c"],
+ ["text",","],
+ ["identifier","d"],
+ ["text",", "],
+ ["keyword.operator","..."],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","end"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["comment","-- return 4, 7"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- Python styled string format operator"]
+],[
+ "start",
+ ["keyword","local"],
+ ["text"," "],
+ ["identifier","gm"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.library","debug"],
+ ["text","."],
+ ["support.function","getmetatable"],
+ ["paren.lparen","("],
+ ["string","\"\""],
+ ["paren.rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","gm"],
+ ["text","."],
+ ["support.function","__mod"],
+ ["keyword.operator","="],
+ ["keyword","function"],
+ ["paren.lparen","("],
+ ["identifier","self"],
+ ["text",", "],
+ ["identifier","other"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["support.function","type"],
+ ["paren.lparen","("],
+ ["identifier","other"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","~="],
+ ["text"," "],
+ ["string","\"table\""],
+ ["text"," "],
+ ["keyword","then"],
+ ["text"," "],
+ ["identifier","other"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["identifier","other"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["keyword","end"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text",","],
+ ["identifier","v"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["support.function","ipairs"],
+ ["paren.lparen","("],
+ ["identifier","other"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","do"],
+ ["text"," "],
+ ["identifier","other"],
+ ["paren.lparen","["],
+ ["identifier","i"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.function","tostring"],
+ ["paren.lparen","("],
+ ["identifier","v"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","end"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["identifier","self"],
+ ["keyword.operator",":"],
+ ["support.function","format"],
+ ["paren.lparen","("],
+ ["support.function","unpack"],
+ ["paren.lparen","("],
+ ["identifier","other"],
+ ["paren.rparen","))"]
+],[
+ "start",
+ ["keyword","end"]
+],[
+ "start"
+],[
+ ["bracketedString",5,"start"],
+ ["support.function","print"],
+ ["paren.lparen","("],
+ ["comment","[===["]
+],[
+ ["bracketedString",5,"start"],
+ ["comment"," blah blah %s, (%d %d)"]
+],[
+ "start",
+ ["comment","]===]"],
+ ["keyword.operator","%"],
+ ["paren.lparen","{"],
+ ["string","\"blah\""],
+ ["text",", "],
+ ["identifier","num_args"],
+ ["paren.lparen","("],
+ ["identifier","int"],
+ ["paren.rparen",")})"]
+],[
+ "start"
+],[
+ ["bracketedComment",3,"start"],
+ ["comment","--[=[--"]
+],[
+ ["bracketedComment",3,"start"],
+ ["comment","table.maxn is deprecated, use # instead."]
+],[
+ "start",
+ ["comment","--]=]--"]
+],[
+ "start",
+ ["support.function","print"],
+ ["paren.lparen","("],
+ ["constant.library","table"],
+ ["text","."],
+ ["invalid.deprecated","maxn"],
+ ["paren.lparen","{"],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["constant.numeric","2"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["constant.numeric","4"],
+ ["paren.rparen","]"],
+ ["keyword.operator","="],
+ ["constant.numeric","4"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["constant.numeric","8"],
+ ["paren.rparen","]"],
+ ["keyword.operator","="],
+ ["constant.numeric","8"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["comment","-- outputs 8 instead of 2"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","print"],
+ ["paren.lparen","("],
+ ["constant.numeric","5"],
+ ["text"," "],
+ ["comment","--[[ blah ]]"],
+ ["paren.rparen",")"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_luapage.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_luapage.json
new file mode 100644
index 000000000..3cee08157
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_luapage.json
@@ -0,0 +1,633 @@
+[[
+ "doctype",
+ ["text",""],
+ ["punctuation.doctype.begin","<!"],
+ ["meta.tag.doctype","DOCTYPE"],
+ ["text"," "],
+ ["xml-pe","html"],
+ ["text"," "],
+ ["xml-pe","PUBLIC"],
+ ["text"," "],
+ ["string","\"-//W3C//DTD XHTML 1.0 Strict//EN\""]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""],
+ ["punctuation.doctype.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ ["lua-bracketedComment",2,"lua-start"],
+ ["keyword","<%"],
+ ["text"," "],
+ ["comment","--[[--"]
+],[
+ ["lua-bracketedComment",2,"lua-start"],
+ ["comment"," index.lp from the Kepler Project's LuaDoc HTML doclet."]
+],[
+ ["lua-bracketedComment",2,"lua-start"],
+ ["comment"," http://keplerproject.github.com/luadoc/"]
+],[
+ "start",
+ ["comment","--]]"],
+ ["text"," "],
+ ["keyword","%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Reference"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","link"],
+ ["text"," "],
+ ["entity.other.attribute-name","rel"],
+ ["keyword.operator.separator","="],
+ ["string","\"stylesheet\""],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\""],
+ ["keyword","<%="],
+ ["identifier","luadoc"],
+ ["text","."],
+ ["identifier","doclet"],
+ ["text","."],
+ ["identifier","html"],
+ ["text","."],
+ ["identifier","link"],
+ ["paren.lparen","("],
+ ["string","\"luadoc.css\""],
+ ["paren.rparen",")"],
+ ["keyword","%>"],
+ ["string","\""],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"text/css\""],
+ ["text"," "],
+ ["meta.tag.punctuation.end","/>"]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","<!--meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/-->"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"container\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"product\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"product_logo\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"product_name\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","big"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","big"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"product_description\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"product\" -->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"main\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"navigation\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","<%="],
+ ["identifier","luadoc"],
+ ["text","."],
+ ["identifier","doclet"],
+ ["text","."],
+ ["identifier","html"],
+ ["text","."],
+ ["identifier","include"],
+ ["paren.lparen","("],
+ ["string","\"menu.lp\""],
+ ["text",", "],
+ ["paren.lparen","{"],
+ ["text"," "],
+ ["identifier","doc"],
+ ["keyword.operator","="],
+ ["identifier","doc"],
+ ["text"," "],
+ ["paren.rparen","})"],
+ ["keyword","%>"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"navigation\" -->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"content\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword","<%if"],
+ ["text"," "],
+ ["keyword","not"],
+ ["text"," "],
+ ["identifier","options"],
+ ["text","."],
+ ["identifier","nomodules"],
+ ["text"," "],
+ ["keyword","and"],
+ ["text"," "],
+ ["keyword.operator","#"],
+ ["identifier","doc"],
+ ["text","."],
+ ["identifier","modules"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword","then%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Modules"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","table"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"module_list\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["comment","<!--<tr><td colspan=\"2\">Modules</td></tr>-->"]
+],[
+ "start",
+ ["keyword","<%for"],
+ ["text"," "],
+ ["identifier","_"],
+ ["text",", "],
+ ["identifier","modulename"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["support.function","ipairs"],
+ ["paren.lparen","("],
+ ["identifier","doc"],
+ ["text","."],
+ ["identifier","modules"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","do%>"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"name\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\""],
+ ["keyword","<%="],
+ ["identifier","luadoc"],
+ ["text","."],
+ ["identifier","doclet"],
+ ["text","."],
+ ["identifier","html"],
+ ["text","."],
+ ["identifier","module_link"],
+ ["paren.lparen","("],
+ ["identifier","modulename"],
+ ["text",", "],
+ ["identifier","doc"],
+ ["paren.rparen",")"],
+ ["keyword","%>"],
+ ["string","\""],
+ ["meta.tag.punctuation.end",">"],
+ ["keyword","<%="],
+ ["identifier","modulename"],
+ ["keyword","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.anchor","a"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"summary\""],
+ ["meta.tag.punctuation.end",">"],
+ ["keyword","<%="],
+ ["identifier","doc"],
+ ["text","."],
+ ["identifier","modules"],
+ ["paren.lparen","["],
+ ["identifier","modulename"],
+ ["paren.rparen","]"],
+ ["text","."],
+ ["identifier","summary"],
+ ["keyword","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","<%end%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","table"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","<%end%>"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword","<%if"],
+ ["text"," "],
+ ["keyword","not"],
+ ["text"," "],
+ ["identifier","options"],
+ ["text","."],
+ ["identifier","nofiles"],
+ ["text"," "],
+ ["keyword","and"],
+ ["text"," "],
+ ["keyword.operator","#"],
+ ["identifier","doc"],
+ ["text","."],
+ ["identifier","files"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword","then%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Files"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h2"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","table"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"file_list\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["comment","<!--<tr><td colspan=\"2\">Files</td></tr>-->"]
+],[
+ "start",
+ ["keyword","<%for"],
+ ["text"," "],
+ ["identifier","_"],
+ ["text",", "],
+ ["identifier","filepath"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["support.function","ipairs"],
+ ["paren.lparen","("],
+ ["identifier","doc"],
+ ["text","."],
+ ["identifier","files"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","do%>"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"name\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\""],
+ ["keyword","<%="],
+ ["identifier","luadoc"],
+ ["text","."],
+ ["identifier","doclet"],
+ ["text","."],
+ ["identifier","html"],
+ ["text","."],
+ ["identifier","file_link"],
+ ["paren.lparen","("],
+ ["identifier","filepath"],
+ ["paren.rparen",")"],
+ ["keyword","%>"],
+ ["string","\""],
+ ["meta.tag.punctuation.end",">"],
+ ["keyword","<%="],
+ ["identifier","filepath"],
+ ["keyword","%>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.anchor","a"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.table","td"],
+ ["text"," "],
+ ["entity.other.attribute-name","class"],
+ ["keyword.operator.separator","="],
+ ["string","\"summary\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","td"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","tr"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","<%end%>"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.table","table"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","<%end%>"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"content\" -->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"main\" -->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","div"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"about\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","\t"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\"http://validator.w3.org/check?uri=referer\""],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.image","img"],
+ ["text"," "],
+ ["entity.other.attribute-name","src"],
+ ["keyword.operator.separator","="],
+ ["string","\"http://www.w3.org/Icons/valid-xhtml10\""],
+ ["text"," "],
+ ["entity.other.attribute-name","alt"],
+ ["keyword.operator.separator","="],
+ ["string","\"Valid XHTML 1.0!\""],
+ ["text"," "],
+ ["entity.other.attribute-name","height"],
+ ["keyword.operator.separator","="],
+ ["string","\"31\""],
+ ["text"," "],
+ ["entity.other.attribute-name","width"],
+ ["keyword.operator.separator","="],
+ ["string","\"88\""],
+ ["text"," "],
+ ["meta.tag.punctuation.end","/>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.anchor","a"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"about\" -->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","div"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," "],
+ ["comment","<!-- id=\"container\" -->"],
+ ["text","\t"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lucene.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lucene.json
new file mode 100644
index 000000000..1f6d2985e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_lucene.json
@@ -0,0 +1,92 @@
+[[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["keyword.operator","AND"],
+ ["text"," as keyword"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["keyword.operator","OR"],
+ ["text"," as keyword"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["keyword.operator","NOT"],
+ ["text"," as keyword"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["string","\"hello this is dog\""],
+ ["text"," as string"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["constant.character.negation","-"],
+ ["string","\"hello this is dog\""],
+ ["text"," as negation with string"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["constant.character.proximity","~100"],
+ ["text"," as text with proximity"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["string","\"hello this is dog\""],
+ ["constant.character.proximity","~100"],
+ ["text"," as string with proximity"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["keyword","raw:"],
+ ["string","\"hello this is dog\""],
+ ["text"," as keyword"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["keyword","raw:"],
+ ["text","foo as\"keyword'"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["string","\"(\""],
+ ["text"," as opening parenthesis"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises "],
+ ["string","\")\""],
+ ["text"," as closing parenthesis"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises foo"],
+ ["constant.character.asterisk","*"],
+ ["text"," as text with asterisk"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises foo"],
+ ["constant.character.interro","?"],
+ ["text"," as text with interro"]
+],[
+ "start",
+ ["keyword","test:"],
+ ["text"," recognises single word as text"]
+],[
+ "start",
+ ["text"," foo"]
+],[
+ "start",
+ ["text"," "]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_markdown.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_markdown.json
new file mode 100644
index 000000000..3c0db62f5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_markdown.json
@@ -0,0 +1,114 @@
+[[
+ "start",
+ ["text","test: header 1 "]
+],[
+ "start",
+ ["markup.heading.1","#"],
+ ["heading","f"]
+],[
+ "start",
+ ["text","test: header 2"]
+],[
+ "start",
+ ["markup.heading.2","##"],
+ ["heading"," foo"]
+],[
+ "start",
+ ["text","test: header ends with ' #'"]
+],[
+ "start",
+ ["markup.heading.1","#"],
+ ["heading"," # # "]
+],[
+ "start",
+ ["text","test: header ends with '#'"]
+],[
+ "start",
+ ["markup.heading.1","#"],
+ ["heading","foo# "]
+],[
+ "start",
+ ["text","test: 6+ #s is not a valid header"]
+],[
+ "start",
+ ["text","####### foo"]
+],[
+ "start",
+ ["text","test: # followed be only space is not a valid header"]
+],[
+ "start",
+ ["text","# "]
+],[
+ "start",
+ ["text","test: only space between #s is not a valid header"]
+],[
+ "start",
+ ["text","# #"]
+],[
+ "allowBlock"
+],[
+ "start",
+ ["markup.heading.1","#"],
+ ["heading"," test links "],
+ ["text","["],
+ ["string","Cloud9 IDE"],
+ ["text","]("],
+ ["markup.underline","http://www.c9.io/"],
+ ["text",")"],
+ ["heading"," #"]
+],[
+ "listblock",
+ ["markup.list","* "],
+ ["text","["],
+ ["string","demo"],
+ ["text","]("],
+ ["markup.underline","http://ajaxorg.github.com/ace/"],
+ ["text",")"],
+ ["list"," "],
+ ["text","["],
+ ["string","+"],
+ ["text","]("],
+ ["markup.underline","escape(\\) "],
+ ["text",")"],
+ ["list"," "],
+ ["text","["],
+ ["string","+"],
+ ["text","]("],
+ ["markup.underline","a"],
+ ["string"," \"title\""],
+ ["text",")"],
+ ["list"," "],
+ ["text","["],
+ ["string","+"],
+ ["text","]("],
+ ["markup.underline","a"],
+ ["string"," \"space\" "],
+ ["text",")"]
+],[
+ "listblock",
+ ["markup.list","* "],
+ ["list","usually "],
+ ["string","*work*"],
+ ["list"," fine ("],
+ ["string","_em_"],
+ ["list",")"]
+],[
+ "listblock",
+ ["list","in lists"]
+],[
+ "start"
+],[
+ "start",
+ ["text","in plain text "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","http://ace.ajaxorg.com"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "allowBlock"
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_mushcode.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_mushcode.json
new file mode 100644
index 000000000..9f8e7cc28
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_mushcode.json
@@ -0,0 +1,790 @@
+[[
+ "start",
+ ["text","@"],
+ ["support.function","create"],
+ ["text"," "],
+ ["identifier","phone"]
+],[
+ "start",
+ ["text","&"],
+ ["identifier","pickup"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["keyword.operator","="],
+ ["identifier","$pick"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text",":@"],
+ ["support.function","ifelse"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","is"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","mode"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["identifier","ICC"],
+ ["paren.rparen",")]"],
+ ["keyword.operator","="],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","pemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["identifier","You"],
+ ["text"," "],
+ ["support.function","pick"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","fullname"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")]"],
+ ["text","."],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["text",","],
+ ["identifier","PHONER"],
+ ["text",":"],
+ ["keyword.operator","%#"],
+ ["paren.rparen",")]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["text",","],
+ ["identifier","MODE"],
+ ["text",":"],
+ ["identifier","CIP"],
+ ["paren.rparen",")]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","(["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","INCOMING"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["identifier","CONNECTED"],
+ ["text",":"],
+ ["paren.lparen","["],
+ ["support.function","num"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")])]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["text",","],
+ ["identifier","CONNECTED"],
+ ["text",":"],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","INCOMING"],
+ ["paren.rparen",")])]"],
+ ["variable","%r"],
+ ["paren.lparen","["],
+ ["support.function","showpicture"],
+ ["paren.lparen","("],
+ ["identifier","PICPICKUP"],
+ ["paren.rparen",")]"],
+ ["variable","%r"],
+ ["identifier","Use"],
+ ["text"," '"],
+ ["paren.lparen","["],
+ ["identifier","color"],
+ ["paren.lparen","("],
+ ["identifier","green"],
+ ["text",","],
+ ["identifier","black"],
+ ["text",","],
+ ["identifier","psay"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["identifier","message"],
+ ["keyword.operator",">"],
+ ["paren.rparen",")]"],
+ ["text","' "],
+ ["paren.lparen","("],
+ ["support.function","or"],
+ ["text"," '"],
+ ["paren.lparen","["],
+ ["identifier","color"],
+ ["paren.lparen","("],
+ ["identifier","green"],
+ ["text",","],
+ ["identifier","black"],
+ ["text",","],
+ ["identifier","p"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["identifier","message"],
+ ["keyword.operator",">"],
+ ["paren.rparen",")]"],
+ ["text","'"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["identifier","to"],
+ ["text"," "],
+ ["identifier","talk"],
+ ["text"," "],
+ ["identifier","into"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["text",".;@"],
+ ["support.function","oemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["variable","%N"],
+ ["text"," "],
+ ["identifier","picks"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","fullname"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")]"],
+ ["text","."],
+ ["paren.rparen","}"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","pemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["identifier","You"],
+ ["text"," "],
+ ["support.function","pick"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["text"," "],
+ ["identifier","but"],
+ ["text"," "],
+ ["identifier","no"],
+ ["text"," "],
+ ["identifier","one"],
+ ["text"," "],
+ ["identifier","is"],
+ ["text"," "],
+ ["identifier","there"],
+ ["text",". "],
+ ["identifier","You"],
+ ["text"," "],
+ ["identifier","hear"],
+ ["text"," "],
+ ["identifier","a"],
+ ["text"," "],
+ ["identifier","dialtone"],
+ ["text"," "],
+ ["support.function","and"],
+ ["text"," "],
+ ["identifier","then"],
+ ["text"," "],
+ ["identifier","hang"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text",". "],
+ ["paren.lparen","["],
+ ["support.function","play"],
+ ["paren.lparen","("],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","DIALTONE"],
+ ["paren.rparen","))]"],
+ ["text",";@"],
+ ["support.function","oemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["variable","%N"],
+ ["text"," "],
+ ["identifier","picks"],
+ ["text"," "],
+ ["identifier","up"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["text",", "],
+ ["identifier","but"],
+ ["text"," "],
+ ["identifier","no"],
+ ["text"," "],
+ ["identifier","one"],
+ ["text"," "],
+ ["identifier","is"],
+ ["text"," "],
+ ["identifier","on"],
+ ["text"," "],
+ ["identifier","the"],
+ ["text"," "],
+ ["identifier","other"],
+ ["text"," "],
+ ["identifier","end"],
+ ["text","."],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text","&"],
+ ["identifier","ringfun"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["keyword.operator","="],
+ ["paren.lparen","["],
+ ["support.function","ifelse"],
+ ["paren.lparen","("],
+ ["support.function","eq"],
+ ["paren.lparen","("],
+ ["support.function","comp"],
+ ["paren.lparen","(["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["identifier","off"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["identifier","color"],
+ ["paren.lparen","("],
+ ["identifier","black"],
+ ["text",","],
+ ["identifier","cyan"],
+ ["text",","],
+ ["identifier","INCOMING"],
+ ["text"," "],
+ ["identifier","CALL"],
+ ["text"," "],
+ ["identifier","FROM"],
+ ["text"," "],
+ ["variable","%1"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","play"],
+ ["paren.lparen","(["],
+ ["support.function","switch"],
+ ["paren.lparen","(["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone1"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","2"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone2"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","3"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone3"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","4"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone4"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","5"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone5"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","6"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone6"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","7"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone7"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","8"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone8"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["constant.numeric","9"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","ringtone9"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["identifier","custom"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","customtone"],
+ ["paren.rparen",")]"],
+ ["text",","],
+ ["identifier","vibrate"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%0"],
+ ["keyword.operator","/"],
+ ["identifier","vibrate"],
+ ["paren.rparen",")])])]"]
+],[
+ "start",
+ ["text","&"],
+ ["identifier","ringloop"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["keyword.operator","="],
+ ["text","@"],
+ ["support.function","switch"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","ringstate"],
+ ["paren.rparen",")]"],
+ ["keyword.operator","="],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","emit"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["identifier","q"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","connecting"],
+ ["paren.rparen",")])]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["text",","],
+ ["identifier","rangs"],
+ ["text",":"],
+ ["constant.numeric","0"],
+ ["paren.rparen",")]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["text",","],
+ ["identifier","mode"],
+ ["text",":"],
+ ["identifier","WFC"],
+ ["paren.rparen",")]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["text",","],
+ ["identifier","INCOMING"],
+ ["text",":"],
+ ["paren.rparen",")]"],
+ ["text",";@"],
+ ["support.function","ifelse"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","HASVMB"],
+ ["paren.rparen",")]"],
+ ["keyword.operator","="],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","tr"],
+ ["text"," "],
+ ["identifier","me"],
+ ["keyword.operator","/"],
+ ["identifier","ROUTEVMB"],
+ ["keyword.operator","="],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","connecting"],
+ ["paren.rparen",")]"],
+ ["text",";"],
+ ["paren.rparen","}"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","pemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","MSGCNC"],
+ ["paren.rparen",")]"],
+ ["text",";"],
+ ["paren.rparen","}}"],
+ ["text",","],
+ ["constant.numeric","2"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","pemit"],
+ ["text"," "],
+ ["keyword.operator","%#="],
+ ["identifier","The"],
+ ["text"," "],
+ ["identifier","call"],
+ ["text"," "],
+ ["identifier","is"],
+ ["text"," "],
+ ["identifier","connected"],
+ ["text","."],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["identifier","q"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","CONNECTING"],
+ ["paren.rparen",")])]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["text",","],
+ ["identifier","CONNECTED"],
+ ["text",":"],
+ ["variable","%qq"],
+ ["paren.rparen",")]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["text",","],
+ ["identifier","CONNECTED"],
+ ["text",":"],
+ ["paren.lparen","["],
+ ["support.function","num"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")])]"],
+ ["paren.lparen","["],
+ ["support.function","set"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["text",","],
+ ["identifier","MODE"],
+ ["text",":"],
+ ["identifier","CIP"],
+ ["paren.rparen",")]"],
+ ["text",";@"],
+ ["support.function","tr"],
+ ["text"," "],
+ ["identifier","me"],
+ ["keyword.operator","/"],
+ ["identifier","ciploop"],
+ ["text",";@"],
+ ["support.function","tr"],
+ ["text"," "],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","ciploop"],
+ ["text",";"],
+ ["paren.rparen","}"],
+ ["text",","],
+ ["constant.numeric","3"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","emit"],
+ ["text"," "],
+ ["identifier","On"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","fullname"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")]"],
+ ["text","'"],
+ ["support.function","s"],
+ ["text"," "],
+ ["identifier","earpiece"],
+ ["text"," "],
+ ["identifier","you"],
+ ["text"," "],
+ ["identifier","hear"],
+ ["text"," "],
+ ["identifier","a"],
+ ["text"," "],
+ ["identifier","ringing"],
+ ["text"," "],
+ ["identifier","sound"],
+ ["text","."],
+ ["paren.lparen","["],
+ ["support.function","play"],
+ ["paren.lparen","("],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","LINETONE"],
+ ["paren.rparen","))]"],
+ ["text",";@"],
+ ["support.function","tr"],
+ ["text"," "],
+ ["identifier","me"],
+ ["keyword.operator","/"],
+ ["identifier","ringhere"],
+ ["text",";@"],
+ ["identifier","increment"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","connecting"],
+ ["paren.rparen",")]"],
+ ["keyword.operator","/"],
+ ["identifier","RANGS"],
+ ["text",";@"],
+ ["identifier","wait"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["keyword.operator","="],
+ ["paren.lparen","{"],
+ ["text","@"],
+ ["support.function","tr"],
+ ["text"," "],
+ ["identifier","me"],
+ ["keyword.operator","/"],
+ ["identifier","ringloop"],
+ ["paren.rparen","}"],
+ ["text",";"],
+ ["paren.rparen","}"],
+ ["text",","],
+ ["constant.numeric","4"],
+ ["text",","],
+ ["paren.lparen","{"],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text","&"],
+ ["identifier","ringstate"],
+ ["text"," "],
+ ["identifier","phone"],
+ ["keyword.operator","="],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["identifier","q"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","connecting"],
+ ["paren.rparen","))]"],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","gt"],
+ ["paren.lparen","("],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","rangs"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["support.function","sub"],
+ ["paren.lparen","("],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","rings"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["constant.numeric","1"],
+ ["paren.rparen","))])]"],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["constant.numeric","2"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","and"],
+ ["paren.lparen","("],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","is"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","MODE"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["identifier","CIP"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","is"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","INCOMING"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","num"],
+ ["paren.lparen","("],
+ ["identifier","me"],
+ ["paren.rparen",")]))]"],
+ ["paren.lparen","["],
+ ["support.function","setq"],
+ ["paren.lparen","("],
+ ["constant.numeric","3"],
+ ["text",","],
+ ["paren.lparen","["],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["identifier","is"],
+ ["text",","],
+ ["support.function","u"],
+ ["paren.lparen","("],
+ ["variable","%qq"],
+ ["keyword.operator","/"],
+ ["identifier","MODE"],
+ ["paren.rparen",")"],
+ ["text",","],
+ ["identifier","ICC"],
+ ["paren.rparen",")])]"],
+ ["paren.lparen","["],
+ ["support.function","ifelse"],
+ ["paren.lparen","("],
+ ["variable","%q1"],
+ ["text",","],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["support.function","ifelse"],
+ ["paren.lparen","("],
+ ["variable","%q2"],
+ ["text",","],
+ ["constant.numeric","2"],
+ ["text",","],
+ ["support.function","ifelse"],
+ ["paren.lparen","("],
+ ["variable","%q3"],
+ ["text",","],
+ ["constant.numeric","3"],
+ ["text",","],
+ ["constant.numeric","4"],
+ ["paren.rparen",")))]"]
+],[
+ "start",
+ ["text",";"],
+ ["identifier","comment"]
+],[
+ "start",
+ ["text","@@"],
+ ["paren.lparen","("],
+ ["identifier","comment"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["keyword","say"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["support.function","time"],
+ ["paren.lparen","("],
+ ["paren.rparen",")]"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_objectivec.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_objectivec.json
new file mode 100644
index 000000000..c6582d20a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_objectivec.json
@@ -0,0 +1,792 @@
+[[
+ "start",
+ ["storage.type.objc","@"],
+ ["punctuation.definition.storage.type.objc","protocol"],
+ ["entity.name.type.objc"," Printing"],
+ ["text",": "],
+ ["entity.other.inherited-class.objc","someParent"]
+],[
+ "start",
+ ["meta.function.objc","-"],
+ ["paren.lparen","("],
+ ["storage.type","void"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["identifier","print"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["storage.type.objc","@end"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.objc","@"],
+ ["punctuation.definition.storage.type.objc","interface"],
+ ["entity.name.type.objc"," Fraction"],
+ ["text",": "],
+ ["entity.other.inherited-class.objc","NSObject"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["identifier","Printing"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["support.class.cocoa","NSCopying"],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","numerator"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","denominator"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["storage.type.objc","@end"]
+],[
+ "start"
+],[
+ "start",
+ ["string.begin.objc","@\""],
+ ["string","blah"],
+ ["invalid.illegal.unknown-escape.objc","\\8"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["string.begin.objc","@\""],
+ ["string","a"],
+ ["constant.character.escape.objc","\\222"],
+ ["string","sd"],
+ ["invalid.illegal.unknown-escape.objc","\\d"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["string.begin.objc","@\""],
+ ["constant.character.escape.objc","\\f"],
+ ["string","aw"],
+ ["constant.character.escape.objc","\\\"\\?"],
+ ["string"," "],
+ ["constant.character.escape.objc","\\'"],
+ ["string"," "],
+ ["constant.character.escape.objc","\\4"],
+ ["string"," n"],
+ ["constant.character.escape.objc","\\\\"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["string.begin.objc","@\""],
+ ["constant.character.escape.objc","\\56"],
+ ["punctuation.definition.string.end","\""]
+],[
+ "start",
+ ["string.begin.objc","@\""],
+ ["constant.character.escape.objc","\\xSF42"],
+ ["punctuation.definition.string.end","\""]
+],[
+ "start"
+],[
+ "start",
+ ["meta.function.objc","-"],
+ ["paren.lparen","("],
+ ["support.class.cocoa","NSDecimalNumber"],
+ ["keyword.operator","*"],
+ ["paren.rparen",")"],
+ ["identifier","addCount"],
+ ["punctuation.operator",":"],
+ ["paren.lparen","("],
+ ["storage.type.id.objc","id"],
+ ["paren.rparen",")"],
+ ["identifier","addObject"],
+ ["paren.lparen","{"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.control","return"],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["identifier","count"],
+ ["text"," "],
+ ["support.function.any-method.objc","decimalNumberByAdding:"],
+ ["identifier","addObject"],
+ ["punctuation.operator","."],
+ ["identifier","count"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.macro.objc","NS_DURING"],
+ ["text"," "],
+ ["keyword.control.macro.objc","NS_HANDLER"],
+ ["text"," "],
+ ["keyword.control.macro.objc","NS_ENDHANDLER"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.control.exception.objc","try"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","argc"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.control.exception.objc","throw"],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSException"],
+ ["text"," "],
+ ["support.function.any-method.objc","exceptionWithName:"],
+ ["string.begin.objc","@\""],
+ ["string","Throwing a test exception"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["identifier","reason"],
+ ["punctuation.operator",":"],
+ ["string.begin.objc","@\""],
+ ["string","Testing the @throw directive."],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["identifier","userInfo"],
+ ["punctuation.operator",":"],
+ ["constant.language.objc","nil"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"],
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.control.exception.objc","catch"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["storage.type.id.objc","id"],
+ ["text"," "],
+ ["identifier","theException"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.cocoa","NSLog"],
+ ["paren.lparen","("],
+ ["string.begin.objc","@\""],
+ ["string","%@"],
+ ["punctuation.definition.string.end","\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","theException"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","result"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"],
+ ["text"," "]
+],[
+ "start",
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.control.exception.objc","finally"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.cocoa","NSLog"],
+ ["paren.lparen","("],
+ ["string.begin.objc","@\""],
+ ["string","This always happens."],
+ ["punctuation.definition.string.end","\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","result"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.storage.modifier.objc","@"],
+ ["storage.modifier.objc","synchronized"],
+ ["paren.lparen","("],
+ ["identifier","lock"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.cocoa","NSLog"],
+ ["paren.lparen","("],
+ ["string.begin.objc","@\""],
+ ["string","Hello World"],
+ ["punctuation.definition.string.end","\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type","struct"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text"," "],
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.other.objc","defs"],
+ ["paren.lparen","("],
+ ["text"," "],
+ ["support.class.cocoa","NSObject"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type","char"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","enc1"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.definition.keyword.objc","@"],
+ ["keyword.other.objc","encode"],
+ ["paren.lparen","("],
+ ["storage.type","int"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.objc","IBOutlet"],
+ ["text","|"],
+ ["storage.type.objc","IBAction"],
+ ["text","|"],
+ ["storage.type.objc","BOOL"],
+ ["text","|"],
+ ["storage.type.objc","SEL"],
+ ["text","|"],
+ ["storage.type.id.objc","id"],
+ ["text","|"],
+ ["storage.type.objc","unichar"],
+ ["text","|"],
+ ["storage.type.objc","IMP"],
+ ["text","|"],
+ ["storage.type.objc","Class"],
+ ["text"," "]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.storage.type.objc","@"],
+ ["storage.type.objc","class"],
+ ["text"," "],
+ ["punctuation.definition.storage.type.objc","@"],
+ ["storage.type.objc","protocol"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.definition.storage.modifier.objc","@"],
+ ["storage.modifier.objc","public"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// instance variables"]
+],[
+ "start",
+ ["punctuation.definition.storage.modifier.objc","@"],
+ ["storage.modifier.objc","package"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// instance variables"]
+],[
+ "start",
+ ["punctuation.definition.storage.modifier.objc","@"],
+ ["storage.modifier.objc","protected"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// instance variables"]
+],[
+ "start",
+ ["punctuation.definition.storage.modifier.objc","@"],
+ ["storage.modifier.objc","private"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// instance variables"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["constant.language.objc","YES"],
+ ["text"," "],
+ ["constant.language.objc","NO"],
+ ["text"," "],
+ ["constant.language.objc","Nil"],
+ ["text"," "],
+ ["constant.language.objc","nil"]
+],[
+ "start",
+ ["support.variable.foundation","NSApp"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["support.function.cocoa.leopard","NSRectToCGRect"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","Protocol"],
+ ["text"," "],
+ ["identifier","ProtocolFromString"],
+ ["punctuation.operator",":"],
+ ["string","\"NSTableViewDelegate\""],
+ ["paren.rparen","))"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.scope.begin.objc","["],
+ ["identifier","SPPoint"],
+ ["text"," "],
+ ["support.function.any-method.objc","pointFromCGPoint:"],
+ ["identifier","self"],
+ ["punctuation.operator","."],
+ ["identifier","position"],
+ ["paren.rparen","]"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function.cocoa","NSRoundDownToMultipleOfPageSize"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#import"],
+ ["constant.other"," <stdio.h>"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","main"],
+ ["paren.lparen","("],
+ ["text"," "],
+ ["storage.type","int"],
+ ["text"," "],
+ ["identifier","argc"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["storage.modifier","const"],
+ ["text"," "],
+ ["storage.type","char"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","argv"],
+ ["punctuation.section.scope.begin.objc","["],
+ ["punctuation.section.scope.end.objc","]"],
+ ["text"," "],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.C99.c","printf"],
+ ["paren.lparen","("],
+ ["text"," "],
+ ["string","\"hello world\\n\""],
+ ["text"," "],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control","return"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["support.class.cocoa","NSChangeSpelling"]
+],[
+ "start"
+],[
+ "start",
+ ["string.begin.objc","@\""],
+ ["string","0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"],
+ ["punctuation.definition.string.end","\""]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.definition.storage.type.objc","@selector"],
+ ["punctuation","("],
+ ["support.function.any-method.name-of-parameter.objc","lowercaseString"],
+ ["punctuation",")"],
+ ["text"," "],
+ ["punctuation.definition.storage.type.objc","@selector"],
+ ["punctuation","("],
+ ["support.function.any-method.name-of-parameter.objc","uppercaseString:"],
+ ["punctuation",")"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","NSFetchRequest"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","localRequest"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","[["],
+ ["identifier","NSFetchRequest"],
+ ["text"," "],
+ ["support.function.any-method.objc","alloc"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["identifier","init"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"],
+ ["text"," "]
+],[
+ "start",
+ ["identifier","localRequest"],
+ ["punctuation.operator","."],
+ ["identifier","entity"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["identifier","NSEntityDescription"],
+ ["text"," "],
+ ["support.function.any-method.objc","entityForName:"],
+ ["string.begin.objc","@\""],
+ ["string","VNSource"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["identifier","inManagedObjectContext"],
+ ["punctuation.operator",":"],
+ ["identifier","context"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"],
+ ["text"," "]
+],[
+ "start",
+ ["identifier","localRequest"],
+ ["punctuation.operator","."],
+ ["identifier","sortDescriptors"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSArray"],
+ ["text"," "],
+ ["support.function.any-method.objc","arrayWithObject:"],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSSortDescriptor"],
+ ["text"," "],
+ ["support.function.any-method.objc","sortDescriptorWithKey:"],
+ ["string.begin.objc","@\""],
+ ["string","resolution"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["identifier","ascending"],
+ ["punctuation.operator",":"],
+ ["constant.language.objc","YES"],
+ ["paren.rparen","]]"],
+ ["punctuation.operator",";"],
+ ["text"," "]
+],[
+ "start",
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","predicate"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["support.function.any-method.objc","predicateWithFormat:"],
+ ["string.begin.objc","@\""],
+ ["string","0 != SUBQUERY(image, $x, 0 != SUBQUERY($x.bookmarkItems, $y, $y.@count == 0).@count).@count"],
+ ["punctuation.definition.string.end","\""],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["support.function.any-method.objc","predicateWithFormat:"],
+ ["paren.rparen","]"]
+],[
+ "start",
+ ["support.class.cocoa","NSString"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","predicateString"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSString"],
+ ["text"," "],
+ ["support.function.any-method.objc","stringWithFormat:"],
+ ["string.begin.objc","@\""],
+ ["string","SELF beginsWith[cd] %@"],
+ ["punctuation.definition.string.end","\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","searchString"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","pred"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["support.function.any-method.objc","predicateWithFormat:"],
+ ["identifier","predicateString"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["support.class.cocoa","NSArray"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["identifier","filteredKeys"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","[["],
+ ["identifier","myMutableDictionary"],
+ ["text"," "],
+ ["support.function.any-method.objc","allKeys"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["identifier","filteredArrayUsingPredicate"],
+ ["punctuation.operator",":"],
+ ["identifier","pred"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"],
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","localRequest"],
+ ["punctuation.operator","."],
+ ["identifier","predicate"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["support.class.cocoa","NSPredicate"],
+ ["text"," "],
+ ["support.function.any-method.objc","predicateWithFormat:"],
+ ["string.begin.objc","@\""],
+ ["string","whichChart = %@"],
+ ["punctuation.definition.string.end","\""],
+ ["text"," "],
+ ["identifier","argumentArray"],
+ ["punctuation.operator",":"],
+ ["text"," "],
+ ["identifier","listChartToDownload"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["identifier","localRequest"],
+ ["punctuation.operator","."],
+ ["identifier","fetchBatchSize"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","100"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["identifier","arrayRequest"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["punctuation.section.scope.begin.objc","["],
+ ["identifier","context"],
+ ["text"," "],
+ ["support.function.any-method.objc","executeFetchRequest:"],
+ ["identifier","localRequest"],
+ ["text"," "],
+ ["identifier","error"],
+ ["punctuation.operator",":"],
+ ["keyword.operator","&"],
+ ["identifier","error1"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.section.scope.begin.objc","["],
+ ["identifier","localRequest"],
+ ["text"," "],
+ ["support.function.any-method.objc","release"],
+ ["paren.rparen","]"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#ifndef"],
+ ["constant.other"," Nil"]
+],[
+ "start",
+ ["keyword","#define"],
+ ["constant.other"," Nil __DARWIN_NULL "],
+ ["comment","/* id of Nil class */"]
+],[
+ "start",
+ ["keyword","#endif"]
+],[
+ "start"
+],[
+ "start",
+ ["storage.type.objc","@implementation"],
+ ["entity.name.type.objc"," MyObject"]
+],[
+ "start",
+ ["meta.function.objc","- "],
+ ["paren.lparen","("],
+ ["storage.type","unsigned"],
+ ["text"," "],
+ ["storage.type","int"],
+ ["paren.rparen",")"],
+ ["identifier","areaOfWidth"],
+ ["punctuation.operator",":"],
+ ["paren.lparen","("],
+ ["storage.type","unsigned"],
+ ["text"," "],
+ ["storage.type","int"],
+ ["paren.rparen",")"],
+ ["identifier","width"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","height"],
+ ["punctuation.operator",":"],
+ ["paren.lparen","("],
+ ["storage.type","unsigned"],
+ ["text"," "],
+ ["storage.type","int"],
+ ["paren.rparen",")"],
+ ["identifier","height"]
+],[
+ "start",
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control","return"],
+ ["text"," "],
+ ["identifier","width"],
+ ["keyword.operator","*"],
+ ["identifier","height"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["storage.type.objc","@end"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ocaml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ocaml.json
new file mode 100644
index 000000000..73e3cfcd4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ocaml.json
@@ -0,0 +1,200 @@
+[[
+ "comment",
+ ["comment","(*"]
+],[
+ "comment",
+ ["comment"," * Example of early return implementation taken from"]
+],[
+ "comment",
+ ["comment"," * http://ocaml.janestreet.com/?q=node/91"]
+],[
+ "start",
+ ["comment"," *)"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","let"],
+ ["text"," "],
+ ["identifier","with_return"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["keyword","type"],
+ ["text"," "],
+ ["identifier","t"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","f"],
+ ["text"," : "],
+ ["identifier","_"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","t"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","="]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","let"],
+ ["text"," "],
+ ["keyword","module"],
+ ["text"," "],
+ ["identifier","M"],
+ ["text"," "],
+ ["keyword.operator","="]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","struct"],
+ ["text"," "],
+ ["keyword","exception"],
+ ["text"," "],
+ ["identifier","Return"],
+ ["text"," "],
+ ["keyword","of"],
+ ["text"," "],
+ ["identifier","t"],
+ ["text"," "],
+ ["keyword","end"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","in"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","let"],
+ ["text"," "],
+ ["identifier","return"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text"," "],
+ ["identifier","return"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["keyword","fun"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["support.function","raise"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","M"],
+ ["text","."],
+ ["identifier","Return"],
+ ["text"," "],
+ ["identifier","x"],
+ ["paren.rparen","))"],
+ ["text","; "],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["keyword","in"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","try"],
+ ["text"," "],
+ ["identifier","f"],
+ ["text"," "],
+ ["identifier","return"],
+ ["text"," "],
+ ["keyword","with"],
+ ["text"," "],
+ ["identifier","M"],
+ ["text","."],
+ ["identifier","Return"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator","->"],
+ ["text"," "],
+ ["identifier","x"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["comment","(* Function that uses the 'early return' functionality provided by `with_return` *)"]
+],[
+ "start",
+ ["keyword","let"],
+ ["text"," "],
+ ["identifier","sum_until_first_negative"],
+ ["text"," "],
+ ["support.function","list"],
+ ["text"," "],
+ ["keyword.operator","="]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","with_return"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["keyword","fun"],
+ ["text"," "],
+ ["identifier","r"],
+ ["text"," "],
+ ["keyword.operator","->"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","List"],
+ ["text","."],
+ ["support.function","fold"],
+ ["text"," "],
+ ["support.function","list"],
+ ["text"," "],
+ ["keyword.operator","~"],
+ ["support.function","init"],
+ ["text",":"],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword.operator","~"],
+ ["identifier","f"],
+ ["text",":"],
+ ["paren.lparen","("],
+ ["keyword","fun"],
+ ["text"," "],
+ ["identifier","acc"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator","->"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword.operator",">="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword","then"],
+ ["text"," "],
+ ["identifier","acc"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["identifier","r"],
+ ["text","."],
+ ["identifier","return"],
+ ["text"," "],
+ ["identifier","acc"],
+ ["paren.rparen","))"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pascal.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pascal.json
new file mode 100644
index 000000000..22c1f0c43
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pascal.json
@@ -0,0 +1,297 @@
+[[
+ "punctuation.definition.comment.pascal",
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one","****************************************************************************"]
+],[
+ "punctuation.definition.comment.pascal",
+ ["comment.block.pascal.one"," * A simple bubble sort program. Reads integers, one per line, and prints *"]
+],[
+ "punctuation.definition.comment.pascal",
+ ["comment.block.pascal.one"," * them out in sorted order. Blows up if there are more than 49. *"]
+],[
+ "start",
+ ["comment.block.pascal.one"," ****************************************************************************"],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["keyword.control.pascal","PROGRAM"],
+ ["text"," Sort(input"],
+ ["keyword.operator",","],
+ ["text"," output)"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","CONST"]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Max array size. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," MaxElts "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric.pascal","50"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","TYPE"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Type of the element array. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," IntArrType "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["keyword.control.pascal","ARRAY"],
+ ["text"," ["],
+ ["constant.numeric.pascal","1"],
+ ["text","..MaxElts] "],
+ ["keyword.control.pascal","OF"],
+ ["text"," Integer"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","VAR"]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Indexes, exchange temp, array size. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," i"],
+ ["keyword.operator",","],
+ ["text"," j"],
+ ["keyword.operator",","],
+ ["text"," tmp"],
+ ["keyword.operator",","],
+ ["text"," size: integer"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Array of ints "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," arr: IntArrType"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Read in the integers. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.pascal","PROCEDURE"],
+ ["text"," "],
+ ["storage.type.function.pascal","ReadArr"],
+ ["text","("],
+ ["keyword.control.pascal","VAR"],
+ ["text"," size: Integer"],
+ ["keyword.operator",";"],
+ ["text"," "],
+ ["keyword.control.pascal","VAR"],
+ ["text"," a: IntArrType)"],
+ ["keyword.operator",";"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","BEGIN"]
+],[
+ "start",
+ ["text"," size "],
+ ["keyword.operator",":="],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","WHILE"],
+ ["text"," "],
+ ["keyword.control.pascal","NOT"],
+ ["text"," eof "],
+ ["keyword.control.pascal","DO"],
+ ["text"," "],
+ ["keyword.control.pascal","BEGIN"]
+],[
+ "start",
+ ["text"," readln(a[size])"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","IF"],
+ ["text"," "],
+ ["keyword.control.pascal","NOT"],
+ ["text"," eof "],
+ ["keyword.control.pascal","THEN"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," size "],
+ ["keyword.operator",":="],
+ ["text"," size "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric.pascal","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","END"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","END"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","BEGIN"]
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Read "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," ReadArr(size"],
+ ["keyword.operator",","],
+ ["text"," arr)"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Sort using bubble sort. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","FOR"],
+ ["text"," i "],
+ ["keyword.operator",":="],
+ ["text"," size "],
+ ["keyword.operator","-"],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text"," DOWNTO "],
+ ["constant.numeric.pascal","1"],
+ ["text"," "],
+ ["keyword.control.pascal","DO"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","FOR"],
+ ["text"," j "],
+ ["keyword.operator",":="],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text"," "],
+ ["keyword.control.pascal","TO"],
+ ["text"," i "],
+ ["keyword.control.pascal","DO"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","IF"],
+ ["text"," arr[j] > arr[j "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text","] "],
+ ["keyword.control.pascal","THEN"],
+ ["text"," "],
+ ["keyword.control.pascal","BEGIN"]
+],[
+ "start",
+ ["text"," tmp "],
+ ["keyword.operator",":="],
+ ["text"," arr[j]"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," arr[j] "],
+ ["keyword.operator",":="],
+ ["text"," arr[j "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text","]"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," arr[j "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text","] "],
+ ["keyword.operator",":="],
+ ["text"," tmp"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","END"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["punctuation.definition.comment.pascal","(*"],
+ ["comment.block.pascal.one"," Print. "],
+ ["punctuation.definition.comment.pascal","*)"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","FOR"],
+ ["text"," i "],
+ ["keyword.operator",":="],
+ ["text"," "],
+ ["constant.numeric.pascal","1"],
+ ["text"," "],
+ ["keyword.control.pascal","TO"],
+ ["text"," size "],
+ ["keyword.control.pascal","DO"]
+],[
+ "start",
+ ["text"," writeln(arr[i])"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.pascal","END"],
+ ["text","."]
+],[
+ "start",
+ ["text"," "]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_perl.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_perl.json
new file mode 100644
index 000000000..30bb39c6a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_perl.json
@@ -0,0 +1,227 @@
+[[
+ "start",
+ ["comment","#!/usr/bin/perl"]
+],[
+ "block_comment",
+ ["comment.doc","=begin"]
+],[
+ "block_comment",
+ ["comment.doc"," perl example code for Ace"]
+],[
+ "start",
+ ["comment.doc","=cut"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","use"],
+ ["text"," "],
+ ["identifier","strict"],
+ ["text",";"]
+],[
+ "start",
+ ["keyword","use"],
+ ["text"," "],
+ ["identifier","warnings"],
+ ["text",";"]
+],[
+ "start",
+ ["keyword","my"],
+ ["text"," "],
+ ["identifier","$num_primes"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text",";"]
+],[
+ "start",
+ ["keyword","my"],
+ ["text"," @"],
+ ["identifier","primes"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","# Put 2 as the first prime so we won't have an empty array"]
+],[
+ "start",
+ ["identifier","$primes"],
+ ["lparen","["],
+ ["identifier","$num_primes"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text",";"]
+],[
+ "start",
+ ["identifier","$num_primes"],
+ ["keyword.operator","++"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","MAIN_LOOP"],
+ ["text",":"]
+],[
+ "start",
+ ["keyword","for"],
+ ["text"," "],
+ ["keyword","my"],
+ ["text"," "],
+ ["identifier","$number_to_check"],
+ ["text"," "],
+ ["lparen","("],
+ ["constant.numeric","3"],
+ ["text"," "],
+ ["keyword.operator",".."],
+ ["text"," "],
+ ["constant.numeric","200"],
+ ["rparen",")"]
+],[
+ "start",
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["keyword","my"],
+ ["text"," "],
+ ["identifier","$p"],
+ ["text"," "],
+ ["lparen","("],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword.operator",".."],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","$num_primes"],
+ ["constant.numeric","-1"],
+ ["rparen","))"]
+],[
+ "start",
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","$number_to_check"],
+ ["text"," "],
+ ["keyword.operator","%"],
+ ["text"," "],
+ ["identifier","$primes"],
+ ["lparen","["],
+ ["identifier","$p"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","next"],
+ ["text"," "],
+ ["identifier","MAIN_LOOP"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment","# If we reached this point it means $number_to_check is not"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","# divisable by any prime number that came before it."]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","$primes"],
+ ["lparen","["],
+ ["identifier","$num_primes"],
+ ["rparen","]"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","$number_to_check"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","$num_primes"],
+ ["keyword.operator","++"],
+ ["text",";"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","for"],
+ ["text"," "],
+ ["keyword","my"],
+ ["text"," "],
+ ["identifier","$p"],
+ ["text"," "],
+ ["lparen","("],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["keyword.operator",".."],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","$num_primes"],
+ ["constant.numeric","-1"],
+ ["rparen","))"]
+],[
+ "start",
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","print"],
+ ["text"," "],
+ ["identifier","$primes"],
+ ["lparen","["],
+ ["identifier","$p"],
+ ["rparen","]"],
+ ["keyword.operator",","],
+ ["text"," "],
+ ["string","\", \""],
+ ["text",";"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start",
+ ["support.function","print"],
+ ["text"," "],
+ ["string","\"\\n\""],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pgsql.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pgsql.json
new file mode 100644
index 000000000..ded4bb868
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_pgsql.json
@@ -0,0 +1,735 @@
+[[
+ "start"
+],[
+ "start",
+ ["keyword.statementBegin","BEGIN"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "doc-start",
+ ["comment.doc","/**"]
+],[
+ "doc-start",
+ ["comment.doc","* Samples from PostgreSQL src/tutorial/basics.source"]
+],[
+ "start",
+ ["comment.doc","*/"]
+],[
+ "statement",
+ ["keyword.statementBegin","CREATE"],
+ ["text"," "],
+ ["keyword","TABLE"],
+ ["text"," "],
+ ["identifier","weather"],
+ ["text"," "],
+ ["paren.lparen","("]
+],[
+ "statement",
+ ["text","\t"],
+ ["identifier","city"],
+ ["text","\t\t"],
+ ["keyword","varchar"],
+ ["paren.lparen","("],
+ ["constant.numeric","80"],
+ ["paren.rparen",")"],
+ ["text",","]
+],[
+ "statement",
+ ["text","\t"],
+ ["identifier","temp_lo"],
+ ["text","\t\t"],
+ ["keyword","int"],
+ ["text",",\t\t"],
+ ["comment","-- low temperature"]
+],[
+ "statement",
+ ["text","\t"],
+ ["identifier","temp_hi"],
+ ["text","\t\t"],
+ ["keyword","int"],
+ ["text",",\t\t"],
+ ["comment","-- high temperature"]
+],[
+ "statement",
+ ["text","\t"],
+ ["identifier","prcp"],
+ ["text","\t\t"],
+ ["keyword","real"],
+ ["text",",\t\t"],
+ ["comment","-- precipitation"]
+],[
+ "statement",
+ ["text","\t"],
+ ["variable.language","\"date\""],
+ ["text","\t\t"],
+ ["keyword","date"]
+],[
+ "start",
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","CREATE"],
+ ["text"," "],
+ ["keyword","TABLE"],
+ ["text"," "],
+ ["identifier","cities"],
+ ["text"," "],
+ ["paren.lparen","("]
+],[
+ "statement",
+ ["text","\t"],
+ ["keyword","name"],
+ ["text","\t\t"],
+ ["keyword","varchar"],
+ ["paren.lparen","("],
+ ["constant.numeric","80"],
+ ["paren.rparen",")"],
+ ["text",","]
+],[
+ "statement",
+ ["text","\t"],
+ ["keyword","location"],
+ ["text","\t"],
+ ["keyword","point"]
+],[
+ "start",
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","INSERT"],
+ ["text"," "],
+ ["keyword","INTO"],
+ ["text"," "],
+ ["identifier","weather"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","VALUES"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["string","'San Francisco'"],
+ ["text",", "],
+ ["constant.numeric","46"],
+ ["text",", "],
+ ["constant.numeric","50"],
+ ["text",", "],
+ ["constant.numeric","0.25"],
+ ["text",", "],
+ ["string","'1994-11-27'"],
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","INSERT"],
+ ["text"," "],
+ ["keyword","INTO"],
+ ["text"," "],
+ ["identifier","cities"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","VALUES"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["string","'San Francisco'"],
+ ["text",", "],
+ ["string","'(-194.0, 53.0)'"],
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","INSERT"],
+ ["text"," "],
+ ["keyword","INTO"],
+ ["text"," "],
+ ["identifier","weather"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","city"],
+ ["text",", "],
+ ["identifier","temp_lo"],
+ ["text",", "],
+ ["identifier","temp_hi"],
+ ["text",", "],
+ ["identifier","prcp"],
+ ["text",", "],
+ ["variable.language","\"date\""],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","VALUES"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["string","'San Francisco'"],
+ ["text",", "],
+ ["constant.numeric","43"],
+ ["text",", "],
+ ["constant.numeric","57"],
+ ["text",", "],
+ ["constant.numeric","0.0"],
+ ["text",", "],
+ ["string","'1994-11-29'"],
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","INSERT"],
+ ["text"," "],
+ ["keyword","INTO"],
+ ["text"," "],
+ ["identifier","weather"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["keyword","date"],
+ ["text",", "],
+ ["identifier","city"],
+ ["text",", "],
+ ["identifier","temp_hi"],
+ ["text",", "],
+ ["identifier","temp_lo"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","VALUES"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["string","'1994-11-29'"],
+ ["text",", "],
+ ["string","'Hayward'"],
+ ["text",", "],
+ ["constant.numeric","54"],
+ ["text",", "],
+ ["constant.numeric","37"],
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword.statementBegin","SELECT"],
+ ["text"," "],
+ ["identifier","city"],
+ ["text",", "],
+ ["paren.lparen","("],
+ ["identifier","temp_hi"],
+ ["keyword.operator","+"],
+ ["identifier","temp_lo"],
+ ["paren.rparen",")"],
+ ["keyword.operator","/"],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["keyword","AS"],
+ ["text"," "],
+ ["identifier","temp_avg"],
+ ["text",", "],
+ ["variable.language","\"date\""],
+ ["text"," "],
+ ["keyword","FROM"],
+ ["text"," "],
+ ["identifier","weather"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "statement",
+ ["keyword.statementBegin","SELECT"],
+ ["text"," "],
+ ["identifier","city"],
+ ["text",", "],
+ ["identifier","temp_lo"],
+ ["text",", "],
+ ["identifier","temp_hi"],
+ ["text",", "],
+ ["identifier","prcp"],
+ ["text",", "],
+ ["variable.language","\"date\""],
+ ["text",", "],
+ ["keyword","location"]
+],[
+ "statement",
+ ["text"," "],
+ ["keyword","FROM"],
+ ["text"," "],
+ ["identifier","weather"],
+ ["text",", "],
+ ["identifier","cities"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","WHERE"],
+ ["text"," "],
+ ["identifier","city"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["keyword","name"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start"
+],[
+ "doc-start",
+ ["comment.doc","/**"]
+],[
+ "doc-start",
+ ["comment.doc","* Dollar quotes starting at the end of the line are colored as SQL unless"]
+],[
+ "doc-start",
+ ["comment.doc","* a special language tag is used. Pearl and Python are currently implemented"]
+],[
+ "doc-start",
+ ["comment.doc","* but lots of others are possible."]
+],[
+ "start",
+ ["comment.doc","*/"]
+],[
+ "statement",
+ ["keyword.statementBegin","create"],
+ ["text"," "],
+ ["keyword","or"],
+ ["text"," "],
+ ["keyword","replace"],
+ ["text"," "],
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","blob_content_chunked"],
+ ["paren.lparen","("]
+],[
+ "statement",
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","p_data"],
+ ["text"," "],
+ ["keyword","bytea"],
+ ["text",", "]
+],[
+ "statement",
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","p_chunk"],
+ ["text"," "],
+ ["keyword","integer"],
+ ["paren.rparen",")"]
+],[
+ "dollarSql",
+ ["keyword","returns"],
+ ["text"," "],
+ ["keyword","setof"],
+ ["text"," "],
+ ["keyword","bytea"],
+ ["text"," "],
+ ["keyword","as"],
+ ["text"," "],
+ ["string","$$"]
+],[
+ "dollarSql",
+ ["comment","-- Still SQL comments"]
+],[
+ "dollarSql",
+ ["keyword","declare"]
+],[
+ "dollarSql",
+ ["text","\t"],
+ ["identifier","v_size"],
+ ["text"," "],
+ ["keyword","integer"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.function","octet_length"],
+ ["paren.lparen","("],
+ ["identifier","p_data"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "dollarSql",
+ ["keyword","begin"]
+],[
+ "dollarSql",
+ ["text","\t"],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text",".."],
+ ["identifier","v_size"],
+ ["text"," "],
+ ["keyword","by"],
+ ["text"," "],
+ ["identifier","p_chunk"],
+ ["text"," "],
+ ["identifier","loop"]
+],[
+ "dollarSql",
+ ["text","\t\t"],
+ ["identifier","return"],
+ ["text"," "],
+ ["keyword","next"],
+ ["text"," "],
+ ["keyword","substring"],
+ ["paren.lparen","("],
+ ["identifier","p_data"],
+ ["text"," "],
+ ["keyword","from"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","p_chunk"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "dollarSql",
+ ["text","\t"],
+ ["keyword","end"],
+ ["text"," "],
+ ["identifier","loop"],
+ ["text",";"]
+],[
+ "dollarSql",
+ ["keyword","end"],
+ ["text",";"]
+],[
+ "start",
+ ["string","$$"],
+ ["text"," "],
+ ["keyword","language"],
+ ["text"," "],
+ ["identifier","plpgsql"],
+ ["text"," "],
+ ["keyword","stable"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- pl/perl"]
+],[
+ "perl-start",
+ ["keyword.statementBegin","CREATE"],
+ ["text"," "],
+ ["keyword","FUNCTION"],
+ ["text"," "],
+ ["identifier","perl_max"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["keyword","integer"],
+ ["text",", "],
+ ["keyword","integer"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","RETURNS"],
+ ["text"," "],
+ ["keyword","integer"],
+ ["text"," "],
+ ["keyword","AS"],
+ ["text"," "],
+ ["string","$perl$"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["comment","# perl comment..."]
+],[
+ "perl-start",
+ ["text"," "],
+ ["keyword","my"],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","$x"],
+ ["keyword.operator",","],
+ ["identifier","$y"],
+ ["rparen",")"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," @"],
+ ["identifier","_"],
+ ["text",";"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["support.function","defined"],
+ ["text"," "],
+ ["identifier","$x"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["support.function","defined"],
+ ["text"," "],
+ ["identifier","$y"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["support.function","undef"],
+ ["text","; "],
+ ["rparen","}"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["identifier","$y"],
+ ["text",";"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["support.function","defined"],
+ ["text"," "],
+ ["identifier","$y"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["identifier","$x"],
+ ["text","; "],
+ ["rparen","}"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["identifier","$x"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","$y"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"],
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["identifier","$x"],
+ ["text","; "],
+ ["rparen","}"]
+],[
+ "perl-start",
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["identifier","$y"],
+ ["text",";"]
+],[
+ "start",
+ ["string","$perl$"],
+ ["text"," "],
+ ["keyword","LANGUAGE"],
+ ["text"," "],
+ ["identifier","plperl"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- pl/python"]
+],[
+ "python-start",
+ ["keyword.statementBegin","CREATE"],
+ ["text"," "],
+ ["keyword","FUNCTION"],
+ ["text"," "],
+ ["identifier","usesavedplan"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","RETURNS"],
+ ["text"," "],
+ ["keyword","trigger"],
+ ["text"," "],
+ ["keyword","AS"],
+ ["text"," "],
+ ["string","$python$"]
+],[
+ "python-start",
+ ["text"," "],
+ ["comment","# python comment..."]
+],[
+ "python-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["identifier","SD"],
+ ["text","."],
+ ["identifier","has_key"],
+ ["paren.lparen","("],
+ ["string","\"plan\""],
+ ["paren.rparen",")"],
+ ["text",":"]
+],[
+ "python-start",
+ ["text"," "],
+ ["identifier","plan"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","SD"],
+ ["paren.lparen","["],
+ ["string","\"plan\""],
+ ["paren.rparen","]"]
+],[
+ "python-start",
+ ["text"," "],
+ ["keyword","else"],
+ ["text",":"]
+],[
+ "python-start",
+ ["text"," "],
+ ["identifier","plan"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","plpy"],
+ ["text","."],
+ ["identifier","prepare"],
+ ["paren.lparen","("],
+ ["string","\"SELECT 1\""],
+ ["paren.rparen",")"]
+],[
+ "python-start",
+ ["text"," "],
+ ["identifier","SD"],
+ ["paren.lparen","["],
+ ["string","\"plan\""],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","plan"]
+],[
+ "start",
+ ["string","$python$"],
+ ["text"," "],
+ ["keyword","LANGUAGE"],
+ ["text"," "],
+ ["identifier","plpythonu"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- psql commands"]
+],[
+ "start",
+ ["support.buildin","\\df cash*"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["comment","-- Some string samples."]
+],[
+ "start",
+ ["keyword.statementBegin","select"],
+ ["text"," "],
+ ["string","'don''t do it now;'"],
+ ["text"," "],
+ ["keyword.operator","||"],
+ ["text"," "],
+ ["string","'maybe later'"],
+ ["statementEnd",";"]
+],[
+ "start",
+ ["keyword.statementBegin","select"],
+ ["text"," "],
+ ["identifier","E"],
+ ["string","'dont\\'t do it'"],
+ ["statementEnd",";"]
+],[
+ "start",
+ ["keyword.statementBegin","select"],
+ ["text"," "],
+ ["support.function","length"],
+ ["paren.lparen","("],
+ ["string","'some other''s stuff'"],
+ ["text"," "],
+ ["keyword.operator","||"],
+ ["text"," "],
+ ["string","$$cat in hat's stuff $$"],
+ ["paren.rparen",")"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "dollarStatementString",
+ ["keyword.statementBegin","select"],
+ ["text"," "],
+ ["string","$$ strings"]
+],[
+ "dollarStatementString",
+ ["string","over multiple "]
+],[
+ "dollarStatementString",
+ ["string","lines - use dollar quotes"]
+],[
+ "start",
+ ["string","$$"],
+ ["statementEnd",";"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.statementBegin","END"],
+ ["statementEnd",";"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_php.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_php.json
new file mode 100644
index 000000000..d8a41eec5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_php.json
@@ -0,0 +1,134 @@
+[[
+ "php-start",
+ ["support.php_tag","<?php"]
+],[
+ "php-start"
+],[
+ "php-start",
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","nfact"],
+ ["paren.lparen","("],
+ ["variable","$n"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "php-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable","$n"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "php-start",
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text",";"]
+],[
+ "php-start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "php-start",
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "php-start",
+ ["text"," "],
+ ["support.function","return"],
+ ["text"," "],
+ ["variable","$n"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "],
+ ["identifier","nfact"],
+ ["paren.lparen","("],
+ ["variable","$n"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "php-start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "php-start",
+ ["paren.rparen","}"]
+],[
+ "php-start"
+],[
+ "php-start",
+ ["support.function","echo"],
+ ["text"," "],
+ ["string","\""],
+ ["constant.language.escape","\\n\\n"],
+ ["string","Please enter a whole number ... \""],
+ ["text",";"]
+],[
+ "php-start",
+ ["variable","$num"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.function","trim"],
+ ["paren.lparen","("],
+ ["support.function","fgets"],
+ ["paren.lparen","("],
+ ["constant.language","STDIN"],
+ ["paren.rparen","))"],
+ ["text",";"]
+],[
+ "php-start"
+],[
+ "php-start",
+ ["comment","// ===== PROCESS - Determing the factorial of the input number ====="]
+],[
+ "php-start",
+ ["variable","$output"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\""],
+ ["constant.language.escape","\\n\\n"],
+ ["string","Factorial \""],
+ ["text"," . "],
+ ["variable","$num"],
+ ["text"," . "],
+ ["string","\" = \""],
+ ["text"," . "],
+ ["identifier","nfact"],
+ ["paren.lparen","("],
+ ["variable","$num"],
+ ["paren.rparen",")"],
+ ["text"," . "],
+ ["string","\""],
+ ["constant.language.escape","\\n\\n"],
+ ["string","\""],
+ ["text",";"]
+],[
+ "php-start",
+ ["support.function","echo"],
+ ["text"," "],
+ ["variable","$output"],
+ ["text",";"]
+],[
+ "php-start"
+],[
+ "start",
+ ["support.php_tag","?>"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_powershell.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_powershell.json
new file mode 100644
index 000000000..43b77db46
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_powershell.json
@@ -0,0 +1,184 @@
+[[
+ "start",
+ ["comment","# This is a simple comment"]
+],[
+ "start",
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","Hello"],
+ ["lparen","("],
+ ["variable.instance","$name"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","Write-host"],
+ ["text"," "],
+ ["string","\"Hello $name\""]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","function"],
+ ["text"," "],
+ ["identifier","add"],
+ ["lparen","("],
+ ["variable.instance","$left"],
+ ["text",", "],
+ ["variable.instance","$right"],
+ ["keyword.operator","="],
+ ["constant.numeric","4"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["lparen","("],
+ ["variable.instance","$right"],
+ ["text"," "],
+ ["keyword.operator","-ne"],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["variable.instance","$left"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"],
+ ["text"," "],
+ ["keyword","elseif"],
+ ["text"," "],
+ ["lparen","("],
+ ["variable.instance","$left"],
+ ["text"," "],
+ ["keyword.operator","-eq"],
+ ["text"," "],
+ ["constant.language","$null"],
+ ["text"," "],
+ ["keyword.operator","-and"],
+ ["text"," "],
+ ["variable.instance","$right"],
+ ["text"," "],
+ ["keyword.operator","-eq"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["rparen",")"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["constant.numeric","3"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"],
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["constant.numeric","2"]
+],[
+ "start",
+ ["text"," "],
+ ["rparen","}"]
+],[
+ "start",
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.instance","$number"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text",";"]
+],[
+ "start",
+ ["variable.instance","$number"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["constant.numeric","3"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","Write-Host"],
+ ["text"," "],
+ ["identifier","Hello"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","name"],
+ ["text"," "],
+ ["string","\"World\""]
+],[
+ "start"
+],[
+ "start",
+ ["variable.instance","$an_array"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," @"],
+ ["lparen","("],
+ ["constant.numeric","1"],
+ ["text",", "],
+ ["constant.numeric","2"],
+ ["text",", "],
+ ["constant.numeric","3"],
+ ["rparen",")"]
+],[
+ "start",
+ ["variable.instance","$a_hash"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," @"],
+ ["lparen","{"],
+ ["string","\"something\""],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"something else\""],
+ ["rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.operator","&"],
+ ["text"," "],
+ ["identifier","notepad"],
+ ["text"," .\\"],
+ ["identifier","readme"],
+ ["text","."],
+ ["identifier","md"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_prolog.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_prolog.json
new file mode 100644
index 000000000..e42b65b52
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_prolog.json
@@ -0,0 +1,265 @@
+[[
+ "start",
+ ["entity.name.function.fact.prolog","partition"],
+ ["punctuation.begin.fact.parameters.prolog","("],
+ ["punctuation.begin.list.prolog","["],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["variable.language.anonymous.prolog","_"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.end.fact.parameters.prolog",")"],
+ ["punctuation.end.fact.prolog","."]
+],[
+ ["keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["entity.name.function.rule.prolog","partition"],
+ ["punctuation.rule.parameters.begin.prolog","("],
+ ["punctuation.begin.list.prolog","["],
+ ["variable.other.prolog","X"],
+ ["punctuation.concat.list.prolog","|"],
+ ["variable.other.prolog","Xs"],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.rule.parameters.prolog"," "],
+ ["variable.parameter.prolog","Pivot"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.rule.parameters.prolog"," "],
+ ["variable.parameter.prolog","Smalls"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.rule.parameters.prolog"," "],
+ ["variable.parameter.prolog","Bigs"],
+ ["punctuation.rule.parameters.end.prolog",")"],
+ ["meta.rule.signature.prolog"," "],
+ ["keyword.operator.definition.prolog",":-"]
+],[
+ ["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["meta.rule.definition.prolog"," "],
+ ["meta.expression.prolog","( "],
+ ["variable.other.prolog","X"],
+ ["meta.expression.prolog"," @"],
+ ["keyword.operator.prolog","<"],
+ ["meta.expression.prolog"," "],
+ ["variable.other.prolog","Pivot"],
+ ["meta.expression.prolog"," "],
+ ["keyword.operator.prolog","->"]
+],[
+ ["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["meta.expression.prolog"," "],
+ ["variable.other.prolog","Smalls"],
+ ["meta.expression.prolog"," "],
+ ["keyword.operator.prolog","="],
+ ["meta.expression.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["variable.other.prolog","X"],
+ ["punctuation.concat.list.prolog","|"],
+ ["variable.other.prolog","Rest"],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.control.and.prolog",","]
+],[
+ ["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["meta.expression.prolog"," "],
+ ["constant.other.atom.prolog","partition"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Xs"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Pivot"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Rest"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Bigs"],
+ ["punctuation.end.statement.parameters.prolog",")"]
+],[
+ ["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["meta.expression.prolog"," "],
+ ["punctuation.control.or.prolog",";"],
+ ["meta.expression.prolog"," "],
+ ["variable.other.prolog","Bigs"],
+ ["meta.expression.prolog"," "],
+ ["keyword.operator.prolog","="],
+ ["meta.expression.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["variable.other.prolog","X"],
+ ["punctuation.concat.list.prolog","|"],
+ ["variable.other.prolog","Rest"],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.control.and.prolog",","]
+],[
+ ["meta.expression.prolog","keyword.operator.definition.prolog","keyword.operator.definition.prolog","meta.rule.prolog"],
+ ["meta.expression.prolog"," "],
+ ["constant.other.atom.prolog","partition"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Xs"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Pivot"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Smalls"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Rest"],
+ ["punctuation.end.statement.parameters.prolog",")"]
+],[
+ "start",
+ ["meta.expression.prolog"," )"],
+ ["punctuation.rule.end.prolog","."]
+],[
+ "start",
+ ["text"," "]
+],[
+ "entity.name.function.fact.prolog",
+ ["entity.name.function.fact.prolog","quicksort"],
+ ["punctuation.begin.fact.parameters.prolog","("],
+ ["punctuation.begin.list.prolog","["],
+ ["punctuation.end.list.prolog","]"],
+ ["invalid.illegal.invalidchar.prolog",")"],
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog","-"],
+ ["keyword.operator.prolog","->"],
+ ["meta.fact.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["punctuation.end.list.prolog","]"],
+ ["invalid.illegal.invalidchar.prolog","."]
+],[
+ "entity.name.function.fact.prolog",
+ ["constant.other.atom.prolog","quicksort"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["punctuation.begin.list.prolog","["],
+ ["variable.other.prolog","X"],
+ ["punctuation.concat.list.prolog","|"],
+ ["variable.other.prolog","Xs"],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog","-"],
+ ["keyword.operator.prolog","->"]
+],[
+ "entity.name.function.fact.prolog",
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog","{"],
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","partition"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Xs"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","X"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Smaller"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","Bigger"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog","}"],
+ ["punctuation.separator.parameters.prolog",","]
+],[
+ "entity.name.function.fact.prolog",
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","quicksort"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Smaller"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["punctuation.begin.list.prolog","["],
+ ["variable.other.prolog","X"],
+ ["punctuation.end.list.prolog","]"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","quicksort"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Bigger"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["invalid.illegal.invalidchar.prolog","."]
+],[
+ "entity.name.function.fact.prolog"
+],[
+ "entity.name.function.fact.prolog",
+ ["constant.other.atom.prolog","perfect"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","N"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog",":-"]
+],[
+ "entity.name.function.fact.prolog",
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","between"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["constant.numeric.prolog","1"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["constant.other.atom.prolog","inf"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","N"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["variable.parameter.prolog","U"],
+ ["meta.fact.prolog"," "],
+ ["keyword.operator.prolog","is"],
+ ["meta.fact.prolog"," "],
+ ["variable.parameter.prolog","N"],
+ ["meta.fact.prolog"," "],
+ ["invalid.illegal.invalidchar.prolog","//"],
+ ["meta.fact.prolog"," "],
+ ["constant.numeric.prolog","2"],
+ ["punctuation.separator.parameters.prolog",","]
+],[
+ "entity.name.function.fact.prolog",
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","findall"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","D"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," ("],
+ ["constant.other.atom.prolog","between"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["constant.numeric.prolog","1"],
+ ["punctuation.separator.statement.prolog",","],
+ ["variable.other.prolog","U"],
+ ["punctuation.separator.statement.prolog",","],
+ ["variable.other.prolog","D"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","N"],
+ ["meta.statement.parameters.prolog"," "],
+ ["constant.other.atom.prolog","mod"],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","D"],
+ ["meta.statement.parameters.prolog"," "],
+ ["keyword.operator.prolog","=:="],
+ ["meta.statement.parameters.prolog"," "],
+ ["constant.numeric.prolog","0"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["punctuation.separator.parameters.prolog",","],
+ ["meta.fact.prolog"," "],
+ ["variable.parameter.prolog","Ds"],
+ ["invalid.illegal.invalidchar.prolog",")"],
+ ["punctuation.separator.parameters.prolog",","]
+],[
+ "entity.name.function.fact.prolog",
+ ["meta.fact.prolog"," "],
+ ["constant.other.atom.prolog","sumlist"],
+ ["punctuation.begin.statement.parameters.prolog","("],
+ ["variable.other.prolog","Ds"],
+ ["punctuation.separator.statement.prolog",","],
+ ["meta.statement.parameters.prolog"," "],
+ ["variable.other.prolog","N"],
+ ["punctuation.end.statement.parameters.prolog",")"],
+ ["invalid.illegal.invalidchar.prolog","."]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_properties.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_properties.json
new file mode 100644
index 000000000..8831045e2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_properties.json
@@ -0,0 +1,68 @@
+[[
+ "start",
+ ["comment","# You are reading the \".properties\" entry."]
+],[
+ "start",
+ ["comment","! The exclamation mark can also mark text as comments."]
+],[
+ "start",
+ ["comment","# The key and element characters #, !, =, and : are written with a preceding backslash to ensure that they are properly loaded."]
+],[
+ "start",
+ ["variable","website "],
+ ["keyword","="],
+ ["string"," http"],
+ ["constant.language.escape","\\"],
+ ["string","://en.wikipedia.org/"]
+],[
+ "start",
+ ["variable","language "],
+ ["keyword","="],
+ ["string"," English"]
+],[
+ "start",
+ ["comment","# The backslash below tells the application to continue reading"]
+],[
+ "start",
+ ["comment","# the value onto the next line."]
+],[
+ "value",
+ ["variable","message "],
+ ["keyword","="],
+ ["string"," Welcome to \\"]
+],[
+ "start",
+ ["string"," Wikipedia!"]
+],[
+ "start",
+ ["comment","# Add spaces to the key"]
+],[
+ "start",
+ ["variable","key"],
+ ["constant.language.escape","\\"],
+ ["variable"," with"],
+ ["constant.language.escape","\\"],
+ ["variable"," spaces "],
+ ["keyword","="],
+ ["string"," This is the value that could be looked up with the key \"key with spaces\"."]
+],[
+ "start",
+ ["comment","# Unicode"]
+],[
+ "start",
+ ["variable","tab "],
+ ["keyword",":"],
+ ["string"," "],
+ ["constant.language.escape","\\u0009"]
+],[
+ "start",
+ ["variable","empty-key"],
+ ["keyword","="]
+],[
+ "start",
+ ["variable","last.line"],
+ ["keyword","="],
+ ["string","value"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_python.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_python.json
new file mode 100644
index 000000000..293c8ff2f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_python.json
@@ -0,0 +1,152 @@
+[[
+ "start",
+ ["comment","#!/usr/local/bin/python"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","import"],
+ ["text"," "],
+ ["identifier","string"],
+ ["text",", "],
+ ["identifier","sys"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","# If no arguments were given, print a helpful message"]
+],[
+ "start",
+ ["keyword","if"],
+ ["text"," "],
+ ["support.function","len"],
+ ["paren.lparen","("],
+ ["identifier","sys"],
+ ["text","."],
+ ["identifier","argv"],
+ ["paren.rparen",")"],
+ ["keyword.operator","=="],
+ ["constant.numeric","1"],
+ ["text",":"]
+],[
+ "qstring3",
+ ["text"," "],
+ ["keyword","print"],
+ ["text"," "],
+ ["string","'''Usage:"]
+],[
+ "start",
+ ["string","celsius temp1 temp2 ...'''"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","sys"],
+ ["text","."],
+ ["identifier","exit"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","# Loop over the arguments"]
+],[
+ "start",
+ ["keyword","for"],
+ ["text"," "],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword","in"],
+ ["text"," "],
+ ["identifier","sys"],
+ ["text","."],
+ ["identifier","argv"],
+ ["paren.lparen","["],
+ ["constant.numeric","1"],
+ ["text",":"],
+ ["paren.rparen","]"],
+ ["text",":"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","try"],
+ ["text",":"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","fahrenheit"],
+ ["keyword.operator","="],
+ ["support.function","float"],
+ ["paren.lparen","("],
+ ["identifier","string"],
+ ["text","."],
+ ["identifier","atoi"],
+ ["paren.lparen","("],
+ ["identifier","i"],
+ ["paren.rparen","))"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","except"],
+ ["text"," "],
+ ["identifier","string"],
+ ["text","."],
+ ["identifier","atoi_error"],
+ ["text",":"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","print"],
+ ["text"," "],
+ ["support.function","repr"],
+ ["paren.lparen","("],
+ ["identifier","i"],
+ ["paren.rparen",")"],
+ ["text",", "],
+ ["string","\"not a numeric value\""]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","else"],
+ ["text",":"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","celsius"],
+ ["keyword.operator","="],
+ ["paren.lparen","("],
+ ["identifier","fahrenheit"],
+ ["keyword.operator","-"],
+ ["constant.numeric","32"],
+ ["paren.rparen",")"],
+ ["keyword.operator","*"],
+ ["constant.numeric","5.0"],
+ ["keyword.operator","/"],
+ ["constant.numeric","9.0"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","print"],
+ ["text"," "],
+ ["string","'%i"],
+ ["constant.language.escape","\\260"],
+ ["string","F = %i"],
+ ["constant.language.escape","\\260"],
+ ["string","C'"],
+ ["text"," "],
+ ["keyword.operator","%"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["support.function","int"],
+ ["paren.lparen","("],
+ ["identifier","fahrenheit"],
+ ["paren.rparen",")"],
+ ["text",", "],
+ ["support.function","int"],
+ ["paren.lparen","("],
+ ["identifier","celsius"],
+ ["keyword.operator","+"],
+ ["constant.numeric",".5"],
+ ["paren.rparen","))"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_r.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_r.json
new file mode 100644
index 000000000..2d446bcee
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_r.json
@@ -0,0 +1,235 @@
+[[
+ "start",
+ ["identifier","Call"],
+ ["keyword.operator",":"]
+],[
+ "start",
+ ["identifier","lm"],
+ ["paren.keyword.operator","("],
+ ["identifier","formula"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","y"],
+ ["text"," "],
+ ["keyword.operator","~"],
+ ["text"," "],
+ ["identifier","x"],
+ ["paren.keyword.operator",")"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["identifier","Residuals"],
+ ["keyword.operator",":"]
+],[
+ "start",
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["text"," "],
+ ["constant.numeric","6"]
+],[
+ "start",
+ ["constant.numeric","3.3333"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","0.6667"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","2.6667"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","2.6667"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","0.6667"],
+ ["text"," "],
+ ["constant.numeric","3.3333"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["identifier","Coefficients"],
+ ["keyword.operator",":"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","Estimate"],
+ ["text"," "],
+ ["identifier","Std"],
+ ["text",". "],
+ ["identifier","Error"],
+ ["text"," "],
+ ["identifier","t"],
+ ["text"," "],
+ ["identifier","value"],
+ ["text"," "],
+ ["identifier","Pr"],
+ ["paren.keyword.operator","("],
+ ["keyword.operator",">|"],
+ ["identifier","t"],
+ ["keyword.operator","|"],
+ ["paren.keyword.operator",")"]
+],[
+ "start",
+ ["paren.keyword.operator","("],
+ ["identifier","Intercept"],
+ ["paren.keyword.operator",")"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","9.3333"],
+ ["text"," "],
+ ["constant.numeric","2.8441"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["constant.numeric","3.282"],
+ ["text"," "],
+ ["constant.numeric","0.030453"],
+ ["text"," "],
+ ["keyword.operator","*"]
+],[
+ "start",
+ ["identifier","x"],
+ ["text"," "],
+ ["constant.numeric","7.0000"],
+ ["text"," "],
+ ["constant.numeric","0.7303"],
+ ["text"," "],
+ ["constant.numeric","9.585"],
+ ["text"," "],
+ ["constant.numeric","0.000662"],
+ ["text"," "],
+ ["keyword.operator","***"]
+],[
+ "start",
+ ["keyword.operator","---"]
+],[
+ "start",
+ ["identifier","Signif"],
+ ["text",". "],
+ ["identifier","codes"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," ‘"],
+ ["keyword.operator","***"],
+ ["text","’ "],
+ ["constant.numeric","0.001"],
+ ["text"," ‘"],
+ ["keyword.operator","**"],
+ ["text","’ "],
+ ["constant.numeric","0.01"],
+ ["text"," ‘"],
+ ["keyword.operator","*"],
+ ["text","’ "],
+ ["constant.numeric","0.05"],
+ ["text"," ‘.’ "],
+ ["constant.numeric","0.1"],
+ ["text"," ‘ ’ "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["identifier","Residual"],
+ ["text"," "],
+ ["identifier","standard"],
+ ["text"," "],
+ ["identifier","error"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","3.055"],
+ ["text"," "],
+ ["identifier","on"],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["identifier","degrees"],
+ ["text"," "],
+ ["identifier","of"],
+ ["text"," "],
+ ["identifier","freedom"]
+],[
+ "start",
+ ["identifier","Multiple"],
+ ["text"," "],
+ ["identifier","R"],
+ ["keyword.operator","-"],
+ ["identifier","squared"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","0.9583"],
+ ["text",", "],
+ ["identifier","Adjusted"],
+ ["text"," "],
+ ["identifier","R"],
+ ["keyword.operator","-"],
+ ["identifier","squared"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","0.9478"]
+],[
+ "start",
+ ["constant.language.boolean","F"],
+ ["keyword.operator","-"],
+ ["identifier","statistic"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","91.88"],
+ ["text"," "],
+ ["identifier","on"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["identifier","and"],
+ ["text"," "],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["identifier","DF"],
+ ["text",", "],
+ ["identifier","p"],
+ ["keyword.operator","-"],
+ ["identifier","value"],
+ ["keyword.operator",":"],
+ ["text"," "],
+ ["constant.numeric","0.000662"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","par"],
+ ["paren.keyword.operator","("],
+ ["identifier","mfrow"],
+ ["keyword.operator","="],
+ ["identifier","c"],
+ ["paren.keyword.operator","("],
+ ["constant.numeric","2"],
+ ["text",", "],
+ ["constant.numeric","2"],
+ ["paren.keyword.operator","))"],
+ ["text"," "],
+ ["comment","# Request 2x2 plot layout"]
+],[
+ "start",
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","plot"],
+ ["paren.keyword.operator","("],
+ ["identifier","lm_1"],
+ ["paren.keyword.operator",")"],
+ ["text"," "],
+ ["comment","# Diagnostic plot of regression model"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rdoc.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rdoc.json
new file mode 100644
index 000000000..0c7574389
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rdoc.json
@@ -0,0 +1,441 @@
+[[
+ "start",
+ ["keyword","\\name"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","picker"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["keyword","\\alias"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","picker"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["keyword","\\title"],
+ ["paren.keyword.operator","{"],
+ ["text","Create a picker control"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["keyword","\\description"],
+ ["paren.keyword.operator","{"]
+],[
+ "start",
+ ["text"," Create a picker control to enable manipulation of plot variables based on a set of fixed choices."]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start"
+],[
+ "nospell",
+ ["keyword","\\usage"],
+ ["paren.keyword.operator","{"]
+],[
+ "nospell",
+ ["nospell.text","picker"],
+ ["paren.keyword.operator","("],
+ ["text","...,"],
+ ["nospell.text"," initial "],
+ ["text","="],
+ ["nospell.text"," NULL"],
+ ["text",","],
+ ["nospell.text"," label "],
+ ["text","="],
+ ["nospell.text"," NULL"],
+ ["paren.keyword.operator",")"]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["keyword","\\arguments"],
+ ["paren.keyword.operator","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\item"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\dots"],
+ ["paren.keyword.operator","}{"]
+],[
+ "start",
+ ["text"," Arguments containing objects to be presented as choices for the picker "],
+ ["paren.keyword.operator","("],
+ ["text","or a list containing the choices"],
+ ["paren.keyword.operator",")"],
+ ["text",". If an element is named then the name is used to display it within the picker. If an element is not named then it is displayed within the picker using "],
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","as"],
+ ["text","."],
+ ["nospell.text","character"],
+ ["paren.keyword.operator","}}"],
+ ["text",". "]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\item"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","initial"],
+ ["paren.keyword.operator","}{"]
+],[
+ "start",
+ ["text"," Initial value for picker. Value must be present in the list of choices specified. If not specified defaults to the first choice."]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\item"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","label"],
+ ["paren.keyword.operator","}{"]
+],[
+ "start",
+ ["text"," Display label for picker. Defaults to the variable name if not specified."]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","\\value"],
+ ["paren.keyword.operator","{"]
+],[
+ "start",
+ ["text"," An object of class \"manipulator.picker\" which can be passed to the "],
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","}}"],
+ ["text"," function."]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","\\seealso"],
+ ["paren.keyword.operator","{"]
+],[
+ "start",
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","}}"],
+ ["text",", "],
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","slider"],
+ ["paren.keyword.operator","}}"],
+ ["text",", "],
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","checkbox"],
+ ["paren.keyword.operator","}}"],
+ ["text",", "],
+ ["keyword","\\code"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\link"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","button"],
+ ["paren.keyword.operator","}}"]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "nospell",
+ ["keyword","\\examples"],
+ ["paren.keyword.operator","{"]
+],[
+ "nospell",
+ ["keyword","\\dontrun"],
+ ["paren.keyword.operator","{"]
+],[
+ "nospell"
+],[
+ "nospell",
+ ["text","##"],
+ ["nospell.text"," Filtering data with a picker"]
+],[
+ "nospell",
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","("]
+],[
+ "nospell",
+ ["nospell.text"," barplot"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","as"],
+ ["text","."],
+ ["nospell.text","matrix"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","longley"],
+ ["paren.keyword.operator","["],
+ ["text",","],
+ ["nospell.text","factor"],
+ ["paren.keyword.operator","])"],
+ ["text",","],
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["nospell.text"," beside "],
+ ["text","="],
+ ["nospell.text"," TRUE"],
+ ["text",","],
+ ["nospell.text"," main "],
+ ["text","="],
+ ["nospell.text"," factor"],
+ ["paren.keyword.operator",")"],
+ ["text",","]
+],[
+ "nospell",
+ ["nospell.text"," factor "],
+ ["text","="],
+ ["nospell.text"," picker"],
+ ["paren.keyword.operator","("],
+ ["text","\""],
+ ["nospell.text","GNP"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","Unemployed"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","Employed"],
+ ["text","\""],
+ ["paren.keyword.operator","))"]
+],[
+ "nospell"
+],[
+ "nospell",
+ ["text","##"],
+ ["nospell.text"," Create a picker with labels"]
+],[
+ "nospell",
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","("]
+],[
+ "nospell",
+ ["nospell.text"," plot"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","pressure"],
+ ["text",","],
+ ["nospell.text"," type "],
+ ["text","="],
+ ["nospell.text"," type"],
+ ["paren.keyword.operator",")"],
+ ["text",","],
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["nospell.text"," type "],
+ ["text","="],
+ ["nospell.text"," picker"],
+ ["paren.keyword.operator","("],
+ ["text","\""],
+ ["nospell.text","points"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","p"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","line"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","l"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","step"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","s"],
+ ["text","\""],
+ ["paren.keyword.operator","))"]
+],[
+ "nospell",
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["text","##"],
+ ["nospell.text"," Picker with groups"]
+],[
+ "nospell",
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","("]
+],[
+ "nospell",
+ ["nospell.text"," barplot"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","as"],
+ ["text","."],
+ ["nospell.text","matrix"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","mtcars"],
+ ["paren.keyword.operator","["],
+ ["nospell.text","group"],
+ ["text",",\""],
+ ["nospell.text","mpg"],
+ ["text","\""],
+ ["paren.keyword.operator","])"],
+ ["text",","],
+ ["nospell.text"," beside"],
+ ["text","="],
+ ["nospell.text","TRUE"],
+ ["paren.keyword.operator",")"],
+ ["text",","]
+],[
+ "nospell",
+ ["nospell.text"," group "],
+ ["text","="],
+ ["nospell.text"," picker"],
+ ["paren.keyword.operator","("],
+ ["text","\""],
+ ["nospell.text","Group 1"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," 1"],
+ ["text",":"],
+ ["nospell.text","11"],
+ ["text",","],
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","Group 2"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," 12"],
+ ["text",":"],
+ ["nospell.text","22"],
+ ["text",","],
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","Group 3"],
+ ["text","\""],
+ ["nospell.text"," "],
+ ["text","="],
+ ["nospell.text"," 23"],
+ ["text",":"],
+ ["nospell.text","32"],
+ ["paren.keyword.operator","))"]
+],[
+ "nospell"
+],[
+ "nospell",
+ ["text","##"],
+ ["nospell.text"," Histogram w"],
+ ["text","/"],
+ ["nospell.text"," picker to select type"]
+],[
+ "nospell",
+ ["nospell.text","require"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","lattice"],
+ ["paren.keyword.operator",")"]
+],[
+ "nospell",
+ ["nospell.text","require"],
+ ["paren.keyword.operator","("],
+ ["nospell.text","stats"],
+ ["paren.keyword.operator",")"]
+],[
+ "nospell",
+ ["nospell.text","manipulate"],
+ ["paren.keyword.operator","("]
+],[
+ "nospell",
+ ["nospell.text"," histogram"],
+ ["paren.keyword.operator","("],
+ ["text","~"],
+ ["nospell.text"," height "],
+ ["text","|"],
+ ["nospell.text"," voice"],
+ ["text","."],
+ ["nospell.text","part"],
+ ["text",","],
+ ["nospell.text"," "]
+],[
+ "nospell",
+ ["nospell.text"," data "],
+ ["text","="],
+ ["nospell.text"," singer"],
+ ["text",","],
+ ["nospell.text"," type "],
+ ["text","="],
+ ["nospell.text"," type"],
+ ["paren.keyword.operator",")"],
+ ["text",","]
+],[
+ "nospell",
+ ["nospell.text"," type "],
+ ["text","="],
+ ["nospell.text"," picker"],
+ ["paren.keyword.operator","("],
+ ["text","\""],
+ ["nospell.text","percent"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","count"],
+ ["text","\","],
+ ["nospell.text"," "],
+ ["text","\""],
+ ["nospell.text","density"],
+ ["text","\""],
+ ["paren.keyword.operator","))"]
+],[
+ "nospell"
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["paren.keyword.operator","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rhtml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rhtml.json
new file mode 100644
index 000000000..6dca1c51c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rhtml.json
@@ -0,0 +1,106 @@
+[[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Title"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","This is an R HTML document. When you click the "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Knit HTML"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","b"],
+ ["meta.tag.punctuation.end",">"],
+ ["text"," button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "r-start",
+ ["support.function.codebegin","<!--begin.rcode"]
+],[
+ "r-start",
+ ["identifier","summary"],
+ ["paren.keyword.operator","("],
+ ["identifier","cars"],
+ ["paren.keyword.operator",")"]
+],[
+ "start",
+ ["support.function.codeend","end.rcode-->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","You can also embed plots, for example:"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","p"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "r-start",
+ ["support.function.codebegin","<!--begin.rcode fig.width=7, fig.height=6"]
+],[
+ "r-start",
+ ["identifier","plot"],
+ ["paren.keyword.operator","("],
+ ["identifier","cars"],
+ ["paren.keyword.operator",")"]
+],[
+ "start",
+ ["support.function.codeend","end.rcode-->"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ruby.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ruby.json
new file mode 100644
index 000000000..19b98b700
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_ruby.json
@@ -0,0 +1,232 @@
+[[
+ "start",
+ ["text"," "],
+ ["comment","#test: symbol tokenizer"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant.other.symbol.ruby",":@thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":$thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":_thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":Thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing1"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing_a"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["constant.other.symbol.ruby",":THING"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing!"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing="],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing?"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":t?"],
+ ["text",","]
+],[
+ "start",
+ ["text"," :, :@, :"],
+ ["keyword.operator","$"],
+ ["text",", :"],
+ ["constant.numeric","1"],
+ ["text",", :1"],
+ ["identifier","thing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":th?"],
+ ["identifier","ing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thi="],
+ ["identifier","ng"],
+ ["text",", :1"],
+ ["identifier","thing"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["constant.other.symbol.ruby",":th!"],
+ ["identifier","ing"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":thing"],
+ ["comment","#"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","]"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment","#test: namespaces aren't symbols\" : function() {"]
+],[
+ "start",
+ ["text"," "],
+ ["support.class","Namespaced"],
+ ["text","::"],
+ ["support.class","Class"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","#test: hex tokenizer "]
+],[
+ "start",
+ ["text"," "],
+ ["constant.numeric","0x9a"],
+ ["text",", "],
+ ["constant.numeric","0XA1"],
+ ["text",", "],
+ ["constant.numeric","0x9_a"],
+ ["text",", 0"],
+ ["identifier","x"],
+ ["text",", 0"],
+ ["identifier","x_9a"],
+ ["text",", 0"],
+ ["identifier","x9a_"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["comment","#test: float tokenizer"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant.numeric","1"],
+ ["text",", "],
+ ["constant.numeric","+1"],
+ ["text",", "],
+ ["constant.numeric","-1"],
+ ["text",", "],
+ ["constant.numeric","12_345"],
+ ["text",", "],
+ ["constant.numeric","0.000_1"],
+ ["text",","]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","_"],
+ ["text",", "],
+ ["constant.numeric","3_1"],
+ ["text",", "],
+ ["constant.numeric","1_2"],
+ ["text",", 1"],
+ ["identifier","_"],
+ ["text","."],
+ ["constant.numeric","0"],
+ ["text",", "],
+ ["constant.numeric","0"],
+ ["text","."],
+ ["identifier","_1"],
+ ["paren.rparen","]"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["paren.lparen","{"],
+ ["constant.other.symbol.ruby",":id"],
+ ["text"," "],
+ ["punctuation.separator.key-value","=>"],
+ ["text"," "],
+ ["constant.numeric","34"],
+ ["text",", "],
+ ["constant.other.symbol.ruby",":key"],
+ ["text"," "],
+ ["punctuation.separator.key-value","=>"],
+ ["text"," "],
+ ["string","\"value\""],
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "comment",
+ ["comment","=begin"]
+],[
+ "start",
+ ["comment","=end"]
+],[
+ "start"
+],[
+ "comment",
+ ["comment","=begin x"]
+],[
+ "comment",
+ ["comment","=end-"]
+],[
+ "start",
+ ["comment","=end x"]
+],[
+ "start"
+],[
+ ["heredoc","FOO","heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["text"," "],
+ ["identifier","herDocs"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant","<<"],
+ ["string","'"],
+ ["support.class","FOO"],
+ ["string","'"],
+ ["text",", "],
+ ["constant","<<"],
+ ["string",""],
+ ["support.class","BAR"],
+ ["string",""],
+ ["text",", "],
+ ["constant","<<-"],
+ ["string",""],
+ ["support.class","BAZ"],
+ ["string",""],
+ ["text",", "],
+ ["constant","<<-"],
+ ["string","`"],
+ ["support.class","EXEC"],
+ ["string","`"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["comment","#comment"]
+],[
+ ["heredoc","FOO","heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["string"," FOO #{literal}"]
+],[
+ ["heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["support.class","FOO"]
+],[
+ ["heredoc","BAR","indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["string"," BAR #{fact(10)}"]
+],[
+ ["indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["support.class","BAR"]
+],[
+ ["indentedHeredoc","BAZ","indentedHeredoc","EXEC"],
+ ["string"," BAZ indented"]
+],[
+ ["indentedHeredoc","EXEC"],
+ ["string"," "],
+ ["support.class","BAZ"]
+],[
+ ["indentedHeredoc","EXEC"],
+ ["string"," echo hi"]
+],[
+ "start",
+ ["string"," "],
+ ["support.class","EXEC"]
+],[
+ "start",
+ ["support.function","puts"],
+ ["text"," "],
+ ["identifier","herDocs"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rust.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rust.json
new file mode 100644
index 000000000..6592575b5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_rust.json
@@ -0,0 +1,136 @@
+[[
+ "start",
+ ["keyword.source.rust","use"],
+ ["text"," "],
+ ["support.constant","core::rand::"],
+ ["text","RngUtil"],
+ ["keyword.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.source.rust","fn"],
+ ["meta.function.source.rust"," "],
+ ["entity.name.function.source.rust","main"],
+ ["meta.function.source.rust","("],
+ ["text",") {"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","for"],
+ ["text"," ["],
+ ["string.quoted.double.source.rust","\"Alice\""],
+ ["keyword.operator",","],
+ ["text"," "],
+ ["string.quoted.double.source.rust","\"Bob\""],
+ ["keyword.operator",","],
+ ["text"," "],
+ ["string.quoted.double.source.rust","\"Carol\""],
+ ["text","].each |&name| {"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","do"],
+ ["text"," spawn {"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","let"],
+ ["text"," v "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["support.constant","rand::"],
+ ["text","Rng().shuffle(["],
+ ["constant.numeric.integer.source.rust","1"],
+ ["keyword.operator",","],
+ ["text"," "],
+ ["constant.numeric.integer.source.rust","2"],
+ ["keyword.operator",","],
+ ["text"," "],
+ ["constant.numeric.integer.source.rust","3"],
+ ["text","])"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","for"],
+ ["text"," v.each |&num| {"]
+],[
+ "start",
+ ["text"," print(fmt"],
+ ["keyword.operator","!"],
+ ["text","("],
+ ["string.quoted.double.source.rust","\"%s says: '%d'"],
+ ["constant.character.escape.source.rust","\\n"],
+ ["string.quoted.double.source.rust","\""],
+ ["keyword.operator",","],
+ ["text"," name"],
+ ["keyword.operator",","],
+ ["text"," num "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric.integer.source.rust","1"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," }"]
+],[
+ "start",
+ ["text"," }"]
+],[
+ "start",
+ ["text"," }"]
+],[
+ "start",
+ ["text","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword.source.rust","fn"],
+ ["meta.function.source.rust"," "],
+ ["entity.name.function.source.rust","map<T, U>"],
+ ["meta.function.source.rust","("],
+ ["text","vector: &[T]"],
+ ["keyword.operator",","],
+ ["text"," function: &fn(v: &T) "],
+ ["keyword.operator","->"],
+ ["text"," U) "],
+ ["keyword.operator","->"],
+ ["text"," ~[U] {"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","let"],
+ ["text"," "],
+ ["keyword.source.rust","mut"],
+ ["text"," accumulator "],
+ ["keyword.operator","="],
+ ["text"," ~[]"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","for"],
+ ["text"," "],
+ ["support.constant","vec::"],
+ ["text","each(vector) |element| {"]
+],[
+ "start",
+ ["text"," accumulator.push(function(element))"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text"," }"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.source.rust","return"],
+ ["text"," accumulator"],
+ ["keyword.operator",";"]
+],[
+ "start",
+ ["text","}"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sass.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sass.json
new file mode 100644
index 000000000..c0b85682c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sass.json
@@ -0,0 +1,229 @@
+[[
+ "start",
+ ["comment","// sass ace mode;"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","@import"],
+ ["text"," "],
+ ["support.function","url("],
+ ["string","http://fonts.googleapis.com/css?family=Ace:700"],
+ ["support.function",")"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.language","html"],
+ ["text",", "],
+ ["variable.language","body"]
+],[
+ "start",
+ ["support.type"," :background-color "],
+ ["constant.numeric","#ace"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","text-align"],
+ ["text",": "],
+ ["constant.language","center"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","height"],
+ ["text",": "],
+ ["constant.numeric","100%"]
+],[
+ ["comment",-1,2,"start"],
+ ["comment"," /*;*********;"]
+],[
+ ["comment",3,2,"start"],
+ ["comment"," ;comment ;"]
+],[
+ ["comment",3,2,"start"],
+ ["comment"," ;*********;"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.language",".toggle"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$size"],
+ ["text",": "],
+ ["constant.numeric","14px"]
+],[
+ "start"
+],[
+ "start",
+ ["support.type"," :background "],
+ ["support.function","url("],
+ ["string","http://subtlepatterns.com/patterns/dark_stripes.png"],
+ ["support.function",")"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border-radius"],
+ ["text",": "],
+ ["constant.numeric","8px"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","height"],
+ ["text",": "],
+ ["variable","$size"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," &"],
+ ["variable.language",":before"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$radius"],
+ ["text",": "],
+ ["variable","$size"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "],
+ ["constant.numeric","0.845"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$glow"],
+ ["text",": "],
+ ["variable","$size"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "],
+ ["constant.numeric","0.125"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["support.type","box-shadow"],
+ ["text",": "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["variable","$glow"],
+ ["text"," "],
+ ["variable","$glow"],
+ ["text"," / "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","#fff"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border-radius"],
+ ["text",": "],
+ ["variable","$radius"]
+],[
+ "start",
+ ["text"," "]
+],[
+ "start",
+ ["text"," &"],
+ ["variable.language",":active"]
+],[
+ "start",
+ ["text"," ~ "],
+ ["variable.language",".button"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","box-shadow"],
+ ["text",": "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","15px"],
+ ["text"," "],
+ ["constant.numeric","25px"],
+ ["text"," "],
+ ["constant.numeric","-4px"],
+ ["text"," "],
+ ["support.function","rgba"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0.4"],
+ ["paren.rparen",")"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," ~ "],
+ ["variable.language",".label"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","font-size"],
+ ["text",": "],
+ ["constant.numeric","40px"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","color"],
+ ["text",": "],
+ ["support.function","rgba"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0.45"],
+ ["paren.rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," &"],
+ ["variable.language",":checked"],
+ ["text"," "]
+],[
+ "start",
+ ["text"," ~ "],
+ ["variable.language",".button"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","box-shadow"],
+ ["text",": "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","15px"],
+ ["text"," "],
+ ["constant.numeric","25px"],
+ ["text"," "],
+ ["constant.numeric","-4px"],
+ ["text"," "],
+ ["constant.numeric","#ace"]
+],[
+ "start",
+ ["text"," ~ "],
+ ["variable.language",".label"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","font-size"],
+ ["text",": "],
+ ["constant.numeric","40px"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","color"],
+ ["text",": "],
+ ["constant.numeric","#c9c9c9"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scad.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scad.json
new file mode 100644
index 000000000..8f0ff6373
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scad.json
@@ -0,0 +1,194 @@
+[[
+ "start",
+ ["comment","// ace can highlight scad!"]
+],[
+ "start",
+ ["keyword","module"],
+ ["text"," "],
+ ["identifier","Element"],
+ ["paren.lparen","("],
+ ["identifier","xpos"],
+ ["text",", "],
+ ["identifier","ypos"],
+ ["text",", "],
+ ["identifier","zpos"],
+ ["paren.rparen",")"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["identifier","translate"],
+ ["paren.lparen","(["],
+ ["identifier","xpos"],
+ ["text",","],
+ ["identifier","ypos"],
+ ["text",","],
+ ["identifier","zpos"],
+ ["paren.rparen","])"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["identifier","union"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["identifier","cube"],
+ ["paren.lparen","(["],
+ ["constant.numeric","10"],
+ ["text",","],
+ ["constant.numeric","10"],
+ ["text",","],
+ ["constant.numeric","4"],
+ ["paren.rparen","]"],
+ ["text",","],
+ ["identifier","true"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["identifier","cylinder"],
+ ["paren.lparen","("],
+ ["constant.numeric","10"],
+ ["text",","],
+ ["constant.numeric","15"],
+ ["text",","],
+ ["constant.numeric","5"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t\t"],
+ ["identifier","translate"],
+ ["paren.lparen","(["],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","10"],
+ ["paren.rparen","])"],
+ ["identifier","sphere"],
+ ["paren.lparen","("],
+ ["constant.numeric","5"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","union"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","for"],
+ ["paren.lparen","("],
+ ["identifier","i"],
+ ["keyword.operator","="],
+ ["paren.lparen","["],
+ ["constant.numeric","0"],
+ ["text",":"],
+ ["constant.numeric","30"],
+ ["paren.rparen","])"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t# "],
+ ["identifier","Element"],
+ ["paren.lparen","("],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["identifier","Element"],
+ ["paren.lparen","("],
+ ["constant.numeric","15"],
+ ["keyword.operator","*"],
+ ["identifier","i"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","for"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","i"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant.numeric","3"],
+ ["text",", "],
+ ["constant.numeric","5"],
+ ["text",", "],
+ ["constant.numeric","7"],
+ ["text",", "],
+ ["constant.numeric","11"],
+ ["paren.rparen","])"],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["identifier","rotate"],
+ ["paren.lparen","(["],
+ ["identifier","i"],
+ ["keyword.operator","*"],
+ ["constant.numeric","10"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["text",","],
+ ["constant.numeric","0"],
+ ["paren.rparen","])"],
+ ["identifier","scale"],
+ ["paren.lparen","(["],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["constant.numeric","1"],
+ ["text",","],
+ ["identifier","i"],
+ ["paren.rparen","])"],
+ ["identifier","cube"],
+ ["paren.lparen","("],
+ ["constant.numeric","10"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scala.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scala.json
new file mode 100644
index 000000000..01dd3ce3e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scala.json
@@ -0,0 +1,542 @@
+[[
+ "start",
+ ["comment","// http://www.scala-lang.org/node/54"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","package"],
+ ["text"," "],
+ ["identifier","examples"],
+ ["text","."],
+ ["identifier","actors"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","import"],
+ ["text"," "],
+ ["identifier","scala"],
+ ["text","."],
+ ["identifier","actors"],
+ ["text","."],
+ ["identifier","Actor"]
+],[
+ "start",
+ ["keyword","import"],
+ ["text"," "],
+ ["identifier","scala"],
+ ["text","."],
+ ["identifier","actors"],
+ ["text","."],
+ ["identifier","Actor"],
+ ["text","."],
+ ["identifier","_"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","abstract"],
+ ["text"," "],
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","PingMessage"]
+],[
+ "start",
+ ["keyword","case"],
+ ["text"," "],
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","Start"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","PingMessage"]
+],[
+ "start",
+ ["keyword","case"],
+ ["text"," "],
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","SendPing"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","PingMessage"]
+],[
+ "start",
+ ["keyword","case"],
+ ["text"," "],
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","Pong"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","PingMessage"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","abstract"],
+ ["text"," "],
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","PongMessage"]
+],[
+ "start",
+ ["keyword","case"],
+ ["text"," "],
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","Ping"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","PongMessage"]
+],[
+ "start",
+ ["keyword","case"],
+ ["text"," "],
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","Stop"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","PongMessage"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","object"],
+ ["text"," "],
+ ["identifier","pingpong"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","Application"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","val"],
+ ["text"," "],
+ ["identifier","pong"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Pong"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","val"],
+ ["text"," "],
+ ["identifier","ping"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Ping"],
+ ["paren.lparen","("],
+ ["constant.numeric","100000"],
+ ["text",", "],
+ ["identifier","pong"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ping"],
+ ["text","."],
+ ["identifier","start"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pong"],
+ ["text","."],
+ ["identifier","start"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ping"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","Start"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Ping"],
+ ["paren.lparen","("],
+ ["identifier","count"],
+ ["text",": "],
+ ["support.function","Int"],
+ ["text",", "],
+ ["identifier","pong"],
+ ["text",": "],
+ ["identifier","Actor"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","Actor"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","act"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Ping: Initializing with count \""],
+ ["keyword.operator","+"],
+ ["identifier","count"],
+ ["keyword.operator","+"],
+ ["string","\": \""],
+ ["keyword.operator","+"],
+ ["identifier","pong"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","var"],
+ ["text"," "],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","count"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","loop"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","react"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","Start"],
+ ["text"," "],
+ ["keyword.operator","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Ping: starting.\""],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pong"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","Ping"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","SendPing"],
+ ["text"," "],
+ ["keyword.operator","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pong"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","Ping"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","Pong"],
+ ["text"," "],
+ ["keyword.operator","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator","%"],
+ ["text"," "],
+ ["constant.numeric","1000"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Ping: pong from: \""],
+ ["keyword.operator","+"],
+ ["identifier","sender"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","pingsLeft"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","self"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","SendPing"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","else"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Ping: Stop.\""],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pong"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","Stop"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","exit"],
+ ["paren.lparen","("],
+ ["symbol.constant","'stop"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Pong"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","Actor"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","def"],
+ ["text"," "],
+ ["identifier","act"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","var"],
+ ["text"," "],
+ ["identifier","pongCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","loop"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","react"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","Ping"],
+ ["text"," "],
+ ["keyword.operator","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","pongCount"],
+ ["text"," "],
+ ["keyword.operator","%"],
+ ["text"," "],
+ ["constant.numeric","1000"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Pong: ping \""],
+ ["keyword.operator","+"],
+ ["identifier","pongCount"],
+ ["keyword.operator","+"],
+ ["string","\" from \""],
+ ["keyword.operator","+"],
+ ["identifier","sender"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","sender"],
+ ["text"," "],
+ ["keyword.operator","!"],
+ ["text"," "],
+ ["identifier","Pong"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","pongCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","pongCount"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","case"],
+ ["text"," "],
+ ["identifier","Stop"],
+ ["text"," "],
+ ["keyword.operator","=>"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","println"],
+ ["paren.lparen","("],
+ ["string","\"Pong: Stop.\""],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","exit"],
+ ["paren.lparen","("],
+ ["symbol.constant","'stop"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scheme.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scheme.json
new file mode 100644
index 000000000..42f4aa65c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scheme.json
@@ -0,0 +1,216 @@
+[[
+ "start",
+ ["text","("],
+ ["storage.type.function-type.scheme","define"],
+ ["text"," "],
+ ["text","("],
+ ["identifier","prompt-for-cd"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"Prompts"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","for"],
+ ["text"," "],
+ ["identifier","CD"],
+ ["text","\""]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","prompt-read"],
+ ["text"," "],
+ ["string","\"Title\""],
+ ["text"," "],
+ ["constant.numeric","1.53"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text","/"],
+ ["constant.numeric","4"],
+ ["text"," "],
+ ["constant.numeric","1.7"],
+ ["text"," "],
+ ["constant.numeric","1.7e0"],
+ ["text"," "],
+ ["constant.numeric","2.9E-4"],
+ ["text"," "],
+ ["constant.numeric","+42"],
+ ["text"," "],
+ ["constant.numeric","-7"],
+ ["text"," "],
+ ["constant.numeric","#b001"],
+ ["text"," "],
+ ["constant.numeric","#b001"],
+ ["text","/"],
+ ["constant.numeric","100"],
+ ["text"," "],
+ ["constant.numeric","#o777"],
+ ["text"," "],
+ ["constant.numeric","#O777"],
+ ["text"," "],
+ ["constant.numeric","#xabc55"],
+ ["text"," "],
+ ["identifier","#c"],
+ ["text","("],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","-5.6"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","prompt-read"],
+ ["text"," "],
+ ["string","\"Artist\""],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.operator","or"],
+ ["text"," ("],
+ ["identifier","parse-integer"],
+ ["text"," ("],
+ ["identifier","prompt-read"],
+ ["text"," "],
+ ["string","\"Rating\""],
+ ["text",") "],
+ ["punctuation.definition.constant.character.scheme","#:junk-allowed"],
+ ["text"," "],
+ ["constant.language","#t"],
+ ["text",") "],
+ ["constant.numeric","0"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.control","if"],
+ ["text"," "],
+ ["identifier","x"],
+ ["text"," ("],
+ ["support.function","format"],
+ ["text"," "],
+ ["constant.language","#t"],
+ ["text"," "],
+ ["string","\"yes\""],
+ ["text",") ("],
+ ["support.function","format"],
+ ["text"," "],
+ ["constant.language","#f"],
+ ["text"," "],
+ ["string","\"no\""],
+ ["text",") "],
+ ["comment",";and here comment"]
+],[
+ "start",
+ ["text"," ) "]
+],[
+ "start",
+ ["text"," "],
+ ["comment",";; second line comment"]
+],[
+ "start",
+ ["text"," '(+ "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","position-if-not"],
+ ["text"," "],
+ ["identifier","char-set"],
+ ["text",":"],
+ ["identifier","whitespace"],
+ ["text"," "],
+ ["identifier","line"],
+ ["text"," "],
+ ["punctuation.definition.constant.character.scheme","#:start"],
+ ["text"," "],
+ ["identifier","beg"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["support.function","quote"],
+ ["text"," ("],
+ ["identifier","privet"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," '("],
+ ["identifier","hello"],
+ ["text"," "],
+ ["identifier","world"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," (* "],
+ ["constant.numeric","5"],
+ ["text"," "],
+ ["constant.numeric","7"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["constant.numeric","34"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["punctuation.definition.constant.character.scheme","#:use"],
+ ["text"," "],
+ ["string","\"aaaa\""],
+ ["text",")"]
+],[
+ "start",
+ ["text"," ("],
+ ["keyword.control","let"],
+ ["text"," (("],
+ ["identifier","x"],
+ ["text"," "],
+ ["constant.numeric","10"],
+ ["text",") ("],
+ ["identifier","y"],
+ ["text"," "],
+ ["constant.numeric","20"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ("],
+ ["identifier","display"],
+ ["text"," (+ "],
+ ["identifier","x"],
+ ["text"," "],
+ ["identifier","y"],
+ ["text","))"]
+],[
+ "start",
+ ["text"," ) "]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["string","\"asdad"],
+ ["constant.character.escape.scheme","\\0"],
+ ["string","eqweqe\""]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scss.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scss.json
new file mode 100644
index 000000000..7e92f153b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_scss.json
@@ -0,0 +1,123 @@
+[[
+ "start",
+ ["comment","/* style.scss */"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.language","#navbar"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$navbar-width"],
+ ["text",": "],
+ ["constant.numeric","800px"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$items"],
+ ["text",": "],
+ ["constant.numeric","5"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","$navbar-color"],
+ ["text",": "],
+ ["constant.numeric","#ce4dd6"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["support.type","width"],
+ ["text",": "],
+ ["variable","$navbar-width"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border-bottom"],
+ ["text",": "],
+ ["constant.numeric","2px"],
+ ["text"," "],
+ ["constant.language","solid"],
+ ["text"," "],
+ ["variable","$navbar-color"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["variable.language","li"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","float"],
+ ["text",": "],
+ ["support.type","left"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","width"],
+ ["text",": "],
+ ["variable","$navbar-width"],
+ ["text","/"],
+ ["variable","$items"],
+ ["text"," "],
+ ["constant","-"],
+ ["text"," "],
+ ["constant.numeric","10px"],
+ ["text",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["support.type","background-color"],
+ ["text",": "],
+ ["support.function","lighten"],
+ ["paren.lparen","("],
+ ["variable","$navbar-color"],
+ ["text",", "],
+ ["constant.numeric","20%"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," &"],
+ ["variable.language",":hover"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","background-color"],
+ ["text",": "],
+ ["support.function","lighten"],
+ ["paren.lparen","("],
+ ["variable","$navbar-color"],
+ ["text",", "],
+ ["constant.numeric","10%"],
+ ["paren.rparen",")"],
+ ["text",";"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sh.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sh.json
new file mode 100644
index 000000000..e4ab34128
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sh.json
@@ -0,0 +1,334 @@
+[[
+ "start",
+ ["comment","#!/bin/sh"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","# Script to open a browser to current branch"]
+],[
+ "start",
+ ["comment","# Repo formats:"]
+],[
+ "start",
+ ["comment","# ssh git@github.com:richoH/gh_pr.git"]
+],[
+ "start",
+ ["comment","# http https://richoH@github.com/richoH/gh_pr.git"]
+],[
+ "start",
+ ["comment","# git git://github.com/richoH/gh_pr.git"]
+],[
+ "start"
+],[
+ "start",
+ ["variable","username="],
+ ["text","`"],
+ ["identifier","git"],
+ ["text"," "],
+ ["identifier","config"],
+ ["text"," "],
+ ["keyword.operator","--"],
+ ["identifier","get"],
+ ["text"," "],
+ ["identifier","github"],
+ ["text","."],
+ ["identifier","user"],
+ ["text","`"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function","get_repo()"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","git"],
+ ["text"," "],
+ ["identifier","remote"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","v"],
+ ["text"," | "],
+ ["identifier","grep"],
+ ["text"," $"],
+ ["paren.lparen","{"],
+ ["text","@:"],
+ ["keyword.operator","-"],
+ ["variable","$username"],
+ ["paren.rparen","}"],
+ ["text"," | "],
+ ["keyword","while"],
+ ["text"," "],
+ ["keyword","read"],
+ ["text"," "],
+ ["identifier","remote"],
+ ["text","; "],
+ ["keyword","do"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["variable","repo="],
+ ["text","`"],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$remote"],
+ ["text"," | "],
+ ["identifier","grep"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","E"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","o"],
+ ["text"," "],
+ ["string","\"git@github.com:[^ ]*\""],
+ ["text","`; "],
+ ["keyword","then"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$repo"],
+ ["text"," | "],
+ ["identifier","sed"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s/^git@github\\.com://\""],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s/\\.git$//\""]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","exit"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","fi"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["variable","repo="],
+ ["text","`"],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$remote"],
+ ["text"," | "],
+ ["identifier","grep"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","E"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","o"],
+ ["text"," "],
+ ["string","\"https?://([^@]*@)?github.com/[^ ]*\\.git\""],
+ ["text","`; "],
+ ["keyword","then"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$repo"],
+ ["text"," | "],
+ ["identifier","sed"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s|^https?://||\""],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s/^.*github\\.com\\///\""],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s/\\.git$//\""]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","exit"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","fi"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["variable","repo="],
+ ["text","`"],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$remote"],
+ ["text"," | "],
+ ["identifier","grep"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","E"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","o"],
+ ["text"," "],
+ ["string","\"git://github.com/[^ ]*\\.git\""],
+ ["text","`; "],
+ ["keyword","then"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["variable","$repo"],
+ ["text"," | "],
+ ["identifier","sed"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s|^git://github.com/||\""],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","e"],
+ ["text"," "],
+ ["string","\"s/\\.git$//\""]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","exit"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","fi"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","done"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["text"," "],
+ ["variable.language","$?"],
+ ["text"," "],
+ ["keyword.operator","-"],
+ ["identifier","eq"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["paren.rparen","]"],
+ ["text","; "],
+ ["keyword","then"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["string","\"Couldn't find a valid remote\""],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["support.function","&2"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","exit"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","fi"]
+],[
+ "start",
+ ["paren.rparen","}"]
+],[
+ "start"
+],[
+ "start",
+ ["support.function.builtin","echo"],
+ ["text"," $"],
+ ["paren.lparen","{"],
+ ["text","#"],
+ ["identifier","x"],
+ ["paren.lparen","["],
+ ["text","@"],
+ ["paren.rparen","]}"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","if"],
+ ["text"," "],
+ ["variable","repo="],
+ ["text","`"],
+ ["identifier","get_repo"],
+ ["text"," $@`; "],
+ ["keyword","then"]
+],[
+ "start",
+ ["text"," "],
+ ["variable","branch="],
+ ["text","`"],
+ ["identifier","git"],
+ ["text"," "],
+ ["identifier","symbolic"],
+ ["keyword.operator","-"],
+ ["identifier","ref"],
+ ["text"," "],
+ ["identifier","HEAD"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["keyword.operator",">/"],
+ ["identifier","dev"],
+ ["keyword.operator","/"],
+ ["identifier","null"],
+ ["text","`"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","echo"],
+ ["text"," "],
+ ["string","\"http://github.com/"],
+ ["constant","$repo"],
+ ["string","/pull/new/${branch##refs/heads/}\""]
+],[
+ "start",
+ ["keyword","else"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function.builtin","exit"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["keyword","fi"]
+],[
+ "start"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_snippets.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_snippets.json
new file mode 100644
index 000000000..308683b77
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_snippets.json
@@ -0,0 +1,159 @@
+[[
+ "start",
+ ["comment","# Function"]
+],[
+ "start",
+ ["constant.language.escape","snippet"],
+ ["text"," fun"]
+],[
+ "sn-start",
+ ["text","\tfunction "],
+ ["markup.list","${"],
+ ["constant.numeric","1"],
+ ["text","?:function_name"],
+ ["markup.list","}"],
+ ["text","("],
+ ["markup.list","${"],
+ ["constant.numeric","2"],
+ ["punctuation.operator",":"],
+ ["text","argument"],
+ ["markup.list","}"],
+ ["text",") {"]
+],[
+ "sn-start",
+ ["text","\t\t"],
+ ["markup.list","${"],
+ ["constant.numeric","3"],
+ ["punctuation.operator",":"],
+ ["text","// body..."],
+ ["markup.list","}"]
+],[
+ "sn-start",
+ ["text","\t}"]
+],[
+ "start",
+ ["comment","# Anonymous Function"]
+],[
+ "start",
+ ["constant.language.escape","regex "],
+ ["keyword","/"],
+ ["text","((=)\\s*|(:)\\s*|(\\()|\\b)"],
+ ["keyword","/"],
+ ["text","f"],
+ ["keyword","/"],
+ ["text","(\\))?"],
+ ["keyword","/"]
+],[
+ "start",
+ ["constant.language.escape","name"],
+ ["text"," f"]
+],[
+ "sn-start",
+ ["text","\tfunction"],
+ ["markup.list","${"],
+ ["variable","M1"],
+ ["text","?: "],
+ ["markup.list","${"],
+ ["constant.numeric","1"],
+ ["punctuation.operator",":"],
+ ["text","functionName"],
+ ["markup.list","}}"],
+ ["text","("],
+ ["variable","$2"],
+ ["text",") {"]
+],[
+ "sn-start",
+ ["text","\t\t"],
+ ["markup.list","${"],
+ ["constant.numeric","0"],
+ ["punctuation.operator",":"],
+ ["keyword","$TM_SELECTED_TEXT"],
+ ["markup.list","}"]
+],[
+ "sn-start",
+ ["text","\t}"],
+ ["markup.list","${"],
+ ["variable","M2"],
+ ["text","?;"],
+ ["markup.list","}${"],
+ ["variable","M3"],
+ ["text","?,"],
+ ["markup.list","}${"],
+ ["variable","M4"],
+ ["text","?)"],
+ ["markup.list","}"]
+],[
+ "start",
+ ["comment","# Immediate function"]
+],[
+ "start",
+ ["constant.language.escape","trigger"],
+ ["text"," \\(?f\\("]
+],[
+ "start",
+ ["constant.language.escape","endTrigger"],
+ ["text"," \\)?"]
+],[
+ "start",
+ ["constant.language.escape","snippet"],
+ ["text"," f("]
+],[
+ "sn-start",
+ ["text","\t(function("],
+ ["markup.list","${"],
+ ["constant.numeric","1"],
+ ["markup.list","}"],
+ ["text",") {"]
+],[
+ "sn-start",
+ ["text","\t\t"],
+ ["markup.list","${"],
+ ["constant.numeric","0"],
+ ["punctuation.operator",":"],
+ ["markup.list","${"],
+ ["keyword","TM_SELECTED_TEXT"],
+ ["punctuation.operator",":"],
+ ["text","/* code */"],
+ ["markup.list","}}"]
+],[
+ "sn-start",
+ ["text","\t}("],
+ ["markup.list","${"],
+ ["constant.numeric","1"],
+ ["markup.list","}"],
+ ["text","));"]
+],[
+ "start",
+ ["comment","# if"]
+],[
+ "start",
+ ["constant.language.escape","snippet"],
+ ["text"," if"]
+],[
+ "sn-start",
+ ["text","\tif ("],
+ ["markup.list","${"],
+ ["constant.numeric","1"],
+ ["punctuation.operator",":"],
+ ["text","true"],
+ ["markup.list","}"],
+ ["text",") {"]
+],[
+ "sn-start",
+ ["text","\t\t"],
+ ["markup.list","${"],
+ ["constant.numeric","0"],
+ ["markup.list","}"]
+],[
+ "sn-start",
+ ["text","\t}"]
+],[
+ "sn-start",
+ ["text","\t"]
+],[
+ "sn-start",
+ ["text","\t"]
+],[
+ "sn-start",
+ ["text","\t"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sql.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sql.json
new file mode 100644
index 000000000..09a3ef996
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_sql.json
@@ -0,0 +1,54 @@
+[[
+ "start",
+ ["keyword","SELECT"],
+ ["text"," "],
+ ["identifier","city"],
+ ["text",", "],
+ ["support.function","COUNT"],
+ ["paren.lparen","("],
+ ["identifier","id"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword","AS"],
+ ["text"," "],
+ ["identifier","users_count"]
+],[
+ "start",
+ ["keyword","FROM"],
+ ["text"," "],
+ ["identifier","users"]
+],[
+ "start",
+ ["keyword","WHERE"],
+ ["text"," "],
+ ["identifier","group_name"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","'salesman'"]
+],[
+ "start",
+ ["keyword","AND"],
+ ["text"," "],
+ ["identifier","created"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["string","'2011-05-21'"]
+],[
+ "start",
+ ["keyword","GROUP"],
+ ["text"," "],
+ ["keyword","BY"],
+ ["text"," "],
+ ["constant.numeric","1"]
+],[
+ "start",
+ ["keyword","ORDER"],
+ ["text"," "],
+ ["keyword","BY"],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["text"," "],
+ ["keyword","DESC"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_stylus.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_stylus.json
new file mode 100644
index 000000000..f24993f7e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_stylus.json
@@ -0,0 +1,271 @@
+[[
+ "start",
+ ["comment","// I'm a comment!"]
+],[
+ "start"
+],[
+ "comment",
+ ["comment","/*"]
+],[
+ "comment",
+ ["comment"," * Adds the given numbers together."]
+],[
+ "start",
+ ["comment"," */"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "comment",
+ ["comment","/*!"]
+],[
+ "comment",
+ ["comment"," * Adds the given numbers together."]
+],[
+ "start",
+ ["comment"," */"]
+],[
+ "start"
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.function.stylus","asdasdasdad"],
+ ["text","("],
+ ["text","df, ad"],
+ ["keyword.operator.stylus","="],
+ ["constant.numeric","23"],
+ ["text",")"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.name.function.stylus","add"],
+ ["text","("],
+ ["entity.name.tag.stylus","a"],
+ ["text",", "],
+ ["entity.name.tag.stylus","b"],
+ ["text"," "],
+ ["keyword.operator.stylus","="],
+ ["text"," "],
+ ["entity.name.tag.stylus","a"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.tag.stylus","a"],
+ ["text"," "],
+ ["keyword.operator.stylus","+"],
+ ["text"," "],
+ ["entity.name.tag.stylus","b"]
+],[
+ "start",
+ ["entity.name.function.stylus","green"],
+ ["text","("],
+ ["constant.numeric","#0c0"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," add("],
+ ["constant.numeric","10"],
+ ["text",", "],
+ ["constant.numeric","5"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","// => 15"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," add("],
+ ["constant.numeric","10"],
+ ["text",")"]
+],[
+ "start",
+ ["text"," add("],
+ ["entity.name.tag.stylus","a"],
+ ["text",", "],
+ ["entity.name.tag.stylus","b"],
+ ["text",")"]
+],[
+ "start"
+],[
+ "start",
+ ["entity.language.stylus"," &"],
+ ["text","asdasd"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," ("],
+ ["variable.language.stylus","arguments"],
+ ["text",")"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.stylus","@sdfsdf"]
+],[
+ "start",
+ ["entity.other.attribute-name.class.stylus",".signatures"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","background-color"],
+ ["text"," "],
+ ["constant.numeric","#e0e8e0"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["keyword","px"],
+ ["text"," "],
+ ["support.constant","solid"],
+ ["text"," grayLighter"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","box-shadow"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["keyword","px"],
+ ["text"," grayLightest"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","border-radius"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["keyword","px"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","padding"],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["keyword","px"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["keyword","px"]
+],[
+ "start",
+ ["text"," "],
+ ["string","\"adsads\""]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","margin-left"],
+ ["text"," "],
+ ["constant.numeric","0"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","list-style"],
+ ["text"," "],
+ ["support.constant","none"]
+],[
+ "start",
+ ["entity.other.attribute-name.class.stylus",".signature"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","list-style"],
+ ["text"," "],
+ ["support.constant","none"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","display"],
+ ["text",": "],
+ ["support.constant","inline"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","margin-left"],
+ ["text"," "],
+ ["constant.numeric","0"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.stylus",">"],
+ ["text"," "],
+ ["entity.name.tag.stylus","li"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","display"],
+ ["text"," "],
+ ["support.constant","inline"]
+],[
+ "start",
+ ["keyword.operator.stylus","is"],
+ ["text"," "],
+ ["keyword.operator.stylus","not"]
+],[
+ "start",
+ ["entity.other.attribute-name.class.stylus",".signature-values"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","list-style"],
+ ["text"," "],
+ ["support.constant","none"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","display"],
+ ["text"," "],
+ ["support.constant","inline"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","margin-left"],
+ ["text"," "],
+ ["constant.numeric","0"]
+],[
+ "start",
+ ["entity.language.stylus"," &"],
+ ["punctuation",":"],
+ ["entity.other.attribute-name.pseudo-element.css","before"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","content"],
+ ["text"," "],
+ ["string","'→'"]
+],[
+ "start",
+ ["text"," "],
+ ["support.type","margin"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["constant.numeric","5"],
+ ["keyword","px"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.stylus",">"],
+ ["text"," "],
+ ["entity.name.tag.stylus","li"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.stylus","!important"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.control.stylus","unless"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_svg.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_svg.json
new file mode 100644
index 000000000..f92fbbb63
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_svg.json
@@ -0,0 +1,684 @@
+[[
+ "meta.tag.punctuation.begin0",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","svg"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","width"],
+ ["keyword.operator.separator","="],
+ ["string","\"800\""],
+ ["text"," "],
+ ["entity.other.attribute-name","height"],
+ ["keyword.operator.separator","="],
+ ["string","\"600\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","xmlns"],
+ ["keyword.operator.separator","="],
+ ["string","\"http://www.w3.org/2000/svg\""]
+],[
+ "start",
+ ["text"," "],
+ ["entity.other.attribute-name","onload"],
+ ["keyword.operator.separator","="],
+ ["string","\"StartAnimation(evt)\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Test Tube Progress Bar"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","desc"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","Created for the Web Directions SVG competition"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","desc"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.script","script"],
+ ["text"," "],
+ ["entity.other.attribute-name","type"],
+ ["keyword.operator.separator","="],
+ ["string","\"text/ecmascript\""],
+ ["meta.tag.punctuation.end",">"],
+ ["string.begin","<![CDATA["]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","timer_increment"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","max_time"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","100"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","hickory"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","dickory"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","dock"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","i"],
+ ["punctuation.operator",";"]
+],[
+ "js-start"
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","function"],
+ ["text"," "],
+ ["entity.name.function","StartAnimation"],
+ ["paren.lparen","("],
+ ["variable.parameter","evt"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","hickory"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","evt"],
+ ["punctuation.operator","."],
+ ["identifier","target"],
+ ["punctuation.operator","."],
+ ["identifier","ownerDocument"],
+ ["punctuation.operator","."],
+ ["support.function.dom","getElementById"],
+ ["paren.lparen","("],
+ ["string","\"hickory\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dickory"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","evt"],
+ ["punctuation.operator","."],
+ ["identifier","target"],
+ ["punctuation.operator","."],
+ ["identifier","ownerDocument"],
+ ["punctuation.operator","."],
+ ["support.function.dom","getElementById"],
+ ["paren.lparen","("],
+ ["string","\"dickory\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dock"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","evt"],
+ ["punctuation.operator","."],
+ ["identifier","target"],
+ ["punctuation.operator","."],
+ ["identifier","ownerDocument"],
+ ["punctuation.operator","."],
+ ["support.function.dom","getElementById"],
+ ["paren.lparen","("],
+ ["string","\"dock\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start"
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","ShowAndGrowElement"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","function"],
+ ["text"," "],
+ ["entity.name.function","ShowAndGrowElement"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["identifier","timer_increment"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["identifier","max_time"],
+ ["paren.rparen",")"]
+],[
+ "js-start",
+ ["text"," "],
+ ["keyword","return"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["comment","// Scale the text string gradually until it is 20 times larger"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","scalefactor"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","*"],
+ ["text"," "],
+ ["constant.numeric","650"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","/"],
+ ["text"," "],
+ ["identifier","max_time"],
+ ["punctuation.operator",";"]
+],[
+ "js-start"
+],[
+ "js-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["text"," "],
+ ["constant.numeric","30"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","hickory"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"display\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","hickory"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"transform\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"translate(\""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["constant.numeric","600"],
+ ["keyword.operator","+"],
+ ["identifier","scalefactor"],
+ ["keyword.operator","*"],
+ ["constant.numeric","3"],
+ ["keyword.operator","*"],
+ ["constant.numeric","-1"],
+ ["text"," "],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\", -144 )\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-no_regex"
+],[
+ "js-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","30"],
+ ["text"," "],
+ ["keyword.operator","&&"],
+ ["text"," "],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator","<"],
+ ["text"," "],
+ ["constant.numeric","66"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dickory"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"display\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dickory"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"transform\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"translate(\""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["constant.numeric","-795"],
+ ["keyword.operator","+"],
+ ["identifier","scalefactor"],
+ ["keyword.operator","*"],
+ ["constant.numeric","2"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\", 0 )\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["identifier","timevalue"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","66"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dock"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"display\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-start",
+ ["text"," "],
+ ["identifier","dock"],
+ ["punctuation.operator","."],
+ ["support.function.dom","setAttribute"],
+ ["paren.lparen","("],
+ ["string","\"transform\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["string","\"translate(\""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["constant.numeric","1450"],
+ ["keyword.operator","+"],
+ ["identifier","scalefactor"],
+ ["keyword.operator","*"],
+ ["constant.numeric","2"],
+ ["keyword.operator","*"],
+ ["constant.numeric","-1"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\", 144 )\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-no_regex"
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["comment","// Call ShowAndGrowElement again <timer_increment> milliseconds later."]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["identifier","setTimeout"],
+ ["paren.lparen","("],
+ ["string","\"ShowAndGrowElement()\""],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","timer_increment"],
+ ["paren.rparen",")"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["variable.language","window"],
+ ["punctuation.operator","."],
+ ["identifier","ShowAndGrowElement"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","ShowAndGrowElement"]
+],[
+ "start",
+ ["text"," "],
+ ["string.end","]]>"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","rect"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","fill"],
+ ["keyword.operator.separator","="],
+ ["string","\"#2e3436\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","fill-rule"],
+ ["keyword.operator.separator","="],
+ ["string","\"nonzero\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","stroke-width"],
+ ["keyword.operator.separator","="],
+ ["string","\"3\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","y"],
+ ["keyword.operator.separator","="],
+ ["string","\"0\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","x"],
+ ["keyword.operator.separator","="],
+ ["string","\"0\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","height"],
+ ["keyword.operator.separator","="],
+ ["string","\"600\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","width"],
+ ["keyword.operator.separator","="],
+ ["string","\"800\""]
+],[
+ "start",
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"rect3590\""],
+ ["meta.tag.punctuation.end","/>"]
+],[
+ "start"
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","text"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","style"],
+ ["keyword.operator.separator","="],
+ ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","x"],
+ ["keyword.operator.separator","="],
+ ["string","\"50\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","y"],
+ ["keyword.operator.separator","="],
+ ["string","\"350\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"hickory\""]
+],[
+ "start",
+ ["text"," "],
+ ["entity.other.attribute-name","display"],
+ ["keyword.operator.separator","="],
+ ["string","\"none\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," Hickory,"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","text"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","text"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","style"],
+ ["keyword.operator.separator","="],
+ ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","x"],
+ ["keyword.operator.separator","="],
+ ["string","\"50\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","y"],
+ ["keyword.operator.separator","="],
+ ["string","\"350\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"dickory\""]
+],[
+ "start",
+ ["text"," "],
+ ["entity.other.attribute-name","display"],
+ ["keyword.operator.separator","="],
+ ["string","\"none\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," dickory,"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","text"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","text"]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","style"],
+ ["keyword.operator.separator","="],
+ ["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","x"],
+ ["keyword.operator.separator","="],
+ ["string","\"50\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","y"],
+ ["keyword.operator.separator","="],
+ ["string","\"350\""]
+],[
+ "meta.tag.punctuation.begin0",
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"dock\""]
+],[
+ "start",
+ ["text"," "],
+ ["entity.other.attribute-name","display"],
+ ["keyword.operator.separator","="],
+ ["string","\"none\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," dock!"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","text"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","svg"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tcl.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tcl.json
new file mode 100644
index 000000000..6a032ddc4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tcl.json
@@ -0,0 +1,385 @@
+[[
+ "commandItem"
+],[
+ "commandItem",
+ ["keyword","proc"],
+ ["text"," "],
+ ["identifier","dijkstra"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["keyword","graph"],
+ ["text"," "],
+ ["identifier","origin"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","# Initialize"]
+],[
+ "commandItem",
+ ["text"," "],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","for"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["keyword","vertex"],
+ ["text"," "],
+ ["identifier","distmap"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["variable.instance","$graph"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","dist"],
+ ["text"," "],
+ ["variable.instance","$vertex"],
+ ["text"," "],
+ ["identifier","Inf"]
+],[
+ "commandItem",
+ ["text","\t"],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","path"],
+ ["text"," "],
+ ["variable.instance","$vertex"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","dist"],
+ ["text"," "],
+ ["variable.instance","$origin"],
+ ["text"," 0"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","path"],
+ ["text"," "],
+ ["variable.instance","$origin"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","list"],
+ ["text"," "],
+ ["variable.instance","$origin"],
+ ["paren.rparen","]"]
+],[
+ "commandItem",
+ ["text"," "]
+],[
+ "commandItem",
+ ["text"," "],
+ ["keyword","while"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","size"],
+ ["text"," "],
+ ["variable.instance","$graph"],
+ ["paren.rparen","]}"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","# Find unhandled node with least weight"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","set"],
+ ["text"," "],
+ ["identifier","d"],
+ ["text"," "],
+ ["identifier","Inf"]
+],[
+ "commandItem",
+ ["text","\t"],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","for"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["keyword","uu"],
+ ["text"," "],
+ ["support.function","-"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["variable.instance","$graph"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "commandItem",
+ ["text","\t "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["variable.instance","$d"],
+ ["text"," "],
+ ["support.function",">"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","set"],
+ ["text"," "],
+ ["identifier","dd"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","get"],
+ ["text"," "],
+ ["variable.instance","$dist"],
+ ["text"," "],
+ ["variable.instance","$uu"],
+ ["paren.rparen","]]}"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword","set"],
+ ["text"," "],
+ ["identifier","u"],
+ ["text"," "],
+ ["variable.instance","$uu"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword","set"],
+ ["text"," "],
+ ["identifier","d"],
+ ["text"," "],
+ ["variable.instance","$dd"]
+],[
+ "commandItem",
+ ["text","\t "],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text"," "]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","# No such node; graph must be disconnected"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["variable.instance","$d"],
+ ["text"," "],
+ ["support.function","=="],
+ ["text"," "],
+ ["identifier","Inf"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["identifier","break"]
+],[
+ "commandItem",
+ ["text"," "]
+],[
+ "commentfollow",
+ ["text","\t"],
+ ["comment","# Update the weights for nodes\\"]
+],[
+ "start",
+ ["comment","\t lead to by the node we've picked"]
+],[
+ "commandItem",
+ ["text","\t"],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","for"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["keyword","v"],
+ ["text"," "],
+ ["identifier","dd"],
+ ["paren.rparen","}"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","get"],
+ ["text"," "],
+ ["variable.instance","$graph"],
+ ["text"," "],
+ ["variable.instance","$u"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "commandItem",
+ ["text","\t "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["text","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","exists"],
+ ["text"," "],
+ ["variable.instance","$graph"],
+ ["text"," "],
+ ["variable.instance","$v"],
+ ["paren.rparen","]}"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword","set"],
+ ["text"," "],
+ ["identifier","alt"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","expr"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["variable.instance","$d"],
+ ["text"," "],
+ ["support.function","+"],
+ ["text"," "],
+ ["variable.instance","$dd"],
+ ["paren.rparen","}]"]
+],[
+ "commandItem",
+ ["text","\t\t"],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","{"],
+ ["variable.instance","$alt"],
+ ["text"," "],
+ ["support.function","<"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","get"],
+ ["text"," "],
+ ["variable.instance","$dist"],
+ ["text"," "],
+ ["variable.instance","$v"],
+ ["paren.rparen","]}"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t "],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","dist"],
+ ["text"," "],
+ ["variable.instance","$v"],
+ ["text"," "],
+ ["variable.instance","$alt"]
+],[
+ "start",
+ ["text","\t\t "],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","set"],
+ ["text"," "],
+ ["identifier","path"],
+ ["text"," "],
+ ["variable.instance","$v"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","list"],
+ ["text"," "],
+ ["support.function","{*}"],
+ ["paren.lparen","["],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","get"],
+ ["text"," "],
+ ["variable.instance","$path"],
+ ["text"," "],
+ ["variable.instance","$u"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["variable.instance","$v"],
+ ["paren.rparen","]"]
+],[
+ "commandItem",
+ ["text","\t\t"],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text","\t "],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "commandItem",
+ ["text"," "]
+],[
+ "start",
+ ["text","\t"],
+ ["comment","# Remove chosen node from graph still to be handled"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword","dict"],
+ ["text"," "],
+ ["identifier","unset"],
+ ["text"," "],
+ ["identifier","graph"],
+ ["text"," "],
+ ["variable.instance","$u"]
+],[
+ "commandItem",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["keyword","list"],
+ ["text"," "],
+ ["variable.instance","$dist"],
+ ["text"," "],
+ ["variable.instance","$path"],
+ ["paren.rparen","]"]
+],[
+ "commandItem",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tex.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tex.json
new file mode 100644
index 000000000..2d0236767
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_tex.json
@@ -0,0 +1,130 @@
+[[
+ "start",
+ ["text","The quadratic formula is $$-b "],
+ ["keyword","\\pm"],
+ ["text"," "],
+ ["keyword","\\sqrt"],
+ ["paren.keyword.operator","{"],
+ ["text","b^2 - 4ac"],
+ ["paren.keyword.operator","}"],
+ ["text"," "],
+ ["keyword","\\over"],
+ ["text"," 2a$$"]
+],[
+ "start",
+ ["keyword","\\bye"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","\\makeatletter"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\newcommand"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\be"],
+ ["paren.keyword.operator","}{"],
+ ["comment","%"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\begingroup"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","% \\setlength{\\arraycolsep}{2pt}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\eqnarray"],
+ ["comment","%"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\@"],
+ ["text","ifstar"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\nonumber"],
+ ["paren.keyword.operator","}{}"],
+ ["comment","%"]
+],[
+ "start",
+ ["text"," "],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\newcommand"],
+ ["paren.keyword.operator","{"],
+ ["keyword","\\ee"],
+ ["paren.keyword.operator","}{"],
+ ["keyword","\\endeqnarray\\endgroup"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\makeatother"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\begin"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","equation"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," x="],
+ ["keyword","\\left\\"],
+ ["paren.keyword.operator","{"],
+ ["text"," "],
+ ["keyword","\\begin"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","array"],
+ ["paren.keyword.operator","}{"],
+ ["text","cl"],
+ ["paren.keyword.operator","}"]
+],[
+ "start",
+ ["text"," 0 & "],
+ ["keyword","\\textrm"],
+ ["paren.keyword.operator","{"],
+ ["text","if "],
+ ["paren.keyword.operator","}"],
+ ["text","A="],
+ ["keyword","\\ldots\\\\"]
+],[
+ "start",
+ ["text"," 1 & "],
+ ["keyword","\\textrm"],
+ ["paren.keyword.operator","{"],
+ ["text","if "],
+ ["paren.keyword.operator","}"],
+ ["text","B="],
+ ["keyword","\\ldots\\\\"]
+],[
+ "start",
+ ["text"," x & "],
+ ["keyword","\\textrm"],
+ ["paren.keyword.operator","{"],
+ ["text","this runs with as much text as you like, but without an raggeright text"]
+],[
+ "start",
+ ["text","."],
+ ["paren.keyword.operator","}"],
+ ["keyword","\\end"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","array"],
+ ["paren.keyword.operator","}"],
+ ["keyword","\\right"],
+ ["text","."]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","\\end"],
+ ["paren.keyword.operator","{"],
+ ["nospell.text","equation"],
+ ["paren.keyword.operator","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_text.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_text.json
new file mode 100644
index 000000000..fff7ef422
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_text.json
@@ -0,0 +1,29 @@
+[[
+ "start",
+ ["text","Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat."]
+],[
+ "start"
+],[
+ "start",
+ ["text","Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis."]
+],[
+ "start"
+],[
+ "start",
+ ["text","At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, At accusam aliquyam diam diam dolore dolores duo eirmod eos erat, et nonumy sed tempor et et invidunt justo labore Stet clita ea et gubergren, kasd magna no rebum. sanctus sea sed takimata ut vero voluptua. est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_textile.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_textile.json
new file mode 100644
index 000000000..59000ce36
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_textile.json
@@ -0,0 +1,113 @@
+[[
+ "start",
+ ["markup.heading.1","h1"],
+ ["keyword",". "],
+ ["text","Textile document"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading.2","h2"],
+ ["keyword",". "],
+ ["text","Heading Two"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading.3","h3"],
+ ["keyword",". "],
+ ["text","A two-line"]
+],[
+ "start",
+ ["text"," header"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading.2","h2"],
+ ["keyword",". "],
+ ["text","Another two-line"]
+],[
+ "start",
+ ["text","header"]
+],[
+ "start"
+],[
+ "start",
+ ["text","Paragraph:"]
+],[
+ "start",
+ ["text","one, two,"]
+],[
+ "start",
+ ["text","thee lines!"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading","p"],
+ ["keyword","("],
+ ["string","classone"],
+ ["text"," "],
+ ["string","two"],
+ ["text"," "],
+ ["string","three"],
+ ["keyword","). "],
+ ["text","This is a paragraph with classes"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading","p"],
+ ["keyword","(#"],
+ ["string","id"],
+ ["keyword","). "],
+ ["text","(one with an id)"]
+],[
+ "start"
+],[
+ "start",
+ ["markup.heading","p"],
+ ["keyword","("],
+ ["string","one"],
+ ["text"," "],
+ ["string","two"],
+ ["text"," "],
+ ["string","three"],
+ ["keyword","#"],
+ ["string","my_id"],
+ ["keyword","). "],
+ ["text","..classes + id"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","*"],
+ ["text"," Unordered list"]
+],[
+ "start",
+ ["keyword","**"],
+ ["text"," sublist"]
+],[
+ "start",
+ ["keyword","*"],
+ ["text"," back again!"]
+],[
+ "start",
+ ["keyword","**"],
+ ["text"," sublist again.."]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#"],
+ ["text"," ordered"]
+],[
+ "start"
+],[
+ "start",
+ ["text","bg. Blockquote!"]
+],[
+ "start",
+ ["text"," This is a two-list blockquote..!"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_toml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_toml.json
new file mode 100644
index 000000000..ec471f745
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_toml.json
@@ -0,0 +1,131 @@
+[[
+ "start",
+ ["comment.toml","# This is a TOML document. Boom."]
+],[
+ "start"
+],[
+ "start",
+ ["identifier","title"],
+ ["text"," = "],
+ ["string","\"TOML Example\""]
+],[
+ "start"
+],[
+ "start",
+ ["variable.keygroup.toml","[owner]"]
+],[
+ "start",
+ ["identifier","name"],
+ ["text"," = "],
+ ["string","\"Tom Preston-Werner\""]
+],[
+ "start",
+ ["identifier","organization"],
+ ["text"," = "],
+ ["string","\"GitHub\""]
+],[
+ "start",
+ ["identifier","bio"],
+ ["text"," = "],
+ ["string","\"GitHub Cofounder & CEO"],
+ ["constant.language.escape","\\n"],
+ ["string","Likes tater tots and beer.\""]
+],[
+ "start",
+ ["identifier","dob"],
+ ["text"," = "],
+ ["support.date.toml","1979-05-27T07:32:00Z"],
+ ["text"," "],
+ ["comment.toml","# First class dates? Why not?"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.keygroup.toml","[database]"]
+],[
+ "start",
+ ["identifier","server"],
+ ["text"," = "],
+ ["string","\"192.168.1.1\""]
+],[
+ "start",
+ ["identifier","ports"],
+ ["text"," = [ "],
+ ["constant.numeric.toml","8001"],
+ ["text",", "],
+ ["constant.numeric.toml","8001"],
+ ["text",", "],
+ ["constant.numeric.toml","8002"],
+ ["text"," ]"]
+],[
+ "start",
+ ["identifier","connection_max"],
+ ["text"," = "],
+ ["constant.numeric.toml","5000"]
+],[
+ "start",
+ ["identifier","enabled"],
+ ["text"," = "],
+ ["constant.language.boolean","true"]
+],[
+ "start"
+],[
+ "start",
+ ["variable.keygroup.toml","[servers]"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment.toml","# You can indent as you please. Tabs or spaces. TOML don't care."]
+],[
+ "start",
+ ["variable.keygroup.toml"," [servers.alpha]"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ip"],
+ ["text"," = "],
+ ["string","\"10.0.0.1\""]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","dc"],
+ ["text"," = "],
+ ["string","\"eqdc10\""]
+],[
+ "start"
+],[
+ "start",
+ ["variable.keygroup.toml"," [servers.beta]"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","ip"],
+ ["text"," = "],
+ ["string","\"10.0.0.2\""]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","dc"],
+ ["text"," = "],
+ ["string","\"eqdc10\""]
+],[
+ "start"
+],[
+ "start",
+ ["variable.keygroup.toml","[clients]"]
+],[
+ "start",
+ ["identifier","data"],
+ ["text"," = [ ["],
+ ["string","\"gamma\""],
+ ["text",", "],
+ ["string","\"delta\""],
+ ["text","], ["],
+ ["constant.numeric.toml","1"],
+ ["text",", "],
+ ["constant.numeric.toml","2"],
+ ["text","] ] "],
+ ["comment.toml","# just an update to make sure parsers support it"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_twig.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_twig.json
new file mode 100644
index 000000000..c4101ded3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_twig.json
@@ -0,0 +1,288 @@
+[[
+ "start",
+ ["punctuation.doctype.begin","<!"],
+ ["meta.tag.doctype","DOCTYPE"],
+ ["text"," "],
+ ["xml-pe","html"],
+ ["punctuation.doctype.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","My Webpage"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","title"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","head"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","ul"],
+ ["text"," "],
+ ["entity.other.attribute-name","id"],
+ ["keyword.operator.separator","="],
+ ["string","\"navigation\""],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","for"],
+ ["text"," "],
+ ["identifier","item"],
+ ["text"," "],
+ ["keyword.operator.twig","in"],
+ ["text"," "],
+ ["identifier","navigation"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.anchor","a"],
+ ["text"," "],
+ ["entity.other.attribute-name","href"],
+ ["keyword.operator.separator","="],
+ ["string","\""],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","item"],
+ ["punctuation.operator","."],
+ ["identifier","href"],
+ ["keyword.operator.other","|"],
+ ["support.function.twig","escape"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"],
+ ["string","\""],
+ ["meta.tag.punctuation.end",">"],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","item"],
+ ["punctuation.operator","."],
+ ["identifier","caption"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.anchor","a"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","endfor"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","if"],
+ ["text"," "],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["keyword.operator.twig","not"],
+ ["text"," "],
+ ["keyword.operator.twig","in"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["comment.block.twig","{# is equivalent to #}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","if"],
+ ["text"," "],
+ ["keyword.operator.twig","not"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["constant.numeric","1"],
+ ["text"," "],
+ ["keyword.operator.twig","in"],
+ ["text"," "],
+ ["paren.lparen","["],
+ ["constant.numeric","1"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["constant.numeric","2"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["constant.numeric","3"],
+ ["paren.rparen","])"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","autoescape"],
+ ["text"," "],
+ ["constant.language.boolean","true"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","var"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","var"],
+ ["keyword.operator.other","|"],
+ ["support.function.twig","raw"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"],
+ ["text"," "],
+ ["comment.block.twig","{# var won't be escaped #}"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","var"],
+ ["keyword.operator.other","|"],
+ ["support.function.twig","escape"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"],
+ ["text"," "],
+ ["comment.block.twig","{# var won't be doubled-escaped #}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.twig","{%"],
+ ["text"," "],
+ ["keyword.control.twig","endautoescape"],
+ ["text"," "],
+ ["meta.tag.twig","%}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["keyword.control.twig","include"],
+ ["paren.lparen","("],
+ ["string","'twig.html'"],
+ ["punctuation.operator",","],
+ ["text"," "],
+ ["identifier","sandboxed"],
+ ["text"," "],
+ ["keyword.operator.assignment","="],
+ ["text"," "],
+ ["constant.language.boolean","true"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["string","\"string "],
+ ["constant.language.escape","#{with}"],
+ ["string"," "],
+ ["constant.language.escape","\\\""],
+ ["string"," escapes\""],
+ ["text"," "],
+ ["string","'another#one'"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","My Webpage"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","h1"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","{{"],
+ ["text"," "],
+ ["identifier","a_variable"],
+ ["text"," "],
+ ["variable.other.readwrite.local.twig","}}"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","body"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","html"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_typescript.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_typescript.json
new file mode 100644
index 000000000..18f2eea64
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_typescript.json
@@ -0,0 +1,559 @@
+[[
+ "start",
+ ["keyword.operator.ts","class"],
+ ["text"," "],
+ ["identifier","Greeter"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t"],
+ ["variable.parameter.function.ts","greeting"],
+ ["text",": "],
+ ["variable.parameter.function.ts","string"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text","\t"],
+ ["keyword.operator.ts","constructor"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter.function.ts","message"],
+ ["text",": "],
+ ["variable.parameter.function.ts","string"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["storage.type.variable.ts","this."],
+ ["identifier","greeting"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","message"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text","\t"],
+ ["identifier","greet"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text","\t\t"],
+ ["keyword","return"],
+ ["text"," "],
+ ["string","\"Hello, \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","greeting"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["paren.rparen","}"],
+ ["text"," "]
+],[
+ "no_regex"
+],[
+ "start",
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","greeter"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["keyword","new"],
+ ["text"," "],
+ ["identifier","Greeter"],
+ ["paren.lparen","("],
+ ["string","\"world\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "no_regex",
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","button"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["variable.language","document"],
+ ["punctuation.operator","."],
+ ["support.function.dom","createElement"],
+ ["paren.lparen","("],
+ ["string","'button'"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["identifier","button"],
+ ["punctuation.operator","."],
+ ["identifier","innerText"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"Say Hello\""]
+],[
+ "start",
+ ["storage.type","button"],
+ ["punctuation.operator","."],
+ ["entity.name.function","onclick"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["storage.type","function"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "no_regex",
+ ["text","\t"],
+ ["support.function","alert"],
+ ["paren.lparen","("],
+ ["entity.name.function.ts","greeter.greet"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["paren.rparen",")"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "no_regex",
+ ["variable.language","document"],
+ ["punctuation.operator","."],
+ ["identifier","body"],
+ ["punctuation.operator","."],
+ ["support.function.dom","appendChild"],
+ ["paren.lparen","("],
+ ["identifier","button"],
+ ["paren.rparen",")"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Snake"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","Animal"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function.ts","move"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","alert"],
+ ["paren.lparen","("],
+ ["string","\"Slithering...\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","super"],
+ ["text","("],
+ ["keyword.other.ts","5"],
+ ["text",")"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["keyword","class"],
+ ["text"," "],
+ ["identifier","Horse"],
+ ["text"," "],
+ ["keyword","extends"],
+ ["text"," "],
+ ["identifier","Animal"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["entity.name.function.ts","move"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["support.function","alert"],
+ ["paren.lparen","("],
+ ["string","\"Galloping...\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","super"],
+ ["punctuation.operator","."],
+ ["identifier","move"],
+ ["paren.lparen","("],
+ ["constant.numeric","45"],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["identifier","module"],
+ ["text"," "],
+ ["identifier","Sayings"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","export"],
+ ["text"," "],
+ ["keyword.operator.ts","class"],
+ ["text"," "],
+ ["identifier","Greeter"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["variable.parameter.function.ts","greeting"],
+ ["text",": "],
+ ["variable.parameter.function.ts","string"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","constructor"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["variable.parameter.function.ts","message"],
+ ["text",": "],
+ ["variable.parameter.function.ts","string"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","greeting"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","message"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","greet"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["string","\"Hello, \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","greeting"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["identifier","module"],
+ ["text"," "],
+ ["identifier","Mankala"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","export"],
+ ["text"," "],
+ ["keyword.operator.ts","class"],
+ ["text"," "],
+ ["identifier","Features"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","public"],
+ ["text"," "],
+ ["identifier","turnContinues"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.language.boolean","false"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","public"],
+ ["text"," "],
+ ["identifier","seedStoredCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","public"],
+ ["text"," "],
+ ["identifier","capturedCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","public"],
+ ["text"," "],
+ ["identifier","spaceCaptured"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","NoSpace"],
+ ["punctuation.operator",";"]
+],[
+ "start"
+],[
+ "start",
+ ["text"," "],
+ ["keyword.operator.ts","public"],
+ ["text"," "],
+ ["entity.name.function.ts","clear"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","turnContinues"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.language.boolean","false"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","seedStoredCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","capturedCount"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","spaceCaptured"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["identifier","NoSpace"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex"
+],[
+ "start",
+ ["text"," "],
+ ["keyword","public"],
+ ["text"," "],
+ ["identifier","toString"],
+ ["paren.lparen","("],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","stringBuilder"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["string","\"\""],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["storage.type.variable.ts","this."],
+ ["identifier","turnContinues"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","stringBuilder"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["string","\" turn continues,\""],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","stringBuilder"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["string","\" stores \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","seedStoredCount"],
+ ["punctuation.operator",";"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","if"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["storage.type.variable.ts","this."],
+ ["identifier","capturedCount"],
+ ["text"," "],
+ ["keyword.operator",">"],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","stringBuilder"],
+ ["text"," "],
+ ["keyword.operator","+="],
+ ["text"," "],
+ ["string","\" captures \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","capturedCount"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\" from space \""],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["storage.type.variable.ts","this."],
+ ["identifier","spaceCaptured"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","return"],
+ ["text"," "],
+ ["identifier","stringBuilder"],
+ ["punctuation.operator",";"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "no_regex",
+ ["paren.rparen","}"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_vbscript.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_vbscript.json
new file mode 100644
index 000000000..6a2346d31
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_vbscript.json
@@ -0,0 +1,249 @@
+[[
+ "start",
+ ["text","myfilename "],
+ ["keyword.operator.asp","="],
+ ["text"," "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","C:\\Wikipedia - VBScript - Example - Hello World.txt\""]
+],[
+ "start"
+],[
+ "start",
+ ["text","MakeHelloWorldFile myfilename"]
+],[
+ "start"
+],[
+ "state_4",
+ ["meta.leading-space"," "]
+],[
+ "state_4"
+],[
+ "start",
+ ["storage.type.function.asp","Sub"],
+ ["text"," "],
+ ["entity.name.function.asp","MakeHelloWorldFile"],
+ ["text"," "],
+ ["punctuation.definition.parameters.asp","("],
+ ["variable.parameter.function.asp","FileName"],
+ ["punctuation.definition.parameters.asp",")"]
+],[
+ "start"
+],[
+ "start",
+ ["punctuation.definition.comment.asp","'"],
+ ["comment.line.apostrophe.asp","Create a new file in C: drive or overwrite existing file"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["storage.type.asp","Set"],
+ ["text"," FSO "],
+ ["keyword.operator.asp","="],
+ ["text"," "],
+ ["support.function.asp","CreateObject"],
+ ["text","("],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","Scripting.FileSystemObject\""],
+ ["text",")"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["keyword.control.asp","If"],
+ ["text"," FSO."],
+ ["entity.name.function.asp","FileExists"],
+ ["text","(FileName) "],
+ ["keyword.control.asp","Then"],
+ ["text"," "]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["text","Answer "],
+ ["keyword.operator.asp","="],
+ ["text"," "],
+ ["support.function.vb.asp","MsgBox"],
+ ["text"," ("],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","File \""],
+ ["text"," "],
+ ["keyword.operator.asp","&"],
+ ["text"," FileName "],
+ ["keyword.operator.asp","&"],
+ ["text"," "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp"," exists ... OK to overwrite?\""],
+ ["text",", vbOKCancel)"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["punctuation.definition.comment.asp","'"],
+ ["comment.line.apostrophe.asp","If button selected is not OK, then quit now"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["punctuation.definition.comment.asp","'"],
+ ["comment.line.apostrophe.asp","vbOK is a language constant"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["keyword.control.asp","If"],
+ ["text"," Answer "],
+ ["keyword.operator.asp","<>"],
+ ["text"," vbOK "],
+ ["keyword.control.asp","Then"],
+ ["text"," "],
+ ["keyword.control.asp","Exit Sub"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["keyword.control.asp","Else"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["punctuation.definition.comment.asp","'"],
+ ["comment.line.apostrophe.asp","Confirm OK to create"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["text","Answer "],
+ ["keyword.operator.asp","="],
+ ["text"," "],
+ ["support.function.vb.asp","MsgBox"],
+ ["text"," ("],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","File \""],
+ ["text"," "],
+ ["keyword.operator.asp","&"],
+ ["text"," FileName "],
+ ["keyword.operator.asp","&"],
+ ["text"," "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp"," ... OK to create?\""],
+ ["text",", vbOKCancel)"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.even-tab.spaces"," "],
+ ["meta.odd-tab.spaces"," "],
+ ["keyword.control.asp","If"],
+ ["text"," Answer "],
+ ["keyword.operator.asp","<>"],
+ ["text"," vbOK "],
+ ["keyword.control.asp","Then"],
+ ["text"," "],
+ ["keyword.control.asp","Exit Sub"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["keyword.control.asp","End If"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["punctuation.definition.comment.asp","'"],
+ ["comment.line.apostrophe.asp","Create new file (or replace an existing file)"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["storage.type.asp","Set"],
+ ["text"," FileObject "],
+ ["keyword.operator.asp","="],
+ ["text"," FSO.CreateTextFile (FileName)"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["text","FileObject.WriteLine "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","Time ... \""],
+ ["text"," "],
+ ["keyword.operator.asp","&"],
+ ["text"," "],
+ ["support.function.vb.asp","Now"],
+ ["text","()"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["text","FileObject.WriteLine "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","Hello World\""]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["text","FileObject."],
+ ["entity.name.function.asp","Close"],
+ ["text","()"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.odd-tab.spaces"," "],
+ ["meta.leading-space"," "],
+ ["support.function.vb.asp","MsgBox"],
+ ["text"," "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp","File \""],
+ ["text"," "],
+ ["keyword.operator.asp","&"],
+ ["text"," FileName "],
+ ["keyword.operator.asp","&"],
+ ["text"," "],
+ ["punctuation.definition.string.begin.asp","\""],
+ ["string.quoted.double.asp"," ... updated.\""]
+],[
+ "start"
+],[
+ "start",
+ ["support.function.asp","End"],
+ ["text"," "],
+ ["storage.type.asp","Sub"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_velocity.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_velocity.json
new file mode 100644
index 000000000..3eb7a9ab4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_velocity.json
@@ -0,0 +1,281 @@
+[[
+ "vm_comment",
+ ["comment.block","#*"]
+],[
+ "vm_comment",
+ ["comment"," This is a sample comment block that"]
+],[
+ "vm_comment",
+ ["comment"," spans multiple lines."]
+],[
+ "start",
+ ["comment","*#"]
+],[
+ "start"
+],[
+ "start",
+ ["keyword","#macro"],
+ ["text"," "],
+ ["lparen","("],
+ ["text"," "],
+ ["identifier","outputItem"],
+ ["text"," "],
+ ["variable","$item"],
+ ["text"," "],
+ ["rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"],
+ ["variable","${"],
+ ["identifier","item"],
+ ["variable","}"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","li"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["keyword","#end"]
+],[
+ "start"
+],[
+ "start",
+ ["comment","## Define the items to iterate"]
+],[
+ "start",
+ ["keyword","#set"],
+ ["text"," "],
+ ["lparen","("],
+ ["text"," "],
+ ["variable","$items"],
+ ["text"," "],
+ ["keyword.operator","="],
+ ["text"," "],
+ ["lparen","["],
+ ["constant.numeric","1"],
+ ["text",", "],
+ ["constant.numeric","2"],
+ ["text",", "],
+ ["constant.numeric","3"],
+ ["text",", "],
+ ["constant.numeric","4"],
+ ["rparen","]"],
+ ["text"," "],
+ ["rparen",")"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text"," "],
+ ["comment","## Iterate over the items and output the evens."]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#foreach"],
+ ["text"," "],
+ ["lparen","("],
+ ["text"," "],
+ ["variable","$item"],
+ ["text"," "],
+ ["identifier","in"],
+ ["text"," "],
+ ["variable","$items"],
+ ["text"," "],
+ ["rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#if"],
+ ["text"," "],
+ ["lparen","("],
+ ["text"," "],
+ ["support.function","$_MathTool"],
+ ["text","."],
+ ["identifier","mod"],
+ ["lparen","("],
+ ["variable","$item"],
+ ["text",", "],
+ ["constant.numeric","2"],
+ ["rparen",")"],
+ ["text"," "],
+ ["keyword.operator","=="],
+ ["text"," "],
+ ["constant.numeric","0"],
+ ["text"," "],
+ ["rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["identifier","#outputItem"],
+ ["text"," "],
+ ["lparen","("],
+ ["variable","$item"],
+ ["rparen",")"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#end"]
+],[
+ "start",
+ ["text"," "],
+ ["keyword","#end"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","ul"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "js-start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "js-comment_regex_allowed",
+ ["text"," "],
+ ["comment","/*"]
+],[
+ "js-comment_regex_allowed",
+ ["comment"," A sample function to decomstrate"]
+],[
+ "js-comment_regex_allowed",
+ ["comment"," JavaScript highlighting and folding."]
+],[
+ "js-start",
+ ["comment"," */"]
+],[
+ "js-start",
+ ["text"," "],
+ ["storage.type","function"],
+ ["text"," "],
+ ["entity.name.function","foo"],
+ ["paren.lparen","("],
+ ["variable.parameter","items"],
+ ["punctuation.operator",", "],
+ ["variable.parameter","nada"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["keyword","for"],
+ ["text"," "],
+ ["paren.lparen","("],
+ ["storage.type","var"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","="],
+ ["constant.numeric","0"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","<"],
+ ["identifier","items"],
+ ["punctuation.operator","."],
+ ["support.constant","length"],
+ ["punctuation.operator",";"],
+ ["text"," "],
+ ["identifier","i"],
+ ["keyword.operator","++"],
+ ["paren.rparen",")"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ "js-start",
+ ["text"," "],
+ ["support.function","alert"],
+ ["paren.lparen","("],
+ ["identifier","items"],
+ ["paren.lparen","["],
+ ["identifier","i"],
+ ["paren.rparen","]"],
+ ["text"," "],
+ ["keyword.operator","+"],
+ ["text"," "],
+ ["string","\"juhu"],
+ ["constant.language.escape","\\n"],
+ ["string","\""],
+ ["paren.rparen",")"],
+ ["punctuation.operator",";"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "js-no_regex",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.script","script"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start"
+],[
+ "css-start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name.style","style"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ ["css-comment","css-start"],
+ ["text"," "],
+ ["comment","/*"]
+],[
+ ["css-comment","css-start"],
+ ["comment"," A sample style to decomstrate"]
+],[
+ ["css-comment","css-start"],
+ ["comment"," CSS highlighting and folding."]
+],[
+ "css-start",
+ ["comment"," */"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["variable",".class"],
+ ["text"," "],
+ ["paren.lparen","{"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["support.type","font-family"],
+ ["text",": Monaco, "],
+ ["string","\"Courier New\""],
+ ["text",", "],
+ ["support.constant.fonts","monospace"],
+ ["text",";"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["support.type","font-size"],
+ ["text",": "],
+ ["constant.numeric","12"],
+ ["keyword","px"],
+ ["text",";"]
+],[
+ ["css-ruleset","css-start"],
+ ["text"," "],
+ ["support.type","cursor"],
+ ["text",": "],
+ ["support.constant","text"],
+ ["text",";"]
+],[
+ "css-start",
+ ["text"," "],
+ ["paren.rparen","}"]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name.style","style"],
+ ["meta.tag.punctuation.end",">"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xml.json
new file mode 100644
index 000000000..70f730932
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xml.json
@@ -0,0 +1,43 @@
+[[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","Juhu"],
+ ["meta.tag.punctuation.end",">"],
+ ["text","//Juhu Kinners"],
+ ["meta.tag.punctuation.begin","</"],
+ ["meta.tag.name","Kinners"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","test: two tags in the same lines should be in separate tokens\""]
+],[
+ "start",
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","Juhu"],
+ ["meta.tag.punctuation.end",">"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","Kinners"],
+ ["meta.tag.punctuation.end",">"]
+],[
+ "start",
+ ["text","test: multiline attributes\""]
+],[
+ ["qqstring_inner","meta.tag.punctuation.begin"],
+ ["meta.tag.punctuation.begin","<"],
+ ["meta.tag.name","copy"],
+ ["text"," "],
+ ["entity.other.attribute-name","set"],
+ ["keyword.operator.separator","="],
+ ["string","\"{"]
+],[
+ ["qqstring_inner","meta.tag.punctuation.begin"],
+ ["string","}\""],
+ ["text"," "],
+ ["entity.other.attribute-name","undo"],
+ ["keyword.operator.separator","="],
+ ["string","\"{"]
+],[
+ "start",
+ ["string","}\""],
+ ["meta.tag.punctuation.end","/>"]
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xquery.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xquery.json
new file mode 100644
index 000000000..aaf9ab9ba
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_xquery.json
@@ -0,0 +1,44 @@
+[[
+ "[\"start\"]",
+ ["keyword","xquery"],
+ ["text"," "],
+ ["keyword","version"],
+ ["text"," "],
+ ["string","\""],
+ ["string","1.0"],
+ ["string","\""],
+ ["text",";"]
+],[
+ "[\"start\"]"
+],[
+ "[\"start\"]",
+ ["keyword","let"],
+ ["text"," "],
+ ["variable","$message"],
+ ["text"," "],
+ ["keyword.operator",":="],
+ ["text"," "],
+ ["string","\""],
+ ["string","Hello World!"],
+ ["string","\""]
+],[
+ "[\"start\",\"StartTag\",\"TagContent\"]",
+ ["keyword","return"],
+ ["text"," "],
+ ["meta.tag","<results"],
+ ["meta.tag",">"]
+],[
+ "[\"start\",\"StartTag\",\"TagContent\"]",
+ ["text"," "],
+ ["meta.tag","<message"],
+ ["meta.tag",">"],
+ ["text","{"],
+ ["variable","$message"],
+ ["text","}"],
+ ["meta.tag","</message>"]
+],[
+ "[\"start\"]",
+ ["meta.tag","</results>"]
+],[
+ "[\"start\"]"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/_test/tokens_yaml.json b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_yaml.json
new file mode 100644
index 000000000..7c9b45f34
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/_test/tokens_yaml.json
@@ -0,0 +1,150 @@
+[[
+ "start",
+ ["comment","# This sample document was taken from wikipedia:"]
+],[
+ "start",
+ ["comment","# http://en.wikipedia.org/wiki/YAML#Sample_document"]
+],[
+ "start",
+ ["list.markup","---"]
+],[
+ "start",
+ ["meta.tag","receipt"],
+ ["keyword",": "],
+ ["text","Oz-Ware Purchase Invoice"]
+],[
+ "start",
+ ["meta.tag","date"],
+ ["keyword",": "],
+ ["constant.numeric","2007-08-06"]
+],[
+ "start",
+ ["meta.tag","customer"],
+ ["keyword",":"]
+],[
+ "start",
+ ["meta.tag"," given"],
+ ["keyword",": "],
+ ["text","Dorothy"]
+],[
+ "start",
+ ["meta.tag"," family"],
+ ["keyword",": "],
+ ["text","Gale"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag","items"],
+ ["keyword",":"]
+],[
+ "start",
+ ["list.markup"," - "],
+ ["meta.tag","part_no"],
+ ["keyword",": "],
+ ["string","'A4786'"]
+],[
+ "start",
+ ["meta.tag"," descrip"],
+ ["keyword",": "],
+ ["text","Water Bucket "],
+ ["paren.lparen","("],
+ ["text","Filled"],
+ ["paren.rparen",")"]
+],[
+ "start",
+ ["meta.tag"," price"],
+ ["keyword",": "],
+ ["constant.numeric","1.47"]
+],[
+ "start",
+ ["meta.tag"," quantity"],
+ ["keyword",": "],
+ ["constant.numeric","4"]
+],[
+ "start"
+],[
+ "start",
+ ["list.markup"," - "],
+ ["meta.tag","part_no"],
+ ["keyword",": "],
+ ["string","'E1628'"]
+],[
+ "start",
+ ["meta.tag"," descrip"],
+ ["keyword",": "],
+ ["text","High Heeled "],
+ ["string","\"Ruby\""],
+ ["text"," Slippers"]
+],[
+ "start",
+ ["meta.tag"," size"],
+ ["keyword",": "],
+ ["constant.numeric","8"]
+],[
+ "start",
+ ["meta.tag"," price"],
+ ["keyword",": "],
+ ["constant.numeric","100.27"]
+],[
+ "start",
+ ["meta.tag"," quantity"],
+ ["keyword",": "],
+ ["constant.numeric","1"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag","bill-to"],
+ ["keyword",": "],
+ ["constant.language","&id001"]
+],[
+ "qqstring",
+ ["meta.tag"," street"],
+ ["keyword",": "],
+ ["string","|"]
+],[
+ "qqstring",
+ ["string"," 123 Tornado Alley"]
+],[
+ "qqstring",
+ ["string"," Suite 16"]
+],[
+ "start",
+ ["meta.tag"," city"],
+ ["keyword",": "],
+ ["text","East Centerville"]
+],[
+ "start",
+ ["meta.tag"," state"],
+ ["keyword",": "],
+ ["text","KS"]
+],[
+ "start"
+],[
+ "start",
+ ["meta.tag","ship-to"],
+ ["keyword",": "],
+ ["constant.language","*id001"]
+],[
+ "start"
+],[
+ "qqstring",
+ ["meta.tag","specialDelivery"],
+ ["keyword",": "],
+ ["string",">"]
+],[
+ "qqstring",
+ ["string"," Follow the Yellow Brick"]
+],[
+ "qqstring",
+ ["string"," Road to the Emerald City."]
+],[
+ "qqstring",
+ ["string"," Pay no attention to the"]
+],[
+ "qqstring",
+ ["string"," man behind the curtain."]
+],[
+ "qqstring"
+]] \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/abap.js b/src/fauxton/assets/js/libs/ace/mode/abap.js
new file mode 100644
index 000000000..6ec54c072
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/abap.js
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Rules = require("./abap_highlight_rules").AbapHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.HighlightRules = Rules;
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/abap_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/abap_highlight_rules.js
new file mode 100644
index 000000000..6b232c90e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/abap_highlight_rules.js
@@ -0,0 +1,134 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * based on
+ * " Vim ABAP syntax file
+ * " Language: SAP - ABAP/R4
+ * " Revision: 2.1
+ * " Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
+ * " Last Change: 2012 Oct 23
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AbapHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword":
+ "ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK" +
+ " CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY" +
+ " DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO" +
+ " ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT" +
+ " FETCH FIELDS FORM FORMAT FREE FROM FUNCTION" +
+ " GENERATE GET" +
+ " HIDE" +
+ " IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION" +
+ " LEAVE LIKE LINE LOAD LOCAL LOOP" +
+ " MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY" +
+ " ON OVERLAY OPTIONAL OTHERS" +
+ " PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT" +
+ " RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK" +
+ " SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS" +
+ " TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES" +
+ " UNASSIGN ULINE UNPACK UPDATE" +
+ " WHEN WHILE WINDOW WRITE" +
+ " OCCURS STRUCTURE OBJECT PROPERTY" +
+ " CASTING APPEND RAISING VALUE COLOR" +
+ " CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT" +
+ " ID NUMBER FOR TITLE OUTPUT" +
+ " WITH EXIT USING" +
+ " INTO WHERE GROUP BY HAVING ORDER BY SINGLE" +
+ " APPENDING CORRESPONDING FIELDS OF TABLE" +
+ " LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING" +
+ " EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN",
+ "constant.language":
+ "TRUE FALSE NULL SPACE",
+ "support.type":
+ "c n i p f d t x string xstring decfloat16 decfloat34",
+ "keyword.operator":
+ "abs sign ceil floor trunc frac acos asin atan cos sin tan" +
+ " abapOperator cosh sinh tanh exp log log10 sqrt" +
+ " strlen xstrlen charlen numofchar dbmaxlen lines"
+ }, "text", true, " ");
+
+ var compoundKeywords = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|"+
+ "EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|"+
+ "END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|"+
+ "RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|"+
+ "WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|"+
+ "(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)"+
+ "(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|"+
+ "LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|"+
+ "CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|"+
+ "FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|"+
+ "NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|"+
+ "START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|"+
+ "TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|"+
+ "IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";
+
+ this.$rules = {
+ "start" : [
+ {token : "string", regex : "`", next : "string"},
+ {token : "string", regex : "'", next : "qstring"},
+ {token : "doc.comment", regex : /^\*.+/},
+ {token : "comment", regex : /".+$/},
+ {token : "invalid", regex: "\\.{2,}"},
+ {token : "keyword.operator", regex: /\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},
+ {token : "paren.lparen", regex : "[\\[({]"},
+ {token : "paren.rparen", regex : "[\\])}]"},
+ {token : "constant.numeric", regex: "[+-]?\\d+\\b"},
+ {token : "variable.parameter", regex : /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},
+ {token : "keyword", regex : compoundKeywords},
+ {token : "variable.parameter", regex : /\w+-\w+(?:-\w+)*/},
+ {token : keywordMapper, regex : "\\b\\w+\\b"},
+ {caseInsensitive: true}
+ ],
+ "qstring" : [
+ {token : "constant.language.escape", regex : "''"},
+ {token : "string", regex : "'", next : "start"},
+ {defaultToken : "string"}
+ ],
+ "string" : [
+ {token : "constant.language.escape", regex : "``"},
+ {token : "string", regex : "`", next : "start"},
+ {defaultToken : "string"}
+ ]
+ }
+};
+oop.inherits(AbapHighlightRules, TextHighlightRules);
+
+exports.AbapHighlightRules = AbapHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/actionscript.js b/src/fauxton/assets/js/libs/ace/mode/actionscript.js
new file mode 100644
index 000000000..47b9345d2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/actionscript.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ActionScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/actionscript_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/actionscript_highlight_rules.js
new file mode 100644
index 000000000..1f30d9c27
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/actionscript_highlight_rules.js
@@ -0,0 +1,141 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from tm bundles\actionscript.tmbundle\Syntaxes\ActionScript.plist (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ActionScriptHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'support.class.actionscript.2',
+ regex: '\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b' },
+ { token: 'support.function.actionscript.2',
+ regex: '\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b' },
+ { token: 'support.constant.actionscript.2',
+ regex: '\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b' },
+ { token: 'keyword.control.actionscript.2',
+ regex: '\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b' },
+ { token: 'storage.type.actionscript.2',
+ regex: '\\b(?:Boolean|Number|String|Void)\\b' },
+ { token: 'constant.language.actionscript.2',
+ regex: '\\b(?:null|undefined|true|false)\\b' },
+ { token: 'constant.numeric.actionscript.2',
+ regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' },
+ { token: 'punctuation.definition.string.begin.actionscript.2',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.actionscript.2',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.actionscript.2',
+ regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.actionscript.2' } ] },
+ { token: 'punctuation.definition.string.begin.actionscript.2',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.actionscript.2',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.actionscript.2',
+ regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.actionscript.2' } ] },
+ { token: 'support.constant.actionscript.2',
+ regex: '\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b' },
+ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.actionscript.2' } ] },
+ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '//.*$',
+ push_:
+ [ { token: 'comment.line.double-slash.actionscript.2',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.actionscript.2' } ] },
+ { token: 'keyword.operator.actionscript.2',
+ regex: '\\binstanceof\\b' },
+ { token: 'keyword.operator.symbolic.actionscript.2',
+ regex: '[-!%&*+=/?:]' },
+ { token:
+ [ 'meta.preprocessor.actionscript.2',
+ 'punctuation.definition.preprocessor.actionscript.2',
+ 'meta.preprocessor.actionscript.2' ],
+ regex: '^([ \\t]*)(#)([a-zA-Z]+)' },
+ { token:
+ [ 'storage.type.function.actionscript.2',
+ 'meta.function.actionscript.2',
+ 'entity.name.function.actionscript.2',
+ 'meta.function.actionscript.2',
+ 'punctuation.definition.parameters.begin.actionscript.2' ],
+ regex: '\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.actionscript.2',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'variable.parameter.function.actionscript.2',
+ regex: '[^,)$]+' },
+ { defaultToken: 'meta.function.actionscript.2' } ] },
+ { token:
+ [ 'storage.type.class.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'entity.name.type.class.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'storage.modifier.extends.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'entity.other.inherited-class.actionscript.2' ],
+ regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' } ] }
+
+ this.normalizeRules();
+};
+
+ActionScriptHighlightRules.metaData = { fileTypes: [ 'as' ],
+ keyEquivalent: '^~A',
+ name: 'ActionScript',
+ scopeName: 'source.actionscript.2' }
+
+
+oop.inherits(ActionScriptHighlightRules, TextHighlightRules);
+
+exports.ActionScriptHighlightRules = ActionScriptHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/ada.js b/src/fauxton/assets/js/libs/ace/mode/ada.js
new file mode 100644
index 000000000..d368bfdd5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ada.js
@@ -0,0 +1,54 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = AdaHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/ada_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/ada_highlight_rules.js
new file mode 100644
index 000000000..b345966c4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ada_highlight_rules.js
@@ -0,0 +1,93 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AdaHighlightRules = function() {
+var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" +
+"access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" +
+"array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" +
+"body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" +
+"|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(AdaHighlightRules, TextHighlightRules);
+
+exports.AdaHighlightRules = AdaHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/asciidoc.js b/src/fauxton/assets/js/libs/ace/mode/asciidoc.js
new file mode 100644
index 000000000..02979f545
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/asciidoc.js
@@ -0,0 +1,64 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules;
+var AsciidocFoldMode = require("./folding/asciidoc").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AsciidocHighlightRules;
+
+ this.foldingRules = new AsciidocFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^((?:.+)?)([-+*][ ]+)/.exec(line);
+ if (match) {
+ return new Array(match[1].length + 1).join(" ") + match[2];
+ } else {
+ return "";
+ }
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/asciidoc_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/asciidoc_highlight_rules.js
new file mode 100644
index 000000000..c0d1a305c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/asciidoc_highlight_rules.js
@@ -0,0 +1,234 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AsciidocHighlightRules = function() {
+ var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b";
+
+ this.$rules = {
+ "start": [
+ {token: "empty", regex: /$/},
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
+ {token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock"},
+ {token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock"},
+ {token: "keyword", regex: /^={4,}\s*$/},
+ {token: "text", regex: /^\s*$/},
+ // immediately return to the start mode without matching anything
+ {token: "empty", regex: "", next: "dissallowDelimitedBlock"}
+ ],
+
+ "dissallowDelimitedBlock": [
+ {include: "paragraphEnd"},
+ {token: "comment", regex: '^//.+$'},
+ {token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},
+
+ {include: "listStart"},
+ {token: "literal", regex: /^\s+.+$/, next: "indentedBlock"},
+ {token: "empty", regex: "", next: "text"}
+ ],
+
+ "paragraphEnd": [
+ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock"},
+ {token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock"},
+ // open block, ruller
+ {token: "keyword", regex: /^(?:--|''')\s*$/, next: "start"},
+ {token: "option", regex: /^\[.*\]\s*$/, next: "start"},
+ {token: "pageBreak", regex: /^>{3,}$/, next: "start"},
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"},
+ {token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start"},
+ {token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start"},
+
+ {token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start"},
+ // .optional title
+ {token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start"}
+ ],
+
+ "listStart": [
+ {token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText"},
+ {token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText"},
+ {token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text"},
+ // continuation
+ {token: "keyword", regex: /^\+\s*$/, next: "start"}
+ ],
+
+ "text": [
+ {token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},
+ {token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},
+ {token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/},
+ {include: "macros"},
+ {include: "paragraphEnd"},
+ {token: "literal", regex:/\+{3,}/, next:"smallPassthrough"},
+ {token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},
+ {token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/},
+ {token: "keyword", regex: /\s\+$/},
+ // any word
+ {token: "text", regex: identifierRe},
+ {token: ["keyword", "string", "keyword"],
+ regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/},
+ {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/},
+ {token: "constant.character", regex: /\({2,3}.*?\){2,3}/},
+ // Anchor
+ {token: "keyword", regex: /\[\[.+?\]\]/},
+ // bibliography
+ {token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/},
+
+ {include: "quotes"},
+ // text block end
+ {token: "empty", regex: /^\s*$/, next: "start"}
+ ],
+
+ "listText": [
+ {include: "listStart"},
+ {include: "text"}
+ ],
+
+ "indentedBlock": [
+ {token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock"},
+ {token: "literal", regex: "", next: "start"}
+ ],
+
+ "listingBlock": [
+ {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "constant.numeric", regex: '<\\d+>'},
+ {token: "literal", regex: '[^<]+'},
+ {token: "literal", regex: '<'}
+ ],
+ "literalBlock": [
+ {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "constant.numeric", regex: '<\\d+>'},
+ {token: "literal", regex: '[^<]+'},
+ {token: "literal", regex: '<'}
+ ],
+ "passthroughBlock": [
+ {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: identifierRe + "|\\d+"},
+ {include: "macros"},
+ {token: "literal", regex: "."}
+ ],
+
+ "smallPassthrough": [
+ {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "literal", regex: identifierRe + "|\\d+"},
+ {include: "macros"}
+ ],
+
+ "commentBlock": [
+ {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "doc.comment", regex: '^.*$'}
+ ],
+ "tableBlock": [
+ {token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock"},
+ {token: "tableBlock", regex: /\|/},
+ {include: "text", noEscape: true}
+ ],
+ "innerTableBlock": [
+ {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock"},
+ {token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock"},
+ {token: "tableBlock", regex: /\!/}
+ ],
+ "macros": [
+ {token: "macro", regex: /{[\w\-$]+}/},
+ {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/},
+ {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},
+ {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},
+ {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},
+ {token: "keyword", regex: /^:.+?:(?= |$)/}
+ ],
+
+ "quotes": [
+ {token: "string.italic", regex: /__[^_\s].*?__/},
+ {token: "string.italic", regex: quoteRule("_")},
+
+ {token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/},
+ {token: "keyword.bold", regex: quoteRule("\\*")},
+
+ {token: "literal", regex: quoteRule("\\+")},
+ {token: "literal", regex: /\+\+[^+\s].*?\+\+/},
+ {token: "literal", regex: /\$\$.+?\$\$/},
+ {token: "literal", regex: quoteRule("`")},
+
+ {token: "keyword", regex: quoteRule("^")},
+ {token: "keyword", regex: quoteRule("~")},
+ {token: "keyword", regex: /##?/},
+ {token: "keyword", regex: /(?:\B|^)``|\b''/}
+ ]
+
+ };
+
+ function quoteRule(ch) {
+ var prefix = /\w/.test(ch) ? "\\b" : "(?:\\B|^)";
+ return prefix + ch + "[^" + ch + "].*?" + ch + "(?![\\w*])";
+ }
+
+ //addQuoteBlock("text")
+
+ var tokenMap = {
+ macro: "constant.character",
+ tableBlock: "doc.comment",
+ titleUnderline: "markup.heading",
+ singleLineTitle: "markup.heading",
+ pageBreak: "string",
+ option: "string.regexp",
+ otherBlock: "markup.list",
+ literal: "support.function",
+ optionalTitle: "constant.numeric",
+ escape: "constant.language.escape",
+ link: "markup.underline.list"
+ };
+
+ for (var state in this.$rules) {
+ var stateRules = this.$rules[state];
+ for (var i = stateRules.length; i--; ) {
+ var rule = stateRules[i];
+ if (rule.include || typeof rule == "string") {
+ var args = [i, 1].concat(this.$rules[rule.include || rule]);
+ if (rule.noEscape) {
+ args = args.filter(function(x) {
+ return !x.next;
+ });
+ }
+ stateRules.splice.apply(stateRules, args);
+ } else if (rule.token in tokenMap) {
+ rule.token = tokenMap[rule.token];
+ }
+ }
+ }
+};
+oop.inherits(AsciidocHighlightRules, TextHighlightRules);
+
+exports.AsciidocHighlightRules = AsciidocHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/assembly_x86.js b/src/fauxton/assets/js/libs/ace/mode/assembly_x86.js
new file mode 100644
index 000000000..269891987
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/assembly_x86.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AssemblyX86HighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/assembly_x86_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/assembly_x86_highlight_rules.js
new file mode 100644
index 000000000..247d1d0cc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/assembly_x86_highlight_rules.js
@@ -0,0 +1,114 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from Assembly x86.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AssemblyX86HighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'keyword.control.assembly',
+ regex: '\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b',
+ caseInsensitive: true },
+ { token: 'variable.parameter.register.assembly',
+ regex: '\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b',
+ caseInsensitive: true },
+ { token: 'constant.character.decimal.assembly',
+ regex: '\\b[0-9]+\\b' },
+ { token: 'constant.character.hexadecimal.assembly',
+ regex: '\\b0x[A-F0-9]+\\b',
+ caseInsensitive: true },
+ { token: 'constant.character.hexadecimal.assembly',
+ regex: '\\b[A-F0-9]+h\\b',
+ caseInsensitive: true },
+ { token: 'string.assembly', regex: /'([^\\']|\\.)*'/ },
+ { token: 'string.assembly', regex: /"([^\\"]|\\.)*"/ },
+ { token: 'support.function.directive.assembly',
+ regex: '^\\[',
+ push:
+ [ { token: 'support.function.directive.assembly',
+ regex: '\\]$',
+ next: 'pop' },
+ { defaultToken: 'support.function.directive.assembly' } ] },
+ { token:
+ [ 'support.function.directive.assembly',
+ 'support.function.directive.assembly',
+ 'entity.name.function.assembly' ],
+ regex: '(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)' },
+ { token: 'support.function.directive.assembly',
+ regex: '^endstruc\\b' },
+ { token:
+ [ 'support.function.directive.assembly',
+ 'entity.name.function.assembly',
+ 'support.function.directive.assembly',
+ 'constant.character.assembly' ],
+ regex: '^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)' },
+ { token: 'support.function.directive.assembly',
+ regex: '^%endmacro' },
+ { token:
+ [ 'text',
+ 'support.function.directive.assembly',
+ 'text',
+ 'entity.name.function.assembly' ],
+ regex: '(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)',
+ caseInsensitive: true },
+ { token: 'support.function.directive.assembly',
+ regex: '\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b',
+ caseInsensitive: true },
+ { token: 'entity.name.function.assembly', regex: '^\\s*%%[\\w.]+?:$' },
+ { token: 'entity.name.function.assembly', regex: '^\\s*%\\$[\\w.]+?:$' },
+ { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' },
+ { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' },
+ { token: 'comment.assembly', regex: ';.*$' } ]
+ }
+
+ this.normalizeRules();
+};
+
+AssemblyX86HighlightRules.metaData = { fileTypes: [ 'asm' ],
+ name: 'Assembly x86',
+ scopeName: 'source.assembly' }
+
+
+oop.inherits(AssemblyX86HighlightRules, TextHighlightRules);
+
+exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/autohotkey.js b/src/fauxton/assets/js/libs/ace/mode/autohotkey.js
new file mode 100644
index 000000000..2a9ecee52
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/autohotkey.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AutoHotKeyHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "/\\*";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/autohotkey_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/autohotkey_highlight_rules.js
new file mode 100644
index 000000000..45193996a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/autohotkey_highlight_rules.js
@@ -0,0 +1,107 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from C:\Users\LED\Desktop\AutoHotKey.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var AutoHotKeyHighlightRules = function() {
+ var autoItKeywords = 'And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|' +
+ 'Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|' +
+ 'ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|' +
+ 'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' +
+ 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters'
+ var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR'
+
+ this.$rules = { start:
+ [ { token: 'comment.line.ahk', regex: '(?:^| );.*$' },
+ { token: 'comment.block.ahk',
+ regex: '/\\*', push:
+ [ { token: 'comment.block.ahk', regex: '\\*/', next: 'pop' },
+ { defaultToken: 'comment.block.ahk' } ] },
+ { token: 'doc.comment.ahk',
+ regex: '#cs', push:
+ [ { token: 'doc.comment.ahk', regex: '#ce', next: 'pop' },
+ { defaultToken: 'doc.comment.ahk' } ] },
+ { token: 'keyword.command.ahk',
+ regex: '(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.ahk',
+ regex: '(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b',
+ caseInsensitive: true },
+ { token: 'support.function.ahk',
+ regex: '(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b',
+ caseInsensitive: true },
+ { token: 'variable.predefined.ahk',
+ regex: '(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b',
+ caseInsensitive: true },
+ { token: 'support.constant.ahk',
+ regex: '(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b',
+ caseInsensitive: true },
+ { token: 'variable.parameter',
+ regex: '(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b',
+ caseInsensitive: true },
+ { keywordMap: {"constant.language": autoItKeywords}, regex: '\\w+\\b'},
+ { keywordMap: {"variable.function": atKeywords}, regex: '@\\w+\\b'},
+ { token : "constant.numeric", regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
+ { token: 'keyword.operator.ahk',
+ regex: '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' },
+ { token: 'punctuation.ahk',
+ regex: '#|`|::|,|\\{|\\}|\\(|\\)|\\%' },
+ { token:
+ [ 'punctuation.quote.double',
+ 'string.quoted.ahk',
+ 'punctuation.quote.double' ],
+ regex: '(")((?:[^"]|"")*)(")' },
+ { token: [ 'label.ahk', 'punctuation.definition.label.ahk' ],
+ regex: '^([^: ]+)(:)(?!:)' } ] }
+
+ this.normalizeRules();
+};
+
+AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey',
+ scopeName: 'source.ahk',
+ fileTypes: [ 'ahk' ],
+ foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))',
+ foldingStopMarker: '^\\s*\\*/|^\\s*\\}' }
+
+
+oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules);
+
+exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/batchfile.js b/src/fauxton/assets/js/libs/ace/mode/batchfile.js
new file mode 100644
index 000000000..2f10957f3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/batchfile.js
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = BatchFileHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "::";
+ this.blockComment = "";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/batchfile_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/batchfile_highlight_rules.js
new file mode 100644
index 000000000..be0380d82
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/batchfile_highlight_rules.js
@@ -0,0 +1,97 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from C:\Users\LED\AppData\Roaming\Sublime Text 2\Packages\Batch File\Batch File.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var BatchFileHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'keyword.command.dosbatch',
+ regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.statement.dosbatch',
+ regex: '\\b(?:goto|call|exit)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.conditional.if.dosbatch',
+ regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.conditional.dosbatch',
+ regex: '\\b(?:if|else)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.repeat.dosbatch',
+ regex: '\\bfor\\b',
+ caseInsensitive: true },
+ { token: 'keyword.operator.dosbatch',
+ regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' },
+ { token: ['doc.comment', 'comment'],
+ regex: '(?:^|\\b)(rem)($|\\s.*$)',
+ caseInsensitive: true },
+ { token: 'comment.line.colons.dosbatch',
+ regex: '::.*$' },
+ { include: 'variable' },
+ { token: 'punctuation.definition.string.begin.shell',
+ regex: '"',
+ push: [
+ { token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' },
+ { include: 'variable' },
+ { defaultToken: 'string.quoted.double.dosbatch' } ] },
+ { token: 'keyword.operator.pipe.dosbatch', regex: '[|]' },
+ { token: 'keyword.operator.redirect.shell',
+ regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ],
+ variable: [
+ { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'},
+ { token: 'constant.numeric', regex: '%~\\d+'},
+ { token: ['markup.list', 'constant.other', 'markup.list'],
+ regex: '(%)(\\w+)(%?)' }]}
+
+ this.normalizeRules();
+};
+
+BatchFileHighlightRules.metaData = { name: 'Batch File',
+ scopeName: 'source.dosbatch',
+ fileTypes: [ 'bat' ] }
+
+
+oop.inherits(BatchFileHighlightRules, TextHighlightRules);
+
+exports.BatchFileHighlightRules = BatchFileHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour.js b/src/fauxton/assets/js/libs/ace/mode/behaviour.js
new file mode 100644
index 000000000..c1c6cb15b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour.js
@@ -0,0 +1,90 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Behaviour = function() {
+ this.$behaviours = {};
+};
+
+(function () {
+
+ this.add = function (name, action, callback) {
+ switch (undefined) {
+ case this.$behaviours:
+ this.$behaviours = {};
+ case this.$behaviours[name]:
+ this.$behaviours[name] = {};
+ }
+ this.$behaviours[name][action] = callback;
+ }
+
+ this.addBehaviours = function (behaviours) {
+ for (var key in behaviours) {
+ for (var action in behaviours[key]) {
+ this.add(key, action, behaviours[key][action]);
+ }
+ }
+ }
+
+ this.remove = function (name) {
+ if (this.$behaviours && this.$behaviours[name]) {
+ delete this.$behaviours[name];
+ }
+ }
+
+ this.inherit = function (mode, filter) {
+ if (typeof mode === "function") {
+ var behaviours = new mode().getBehaviours(filter);
+ } else {
+ var behaviours = mode.getBehaviours(filter);
+ }
+ this.addBehaviours(behaviours);
+ }
+
+ this.getBehaviours = function (filter) {
+ if (!filter) {
+ return this.$behaviours;
+ } else {
+ var ret = {}
+ for (var i = 0; i < filter.length; i++) {
+ if (this.$behaviours[filter[i]]) {
+ ret[filter[i]] = this.$behaviours[filter[i]];
+ }
+ }
+ return ret;
+ }
+ }
+
+}).call(Behaviour.prototype);
+
+exports.Behaviour = Behaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour/css.js b/src/fauxton/assets/js/libs/ace/mode/behaviour/css.js
new file mode 100644
index 000000000..1c35f7443
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour/css.js
@@ -0,0 +1,108 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar === ';') {
+ range.end.column ++;
+ return range;
+ }
+ }
+ }
+ });
+
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour/cstyle.js b/src/fauxton/assets/js/libs/ace/mode/behaviour/cstyle.js
new file mode 100644
index 000000000..54f75526a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour/cstyle.js
@@ -0,0 +1,365 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+var SAFE_INSERT_IN_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator"];
+var SAFE_INSERT_BEFORE_TOKENS =
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
+
+
+var autoInsertedBrackets = 0;
+var autoInsertedRow = -1;
+var autoInsertedLineEnd = "";
+var maybeInsertedBrackets = 0;
+var maybeInsertedRow = -1;
+var maybeInsertedLineStart = "";
+var maybeInsertedLineEnd = "";
+
+var CstyleBehaviour = function () {
+
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+
+ // Don't insert in the middle of a keyword/identifier/lexical
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
+ // Look ahead in case we're at the end of a token
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
+ return false;
+ }
+
+ // Only insert in front of whitespace/comments
+ iterator.stepForward();
+ return iterator.getCurrentTokenRow() !== cursor.row ||
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
+ };
+
+ CstyleBehaviour.$matchTokenType = function(token, types) {
+ return types.indexOf(token.type || token) > -1;
+ };
+
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ // Reset previous state if text or context changed too much
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
+ autoInsertedBrackets = 0;
+ autoInsertedRow = cursor.row;
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ autoInsertedBrackets++;
+ };
+
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = cursor.row;
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ maybeInsertedLineEnd = line.substr(cursor.column);
+ maybeInsertedBrackets++;
+ };
+
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return autoInsertedBrackets > 0 &&
+ cursor.row === autoInsertedRow &&
+ bracket === autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === autoInsertedLineEnd;
+ };
+
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return maybeInsertedBrackets > 0 &&
+ cursor.row === maybeInsertedRow &&
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
+ };
+
+ CstyleBehaviour.popAutoInsertedClosing = function() {
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
+ autoInsertedBrackets--;
+ };
+
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ maybeInsertedBrackets = 0;
+ maybeInsertedRow = -1;
+ };
+
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '{' + selected + '}',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column])) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}') {
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == "\n" || text == "\r\n") {
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == '}' || closing !== "") {
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
+ if (!openBracePos)
+ return null;
+
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
+ var next_indent = this.$getIndent(line);
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ }
+ }
+ });
+
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
+ if (rightChar == '}') {
+ range.end.column++;
+ return range;
+ } else {
+ maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
+ if (text == '(') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '(' + selected + ')',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ')') {
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '(') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ')') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
+ if (text == '[') {
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: '[' + selected + ']',
+ selection: false
+ };
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == ']') {
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
+ CstyleBehaviour.popAutoInsertedClosing();
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ });
+
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '[') {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == ']') {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ } else {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+
+ // We're escaped.
+ if (leftChar == '\\') {
+ return null;
+ }
+
+ // Find what token we're inside.
+ var tokens = session.getTokens(selection.start.row);
+ var col = 0, token;
+ var quotepos = -1; // Track whether we're inside an open quote.
+
+ for (var x = 0; x < tokens.length; x++) {
+ token = tokens[x];
+ if (token.type == "string") {
+ quotepos = -1;
+ } else if (quotepos < 0) {
+ quotepos = token.value.indexOf(quote);
+ }
+ if ((token.value.length + col) > selection.start.column) {
+ break;
+ }
+ col += tokens[x].value.length;
+ }
+
+ // Try and be smart about when we auto insert.
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
+ return;
+ return {
+ text: quote + quote,
+ selection: [1,1]
+ };
+ } else if (token && token.type === "string") {
+ // Ignore input and move right one if we're typing over the closing quote.
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar == quote) {
+ return {
+ text: '',
+ selection: [1, 1]
+ };
+ }
+ }
+ }
+ }
+ });
+
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour/html.js b/src/fauxton/assets/js/libs/ace/mode/behaviour/html.js
new file mode 100644
index 000000000..1d500e0fe
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour/html.js
@@ -0,0 +1,88 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
+
+function hasType(token, type) {
+ var tokenTypes = token.type.split('.');
+ return type.split('.').every(function(type){
+ return (tokenTypes.indexOf(type) !== -1);
+ });
+ return hasType;
+}
+
+var HtmlBehaviour = function () {
+
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ return;
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ return;
+ }
+ var element = token.value;
+ if (atCursor){
+ var element = element.substring(0, position.column - token.start);
+ }
+ if (voidElements.indexOf(element) !== -1){
+ return;
+ }
+ return {
+ text: '>' + '</' + element + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+}
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour/xml.js b/src/fauxton/assets/js/libs/ace/mode/behaviour/xml.js
new file mode 100644
index 000000000..472613068
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour/xml.js
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var tokenTypes = token.type.split('.');
+ return type.split('.').every(function(type){
+ return (tokenTypes.indexOf(type) !== -1);
+ });
+ return hasType;
+}
+
+var XmlBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
+ return;
+ var atCursor = false;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
+ return;
+ }
+ var tag = token.value;
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
+ if (rightChars == '</') {
+ var next_indent = this.$getIndent(line);
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent,
+ selection: [1, indent.length, 1, indent.length]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/behaviour/xquery.js b/src/fauxton/assets/js/libs/ace/mode/behaviour/xquery.js
new file mode 100644
index 000000000..f9bfb3f96
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/behaviour/xquery.js
@@ -0,0 +1,92 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+ var oop = require("../../lib/oop");
+ var Behaviour = require('../behaviour').Behaviour;
+ var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+ var TokenIterator = require("../../token_iterator").TokenIterator;
+
+function hasType(token, type) {
+ var hasType = true;
+ var typeList = token.type.split('.');
+ var needleList = type.split('.');
+ needleList.forEach(function(needle){
+ if (typeList.indexOf(needle) == -1) {
+ hasType = false;
+ return false;
+ }
+ });
+ return hasType;
+}
+
+ var XQueryBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
+ this.inherit(XmlBehaviour); // Get xml behaviour
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken();
+ var atCursor = false;
+ var state = JSON.parse(state).pop();
+ if ((token && token.value === '>') || state !== "StartTag") return;
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
+ } else {
+ atCursor = true;
+ }
+ var previous = iterator.stepBackward();
+ if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
+ return
+ }
+ var tag = token.value.substring(1);
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ }
+ oop.inherits(XQueryBehaviour, Behaviour);
+
+ exports.XQueryBehaviour = XQueryBehaviour;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/c9search.js b/src/fauxton/assets/js/libs/ace/mode/c9search.js
new file mode 100644
index 000000000..18cfdd408
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/c9search.js
@@ -0,0 +1,67 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var C9StyleFoldMode = require("./folding/c9search").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = C9SearchHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new C9StyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/c9search_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/c9search_highlight_rules.js
new file mode 100644
index 000000000..df31112b3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/c9search_highlight_rules.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var C9SearchHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+ this.$rules = {
+ "start" : [
+ {
+ token : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text"],
+ regex : "(^\\s+[0-9]+)(:\\s*)(.+)"
+ },
+ {
+ token : ["string", "text"], // single line
+ regex : "(.+)(:$)"
+ }
+ ]
+ };
+};
+
+oop.inherits(C9SearchHighlightRules, TextHighlightRules);
+
+exports.C9SearchHighlightRules = C9SearchHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/c_cpp.js b/src/fauxton/assets/js/libs/ace/mode/c_cpp.js
new file mode 100644
index 000000000..08ccf0bb7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/c_cpp.js
@@ -0,0 +1,101 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/c_cpp_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/c_cpp_highlight_rules.js
new file mode 100644
index 000000000..d1de84af1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/c_cpp_highlight_rules.js
@@ -0,0 +1,183 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+// used by objective-c
+var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b"
+
+var c_cppHighlightRules = function() {
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|goto|if|_Pragma|" +
+ "return|switch|while|catch|operator|try|throw|using"
+ );
+
+ var storageType = (
+ "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
+ "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
+ "class|wchar_t|template"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private:|" +
+ "protected:|public:|friend|explicit|virtual|export|mutable|typename"
+ );
+
+ var keywordOperators = (
+ "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" +
+ "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace"
+ );
+
+ var builtinConstants = (
+ "NULL|true|false|TRUE|FALSE"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "storage.modifier" : storageModifiers,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "this",
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "(?:#\\s*endif)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ token : "constant.other.multiline",
+ regex : /.*\\/
+ },
+ {
+ token : "constant.other",
+ regex : "\\s*<.+?>",
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',
+ next : "start"
+ },
+ {
+ token : "constant.other", // single line
+ regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",
+ next : "start"
+ },
+ // "\" implies multiline, while "/" implies comment
+ {
+ token : "constant.other",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/clojure.js b/src/fauxton/assets/js/libs/ace/mode/clojure.js
new file mode 100644
index 000000000..71f842e72
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/clojure.js
@@ -0,0 +1,86 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
+var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = ClojureHighlightRules;
+ this.$outdent = new MatchingParensOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/[\(\[]/);
+ if (match) {
+ indent += " ";
+ }
+ match = line.match(/[\)]/);
+ if (match) {
+ indent = "";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/clojure_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/clojure_highlight_rules.js
new file mode 100644
index 000000000..f7e28d876
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/clojure_highlight_rules.js
@@ -0,0 +1,200 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+
+
+var ClojureHighlightRules = function() {
+
+ var builtinFunctions = (
+ '* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +
+ '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +
+ '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +
+ '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +
+ '*read-eval* *source-path* *use-context-classloader* ' +
+ '*warn-on-reflection* + - -> ->> .. / < <= = ' +
+ '== > &gt; >= &gt;= accessor aclone ' +
+ 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +
+ 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +
+ 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +
+ 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +
+ 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +
+ 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +
+ 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +
+ 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +
+ 'char-escape-string char-name-string char? chars chunk chunk-append ' +
+ 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +
+ 'class class? clear-agent-errors clojure-version coll? comment commute ' +
+ 'comp comparator compare compare-and-set! compile complement concat cond ' +
+ 'condp conj conj! cons constantly construct-proxy contains? count ' +
+ 'counted? create-ns create-struct cycle dec decimal? declare definline ' +
+ 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +
+ 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +
+ 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +
+ 'double-array doubles drop drop-last drop-while empty empty? ensure ' +
+ 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +
+ 'find-doc find-ns find-var first float float-array float? floats flush ' +
+ 'fn fn? fnext for force format future future-call future-cancel ' +
+ 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +
+ 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +
+ 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +
+ 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +
+ 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +
+ 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +
+ 'list* list? load load-file load-reader load-string loaded-libs locking ' +
+ 'long long-array longs loop macroexpand macroexpand-1 make-array ' +
+ 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +
+ 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +
+ 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +
+ 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +
+ 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +
+ 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +
+ 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +
+ 'primitives-classnames print print-ctor print-doc print-dup print-method ' +
+ 'print-namespace-doc print-simple print-special-doc print-str printf ' +
+ 'println println-str prn prn-str promise proxy proxy-call-with-super ' +
+ 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +
+ 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +
+ 're-matcher re-matches re-pattern re-seq read read-line read-string ' +
+ 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +
+ 'refer refer-clojure release-pending-sends rem remove remove-method ' +
+ 'remove-ns remove-watch repeat repeatedly replace replicate require ' +
+ 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +
+ 'rsubseq second select-keys send send-off seq seq? seque sequence ' +
+ 'sequential? set set-validator! set? short short-array shorts ' +
+ 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +
+ 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +
+ 'split-at split-with str stream? string? struct struct-map subs subseq ' +
+ 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +
+ 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +
+ 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +
+ 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +
+ 'unchecked-remainder unchecked-subtract underive unquote ' +
+ 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +
+ 'var? vary-meta vec vector vector? when when-first when-let when-not ' +
+ 'while with-bindings with-bindings* with-in-str with-loading-context ' +
+ 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +
+ 'zero? zipmap'
+ );
+
+ var keywords = ('throw try var ' +
+ 'def do fn if let loop monitor-enter monitor-exit new quote recur set!'
+ );
+
+ var buildinConstants = ("true false nil");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": builtinFunctions
+ }, "identifier", false, " ");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : ";.*$"
+ }, {
+ token : "keyword", //parens
+ regex : "[\\(|\\)]"
+ }, {
+ token : "keyword", //lists
+ regex : "[\\'\\(]"
+ }, {
+ token : "keyword", //vectors
+ regex : "[\\[|\\]]"
+ }, {
+ token : "keyword", //sets and maps
+ regex : "[\\{|\\}|\\#\\{|\\#\\}]"
+ }, {
+ token : "keyword", // ampersands
+ regex : '[\\&]'
+ }, {
+ token : "keyword", // metadata
+ regex : '[\\#\\^\\{]'
+ }, {
+ token : "keyword", // anonymous fn syntactic sugar
+ regex : '[\\%]'
+ }, {
+ token : "keyword", // deref reader macro
+ regex : '[@]'
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language",
+ regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]'
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
+ }, {
+ token : "string", // single line
+ regex : '"',
+ next: "string"
+ }, {
+ token : "constant", // symbol
+ regex : /:[^()\[\]{}'"\^%`,;\s]+/
+ }, {
+ token : "string.regexp", //Regular Expressions
+ regex : '/#"(?:\\.|(?:\\\")|[^\""\n])*"/g'
+ }
+
+ ],
+ "string" : [
+ {
+ token : "constant.language.escape",
+ regex : "\\\\.|\\\\$"
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }
+ ]
+ };
+};
+
+oop.inherits(ClojureHighlightRules, TextHighlightRules);
+
+exports.ClojureHighlightRules = ClojureHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/cobol.js b/src/fauxton/assets/js/libs/ace/mode/cobol.js
new file mode 100644
index 000000000..a705d9bd9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/cobol.js
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = CobolHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "*";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/cobol_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/cobol_highlight_rules.js
new file mode 100644
index 000000000..36335c932
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/cobol_highlight_rules.js
@@ -0,0 +1,100 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var CobolHighlightRules = function() {
+var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" +
+"AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" +
+"ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" +
+"TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" +
+"UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" +
+"PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" +
+"CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" +
+"COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" +
+"RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" +
+"DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" +
+"ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" +
+"EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "\\*.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(CobolHighlightRules, TextHighlightRules);
+
+exports.CobolHighlightRules = CobolHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee.js b/src/fauxton/assets/js/libs/ace/mode/coffee.js
new file mode 100644
index 000000000..72ed09603
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee.js
@@ -0,0 +1,114 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+
+function Mode() {
+ this.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
+ var commentLine = /^(\s*)#/;
+ var hereComment = /^\s*###(?!#)/;
+ var indentation = /^\s*/;
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow){
+ console.log("toggle");
+ var range = new Range(0, 0, 0, 0);
+ for (var i = startRow; i <= endRow; ++i) {
+ var line = doc.getLine(i);
+ if (hereComment.test(line))
+ continue;
+
+ if (commentLine.test(line))
+ line = line.replace(commentLine, '$1');
+ else
+ line = line.replace(indentation, '$&#');
+
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/coffee-script.js b/src/fauxton/assets/js/libs/ace/mode/coffee/coffee-script.js
new file mode 100644
index 000000000..9e9719f7b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/coffee-script.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+ var Lexer = require("./lexer").Lexer;
+ var parser = require("./parser");
+
+ var lexer = new Lexer();
+ parser.lexer = {
+ lex: function() {
+ var tag, token;
+ token = this.tokens[this.pos++];
+ if (token) {
+ tag = token[0], this.yytext = token[1], this.yylloc = token[2];
+ this.yylineno = this.yylloc.first_line;
+ } else {
+ tag = '';
+ }
+ return tag;
+ },
+ setInput: function(tokens) {
+ this.tokens = tokens;
+ return this.pos = 0;
+ },
+ upcomingInput: function() {
+ return "";
+ }
+ };
+ parser.yy = require('./nodes');
+
+ exports.parse = function(code) {
+ return parser.parse(lexer.tokenize(code));
+ };
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/helpers.js b/src/fauxton/assets/js/libs/ace/mode/coffee/helpers.js
new file mode 100644
index 000000000..fe73f2b7f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/helpers.js
@@ -0,0 +1,271 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+// Generated by CoffeeScript 1.6.3
+
+ var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref;
+
+ exports.starts = function(string, literal, start) {
+ return literal === string.substr(start, literal.length);
+ };
+
+ exports.ends = function(string, literal, back) {
+ var len;
+ len = literal.length;
+ return literal === string.substr(string.length - len - (back || 0), len);
+ };
+
+ exports.repeat = repeat = function(str, n) {
+ var res;
+ res = '';
+ while (n > 0) {
+ if (n & 1) {
+ res += str;
+ }
+ n >>>= 1;
+ str += str;
+ }
+ return res;
+ };
+
+ exports.compact = function(array) {
+ var item, _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ item = array[_i];
+ if (item) {
+ _results.push(item);
+ }
+ }
+ return _results;
+ };
+
+ exports.count = function(string, substr) {
+ var num, pos;
+ num = pos = 0;
+ if (!substr.length) {
+ return 1 / 0;
+ }
+ while (pos = 1 + string.indexOf(substr, pos)) {
+ num++;
+ }
+ return num;
+ };
+
+ exports.merge = function(options, overrides) {
+ return extend(extend({}, options), overrides);
+ };
+
+ extend = exports.extend = function(object, properties) {
+ var key, val;
+ for (key in properties) {
+ val = properties[key];
+ object[key] = val;
+ }
+ return object;
+ };
+
+ exports.flatten = flatten = function(array) {
+ var element, flattened, _i, _len;
+ flattened = [];
+ for (_i = 0, _len = array.length; _i < _len; _i++) {
+ element = array[_i];
+ if (element instanceof Array) {
+ flattened = flattened.concat(flatten(element));
+ } else {
+ flattened.push(element);
+ }
+ }
+ return flattened;
+ };
+
+ exports.del = function(obj, key) {
+ var val;
+ val = obj[key];
+ delete obj[key];
+ return val;
+ };
+
+ exports.last = last = function(array, back) {
+ return array[array.length - (back || 0) - 1];
+ };
+
+ exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) {
+ var e, _i, _len;
+ for (_i = 0, _len = this.length; _i < _len; _i++) {
+ e = this[_i];
+ if (fn(e)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ exports.invertLiterate = function(code) {
+ var line, lines, maybe_code;
+ maybe_code = true;
+ lines = (function() {
+ var _i, _len, _ref1, _results;
+ _ref1 = code.split('\n');
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ line = _ref1[_i];
+ if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) {
+ _results.push(line);
+ } else if (maybe_code = /^\s*$/.test(line)) {
+ _results.push(line);
+ } else {
+ _results.push('# ' + line);
+ }
+ }
+ return _results;
+ })();
+ return lines.join('\n');
+ };
+
+ buildLocationData = function(first, last) {
+ if (!last) {
+ return first;
+ } else {
+ return {
+ first_line: first.first_line,
+ first_column: first.first_column,
+ last_line: last.last_line,
+ last_column: last.last_column
+ };
+ }
+ };
+
+ exports.addLocationDataFn = function(first, last) {
+ return function(obj) {
+ if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) {
+ obj.updateLocationDataIfMissing(buildLocationData(first, last));
+ }
+ return obj;
+ };
+ };
+
+ exports.locationDataToString = function(obj) {
+ var locationData;
+ if (("2" in obj) && ("first_line" in obj[2])) {
+ locationData = obj[2];
+ } else if ("first_line" in obj) {
+ locationData = obj;
+ }
+ if (locationData) {
+ return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1));
+ } else {
+ return "No location data";
+ }
+ };
+
+ exports.baseFileName = function(file, stripExt, useWinPathSep) {
+ var parts, pathSep;
+ if (stripExt == null) {
+ stripExt = false;
+ }
+ if (useWinPathSep == null) {
+ useWinPathSep = false;
+ }
+ pathSep = useWinPathSep ? /\\|\// : /\//;
+ parts = file.split(pathSep);
+ file = parts[parts.length - 1];
+ if (!stripExt) {
+ return file;
+ }
+ parts = file.split('.');
+ parts.pop();
+ if (parts[parts.length - 1] === 'coffee' && parts.length > 1) {
+ parts.pop();
+ }
+ return parts.join('.');
+ };
+
+ exports.isCoffee = function(file) {
+ return /\.((lit)?coffee|coffee\.md)$/.test(file);
+ };
+
+ exports.isLiterate = function(file) {
+ return /\.(litcoffee|coffee\.md)$/.test(file);
+ };
+
+ exports.throwSyntaxError = function(message, location) {
+ var error;
+ if (location.last_line == null) {
+ location.last_line = location.first_line;
+ }
+ if (location.last_column == null) {
+ location.last_column = location.first_column;
+ }
+ error = new SyntaxError(message);
+ error.location = location;
+ error.toString = syntaxErrorToString;
+ error.stack = error.toString();
+ throw error;
+ };
+
+ exports.updateSyntaxError = function(error, code, filename) {
+ if (error.toString === syntaxErrorToString) {
+ error.code || (error.code = code);
+ error.filename || (error.filename = filename);
+ error.stack = error.toString();
+ }
+ return error;
+ };
+
+ syntaxErrorToString = function() {
+ var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2;
+ if (!(this.code && this.location)) {
+ return Error.prototype.toString.call(this);
+ }
+ _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column;
+ if (last_line == null) {
+ last_line = first_line;
+ }
+ if (last_column == null) {
+ last_column = first_column;
+ }
+ filename = this.filename || '[stdin]';
+ codeLine = this.code.split('\n')[first_line];
+ start = first_column;
+ end = first_line === last_line ? last_column + 1 : codeLine.length;
+ marker = repeat(' ', start) + repeat('^', end - start);
+ if (typeof process !== "undefined" && process !== null) {
+ colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
+ }
+ if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) {
+ colorize = function(str) {
+ return "\x1B[1;31m" + str + "\x1B[0m";
+ };
+ codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end);
+ marker = colorize(marker);
+ }
+ return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker;
+ };
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/lexer.js b/src/fauxton/assets/js/libs/ace/mode/coffee/lexer.js
new file mode 100644
index 000000000..ed02bfe08
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/lexer.js
@@ -0,0 +1,929 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+// Generated by CoffeeScript 1.6.3
+
+ var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
+
+ _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES;
+
+ _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
+
+ exports.Lexer = Lexer = (function() {
+ function Lexer() {}
+
+ Lexer.prototype.tokenize = function(code, opts) {
+ var consumed, i, tag, _ref2;
+ if (opts == null) {
+ opts = {};
+ }
+ this.literate = opts.literate;
+ this.indent = 0;
+ this.baseIndent = 0;
+ this.indebt = 0;
+ this.outdebt = 0;
+ this.indents = [];
+ this.ends = [];
+ this.tokens = [];
+ this.chunkLine = opts.line || 0;
+ this.chunkColumn = opts.column || 0;
+ code = this.clean(code);
+ i = 0;
+ while (this.chunk = code.slice(i)) {
+ consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken();
+ _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1];
+ i += consumed;
+ }
+ this.closeIndentation();
+ if (tag = this.ends.pop()) {
+ this.error("missing " + tag);
+ }
+ if (opts.rewrite === false) {
+ return this.tokens;
+ }
+ return (new Rewriter).rewrite(this.tokens);
+ };
+
+ Lexer.prototype.clean = function(code) {
+ if (code.charCodeAt(0) === BOM) {
+ code = code.slice(1);
+ }
+ code = code.replace(/\r/g, '').replace(TRAILING_SPACES, '');
+ if (WHITESPACE.test(code)) {
+ code = "\n" + code;
+ this.chunkLine--;
+ }
+ if (this.literate) {
+ code = invertLiterate(code);
+ }
+ return code;
+ };
+
+ Lexer.prototype.identifierToken = function() {
+ var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4;
+ if (!(match = IDENTIFIER.exec(this.chunk))) {
+ return 0;
+ }
+ input = match[0], id = match[1], colon = match[2];
+ idLength = id.length;
+ poppedToken = void 0;
+ if (id === 'own' && this.tag() === 'FOR') {
+ this.token('OWN', id);
+ return id.length;
+ }
+ forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@');
+ tag = 'IDENTIFIER';
+ if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) {
+ tag = id.toUpperCase();
+ if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) {
+ tag = 'LEADING_WHEN';
+ } else if (tag === 'FOR') {
+ this.seenFor = true;
+ } else if (tag === 'UNLESS') {
+ tag = 'IF';
+ } else if (__indexOf.call(UNARY, tag) >= 0) {
+ tag = 'UNARY';
+ } else if (__indexOf.call(RELATION, tag) >= 0) {
+ if (tag !== 'INSTANCEOF' && this.seenFor) {
+ tag = 'FOR' + tag;
+ this.seenFor = false;
+ } else {
+ tag = 'RELATION';
+ if (this.value() === '!') {
+ poppedToken = this.tokens.pop();
+ id = '!' + id;
+ }
+ }
+ }
+ }
+ if (__indexOf.call(JS_FORBIDDEN, id) >= 0) {
+ if (forcedIdentifier) {
+ tag = 'IDENTIFIER';
+ id = new String(id);
+ id.reserved = true;
+ } else if (__indexOf.call(RESERVED, id) >= 0) {
+ this.error("reserved word \"" + id + "\"");
+ }
+ }
+ if (!forcedIdentifier) {
+ if (__indexOf.call(COFFEE_ALIASES, id) >= 0) {
+ id = COFFEE_ALIAS_MAP[id];
+ }
+ tag = (function() {
+ switch (id) {
+ case '!':
+ return 'UNARY';
+ case '==':
+ case '!=':
+ return 'COMPARE';
+ case '&&':
+ case '||':
+ return 'LOGIC';
+ case 'true':
+ case 'false':
+ return 'BOOL';
+ case 'break':
+ case 'continue':
+ return 'STATEMENT';
+ default:
+ return tag;
+ }
+ })();
+ }
+ tagToken = this.token(tag, id, 0, idLength);
+ if (poppedToken) {
+ _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1];
+ }
+ if (colon) {
+ colonOffset = input.lastIndexOf(':');
+ this.token(':', ':', colonOffset, colon.length);
+ }
+ return input.length;
+ };
+
+ Lexer.prototype.numberToken = function() {
+ var binaryLiteral, lexedLength, match, number, octalLiteral;
+ if (!(match = NUMBER.exec(this.chunk))) {
+ return 0;
+ }
+ number = match[0];
+ if (/^0[BOX]/.test(number)) {
+ this.error("radix prefix '" + number + "' must be lowercase");
+ } else if (/E/.test(number) && !/^0x/.test(number)) {
+ this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'");
+ } else if (/^0\d*[89]/.test(number)) {
+ this.error("decimal literal '" + number + "' must not be prefixed with '0'");
+ } else if (/^0\d+/.test(number)) {
+ this.error("octal literal '" + number + "' must be prefixed with '0o'");
+ }
+ lexedLength = number.length;
+ if (octalLiteral = /^0o([0-7]+)/.exec(number)) {
+ number = '0x' + parseInt(octalLiteral[1], 8).toString(16);
+ }
+ if (binaryLiteral = /^0b([01]+)/.exec(number)) {
+ number = '0x' + parseInt(binaryLiteral[1], 2).toString(16);
+ }
+ this.token('NUMBER', number, 0, lexedLength);
+ return lexedLength;
+ };
+
+ Lexer.prototype.stringToken = function() {
+ var match, octalEsc, string;
+ switch (this.chunk.charAt(0)) {
+ case "'":
+ if (!(match = SIMPLESTR.exec(this.chunk))) {
+ return 0;
+ }
+ string = match[0];
+ this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length);
+ break;
+ case '"':
+ if (!(string = this.balancedString(this.chunk, '"'))) {
+ return 0;
+ }
+ if (0 < string.indexOf('#{', 1)) {
+ this.interpolateString(string.slice(1, -1), {
+ strOffset: 1,
+ lexedLength: string.length
+ });
+ } else {
+ this.token('STRING', this.escapeLines(string, 0, string.length));
+ }
+ break;
+ default:
+ return 0;
+ }
+ if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) {
+ this.error("octal escape sequences " + string + " are not allowed");
+ }
+ return string.length;
+ };
+
+ Lexer.prototype.heredocToken = function() {
+ var doc, heredoc, match, quote;
+ if (!(match = HEREDOC.exec(this.chunk))) {
+ return 0;
+ }
+ heredoc = match[0];
+ quote = heredoc.charAt(0);
+ doc = this.sanitizeHeredoc(match[2], {
+ quote: quote,
+ indent: null
+ });
+ if (quote === '"' && 0 <= doc.indexOf('#{')) {
+ this.interpolateString(doc, {
+ heredoc: true,
+ strOffset: 3,
+ lexedLength: heredoc.length
+ });
+ } else {
+ this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length);
+ }
+ return heredoc.length;
+ };
+
+ Lexer.prototype.commentToken = function() {
+ var comment, here, match;
+ if (!(match = this.chunk.match(COMMENT))) {
+ return 0;
+ }
+ comment = match[0], here = match[1];
+ if (here) {
+ this.token('HERECOMMENT', this.sanitizeHeredoc(here, {
+ herecomment: true,
+ indent: repeat(' ', this.indent)
+ }), 0, comment.length);
+ }
+ return comment.length;
+ };
+
+ Lexer.prototype.jsToken = function() {
+ var match, script;
+ if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) {
+ return 0;
+ }
+ this.token('JS', (script = match[0]).slice(1, -1), 0, script.length);
+ return script.length;
+ };
+
+ Lexer.prototype.regexToken = function() {
+ var flags, length, match, prev, regex, _ref2, _ref3;
+ if (this.chunk.charAt(0) !== '/') {
+ return 0;
+ }
+ if (match = HEREGEX.exec(this.chunk)) {
+ length = this.heregexToken(match);
+ return length;
+ }
+ prev = last(this.tokens);
+ if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) {
+ return 0;
+ }
+ if (!(match = REGEX.exec(this.chunk))) {
+ return 0;
+ }
+ _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2];
+ if (regex.slice(0, 2) === '/*') {
+ this.error('regular expressions cannot begin with `*`');
+ }
+ if (regex === '//') {
+ regex = '/(?:)/';
+ }
+ this.token('REGEX', "" + regex + flags, 0, match.length);
+ return match.length;
+ };
+
+ Lexer.prototype.heregexToken = function(match) {
+ var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
+ heregex = match[0], body = match[1], flags = match[2];
+ if (0 > body.indexOf('#{')) {
+ re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/');
+ if (re.match(/^\*/)) {
+ this.error('regular expressions cannot begin with `*`');
+ }
+ this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length);
+ return heregex.length;
+ }
+ this.token('IDENTIFIER', 'RegExp', 0, 0);
+ this.token('CALL_START', '(', 0, 0);
+ tokens = [];
+ _ref2 = this.interpolateString(body, {
+ regex: true
+ });
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ token = _ref2[_i];
+ tag = token[0], value = token[1];
+ if (tag === 'TOKENS') {
+ tokens.push.apply(tokens, value);
+ } else if (tag === 'NEOSTRING') {
+ if (!(value = value.replace(HEREGEX_OMIT, ''))) {
+ continue;
+ }
+ value = value.replace(/\\/g, '\\\\');
+ token[0] = 'STRING';
+ token[1] = this.makeString(value, '"', true);
+ tokens.push(token);
+ } else {
+ this.error("Unexpected " + tag);
+ }
+ prev = last(this.tokens);
+ plusToken = ['+', '+'];
+ plusToken[2] = prev[2];
+ tokens.push(plusToken);
+ }
+ tokens.pop();
+ if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') {
+ this.token('STRING', '""', 0, 0);
+ this.token('+', '+', 0, 0);
+ }
+ (_ref4 = this.tokens).push.apply(_ref4, tokens);
+ if (flags) {
+ flagsOffset = heregex.lastIndexOf(flags);
+ this.token(',', ',', flagsOffset, 0);
+ this.token('STRING', '"' + flags + '"', flagsOffset, flags.length);
+ }
+ this.token(')', ')', heregex.length - 1, 0);
+ return heregex.length;
+ };
+
+ Lexer.prototype.lineToken = function() {
+ var diff, indent, match, noNewlines, size;
+ if (!(match = MULTI_DENT.exec(this.chunk))) {
+ return 0;
+ }
+ indent = match[0];
+ this.seenFor = false;
+ size = indent.length - 1 - indent.lastIndexOf('\n');
+ noNewlines = this.unfinished();
+ if (size - this.indebt === this.indent) {
+ if (noNewlines) {
+ this.suppressNewlines();
+ } else {
+ this.newlineToken(0);
+ }
+ return indent.length;
+ }
+ if (size > this.indent) {
+ if (noNewlines) {
+ this.indebt = size - this.indent;
+ this.suppressNewlines();
+ return indent.length;
+ }
+ if (!this.tokens.length) {
+ this.baseIndent = this.indent = size;
+ return indent.length;
+ }
+ diff = size - this.indent + this.outdebt;
+ this.token('INDENT', diff, indent.length - size, size);
+ this.indents.push(diff);
+ this.ends.push('OUTDENT');
+ this.outdebt = this.indebt = 0;
+ } else if (size < this.baseIndent) {
+ this.error('missing indentation', indent.length);
+ } else {
+ this.indebt = 0;
+ this.outdentToken(this.indent - size, noNewlines, indent.length);
+ }
+ this.indent = size;
+ return indent.length;
+ };
+
+ Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) {
+ var dent, len;
+ while (moveOut > 0) {
+ len = this.indents.length - 1;
+ if (this.indents[len] === void 0) {
+ moveOut = 0;
+ } else if (this.indents[len] === this.outdebt) {
+ moveOut -= this.outdebt;
+ this.outdebt = 0;
+ } else if (this.indents[len] < this.outdebt) {
+ this.outdebt -= this.indents[len];
+ moveOut -= this.indents[len];
+ } else {
+ dent = this.indents.pop() + this.outdebt;
+ moveOut -= dent;
+ this.outdebt = 0;
+ this.pair('OUTDENT');
+ this.token('OUTDENT', dent, 0, outdentLength);
+ }
+ }
+ if (dent) {
+ this.outdebt -= moveOut;
+ }
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
+ if (!(this.tag() === 'TERMINATOR' || noNewlines)) {
+ this.token('TERMINATOR', '\n', outdentLength, 0);
+ }
+ return this;
+ };
+
+ Lexer.prototype.whitespaceToken = function() {
+ var match, nline, prev;
+ if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) {
+ return 0;
+ }
+ prev = last(this.tokens);
+ if (prev) {
+ prev[match ? 'spaced' : 'newLine'] = true;
+ }
+ if (match) {
+ return match[0].length;
+ } else {
+ return 0;
+ }
+ };
+
+ Lexer.prototype.newlineToken = function(offset) {
+ while (this.value() === ';') {
+ this.tokens.pop();
+ }
+ if (this.tag() !== 'TERMINATOR') {
+ this.token('TERMINATOR', '\n', offset, 0);
+ }
+ return this;
+ };
+
+ Lexer.prototype.suppressNewlines = function() {
+ if (this.value() === '\\') {
+ this.tokens.pop();
+ }
+ return this;
+ };
+
+ Lexer.prototype.literalToken = function() {
+ var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5;
+ if (match = OPERATOR.exec(this.chunk)) {
+ value = match[0];
+ if (CODE.test(value)) {
+ this.tagParameters();
+ }
+ } else {
+ value = this.chunk.charAt(0);
+ }
+ tag = value;
+ prev = last(this.tokens);
+ if (value === '=' && prev) {
+ if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) {
+ this.error("reserved word \"" + (this.value()) + "\" can't be assigned");
+ }
+ if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') {
+ prev[0] = 'COMPOUND_ASSIGN';
+ prev[1] += '=';
+ return value.length;
+ }
+ }
+ if (value === ';') {
+ this.seenFor = false;
+ tag = 'TERMINATOR';
+ } else if (__indexOf.call(MATH, value) >= 0) {
+ tag = 'MATH';
+ } else if (__indexOf.call(COMPARE, value) >= 0) {
+ tag = 'COMPARE';
+ } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) {
+ tag = 'COMPOUND_ASSIGN';
+ } else if (__indexOf.call(UNARY, value) >= 0) {
+ tag = 'UNARY';
+ } else if (__indexOf.call(SHIFT, value) >= 0) {
+ tag = 'SHIFT';
+ } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) {
+ tag = 'LOGIC';
+ } else if (prev && !prev.spaced) {
+ if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) {
+ if (prev[0] === '?') {
+ prev[0] = 'FUNC_EXIST';
+ }
+ tag = 'CALL_START';
+ } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) {
+ tag = 'INDEX_START';
+ switch (prev[0]) {
+ case '?':
+ prev[0] = 'INDEX_SOAK';
+ }
+ }
+ }
+ switch (value) {
+ case '(':
+ case '{':
+ case '[':
+ this.ends.push(INVERSES[value]);
+ break;
+ case ')':
+ case '}':
+ case ']':
+ this.pair(value);
+ }
+ this.token(tag, value);
+ return value.length;
+ };
+
+ Lexer.prototype.sanitizeHeredoc = function(doc, options) {
+ var attempt, herecomment, indent, match, _ref2;
+ indent = options.indent, herecomment = options.herecomment;
+ if (herecomment) {
+ if (HEREDOC_ILLEGAL.test(doc)) {
+ this.error("block comment cannot contain \"*/\", starting");
+ }
+ if (doc.indexOf('\n') < 0) {
+ return doc;
+ }
+ } else {
+ while (match = HEREDOC_INDENT.exec(doc)) {
+ attempt = match[1];
+ if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) {
+ indent = attempt;
+ }
+ }
+ }
+ if (indent) {
+ doc = doc.replace(RegExp("\\n" + indent, "g"), '\n');
+ }
+ if (!herecomment) {
+ doc = doc.replace(/^\n/, '');
+ }
+ return doc;
+ };
+
+ Lexer.prototype.tagParameters = function() {
+ var i, stack, tok, tokens;
+ if (this.tag() !== ')') {
+ return this;
+ }
+ stack = [];
+ tokens = this.tokens;
+ i = tokens.length;
+ tokens[--i][0] = 'PARAM_END';
+ while (tok = tokens[--i]) {
+ switch (tok[0]) {
+ case ')':
+ stack.push(tok);
+ break;
+ case '(':
+ case 'CALL_START':
+ if (stack.length) {
+ stack.pop();
+ } else if (tok[0] === '(') {
+ tok[0] = 'PARAM_START';
+ return this;
+ } else {
+ return this;
+ }
+ }
+ }
+ return this;
+ };
+
+ Lexer.prototype.closeIndentation = function() {
+ return this.outdentToken(this.indent);
+ };
+
+ Lexer.prototype.balancedString = function(str, end) {
+ var continueCount, i, letter, match, prev, stack, _i, _ref2;
+ continueCount = 0;
+ stack = [end];
+ for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) {
+ if (continueCount) {
+ --continueCount;
+ continue;
+ }
+ switch (letter = str.charAt(i)) {
+ case '\\':
+ ++continueCount;
+ continue;
+ case end:
+ stack.pop();
+ if (!stack.length) {
+ return str.slice(0, +i + 1 || 9e9);
+ }
+ end = stack[stack.length - 1];
+ continue;
+ }
+ if (end === '}' && (letter === '"' || letter === "'")) {
+ stack.push(end = letter);
+ } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) {
+ continueCount += match[0].length - 1;
+ } else if (end === '}' && letter === '{') {
+ stack.push(end = '}');
+ } else if (end === '"' && prev === '#' && letter === '{') {
+ stack.push(end = '}');
+ }
+ prev = letter;
+ }
+ return this.error("missing " + (stack.pop()) + ", starting");
+ };
+
+ Lexer.prototype.interpolateString = function(str, options) {
+ var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4;
+ if (options == null) {
+ options = {};
+ }
+ heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength;
+ offsetInChunk = offsetInChunk || 0;
+ strOffset = strOffset || 0;
+ lexedLength = lexedLength || str.length;
+ if (heredoc && str.length > 0 && str[0] === '\n') {
+ str = str.slice(1);
+ strOffset++;
+ }
+ tokens = [];
+ pi = 0;
+ i = -1;
+ while (letter = str.charAt(i += 1)) {
+ if (letter === '\\') {
+ i += 1;
+ continue;
+ }
+ if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) {
+ continue;
+ }
+ if (pi < i) {
+ tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi));
+ }
+ inner = expr.slice(1, -1);
+ if (inner.length) {
+ _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1];
+ nested = new Lexer().tokenize(inner, {
+ line: line,
+ column: column,
+ rewrite: false
+ });
+ popped = nested.pop();
+ if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') {
+ popped = nested.shift();
+ }
+ if (len = nested.length) {
+ if (len > 1) {
+ nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0));
+ nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0));
+ }
+ tokens.push(['TOKENS', nested]);
+ }
+ }
+ i += expr.length;
+ pi = i + 1;
+ }
+ if ((i > pi && pi < str.length)) {
+ tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi));
+ }
+ if (regex) {
+ return tokens;
+ }
+ if (!tokens.length) {
+ return this.token('STRING', '""', offsetInChunk, lexedLength);
+ }
+ if (tokens[0][0] !== 'NEOSTRING') {
+ tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk));
+ }
+ if (interpolated = tokens.length > 1) {
+ this.token('(', '(', offsetInChunk, 0);
+ }
+ for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) {
+ token = tokens[i];
+ tag = token[0], value = token[1];
+ if (i) {
+ if (i) {
+ plusToken = this.token('+', '+');
+ }
+ locationToken = tag === 'TOKENS' ? value[0] : token;
+ plusToken[2] = {
+ first_line: locationToken[2].first_line,
+ first_column: locationToken[2].first_column,
+ last_line: locationToken[2].first_line,
+ last_column: locationToken[2].first_column
+ };
+ }
+ if (tag === 'TOKENS') {
+ (_ref4 = this.tokens).push.apply(_ref4, value);
+ } else if (tag === 'NEOSTRING') {
+ token[0] = 'STRING';
+ token[1] = this.makeString(value, '"', heredoc);
+ this.tokens.push(token);
+ } else {
+ this.error("Unexpected " + tag);
+ }
+ }
+ if (interpolated) {
+ rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0);
+ rparen.stringEnd = true;
+ this.tokens.push(rparen);
+ }
+ return tokens;
+ };
+
+ Lexer.prototype.pair = function(tag) {
+ var size, wanted;
+ if (tag !== (wanted = last(this.ends))) {
+ if ('OUTDENT' !== wanted) {
+ this.error("unmatched " + tag);
+ }
+ this.indent -= size = last(this.indents);
+ this.outdentToken(size, true);
+ return this.pair(tag);
+ }
+ return this.ends.pop();
+ };
+
+ Lexer.prototype.getLineAndColumnFromChunk = function(offset) {
+ var column, lineCount, lines, string;
+ if (offset === 0) {
+ return [this.chunkLine, this.chunkColumn];
+ }
+ if (offset >= this.chunk.length) {
+ string = this.chunk;
+ } else {
+ string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9);
+ }
+ lineCount = count(string, '\n');
+ column = this.chunkColumn;
+ if (lineCount > 0) {
+ lines = string.split('\n');
+ column = last(lines).length;
+ } else {
+ column += string.length;
+ }
+ return [this.chunkLine + lineCount, column];
+ };
+
+ Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) {
+ var lastCharacter, locationData, token, _ref2, _ref3;
+ if (offsetInChunk == null) {
+ offsetInChunk = 0;
+ }
+ if (length == null) {
+ length = value.length;
+ }
+ locationData = {};
+ _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1];
+ lastCharacter = Math.max(0, length - 1);
+ _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1];
+ token = [tag, value, locationData];
+ return token;
+ };
+
+ Lexer.prototype.token = function(tag, value, offsetInChunk, length) {
+ var token;
+ token = this.makeToken(tag, value, offsetInChunk, length);
+ this.tokens.push(token);
+ return token;
+ };
+
+ Lexer.prototype.tag = function(index, tag) {
+ var tok;
+ return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]);
+ };
+
+ Lexer.prototype.value = function(index, val) {
+ var tok;
+ return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]);
+ };
+
+ Lexer.prototype.unfinished = function() {
+ var _ref2;
+ return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS');
+ };
+
+ Lexer.prototype.escapeLines = function(str, heredoc) {
+ return str.replace(MULTILINER, heredoc ? '\\n' : '');
+ };
+
+ Lexer.prototype.makeString = function(body, quote, heredoc) {
+ if (!body) {
+ return quote + quote;
+ }
+ body = body.replace(/\\([\s\S])/g, function(match, contents) {
+ if (contents === '\n' || contents === quote) {
+ return contents;
+ } else {
+ return match;
+ }
+ });
+ body = body.replace(RegExp("" + quote, "g"), '\\$&');
+ return quote + this.escapeLines(body, heredoc) + quote;
+ };
+
+ Lexer.prototype.error = function(message, offset) {
+ var first_column, first_line, _ref2;
+ if (offset == null) {
+ offset = 0;
+ }
+ _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1];
+ return throwSyntaxError(message, {
+ first_line: first_line,
+ first_column: first_column
+ });
+ };
+
+ return Lexer;
+
+ })();
+
+ JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
+
+ COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
+
+ COFFEE_ALIAS_MAP = {
+ and: '&&',
+ or: '||',
+ is: '==',
+ isnt: '!=',
+ not: '!',
+ yes: 'true',
+ no: 'false',
+ on: 'true',
+ off: 'false'
+ };
+
+ COFFEE_ALIASES = (function() {
+ var _results;
+ _results = [];
+ for (key in COFFEE_ALIAS_MAP) {
+ _results.push(key);
+ }
+ return _results;
+ })();
+
+ COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES);
+
+ RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield'];
+
+ STRICT_PROSCRIBED = ['arguments', 'eval'];
+
+ JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED);
+
+ exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED);
+
+ exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED;
+
+ BOM = 65279;
+
+ IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/;
+
+ NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i;
+
+ HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/;
+
+ OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/;
+
+ WHITESPACE = /^[^\n\S]+/;
+
+ COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/;
+
+ CODE = /^[-=]>/;
+
+ MULTI_DENT = /^(?:\n[^\n\S]*)+/;
+
+ SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/;
+
+ JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/;
+
+ REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/;
+
+ HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/;
+
+ HEREGEX_OMIT = /\s+(?:#.*)?/g;
+
+ MULTILINER = /\n/g;
+
+ HEREDOC_INDENT = /\n+([^\n\S]*)/g;
+
+ HEREDOC_ILLEGAL = /\*\//;
+
+ LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/;
+
+ TRAILING_SPACES = /\s+$/;
+
+ COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
+
+ UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO'];
+
+ LOGIC = ['&&', '||', '&', '|', '^'];
+
+ SHIFT = ['<<', '>>', '>>>'];
+
+ COMPARE = ['==', '!=', '<', '>', '<=', '>='];
+
+ MATH = ['*', '/', '%'];
+
+ RELATION = ['IN', 'OF', 'INSTANCEOF'];
+
+ BOOL = ['TRUE', 'FALSE'];
+
+ NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--'];
+
+ NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']');
+
+ CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER'];
+
+ INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED');
+
+ LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR'];
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/nodes.js b/src/fauxton/assets/js/libs/ace/mode/coffee/nodes.js
new file mode 100644
index 000000000..b97dd58a4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/nodes.js
@@ -0,0 +1,3080 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+// Generated by CoffeeScript 1.6.3
+
+ var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3,
+ __hasProp = {}.hasOwnProperty,
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
+ Error.stackTraceLimit = Infinity;
+
+ Scope = require('./scope').Scope;
+
+ _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED;
+
+ _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError;
+
+ exports.extend = extend;
+
+ exports.addLocationDataFn = addLocationDataFn;
+
+ YES = function() {
+ return true;
+ };
+
+ NO = function() {
+ return false;
+ };
+
+ THIS = function() {
+ return this;
+ };
+
+ NEGATE = function() {
+ this.negated = !this.negated;
+ return this;
+ };
+
+ exports.CodeFragment = CodeFragment = (function() {
+ function CodeFragment(parent, code) {
+ var _ref2;
+ this.code = "" + code;
+ this.locationData = parent != null ? parent.locationData : void 0;
+ this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown';
+ }
+
+ CodeFragment.prototype.toString = function() {
+ return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : '');
+ };
+
+ return CodeFragment;
+
+ })();
+
+ fragmentsToText = function(fragments) {
+ var fragment;
+ return ((function() {
+ var _i, _len, _results;
+ _results = [];
+ for (_i = 0, _len = fragments.length; _i < _len; _i++) {
+ fragment = fragments[_i];
+ _results.push(fragment.code);
+ }
+ return _results;
+ })()).join('');
+ };
+
+ exports.Base = Base = (function() {
+ function Base() {}
+
+ Base.prototype.compile = function(o, lvl) {
+ return fragmentsToText(this.compileToFragments(o, lvl));
+ };
+
+ Base.prototype.compileToFragments = function(o, lvl) {
+ var node;
+ o = extend({}, o);
+ if (lvl) {
+ o.level = lvl;
+ }
+ node = this.unfoldSoak(o) || this;
+ node.tab = o.indent;
+ if (o.level === LEVEL_TOP || !node.isStatement(o)) {
+ return node.compileNode(o);
+ } else {
+ return node.compileClosure(o);
+ }
+ };
+
+ Base.prototype.compileClosure = function(o) {
+ var jumpNode;
+ if (jumpNode = this.jumps()) {
+ jumpNode.error('cannot use a pure statement in an expression');
+ }
+ o.sharedScope = true;
+ return Closure.wrap(this).compileNode(o);
+ };
+
+ Base.prototype.cache = function(o, level, reused) {
+ var ref, sub;
+ if (!this.isComplex()) {
+ ref = level ? this.compileToFragments(o, level) : this;
+ return [ref, ref];
+ } else {
+ ref = new Literal(reused || o.scope.freeVariable('ref'));
+ sub = new Assign(ref, this);
+ if (level) {
+ return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]];
+ } else {
+ return [sub, ref];
+ }
+ }
+ };
+
+ Base.prototype.cacheToCodeFragments = function(cacheValues) {
+ return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])];
+ };
+
+ Base.prototype.makeReturn = function(res) {
+ var me;
+ me = this.unwrapAll();
+ if (res) {
+ return new Call(new Literal("" + res + ".push"), [me]);
+ } else {
+ return new Return(me);
+ }
+ };
+
+ Base.prototype.contains = function(pred) {
+ var node;
+ node = void 0;
+ this.traverseChildren(false, function(n) {
+ if (pred(n)) {
+ node = n;
+ return false;
+ }
+ });
+ return node;
+ };
+
+ Base.prototype.lastNonComment = function(list) {
+ var i;
+ i = list.length;
+ while (i--) {
+ if (!(list[i] instanceof Comment)) {
+ return list[i];
+ }
+ }
+ return null;
+ };
+
+ Base.prototype.toString = function(idt, name) {
+ var tree;
+ if (idt == null) {
+ idt = '';
+ }
+ if (name == null) {
+ name = this.constructor.name;
+ }
+ tree = '\n' + idt + name;
+ if (this.soak) {
+ tree += '?';
+ }
+ this.eachChild(function(node) {
+ return tree += node.toString(idt + TAB);
+ });
+ return tree;
+ };
+
+ Base.prototype.eachChild = function(func) {
+ var attr, child, _i, _j, _len, _len1, _ref2, _ref3;
+ if (!this.children) {
+ return this;
+ }
+ _ref2 = this.children;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ attr = _ref2[_i];
+ if (this[attr]) {
+ _ref3 = flatten([this[attr]]);
+ for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
+ child = _ref3[_j];
+ if (func(child) === false) {
+ return this;
+ }
+ }
+ }
+ }
+ return this;
+ };
+
+ Base.prototype.traverseChildren = function(crossScope, func) {
+ return this.eachChild(function(child) {
+ var recur;
+ recur = func(child);
+ if (recur !== false) {
+ return child.traverseChildren(crossScope, func);
+ }
+ });
+ };
+
+ Base.prototype.invert = function() {
+ return new Op('!', this);
+ };
+
+ Base.prototype.unwrapAll = function() {
+ var node;
+ node = this;
+ while (node !== (node = node.unwrap())) {
+ continue;
+ }
+ return node;
+ };
+
+ Base.prototype.children = [];
+
+ Base.prototype.isStatement = NO;
+
+ Base.prototype.jumps = NO;
+
+ Base.prototype.isComplex = YES;
+
+ Base.prototype.isChainable = NO;
+
+ Base.prototype.isAssignable = NO;
+
+ Base.prototype.unwrap = THIS;
+
+ Base.prototype.unfoldSoak = NO;
+
+ Base.prototype.assigns = NO;
+
+ Base.prototype.updateLocationDataIfMissing = function(locationData) {
+ if (this.locationData) {
+ return this;
+ }
+ this.locationData = locationData;
+ return this.eachChild(function(child) {
+ return child.updateLocationDataIfMissing(locationData);
+ });
+ };
+
+ Base.prototype.error = function(message) {
+ return throwSyntaxError(message, this.locationData);
+ };
+
+ Base.prototype.makeCode = function(code) {
+ return new CodeFragment(this, code);
+ };
+
+ Base.prototype.wrapInBraces = function(fragments) {
+ return [].concat(this.makeCode('('), fragments, this.makeCode(')'));
+ };
+
+ Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) {
+ var answer, fragments, i, _i, _len;
+ answer = [];
+ for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) {
+ fragments = fragmentsList[i];
+ if (i) {
+ answer.push(this.makeCode(joinStr));
+ }
+ answer = answer.concat(fragments);
+ }
+ return answer;
+ };
+
+ return Base;
+
+ })();
+
+ exports.Block = Block = (function(_super) {
+ __extends(Block, _super);
+
+ function Block(nodes) {
+ this.expressions = compact(flatten(nodes || []));
+ }
+
+ Block.prototype.children = ['expressions'];
+
+ Block.prototype.push = function(node) {
+ this.expressions.push(node);
+ return this;
+ };
+
+ Block.prototype.pop = function() {
+ return this.expressions.pop();
+ };
+
+ Block.prototype.unshift = function(node) {
+ this.expressions.unshift(node);
+ return this;
+ };
+
+ Block.prototype.unwrap = function() {
+ if (this.expressions.length === 1) {
+ return this.expressions[0];
+ } else {
+ return this;
+ }
+ };
+
+ Block.prototype.isEmpty = function() {
+ return !this.expressions.length;
+ };
+
+ Block.prototype.isStatement = function(o) {
+ var exp, _i, _len, _ref2;
+ _ref2 = this.expressions;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ exp = _ref2[_i];
+ if (exp.isStatement(o)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ Block.prototype.jumps = function(o) {
+ var exp, _i, _len, _ref2;
+ _ref2 = this.expressions;
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ exp = _ref2[_i];
+ if (exp.jumps(o)) {
+ return exp;
+ }
+ }
+ };
+
+ Block.prototype.makeReturn = function(res) {
+ var expr, len;
+ len = this.expressions.length;
+ while (len--) {
+ expr = this.expressions[len];
+ if (!(expr instanceof Comment)) {
+ this.expressions[len] = expr.makeReturn(res);
+ if (expr instanceof Return && !expr.expression) {
+ this.expressions.splice(len, 1);
+ }
+ break;
+ }
+ }
+ return this;
+ };
+
+ Block.prototype.compileToFragments = function(o, level) {
+ if (o == null) {
+ o = {};
+ }
+ if (o.scope) {
+ return Block.__super__.compileToFragments.call(this, o, level);
+ } else {
+ return this.compileRoot(o);
+ }
+ };
+
+ Block.prototype.compileNode = function(o) {
+ var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2;
+ this.tab = o.indent;
+ top = o.level === LEVEL_TOP;
+ compiledNodes = [];
+ _ref2 = this.expressions;
+ for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) {
+ node = _ref2[index];
+ node = node.unwrapAll();
+ node = node.unfoldSoak(o) || node;
+ if (node instanceof Block) {
+ compiledNodes.push(node.compileNode(o));
+ } else if (top) {
+ node.front = true;
+ fragments = node.compileToFragments(o);
+ if (!node.isStatement(o)) {
+ fragments.unshift(this.makeCode("" + this.tab));
+ fragments.push(this.makeCode(";"));
+ }
+ compiledNodes.push(fragments);
+ } else {
+ compiledNodes.push(node.compileToFragments(o, LEVEL_LIST));
+ }
+ }
+ if (top) {
+ if (this.spaced) {
+ return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n"));
+ } else {
+ return this.joinFragmentArrays(compiledNodes, '\n');
+ }
+ }
+ if (compiledNodes.length) {
+ answer = this.joinFragmentArrays(compiledNodes, ', ');
+ } else {
+ answer = [this.makeCode("void 0")];
+ }
+ if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Block.prototype.compileRoot = function(o) {
+ var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2;
+ o.indent = o.bare ? '' : TAB;
+ o.level = LEVEL_TOP;
+ this.spaced = true;
+ o.scope = new Scope(null, this, null);
+ _ref2 = o.locals || [];
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
+ name = _ref2[_i];
+ o.scope.parameter(name);
+ }
+ prelude = [];
+ if (!o.bare) {
+ preludeExps = (function() {
+ var _j, _len1, _ref3, _results;
+ _ref3 = this.expressions;
+ _results = [];
+ for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) {
+ exp = _ref3[i];
+ if (!(exp.unwrap() instanceof Comment)) {
+ break;
+ }
+ _results.push(exp);
+ }
+ return _results;
+ }).call(this);
+ rest = this.expressions.slice(preludeExps.length);
+ this.expressions = preludeExps;
+ if (preludeExps.length) {
+ prelude = this.compileNode(merge(o, {
+ indent: ''
+ }));
+ prelude.push(this.makeCode("\n"));
+ }
+ this.expressions = rest;
+ }
+ fragments = this.compileWithDeclarations(o);
+ if (o.bare) {
+ return fragments;
+ }
+ return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n"));
+ };
+
+ Block.prototype.compileWithDeclarations = function(o) {
+ var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4;
+ fragments = [];
+ post = [];
+ _ref2 = this.expressions;
+ for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) {
+ exp = _ref2[i];
+ exp = exp.unwrap();
+ if (!(exp instanceof Comment || exp instanceof Literal)) {
+ break;
+ }
+ }
+ o = merge(o, {
+ level: LEVEL_TOP
+ });
+ if (i) {
+ rest = this.expressions.splice(i, 9e9);
+ _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1];
+ _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1];
+ this.expressions = rest;
+ }
+ post = this.compileNode(o);
+ scope = o.scope;
+ if (scope.expressions === this) {
+ declars = o.scope.hasDeclarations();
+ assigns = scope.hasAssignments;
+ if (declars || assigns) {
+ if (i) {
+ fragments.push(this.makeCode('\n'));
+ }
+ fragments.push(this.makeCode("" + this.tab + "var "));
+ if (declars) {
+ fragments.push(this.makeCode(scope.declaredVariables().join(', ')));
+ }
+ if (assigns) {
+ if (declars) {
+ fragments.push(this.makeCode(",\n" + (this.tab + TAB)));
+ }
+ fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB))));
+ }
+ fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : '')));
+ } else if (fragments.length && post.length) {
+ fragments.push(this.makeCode("\n"));
+ }
+ }
+ return fragments.concat(post);
+ };
+
+ Block.wrap = function(nodes) {
+ if (nodes.length === 1 && nodes[0] instanceof Block) {
+ return nodes[0];
+ }
+ return new Block(nodes);
+ };
+
+ return Block;
+
+ })(Base);
+
+ exports.Literal = Literal = (function(_super) {
+ __extends(Literal, _super);
+
+ function Literal(value) {
+ this.value = value;
+ }
+
+ Literal.prototype.makeReturn = function() {
+ if (this.isStatement()) {
+ return this;
+ } else {
+ return Literal.__super__.makeReturn.apply(this, arguments);
+ }
+ };
+
+ Literal.prototype.isAssignable = function() {
+ return IDENTIFIER.test(this.value);
+ };
+
+ Literal.prototype.isStatement = function() {
+ var _ref2;
+ return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger';
+ };
+
+ Literal.prototype.isComplex = NO;
+
+ Literal.prototype.assigns = function(name) {
+ return name === this.value;
+ };
+
+ Literal.prototype.jumps = function(o) {
+ if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) {
+ return this;
+ }
+ if (this.value === 'continue' && !(o != null ? o.loop : void 0)) {
+ return this;
+ }
+ };
+
+ Literal.prototype.compileNode = function(o) {
+ var answer, code, _ref2;
+ code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value;
+ answer = this.isStatement() ? "" + this.tab + code + ";" : code;
+ return [this.makeCode(answer)];
+ };
+
+ Literal.prototype.toString = function() {
+ return ' "' + this.value + '"';
+ };
+
+ return Literal;
+
+ })(Base);
+
+ exports.Undefined = (function(_super) {
+ __extends(Undefined, _super);
+
+ function Undefined() {
+ _ref2 = Undefined.__super__.constructor.apply(this, arguments);
+ return _ref2;
+ }
+
+ Undefined.prototype.isAssignable = NO;
+
+ Undefined.prototype.isComplex = NO;
+
+ Undefined.prototype.compileNode = function(o) {
+ return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')];
+ };
+
+ return Undefined;
+
+ })(Base);
+
+ exports.Null = (function(_super) {
+ __extends(Null, _super);
+
+ function Null() {
+ _ref3 = Null.__super__.constructor.apply(this, arguments);
+ return _ref3;
+ }
+
+ Null.prototype.isAssignable = NO;
+
+ Null.prototype.isComplex = NO;
+
+ Null.prototype.compileNode = function() {
+ return [this.makeCode("null")];
+ };
+
+ return Null;
+
+ })(Base);
+
+ exports.Bool = (function(_super) {
+ __extends(Bool, _super);
+
+ Bool.prototype.isAssignable = NO;
+
+ Bool.prototype.isComplex = NO;
+
+ Bool.prototype.compileNode = function() {
+ return [this.makeCode(this.val)];
+ };
+
+ function Bool(val) {
+ this.val = val;
+ }
+
+ return Bool;
+
+ })(Base);
+
+ exports.Return = Return = (function(_super) {
+ __extends(Return, _super);
+
+ function Return(expr) {
+ if (expr && !expr.unwrap().isUndefined) {
+ this.expression = expr;
+ }
+ }
+
+ Return.prototype.children = ['expression'];
+
+ Return.prototype.isStatement = YES;
+
+ Return.prototype.makeReturn = THIS;
+
+ Return.prototype.jumps = THIS;
+
+ Return.prototype.compileToFragments = function(o, level) {
+ var expr, _ref4;
+ expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0;
+ if (expr && !(expr instanceof Return)) {
+ return expr.compileToFragments(o, level);
+ } else {
+ return Return.__super__.compileToFragments.call(this, o, level);
+ }
+ };
+
+ Return.prototype.compileNode = function(o) {
+ var answer;
+ answer = [];
+ answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : ""))));
+ if (this.expression) {
+ answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN));
+ }
+ answer.push(this.makeCode(";"));
+ return answer;
+ };
+
+ return Return;
+
+ })(Base);
+
+ exports.Value = Value = (function(_super) {
+ __extends(Value, _super);
+
+ function Value(base, props, tag) {
+ if (!props && base instanceof Value) {
+ return base;
+ }
+ this.base = base;
+ this.properties = props || [];
+ if (tag) {
+ this[tag] = true;
+ }
+ return this;
+ }
+
+ Value.prototype.children = ['base', 'properties'];
+
+ Value.prototype.add = function(props) {
+ this.properties = this.properties.concat(props);
+ return this;
+ };
+
+ Value.prototype.hasProperties = function() {
+ return !!this.properties.length;
+ };
+
+ Value.prototype.isArray = function() {
+ return !this.properties.length && this.base instanceof Arr;
+ };
+
+ Value.prototype.isComplex = function() {
+ return this.hasProperties() || this.base.isComplex();
+ };
+
+ Value.prototype.isAssignable = function() {
+ return this.hasProperties() || this.base.isAssignable();
+ };
+
+ Value.prototype.isSimpleNumber = function() {
+ return this.base instanceof Literal && SIMPLENUM.test(this.base.value);
+ };
+
+ Value.prototype.isString = function() {
+ return this.base instanceof Literal && IS_STRING.test(this.base.value);
+ };
+
+ Value.prototype.isAtomic = function() {
+ var node, _i, _len, _ref4;
+ _ref4 = this.properties.concat(this.base);
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ node = _ref4[_i];
+ if (node.soak || node instanceof Call) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ Value.prototype.isStatement = function(o) {
+ return !this.properties.length && this.base.isStatement(o);
+ };
+
+ Value.prototype.assigns = function(name) {
+ return !this.properties.length && this.base.assigns(name);
+ };
+
+ Value.prototype.jumps = function(o) {
+ return !this.properties.length && this.base.jumps(o);
+ };
+
+ Value.prototype.isObject = function(onlyGenerated) {
+ if (this.properties.length) {
+ return false;
+ }
+ return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated);
+ };
+
+ Value.prototype.isSplice = function() {
+ return last(this.properties) instanceof Slice;
+ };
+
+ Value.prototype.unwrap = function() {
+ if (this.properties.length) {
+ return this;
+ } else {
+ return this.base;
+ }
+ };
+
+ Value.prototype.cacheReference = function(o) {
+ var base, bref, name, nref;
+ name = last(this.properties);
+ if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) {
+ return [this, this];
+ }
+ base = new Value(this.base, this.properties.slice(0, -1));
+ if (base.isComplex()) {
+ bref = new Literal(o.scope.freeVariable('base'));
+ base = new Value(new Parens(new Assign(bref, base)));
+ }
+ if (!name) {
+ return [base, bref];
+ }
+ if (name.isComplex()) {
+ nref = new Literal(o.scope.freeVariable('name'));
+ name = new Index(new Assign(nref, name.index));
+ nref = new Index(nref);
+ }
+ return [base.add(name), new Value(bref || base.base, [nref || name])];
+ };
+
+ Value.prototype.compileNode = function(o) {
+ var fragments, prop, props, _i, _len;
+ this.base.front = this.front;
+ props = this.properties;
+ fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null));
+ if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) {
+ fragments.push(this.makeCode('.'));
+ }
+ for (_i = 0, _len = props.length; _i < _len; _i++) {
+ prop = props[_i];
+ fragments.push.apply(fragments, prop.compileToFragments(o));
+ }
+ return fragments;
+ };
+
+ Value.prototype.unfoldSoak = function(o) {
+ var _this = this;
+ return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() {
+ var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5;
+ if (ifn = _this.base.unfoldSoak(o)) {
+ (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties);
+ return ifn;
+ }
+ _ref5 = _this.properties;
+ for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) {
+ prop = _ref5[i];
+ if (!prop.soak) {
+ continue;
+ }
+ prop.soak = false;
+ fst = new Value(_this.base, _this.properties.slice(0, i));
+ snd = new Value(_this.base, _this.properties.slice(i));
+ if (fst.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, fst));
+ snd.base = ref;
+ }
+ return new If(new Existence(fst), snd, {
+ soak: true
+ });
+ }
+ return false;
+ })();
+ };
+
+ return Value;
+
+ })(Base);
+
+ exports.Comment = Comment = (function(_super) {
+ __extends(Comment, _super);
+
+ function Comment(comment) {
+ this.comment = comment;
+ }
+
+ Comment.prototype.isStatement = YES;
+
+ Comment.prototype.makeReturn = THIS;
+
+ Comment.prototype.compileNode = function(o, level) {
+ var code;
+ code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/";
+ if ((level || o.level) === LEVEL_TOP) {
+ code = o.indent + code;
+ }
+ return [this.makeCode("\n"), this.makeCode(code)];
+ };
+
+ return Comment;
+
+ })(Base);
+
+ exports.Call = Call = (function(_super) {
+ __extends(Call, _super);
+
+ function Call(variable, args, soak) {
+ this.args = args != null ? args : [];
+ this.soak = soak;
+ this.isNew = false;
+ this.isSuper = variable === 'super';
+ this.variable = this.isSuper ? null : variable;
+ }
+
+ Call.prototype.children = ['variable', 'args'];
+
+ Call.prototype.newInstance = function() {
+ var base, _ref4;
+ base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable;
+ if (base instanceof Call && !base.isNew) {
+ base.newInstance();
+ } else {
+ this.isNew = true;
+ }
+ return this;
+ };
+
+ Call.prototype.superReference = function(o) {
+ var accesses, method;
+ method = o.scope.namedMethod();
+ if (method != null ? method.klass : void 0) {
+ accesses = [new Access(new Literal('__super__'))];
+ if (method["static"]) {
+ accesses.push(new Access(new Literal('constructor')));
+ }
+ accesses.push(new Access(new Literal(method.name)));
+ return (new Value(new Literal(method.klass), accesses)).compile(o);
+ } else if (method != null ? method.ctor : void 0) {
+ return "" + method.name + ".__super__.constructor";
+ } else {
+ return this.error('cannot call super outside of an instance method.');
+ }
+ };
+
+ Call.prototype.superThis = function(o) {
+ var method;
+ method = o.scope.method;
+ return (method && !method.klass && method.context) || "this";
+ };
+
+ Call.prototype.unfoldSoak = function(o) {
+ var call, ifn, left, list, rite, _i, _len, _ref4, _ref5;
+ if (this.soak) {
+ if (this.variable) {
+ if (ifn = unfoldSoak(o, this, 'variable')) {
+ return ifn;
+ }
+ _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1];
+ } else {
+ left = new Literal(this.superReference(o));
+ rite = new Value(left);
+ }
+ rite = new Call(rite, this.args);
+ rite.isNew = this.isNew;
+ left = new Literal("typeof " + (left.compile(o)) + " === \"function\"");
+ return new If(left, new Value(rite), {
+ soak: true
+ });
+ }
+ call = this;
+ list = [];
+ while (true) {
+ if (call.variable instanceof Call) {
+ list.push(call);
+ call = call.variable;
+ continue;
+ }
+ if (!(call.variable instanceof Value)) {
+ break;
+ }
+ list.push(call);
+ if (!((call = call.variable.base) instanceof Call)) {
+ break;
+ }
+ }
+ _ref5 = list.reverse();
+ for (_i = 0, _len = _ref5.length; _i < _len; _i++) {
+ call = _ref5[_i];
+ if (ifn) {
+ if (call.variable instanceof Call) {
+ call.variable = ifn;
+ } else {
+ call.variable.base = ifn;
+ }
+ }
+ ifn = unfoldSoak(o, call, 'variable');
+ }
+ return ifn;
+ };
+
+ Call.prototype.compileNode = function(o) {
+ var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5;
+ if ((_ref4 = this.variable) != null) {
+ _ref4.front = this.front;
+ }
+ compiledArray = Splat.compileSplattedArray(o, this.args, true);
+ if (compiledArray.length) {
+ return this.compileSplat(o, compiledArray);
+ }
+ compiledArgs = [];
+ _ref5 = this.args;
+ for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) {
+ arg = _ref5[argIndex];
+ if (argIndex) {
+ compiledArgs.push(this.makeCode(", "));
+ }
+ compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST));
+ }
+ fragments = [];
+ if (this.isSuper) {
+ preface = this.superReference(o) + (".call(" + (this.superThis(o)));
+ if (compiledArgs.length) {
+ preface += ", ";
+ }
+ fragments.push(this.makeCode(preface));
+ } else {
+ if (this.isNew) {
+ fragments.push(this.makeCode('new '));
+ }
+ fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS));
+ fragments.push(this.makeCode("("));
+ }
+ fragments.push.apply(fragments, compiledArgs);
+ fragments.push(this.makeCode(")"));
+ return fragments;
+ };
+
+ Call.prototype.compileSplat = function(o, splatArgs) {
+ var answer, base, fun, idt, name, ref;
+ if (this.isSuper) {
+ return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")"));
+ }
+ if (this.isNew) {
+ idt = this.tab + TAB;
+ return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})"));
+ }
+ answer = [];
+ base = new Value(this.variable);
+ if ((name = base.properties.pop()) && base.isComplex()) {
+ ref = o.scope.freeVariable('ref');
+ answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o));
+ } else {
+ fun = base.compileToFragments(o, LEVEL_ACCESS);
+ if (SIMPLENUM.test(fragmentsToText(fun))) {
+ fun = this.wrapInBraces(fun);
+ }
+ if (name) {
+ ref = fragmentsToText(fun);
+ fun.push.apply(fun, name.compileToFragments(o));
+ } else {
+ ref = 'null';
+ }
+ answer = answer.concat(fun);
+ }
+ return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")"));
+ };
+
+ return Call;
+
+ })(Base);
+
+ exports.Extends = Extends = (function(_super) {
+ __extends(Extends, _super);
+
+ function Extends(child, parent) {
+ this.child = child;
+ this.parent = parent;
+ }
+
+ Extends.prototype.children = ['child', 'parent'];
+
+ Extends.prototype.compileToFragments = function(o) {
+ return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o);
+ };
+
+ return Extends;
+
+ })(Base);
+
+ exports.Access = Access = (function(_super) {
+ __extends(Access, _super);
+
+ function Access(name, tag) {
+ this.name = name;
+ this.name.asKey = true;
+ this.soak = tag === 'soak';
+ }
+
+ Access.prototype.children = ['name'];
+
+ Access.prototype.compileToFragments = function(o) {
+ var name;
+ name = this.name.compileToFragments(o);
+ if (IDENTIFIER.test(fragmentsToText(name))) {
+ name.unshift(this.makeCode("."));
+ } else {
+ name.unshift(this.makeCode("["));
+ name.push(this.makeCode("]"));
+ }
+ return name;
+ };
+
+ Access.prototype.isComplex = NO;
+
+ return Access;
+
+ })(Base);
+
+ exports.Index = Index = (function(_super) {
+ __extends(Index, _super);
+
+ function Index(index) {
+ this.index = index;
+ }
+
+ Index.prototype.children = ['index'];
+
+ Index.prototype.compileToFragments = function(o) {
+ return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]"));
+ };
+
+ Index.prototype.isComplex = function() {
+ return this.index.isComplex();
+ };
+
+ return Index;
+
+ })(Base);
+
+ exports.Range = Range = (function(_super) {
+ __extends(Range, _super);
+
+ Range.prototype.children = ['from', 'to'];
+
+ function Range(from, to, tag) {
+ this.from = from;
+ this.to = to;
+ this.exclusive = tag === 'exclusive';
+ this.equals = this.exclusive ? '' : '=';
+ }
+
+ Range.prototype.compileVariables = function(o) {
+ var step, _ref4, _ref5, _ref6, _ref7;
+ o = merge(o, {
+ top: true
+ });
+ _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1];
+ _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1];
+ if (step = del(o, 'step')) {
+ _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1];
+ }
+ _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1];
+ if (this.stepVar) {
+ return this.stepNum = this.stepVar.match(SIMPLENUM);
+ }
+ };
+
+ Range.prototype.compileNode = function(o) {
+ var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5;
+ if (!this.fromVar) {
+ this.compileVariables(o);
+ }
+ if (!o.index) {
+ return this.compileArray(o);
+ }
+ known = this.fromNum && this.toNum;
+ idx = del(o, 'index');
+ idxName = del(o, 'name');
+ namedIndex = idxName && idxName !== idx;
+ varPart = "" + idx + " = " + this.fromC;
+ if (this.toC !== this.toVar) {
+ varPart += ", " + this.toC;
+ }
+ if (this.step !== this.stepVar) {
+ varPart += ", " + this.step;
+ }
+ _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1];
+ condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar);
+ stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--";
+ if (namedIndex) {
+ varPart = "" + idxName + " = " + varPart;
+ }
+ if (namedIndex) {
+ stepPart = "" + idxName + " = " + stepPart;
+ }
+ return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)];
+ };
+
+ Range.prototype.compileArray = function(o) {
+ var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results;
+ if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) {
+ range = (function() {
+ _results = [];
+ for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); }
+ return _results;
+ }).apply(this);
+ if (this.exclusive) {
+ range.pop();
+ }
+ return [this.makeCode("[" + (range.join(', ')) + "]")];
+ }
+ idt = this.tab + TAB;
+ i = o.scope.freeVariable('i');
+ result = o.scope.freeVariable('results');
+ pre = "\n" + idt + result + " = [];";
+ if (this.fromNum && this.toNum) {
+ o.index = i;
+ body = fragmentsToText(this.compileNode(o));
+ } else {
+ vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : '');
+ cond = "" + this.fromVar + " <= " + this.toVar;
+ body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--";
+ }
+ post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent;
+ hasArgs = function(node) {
+ return node != null ? node.contains(function(n) {
+ return n instanceof Literal && n.value === 'arguments' && !n.asKey;
+ }) : void 0;
+ };
+ if (hasArgs(this.from) || hasArgs(this.to)) {
+ args = ', arguments';
+ }
+ return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")];
+ };
+
+ return Range;
+
+ })(Base);
+
+ exports.Slice = Slice = (function(_super) {
+ __extends(Slice, _super);
+
+ Slice.prototype.children = ['range'];
+
+ function Slice(range) {
+ this.range = range;
+ Slice.__super__.constructor.call(this);
+ }
+
+ Slice.prototype.compileNode = function(o) {
+ var compiled, compiledText, from, fromCompiled, to, toStr, _ref4;
+ _ref4 = this.range, to = _ref4.to, from = _ref4.from;
+ fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')];
+ if (to) {
+ compiled = to.compileToFragments(o, LEVEL_PAREN);
+ compiledText = fragmentsToText(compiled);
+ if (!(!this.range.exclusive && +compiledText === -1)) {
+ toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9"));
+ }
+ }
+ return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")];
+ };
+
+ return Slice;
+
+ })(Base);
+
+ exports.Obj = Obj = (function(_super) {
+ __extends(Obj, _super);
+
+ function Obj(props, generated) {
+ this.generated = generated != null ? generated : false;
+ this.objects = this.properties = props || [];
+ }
+
+ Obj.prototype.children = ['properties'];
+
+ Obj.prototype.compileNode = function(o) {
+ var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1;
+ props = this.properties;
+ if (!props.length) {
+ return [this.makeCode(this.front ? '({})' : '{}')];
+ }
+ if (this.generated) {
+ for (_i = 0, _len = props.length; _i < _len; _i++) {
+ node = props[_i];
+ if (node instanceof Value) {
+ node.error('cannot have an implicit value in an implicit object');
+ }
+ }
+ }
+ idt = o.indent += TAB;
+ lastNoncom = this.lastNonComment(this.properties);
+ answer = [];
+ for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) {
+ prop = props[i];
+ join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n';
+ indent = prop instanceof Comment ? '' : idt;
+ if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) {
+ prop.variable.error('Invalid object key');
+ }
+ if (prop instanceof Value && prop["this"]) {
+ prop = new Assign(prop.properties[0].name, prop, 'object');
+ }
+ if (!(prop instanceof Comment)) {
+ if (!(prop instanceof Assign)) {
+ prop = new Assign(prop, prop, 'object');
+ }
+ (prop.variable.base || prop.variable).asKey = true;
+ }
+ if (indent) {
+ answer.push(this.makeCode(indent));
+ }
+ answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP));
+ if (join) {
+ answer.push(this.makeCode(join));
+ }
+ }
+ answer.unshift(this.makeCode("{" + (props.length && '\n')));
+ answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}"));
+ if (this.front) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Obj.prototype.assigns = function(name) {
+ var prop, _i, _len, _ref4;
+ _ref4 = this.properties;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ prop = _ref4[_i];
+ if (prop.assigns(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ return Obj;
+
+ })(Base);
+
+ exports.Arr = Arr = (function(_super) {
+ __extends(Arr, _super);
+
+ function Arr(objs) {
+ this.objects = objs || [];
+ }
+
+ Arr.prototype.children = ['objects'];
+
+ Arr.prototype.compileNode = function(o) {
+ var answer, compiledObjs, fragments, index, obj, _i, _len;
+ if (!this.objects.length) {
+ return [this.makeCode('[]')];
+ }
+ o.indent += TAB;
+ answer = Splat.compileSplattedArray(o, this.objects);
+ if (answer.length) {
+ return answer;
+ }
+ answer = [];
+ compiledObjs = (function() {
+ var _i, _len, _ref4, _results;
+ _ref4 = this.objects;
+ _results = [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ _results.push(obj.compileToFragments(o, LEVEL_LIST));
+ }
+ return _results;
+ }).call(this);
+ for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) {
+ fragments = compiledObjs[index];
+ if (index) {
+ answer.push(this.makeCode(", "));
+ }
+ answer.push.apply(answer, fragments);
+ }
+ if (fragmentsToText(answer).indexOf('\n') >= 0) {
+ answer.unshift(this.makeCode("[\n" + o.indent));
+ answer.push(this.makeCode("\n" + this.tab + "]"));
+ } else {
+ answer.unshift(this.makeCode("["));
+ answer.push(this.makeCode("]"));
+ }
+ return answer;
+ };
+
+ Arr.prototype.assigns = function(name) {
+ var obj, _i, _len, _ref4;
+ _ref4 = this.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (obj.assigns(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ return Arr;
+
+ })(Base);
+
+ exports.Class = Class = (function(_super) {
+ __extends(Class, _super);
+
+ function Class(variable, parent, body) {
+ this.variable = variable;
+ this.parent = parent;
+ this.body = body != null ? body : new Block;
+ this.boundFuncs = [];
+ this.body.classBody = true;
+ }
+
+ Class.prototype.children = ['variable', 'parent', 'body'];
+
+ Class.prototype.determineName = function() {
+ var decl, tail;
+ if (!this.variable) {
+ return null;
+ }
+ decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value;
+ if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) {
+ this.variable.error("class variable name may not be " + decl);
+ }
+ return decl && (decl = IDENTIFIER.test(decl) && decl);
+ };
+
+ Class.prototype.setContext = function(name) {
+ return this.body.traverseChildren(false, function(node) {
+ if (node.classBody) {
+ return false;
+ }
+ if (node instanceof Literal && node.value === 'this') {
+ return node.value = name;
+ } else if (node instanceof Code) {
+ node.klass = name;
+ if (node.bound) {
+ return node.context = name;
+ }
+ }
+ });
+ };
+
+ Class.prototype.addBoundFunctions = function(o) {
+ var bvar, lhs, _i, _len, _ref4;
+ _ref4 = this.boundFuncs;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ bvar = _ref4[_i];
+ lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o);
+ this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)"));
+ }
+ };
+
+ Class.prototype.addProperties = function(node, name, o) {
+ var assign, base, exprs, func, props;
+ props = node.base.properties.slice(0);
+ exprs = (function() {
+ var _results;
+ _results = [];
+ while (assign = props.shift()) {
+ if (assign instanceof Assign) {
+ base = assign.variable.base;
+ delete assign.context;
+ func = assign.value;
+ if (base.value === 'constructor') {
+ if (this.ctor) {
+ assign.error('cannot define more than one constructor in a class');
+ }
+ if (func.bound) {
+ assign.error('cannot define a constructor as a bound function');
+ }
+ if (func instanceof Code) {
+ assign = this.ctor = func;
+ } else {
+ this.externalCtor = o.scope.freeVariable('class');
+ assign = new Assign(new Literal(this.externalCtor), func);
+ }
+ } else {
+ if (assign.variable["this"]) {
+ func["static"] = true;
+ if (func.bound) {
+ func.context = name;
+ }
+ } else {
+ assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]);
+ if (func instanceof Code && func.bound) {
+ this.boundFuncs.push(base);
+ func.bound = false;
+ }
+ }
+ }
+ }
+ _results.push(assign);
+ }
+ return _results;
+ }).call(this);
+ return compact(exprs);
+ };
+
+ Class.prototype.walkBody = function(name, o) {
+ var _this = this;
+ return this.traverseChildren(false, function(child) {
+ var cont, exps, i, node, _i, _len, _ref4;
+ cont = true;
+ if (child instanceof Class) {
+ return false;
+ }
+ if (child instanceof Block) {
+ _ref4 = exps = child.expressions;
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
+ node = _ref4[i];
+ if (node instanceof Value && node.isObject(true)) {
+ cont = false;
+ exps[i] = _this.addProperties(node, name, o);
+ }
+ }
+ child.expressions = exps = flatten(exps);
+ }
+ return cont && !(child instanceof Class);
+ });
+ };
+
+ Class.prototype.hoistDirectivePrologue = function() {
+ var expressions, index, node;
+ index = 0;
+ expressions = this.body.expressions;
+ while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) {
+ ++index;
+ }
+ return this.directives = expressions.splice(0, index);
+ };
+
+ Class.prototype.ensureConstructor = function(name, o) {
+ var missing, ref, superCall;
+ missing = !this.ctor;
+ this.ctor || (this.ctor = new Code);
+ this.ctor.ctor = this.ctor.name = name;
+ this.ctor.klass = null;
+ this.ctor.noReturn = true;
+ if (missing) {
+ if (this.parent) {
+ superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)");
+ }
+ if (this.externalCtor) {
+ superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)");
+ }
+ if (superCall) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ this.ctor.body.unshift(new Assign(ref, superCall));
+ }
+ this.addBoundFunctions(o);
+ if (superCall) {
+ this.ctor.body.push(ref);
+ this.ctor.body.makeReturn();
+ }
+ return this.body.expressions.unshift(this.ctor);
+ } else {
+ return this.addBoundFunctions(o);
+ }
+ };
+
+ Class.prototype.compileNode = function(o) {
+ var call, decl, klass, lname, name, params, _ref4;
+ decl = this.determineName();
+ name = decl || '_Class';
+ if (name.reserved) {
+ name = "_" + name;
+ }
+ lname = new Literal(name);
+ this.hoistDirectivePrologue();
+ this.setContext(name);
+ this.walkBody(name, o);
+ this.ensureConstructor(name, o);
+ this.body.spaced = true;
+ if (!(this.ctor instanceof Code)) {
+ this.body.expressions.unshift(this.ctor);
+ }
+ this.body.expressions.push(lname);
+ (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives);
+ call = Closure.wrap(this.body);
+ if (this.parent) {
+ this.superClass = new Literal(o.scope.freeVariable('super', false));
+ this.body.expressions.unshift(new Extends(lname, this.superClass));
+ call.args.push(this.parent);
+ params = call.variable.params || call.variable.base.params;
+ params.push(new Param(this.superClass));
+ }
+ klass = new Parens(call, true);
+ if (this.variable) {
+ klass = new Assign(this.variable, klass);
+ }
+ return klass.compileToFragments(o);
+ };
+
+ return Class;
+
+ })(Base);
+
+ exports.Assign = Assign = (function(_super) {
+ __extends(Assign, _super);
+
+ function Assign(variable, value, context, options) {
+ var forbidden, name, _ref4;
+ this.variable = variable;
+ this.value = value;
+ this.context = context;
+ this.param = options && options.param;
+ this.subpattern = options && options.subpattern;
+ forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0);
+ if (forbidden && this.context !== 'object') {
+ this.variable.error("variable name may not be \"" + name + "\"");
+ }
+ }
+
+ Assign.prototype.children = ['variable', 'value'];
+
+ Assign.prototype.isStatement = function(o) {
+ return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0;
+ };
+
+ Assign.prototype.assigns = function(name) {
+ return this[this.context === 'object' ? 'value' : 'variable'].assigns(name);
+ };
+
+ Assign.prototype.unfoldSoak = function(o) {
+ return unfoldSoak(o, this, 'variable');
+ };
+
+ Assign.prototype.compileNode = function(o) {
+ var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7;
+ if (isValue = this.variable instanceof Value) {
+ if (this.variable.isArray() || this.variable.isObject()) {
+ return this.compilePatternMatch(o);
+ }
+ if (this.variable.isSplice()) {
+ return this.compileSplice(o);
+ }
+ if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') {
+ return this.compileConditional(o);
+ }
+ }
+ compiledName = this.variable.compileToFragments(o, LEVEL_LIST);
+ name = fragmentsToText(compiledName);
+ if (!this.context) {
+ varBase = this.variable.unwrapAll();
+ if (!varBase.isAssignable()) {
+ this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned");
+ }
+ if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) {
+ if (this.param) {
+ o.scope.add(name, 'var');
+ } else {
+ o.scope.find(name);
+ }
+ }
+ }
+ if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) {
+ if (match[1]) {
+ this.value.klass = match[1];
+ }
+ this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5];
+ }
+ val = this.value.compileToFragments(o, LEVEL_LIST);
+ if (this.context === 'object') {
+ return compiledName.concat(this.makeCode(": "), val);
+ }
+ answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val);
+ if (o.level <= LEVEL_LIST) {
+ return answer;
+ } else {
+ return this.wrapInBraces(answer);
+ }
+ };
+
+ Assign.prototype.compilePatternMatch = function(o) {
+ var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ top = o.level === LEVEL_TOP;
+ value = this.value;
+ objects = this.variable.base.objects;
+ if (!(olen = objects.length)) {
+ code = value.compileToFragments(o);
+ if (o.level >= LEVEL_OP) {
+ return this.wrapInBraces(code);
+ } else {
+ return code;
+ }
+ }
+ isObject = this.variable.isObject();
+ if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) {
+ if (obj instanceof Assign) {
+ _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value;
+ } else {
+ idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0);
+ }
+ acc = IDENTIFIER.test(idx.unwrap().value || 0);
+ value = new Value(value);
+ value.properties.push(new (acc ? Access : Index)(idx));
+ if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) {
+ obj.error("assignment to a reserved word: " + (obj.compile(o)));
+ }
+ return new Assign(obj, value, null, {
+ param: this.param
+ }).compileToFragments(o, LEVEL_TOP);
+ }
+ vvar = value.compileToFragments(o, LEVEL_LIST);
+ vvarText = fragmentsToText(vvar);
+ assigns = [];
+ splat = false;
+ if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) {
+ assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar)));
+ vvar = [this.makeCode(ref)];
+ vvarText = ref;
+ }
+ for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) {
+ obj = objects[i];
+ idx = i;
+ if (isObject) {
+ if (obj instanceof Assign) {
+ _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value;
+ } else {
+ if (obj.base instanceof Parens) {
+ _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1];
+ } else {
+ idx = obj["this"] ? obj.properties[0].name : obj;
+ }
+ }
+ }
+ if (!splat && obj instanceof Splat) {
+ name = obj.name.unwrap().value;
+ obj = obj.unwrap();
+ val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i;
+ if (rest = olen - i - 1) {
+ ivar = o.scope.freeVariable('i');
+ val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])";
+ } else {
+ val += ") : []";
+ }
+ val = new Literal(val);
+ splat = "" + ivar + "++";
+ } else {
+ name = obj.unwrap().value;
+ if (obj instanceof Splat) {
+ obj.error("multiple splats are disallowed in an assignment");
+ }
+ if (typeof idx === 'number') {
+ idx = new Literal(splat || idx);
+ acc = false;
+ } else {
+ acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0);
+ }
+ val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]);
+ }
+ if ((name != null) && __indexOf.call(RESERVED, name) >= 0) {
+ obj.error("assignment to a reserved word: " + (obj.compile(o)));
+ }
+ assigns.push(new Assign(obj, val, null, {
+ param: this.param,
+ subpattern: true
+ }).compileToFragments(o, LEVEL_LIST));
+ }
+ if (!(top || this.subpattern)) {
+ assigns.push(vvar);
+ }
+ fragments = this.joinFragmentArrays(assigns, ', ');
+ if (o.level < LEVEL_LIST) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ Assign.prototype.compileConditional = function(o) {
+ var left, right, _ref4;
+ _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1];
+ if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) {
+ this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before");
+ }
+ if (__indexOf.call(this.context, "?") >= 0) {
+ o.isExistentialEquals = true;
+ }
+ return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o);
+ };
+
+ Assign.prototype.compileSplice = function(o) {
+ var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6;
+ _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive;
+ name = this.variable.compile(o);
+ if (from) {
+ _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1];
+ } else {
+ fromDecl = fromRef = '0';
+ }
+ if (to) {
+ if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) {
+ to = +to.compile(o) - +fromRef;
+ if (!exclusive) {
+ to += 1;
+ }
+ } else {
+ to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef;
+ if (!exclusive) {
+ to += ' + 1';
+ }
+ }
+ } else {
+ to = "9e9";
+ }
+ _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1];
+ answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef);
+ if (o.level > LEVEL_TOP) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ return Assign;
+
+ })(Base);
+
+ exports.Code = Code = (function(_super) {
+ __extends(Code, _super);
+
+ function Code(params, body, tag) {
+ this.params = params || [];
+ this.body = body || new Block;
+ this.bound = tag === 'boundfunc';
+ if (this.bound) {
+ this.context = '_this';
+ }
+ }
+
+ Code.prototype.children = ['params', 'body'];
+
+ Code.prototype.isStatement = function() {
+ return !!this.ctor;
+ };
+
+ Code.prototype.jumps = NO;
+
+ Code.prototype.compileNode = function(o) {
+ var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8;
+ o.scope = new Scope(o.scope, this.body, this);
+ o.scope.shared = del(o, 'sharedScope');
+ o.indent += TAB;
+ delete o.bare;
+ delete o.isExistentialEquals;
+ params = [];
+ exprs = [];
+ this.eachParamName(function(name) {
+ if (!o.scope.check(name)) {
+ return o.scope.parameter(name);
+ }
+ });
+ _ref4 = this.params;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ if (!param.splat) {
+ continue;
+ }
+ _ref5 = this.params;
+ for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) {
+ p = _ref5[_j].name;
+ if (p["this"]) {
+ p = p.properties[0].name;
+ }
+ if (p.value) {
+ o.scope.add(p.value, 'var', true);
+ }
+ }
+ splats = new Assign(new Value(new Arr((function() {
+ var _k, _len2, _ref6, _results;
+ _ref6 = this.params;
+ _results = [];
+ for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
+ p = _ref6[_k];
+ _results.push(p.asReference(o));
+ }
+ return _results;
+ }).call(this))), new Value(new Literal('arguments')));
+ break;
+ }
+ _ref6 = this.params;
+ for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
+ param = _ref6[_k];
+ if (param.isComplex()) {
+ val = ref = param.asReference(o);
+ if (param.value) {
+ val = new Op('?', ref, param.value);
+ }
+ exprs.push(new Assign(new Value(param.name), val, '=', {
+ param: true
+ }));
+ } else {
+ ref = param;
+ if (param.value) {
+ lit = new Literal(ref.name.value + ' == null');
+ val = new Assign(new Value(param.name), param.value, '=');
+ exprs.push(new If(lit, val));
+ }
+ }
+ if (!splats) {
+ params.push(ref);
+ }
+ }
+ wasEmpty = this.body.isEmpty();
+ if (splats) {
+ exprs.unshift(splats);
+ }
+ if (exprs.length) {
+ (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs);
+ }
+ for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) {
+ p = params[i];
+ params[i] = p.compileToFragments(o);
+ o.scope.parameter(fragmentsToText(params[i]));
+ }
+ uniqs = [];
+ this.eachParamName(function(name, node) {
+ if (__indexOf.call(uniqs, name) >= 0) {
+ node.error("multiple parameters named '" + name + "'");
+ }
+ return uniqs.push(name);
+ });
+ if (!(wasEmpty || this.noReturn)) {
+ this.body.makeReturn();
+ }
+ if (this.bound) {
+ if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) {
+ this.bound = this.context = o.scope.parent.method.context;
+ } else if (!this["static"]) {
+ o.scope.parent.assign('_this', 'this');
+ }
+ }
+ idt = o.indent;
+ code = 'function';
+ if (this.ctor) {
+ code += ' ' + this.name;
+ }
+ code += '(';
+ answer = [this.makeCode(code)];
+ for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) {
+ p = params[i];
+ if (i) {
+ answer.push(this.makeCode(", "));
+ }
+ answer.push.apply(answer, p);
+ }
+ answer.push(this.makeCode(') {'));
+ if (!this.body.isEmpty()) {
+ answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab));
+ }
+ answer.push(this.makeCode('}'));
+ if (this.ctor) {
+ return [this.makeCode(this.tab)].concat(__slice.call(answer));
+ }
+ if (this.front || (o.level >= LEVEL_ACCESS)) {
+ return this.wrapInBraces(answer);
+ } else {
+ return answer;
+ }
+ };
+
+ Code.prototype.eachParamName = function(iterator) {
+ var param, _i, _len, _ref4, _results;
+ _ref4 = this.params;
+ _results = [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ _results.push(param.eachName(iterator));
+ }
+ return _results;
+ };
+
+ Code.prototype.traverseChildren = function(crossScope, func) {
+ if (crossScope) {
+ return Code.__super__.traverseChildren.call(this, crossScope, func);
+ }
+ };
+
+ return Code;
+
+ })(Base);
+
+ exports.Param = Param = (function(_super) {
+ __extends(Param, _super);
+
+ function Param(name, value, splat) {
+ var _ref4;
+ this.name = name;
+ this.value = value;
+ this.splat = splat;
+ if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) {
+ this.name.error("parameter name \"" + name + "\" is not allowed");
+ }
+ }
+
+ Param.prototype.children = ['name', 'value'];
+
+ Param.prototype.compileToFragments = function(o) {
+ return this.name.compileToFragments(o, LEVEL_LIST);
+ };
+
+ Param.prototype.asReference = function(o) {
+ var node;
+ if (this.reference) {
+ return this.reference;
+ }
+ node = this.name;
+ if (node["this"]) {
+ node = node.properties[0].name;
+ if (node.value.reserved) {
+ node = new Literal(o.scope.freeVariable(node.value));
+ }
+ } else if (node.isComplex()) {
+ node = new Literal(o.scope.freeVariable('arg'));
+ }
+ node = new Value(node);
+ if (this.splat) {
+ node = new Splat(node);
+ }
+ return this.reference = node;
+ };
+
+ Param.prototype.isComplex = function() {
+ return this.name.isComplex();
+ };
+
+ Param.prototype.eachName = function(iterator, name) {
+ var atParam, node, obj, _i, _len, _ref4;
+ if (name == null) {
+ name = this.name;
+ }
+ atParam = function(obj) {
+ var node;
+ node = obj.properties[0].name;
+ if (!node.value.reserved) {
+ return iterator(node.value, node);
+ }
+ };
+ if (name instanceof Literal) {
+ return iterator(name.value, name);
+ }
+ if (name instanceof Value) {
+ return atParam(name);
+ }
+ _ref4 = name.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (obj instanceof Assign) {
+ this.eachName(iterator, obj.value.unwrap());
+ } else if (obj instanceof Splat) {
+ node = obj.name.unwrap();
+ iterator(node.value, node);
+ } else if (obj instanceof Value) {
+ if (obj.isArray() || obj.isObject()) {
+ this.eachName(iterator, obj.base);
+ } else if (obj["this"]) {
+ atParam(obj);
+ } else {
+ iterator(obj.base.value, obj.base);
+ }
+ } else {
+ obj.error("illegal parameter " + (obj.compile()));
+ }
+ }
+ };
+
+ return Param;
+
+ })(Base);
+
+ exports.Splat = Splat = (function(_super) {
+ __extends(Splat, _super);
+
+ Splat.prototype.children = ['name'];
+
+ Splat.prototype.isAssignable = YES;
+
+ function Splat(name) {
+ this.name = name.compile ? name : new Literal(name);
+ }
+
+ Splat.prototype.assigns = function(name) {
+ return this.name.assigns(name);
+ };
+
+ Splat.prototype.compileToFragments = function(o) {
+ return this.name.compileToFragments(o);
+ };
+
+ Splat.prototype.unwrap = function() {
+ return this.name;
+ };
+
+ Splat.compileSplattedArray = function(o, list, apply) {
+ var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len;
+ index = -1;
+ while ((node = list[++index]) && !(node instanceof Splat)) {
+ continue;
+ }
+ if (index >= list.length) {
+ return [];
+ }
+ if (list.length === 1) {
+ node = list[0];
+ fragments = node.compileToFragments(o, LEVEL_LIST);
+ if (apply) {
+ return fragments;
+ }
+ return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")"));
+ }
+ args = list.slice(index);
+ for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) {
+ node = args[i];
+ compiledNode = node.compileToFragments(o, LEVEL_LIST);
+ args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]"));
+ }
+ if (index === 0) {
+ node = list[0];
+ concatPart = node.joinFragmentArrays(args.slice(1), ', ');
+ return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")"));
+ }
+ base = (function() {
+ var _j, _len1, _ref4, _results;
+ _ref4 = list.slice(0, index);
+ _results = [];
+ for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
+ node = _ref4[_j];
+ _results.push(node.compileToFragments(o, LEVEL_LIST));
+ }
+ return _results;
+ })();
+ base = list[0].joinFragmentArrays(base, ', ');
+ concatPart = list[index].joinFragmentArrays(args, ', ');
+ return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")"));
+ };
+
+ return Splat;
+
+ })(Base);
+
+ exports.While = While = (function(_super) {
+ __extends(While, _super);
+
+ function While(condition, options) {
+ this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition;
+ this.guard = options != null ? options.guard : void 0;
+ }
+
+ While.prototype.children = ['condition', 'guard', 'body'];
+
+ While.prototype.isStatement = YES;
+
+ While.prototype.makeReturn = function(res) {
+ if (res) {
+ return While.__super__.makeReturn.apply(this, arguments);
+ } else {
+ this.returns = !this.jumps({
+ loop: true
+ });
+ return this;
+ }
+ };
+
+ While.prototype.addBody = function(body) {
+ this.body = body;
+ return this;
+ };
+
+ While.prototype.jumps = function() {
+ var expressions, node, _i, _len;
+ expressions = this.body.expressions;
+ if (!expressions.length) {
+ return false;
+ }
+ for (_i = 0, _len = expressions.length; _i < _len; _i++) {
+ node = expressions[_i];
+ if (node.jumps({
+ loop: true
+ })) {
+ return node;
+ }
+ }
+ return false;
+ };
+
+ While.prototype.compileNode = function(o) {
+ var answer, body, rvar, set;
+ o.indent += TAB;
+ set = '';
+ body = this.body;
+ if (body.isEmpty()) {
+ body = this.makeCode('');
+ } else {
+ if (this.returns) {
+ body.makeReturn(rvar = o.scope.freeVariable('results'));
+ set = "" + this.tab + rvar + " = [];\n";
+ }
+ if (this.guard) {
+ if (body.expressions.length > 1) {
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
+ } else {
+ if (this.guard) {
+ body = Block.wrap([new If(this.guard, body)]);
+ }
+ }
+ }
+ body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab));
+ }
+ answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}"));
+ if (this.returns) {
+ answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";"));
+ }
+ return answer;
+ };
+
+ return While;
+
+ })(Base);
+
+ exports.Op = Op = (function(_super) {
+ var CONVERSIONS, INVERSIONS;
+
+ __extends(Op, _super);
+
+ function Op(op, first, second, flip) {
+ if (op === 'in') {
+ return new In(first, second);
+ }
+ if (op === 'do') {
+ return this.generateDo(first);
+ }
+ if (op === 'new') {
+ if (first instanceof Call && !first["do"] && !first.isNew) {
+ return first.newInstance();
+ }
+ if (first instanceof Code && first.bound || first["do"]) {
+ first = new Parens(first);
+ }
+ }
+ this.operator = CONVERSIONS[op] || op;
+ this.first = first;
+ this.second = second;
+ this.flip = !!flip;
+ return this;
+ }
+
+ CONVERSIONS = {
+ '==': '===',
+ '!=': '!==',
+ 'of': 'in'
+ };
+
+ INVERSIONS = {
+ '!==': '===',
+ '===': '!=='
+ };
+
+ Op.prototype.children = ['first', 'second'];
+
+ Op.prototype.isSimpleNumber = NO;
+
+ Op.prototype.isUnary = function() {
+ return !this.second;
+ };
+
+ Op.prototype.isComplex = function() {
+ var _ref4;
+ return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex();
+ };
+
+ Op.prototype.isChainable = function() {
+ var _ref4;
+ return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!==';
+ };
+
+ Op.prototype.invert = function() {
+ var allInvertable, curr, fst, op, _ref4;
+ if (this.isChainable() && this.first.isChainable()) {
+ allInvertable = true;
+ curr = this;
+ while (curr && curr.operator) {
+ allInvertable && (allInvertable = curr.operator in INVERSIONS);
+ curr = curr.first;
+ }
+ if (!allInvertable) {
+ return new Parens(this).invert();
+ }
+ curr = this;
+ while (curr && curr.operator) {
+ curr.invert = !curr.invert;
+ curr.operator = INVERSIONS[curr.operator];
+ curr = curr.first;
+ }
+ return this;
+ } else if (op = INVERSIONS[this.operator]) {
+ this.operator = op;
+ if (this.first.unwrap() instanceof Op) {
+ this.first.invert();
+ }
+ return this;
+ } else if (this.second) {
+ return new Parens(this).invert();
+ } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) {
+ return fst;
+ } else {
+ return new Op('!', this);
+ }
+ };
+
+ Op.prototype.unfoldSoak = function(o) {
+ var _ref4;
+ return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first');
+ };
+
+ Op.prototype.generateDo = function(exp) {
+ var call, func, param, passedParams, ref, _i, _len, _ref4;
+ passedParams = [];
+ func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp;
+ _ref4 = func.params || [];
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ param = _ref4[_i];
+ if (param.value) {
+ passedParams.push(param.value);
+ delete param.value;
+ } else {
+ passedParams.push(param);
+ }
+ }
+ call = new Call(exp, passedParams);
+ call["do"] = true;
+ return call;
+ };
+
+ Op.prototype.compileNode = function(o) {
+ var answer, isChain, _ref4, _ref5;
+ isChain = this.isChainable() && this.first.isChainable();
+ if (!isChain) {
+ this.first.front = this.front;
+ }
+ if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) {
+ this.error('delete operand may not be argument or var');
+ }
+ if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) {
+ this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\"");
+ }
+ if (this.isUnary()) {
+ return this.compileUnary(o);
+ }
+ if (isChain) {
+ return this.compileChain(o);
+ }
+ if (this.operator === '?') {
+ return this.compileExistence(o);
+ }
+ answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP));
+ if (o.level <= LEVEL_OP) {
+ return answer;
+ } else {
+ return this.wrapInBraces(answer);
+ }
+ };
+
+ Op.prototype.compileChain = function(o) {
+ var fragments, fst, shared, _ref4;
+ _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1];
+ fst = this.first.compileToFragments(o, LEVEL_OP);
+ fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP));
+ return this.wrapInBraces(fragments);
+ };
+
+ Op.prototype.compileExistence = function(o) {
+ var fst, ref;
+ if (!o.isExistentialEquals && this.first.isComplex()) {
+ ref = new Literal(o.scope.freeVariable('ref'));
+ fst = new Parens(new Assign(ref, this.first));
+ } else {
+ fst = this.first;
+ ref = fst;
+ }
+ return new If(new Existence(fst), ref, {
+ type: 'if'
+ }).addElse(this.second).compileToFragments(o);
+ };
+
+ Op.prototype.compileUnary = function(o) {
+ var op, parts, plusMinus;
+ parts = [];
+ op = this.operator;
+ parts.push([this.makeCode(op)]);
+ if (op === '!' && this.first instanceof Existence) {
+ this.first.negated = !this.first.negated;
+ return this.first.compileToFragments(o);
+ }
+ if (o.level >= LEVEL_ACCESS) {
+ return (new Parens(this)).compileToFragments(o);
+ }
+ plusMinus = op === '+' || op === '-';
+ if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) {
+ parts.push([this.makeCode(' ')]);
+ }
+ if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
+ this.first = new Parens(this.first);
+ }
+ parts.push(this.first.compileToFragments(o, LEVEL_OP));
+ if (this.flip) {
+ parts.reverse();
+ }
+ return this.joinFragmentArrays(parts, '');
+ };
+
+ Op.prototype.toString = function(idt) {
+ return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator);
+ };
+
+ return Op;
+
+ })(Base);
+
+ exports.In = In = (function(_super) {
+ __extends(In, _super);
+
+ function In(object, array) {
+ this.object = object;
+ this.array = array;
+ }
+
+ In.prototype.children = ['object', 'array'];
+
+ In.prototype.invert = NEGATE;
+
+ In.prototype.compileNode = function(o) {
+ var hasSplat, obj, _i, _len, _ref4;
+ if (this.array instanceof Value && this.array.isArray()) {
+ _ref4 = this.array.base.objects;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ obj = _ref4[_i];
+ if (!(obj instanceof Splat)) {
+ continue;
+ }
+ hasSplat = true;
+ break;
+ }
+ if (!hasSplat) {
+ return this.compileOrTest(o);
+ }
+ }
+ return this.compileLoopTest(o);
+ };
+
+ In.prototype.compileOrTest = function(o) {
+ var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6;
+ if (this.array.base.objects.length === 0) {
+ return [this.makeCode("" + (!!this.negated))];
+ }
+ _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1];
+ _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1];
+ tests = [];
+ _ref6 = this.array.base.objects;
+ for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) {
+ item = _ref6[i];
+ if (i) {
+ tests.push(this.makeCode(cnj));
+ }
+ tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS));
+ }
+ if (o.level < LEVEL_OP) {
+ return tests;
+ } else {
+ return this.wrapInBraces(tests);
+ }
+ };
+
+ In.prototype.compileLoopTest = function(o) {
+ var fragments, ref, sub, _ref4;
+ _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1];
+ fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0')));
+ if (fragmentsToText(sub) === fragmentsToText(ref)) {
+ return fragments;
+ }
+ fragments = sub.concat(this.makeCode(', '), fragments);
+ if (o.level < LEVEL_LIST) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ In.prototype.toString = function(idt) {
+ return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : ''));
+ };
+
+ return In;
+
+ })(Base);
+
+ exports.Try = Try = (function(_super) {
+ __extends(Try, _super);
+
+ function Try(attempt, errorVariable, recovery, ensure) {
+ this.attempt = attempt;
+ this.errorVariable = errorVariable;
+ this.recovery = recovery;
+ this.ensure = ensure;
+ }
+
+ Try.prototype.children = ['attempt', 'recovery', 'ensure'];
+
+ Try.prototype.isStatement = YES;
+
+ Try.prototype.jumps = function(o) {
+ var _ref4;
+ return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0);
+ };
+
+ Try.prototype.makeReturn = function(res) {
+ if (this.attempt) {
+ this.attempt = this.attempt.makeReturn(res);
+ }
+ if (this.recovery) {
+ this.recovery = this.recovery.makeReturn(res);
+ }
+ return this;
+ };
+
+ Try.prototype.compileNode = function(o) {
+ var catchPart, ensurePart, placeholder, tryPart;
+ o.indent += TAB;
+ tryPart = this.attempt.compileToFragments(o, LEVEL_TOP);
+ catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : [];
+ ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : [];
+ return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart);
+ };
+
+ return Try;
+
+ })(Base);
+
+ exports.Throw = Throw = (function(_super) {
+ __extends(Throw, _super);
+
+ function Throw(expression) {
+ this.expression = expression;
+ }
+
+ Throw.prototype.children = ['expression'];
+
+ Throw.prototype.isStatement = YES;
+
+ Throw.prototype.jumps = NO;
+
+ Throw.prototype.makeReturn = THIS;
+
+ Throw.prototype.compileNode = function(o) {
+ return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";"));
+ };
+
+ return Throw;
+
+ })(Base);
+
+ exports.Existence = Existence = (function(_super) {
+ __extends(Existence, _super);
+
+ function Existence(expression) {
+ this.expression = expression;
+ }
+
+ Existence.prototype.children = ['expression'];
+
+ Existence.prototype.invert = NEGATE;
+
+ Existence.prototype.compileNode = function(o) {
+ var cmp, cnj, code, _ref4;
+ this.expression.front = this.front;
+ code = this.expression.compile(o, LEVEL_OP);
+ if (IDENTIFIER.test(code) && !o.scope.check(code)) {
+ _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1];
+ code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null";
+ } else {
+ code = "" + code + " " + (this.negated ? '==' : '!=') + " null";
+ }
+ return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")];
+ };
+
+ return Existence;
+
+ })(Base);
+
+ exports.Parens = Parens = (function(_super) {
+ __extends(Parens, _super);
+
+ function Parens(body) {
+ this.body = body;
+ }
+
+ Parens.prototype.children = ['body'];
+
+ Parens.prototype.unwrap = function() {
+ return this.body;
+ };
+
+ Parens.prototype.isComplex = function() {
+ return this.body.isComplex();
+ };
+
+ Parens.prototype.compileNode = function(o) {
+ var bare, expr, fragments;
+ expr = this.body.unwrap();
+ if (expr instanceof Value && expr.isAtomic()) {
+ expr.front = this.front;
+ return expr.compileToFragments(o);
+ }
+ fragments = expr.compileToFragments(o, LEVEL_PAREN);
+ bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns));
+ if (bare) {
+ return fragments;
+ } else {
+ return this.wrapInBraces(fragments);
+ }
+ };
+
+ return Parens;
+
+ })(Base);
+
+ exports.For = For = (function(_super) {
+ __extends(For, _super);
+
+ function For(body, source) {
+ var _ref4;
+ this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index;
+ this.body = Block.wrap([body]);
+ this.own = !!source.own;
+ this.object = !!source.object;
+ if (this.object) {
+ _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1];
+ }
+ if (this.index instanceof Value) {
+ this.index.error('index cannot be a pattern matching expression');
+ }
+ this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length;
+ this.pattern = this.name instanceof Value;
+ if (this.range && this.index) {
+ this.index.error('indexes do not apply to range loops');
+ }
+ if (this.range && this.pattern) {
+ this.name.error('cannot pattern match over range loops');
+ }
+ if (this.own && !this.object) {
+ this.index.error('cannot use own with for-in');
+ }
+ this.returns = false;
+ }
+
+ For.prototype.children = ['body', 'source', 'guard', 'step'];
+
+ For.prototype.compileNode = function(o) {
+ var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5;
+ body = Block.wrap([this.body]);
+ lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0;
+ if (lastJumps && lastJumps instanceof Return) {
+ this.returns = false;
+ }
+ source = this.range ? this.source.base : this.source;
+ scope = o.scope;
+ name = this.name && (this.name.compile(o, LEVEL_LIST));
+ index = this.index && (this.index.compile(o, LEVEL_LIST));
+ if (name && !this.pattern) {
+ scope.find(name);
+ }
+ if (index) {
+ scope.find(index);
+ }
+ if (this.returns) {
+ rvar = scope.freeVariable('results');
+ }
+ ivar = (this.object && index) || scope.freeVariable('i');
+ kvar = (this.range && name) || index || ivar;
+ kvarAssign = kvar !== ivar ? "" + kvar + " = " : "";
+ if (this.step && !this.range) {
+ _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1];
+ stepNum = stepVar.match(SIMPLENUM);
+ }
+ if (this.pattern) {
+ name = ivar;
+ }
+ varPart = '';
+ guardPart = '';
+ defPart = '';
+ idt1 = this.tab + TAB;
+ if (this.range) {
+ forPartFragments = source.compileToFragments(merge(o, {
+ index: ivar,
+ name: name,
+ step: this.step
+ }));
+ } else {
+ svar = this.source.compile(o, LEVEL_LIST);
+ if ((name || this.own) && !IDENTIFIER.test(svar)) {
+ defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n";
+ svar = ref;
+ }
+ if (name && !this.pattern) {
+ namePart = "" + name + " = " + svar + "[" + kvar + "]";
+ }
+ if (!this.object) {
+ if (step !== stepVar) {
+ defPart += "" + this.tab + step + ";\n";
+ }
+ if (!(this.step && stepNum && (down = +stepNum < 0))) {
+ lvar = scope.freeVariable('len');
+ }
+ declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length";
+ declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1";
+ compare = "" + ivar + " < " + lvar;
+ compareDown = "" + ivar + " >= 0";
+ if (this.step) {
+ if (stepNum) {
+ if (down) {
+ compare = compareDown;
+ declare = declareDown;
+ }
+ } else {
+ compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown;
+ declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")";
+ }
+ increment = "" + ivar + " += " + stepVar;
+ } else {
+ increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++");
+ }
+ forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)];
+ }
+ }
+ if (this.returns) {
+ resultPart = "" + this.tab + rvar + " = [];\n";
+ returnResult = "\n" + this.tab + "return " + rvar + ";";
+ body.makeReturn(rvar);
+ }
+ if (this.guard) {
+ if (body.expressions.length > 1) {
+ body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue")));
+ } else {
+ if (this.guard) {
+ body = Block.wrap([new If(this.guard, body)]);
+ }
+ }
+ }
+ if (this.pattern) {
+ body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]")));
+ }
+ defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body));
+ if (namePart) {
+ varPart = "\n" + idt1 + namePart + ";";
+ }
+ if (this.object) {
+ forPartFragments = [this.makeCode("" + kvar + " in " + svar)];
+ if (this.own) {
+ guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;";
+ }
+ }
+ bodyFragments = body.compileToFragments(merge(o, {
+ indent: idt1
+ }), LEVEL_TOP);
+ if (bodyFragments && (bodyFragments.length > 0)) {
+ bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n"));
+ }
+ return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || '')));
+ };
+
+ For.prototype.pluckDirectCall = function(o, body) {
+ var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
+ defs = [];
+ _ref4 = body.expressions;
+ for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) {
+ expr = _ref4[idx];
+ expr = expr.unwrapAll();
+ if (!(expr instanceof Call)) {
+ continue;
+ }
+ val = expr.variable.unwrapAll();
+ if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) {
+ continue;
+ }
+ fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val;
+ ref = new Literal(o.scope.freeVariable('fn'));
+ base = new Value(ref);
+ if (val.base) {
+ _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1];
+ }
+ body.expressions[idx] = new Call(base, expr.args);
+ defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n'));
+ }
+ return defs;
+ };
+
+ return For;
+
+ })(While);
+
+ exports.Switch = Switch = (function(_super) {
+ __extends(Switch, _super);
+
+ function Switch(subject, cases, otherwise) {
+ this.subject = subject;
+ this.cases = cases;
+ this.otherwise = otherwise;
+ }
+
+ Switch.prototype.children = ['subject', 'cases', 'otherwise'];
+
+ Switch.prototype.isStatement = YES;
+
+ Switch.prototype.jumps = function(o) {
+ var block, conds, _i, _len, _ref4, _ref5, _ref6;
+ if (o == null) {
+ o = {
+ block: true
+ };
+ }
+ _ref4 = this.cases;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1];
+ if (block.jumps(o)) {
+ return block;
+ }
+ }
+ return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0;
+ };
+
+ Switch.prototype.makeReturn = function(res) {
+ var pair, _i, _len, _ref4, _ref5;
+ _ref4 = this.cases;
+ for (_i = 0, _len = _ref4.length; _i < _len; _i++) {
+ pair = _ref4[_i];
+ pair[1].makeReturn(res);
+ }
+ if (res) {
+ this.otherwise || (this.otherwise = new Block([new Literal('void 0')]));
+ }
+ if ((_ref5 = this.otherwise) != null) {
+ _ref5.makeReturn(res);
+ }
+ return this;
+ };
+
+ Switch.prototype.compileNode = function(o) {
+ var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6;
+ idt1 = o.indent + TAB;
+ idt2 = o.indent = idt1 + TAB;
+ fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n"));
+ _ref4 = this.cases;
+ for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) {
+ _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1];
+ _ref6 = flatten([conditions]);
+ for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
+ cond = _ref6[_j];
+ if (!this.subject) {
+ cond = cond.invert();
+ }
+ fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n"));
+ }
+ if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) {
+ fragments = fragments.concat(body, this.makeCode('\n'));
+ }
+ if (i === this.cases.length - 1 && !this.otherwise) {
+ break;
+ }
+ expr = this.lastNonComment(block.expressions);
+ if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) {
+ continue;
+ }
+ fragments.push(cond.makeCode(idt2 + 'break;\n'));
+ }
+ if (this.otherwise && this.otherwise.expressions.length) {
+ fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")]));
+ }
+ fragments.push(this.makeCode(this.tab + '}'));
+ return fragments;
+ };
+
+ return Switch;
+
+ })(Base);
+
+ exports.If = If = (function(_super) {
+ __extends(If, _super);
+
+ function If(condition, body, options) {
+ this.body = body;
+ if (options == null) {
+ options = {};
+ }
+ this.condition = options.type === 'unless' ? condition.invert() : condition;
+ this.elseBody = null;
+ this.isChain = false;
+ this.soak = options.soak;
+ }
+
+ If.prototype.children = ['condition', 'body', 'elseBody'];
+
+ If.prototype.bodyNode = function() {
+ var _ref4;
+ return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0;
+ };
+
+ If.prototype.elseBodyNode = function() {
+ var _ref4;
+ return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0;
+ };
+
+ If.prototype.addElse = function(elseBody) {
+ if (this.isChain) {
+ this.elseBodyNode().addElse(elseBody);
+ } else {
+ this.isChain = elseBody instanceof If;
+ this.elseBody = this.ensureBlock(elseBody);
+ this.elseBody.updateLocationDataIfMissing(elseBody.locationData);
+ }
+ return this;
+ };
+
+ If.prototype.isStatement = function(o) {
+ var _ref4;
+ return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0);
+ };
+
+ If.prototype.jumps = function(o) {
+ var _ref4;
+ return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0);
+ };
+
+ If.prototype.compileNode = function(o) {
+ if (this.isStatement(o)) {
+ return this.compileStatement(o);
+ } else {
+ return this.compileExpression(o);
+ }
+ };
+
+ If.prototype.makeReturn = function(res) {
+ if (res) {
+ this.elseBody || (this.elseBody = new Block([new Literal('void 0')]));
+ }
+ this.body && (this.body = new Block([this.body.makeReturn(res)]));
+ this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)]));
+ return this;
+ };
+
+ If.prototype.ensureBlock = function(node) {
+ if (node instanceof Block) {
+ return node;
+ } else {
+ return new Block([node]);
+ }
+ };
+
+ If.prototype.compileStatement = function(o) {
+ var answer, body, child, cond, exeq, ifPart, indent;
+ child = del(o, 'chainChild');
+ exeq = del(o, 'isExistentialEquals');
+ if (exeq) {
+ return new If(this.condition.invert(), this.elseBodyNode(), {
+ type: 'if'
+ }).compileToFragments(o);
+ }
+ indent = o.indent + TAB;
+ cond = this.condition.compileToFragments(o, LEVEL_PAREN);
+ body = this.ensureBlock(this.body).compileToFragments(merge(o, {
+ indent: indent
+ }));
+ ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}"));
+ if (!child) {
+ ifPart.unshift(this.makeCode(this.tab));
+ }
+ if (!this.elseBody) {
+ return ifPart;
+ }
+ answer = ifPart.concat(this.makeCode(' else '));
+ if (this.isChain) {
+ o.chainChild = true;
+ answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP));
+ } else {
+ answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, {
+ indent: indent
+ }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}"));
+ }
+ return answer;
+ };
+
+ If.prototype.compileExpression = function(o) {
+ var alt, body, cond, fragments;
+ cond = this.condition.compileToFragments(o, LEVEL_COND);
+ body = this.bodyNode().compileToFragments(o, LEVEL_LIST);
+ alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')];
+ fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt);
+ if (o.level >= LEVEL_COND) {
+ return this.wrapInBraces(fragments);
+ } else {
+ return fragments;
+ }
+ };
+
+ If.prototype.unfoldSoak = function() {
+ return this.soak && this;
+ };
+
+ return If;
+
+ })(Base);
+
+ Closure = {
+ wrap: function(expressions, statement, noReturn) {
+ var args, argumentsNode, call, func, meth;
+ if (expressions.jumps()) {
+ return expressions;
+ }
+ func = new Code([], Block.wrap([expressions]));
+ args = [];
+ argumentsNode = expressions.contains(this.isLiteralArguments);
+ if (argumentsNode && expressions.classBody) {
+ argumentsNode.error("Class bodies shouldn't reference arguments");
+ }
+ if (argumentsNode || expressions.contains(this.isLiteralThis)) {
+ meth = new Literal(argumentsNode ? 'apply' : 'call');
+ args = [new Literal('this')];
+ if (argumentsNode) {
+ args.push(new Literal('arguments'));
+ }
+ func = new Value(func, [new Access(meth)]);
+ }
+ func.noReturn = noReturn;
+ call = new Call(func, args);
+ if (statement) {
+ return Block.wrap([call]);
+ } else {
+ return call;
+ }
+ },
+ isLiteralArguments: function(node) {
+ return node instanceof Literal && node.value === 'arguments' && !node.asKey;
+ },
+ isLiteralThis: function(node) {
+ return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper);
+ }
+ };
+
+ unfoldSoak = function(o, parent, name) {
+ var ifn;
+ if (!(ifn = parent[name].unfoldSoak(o))) {
+ return;
+ }
+ parent[name] = ifn.body;
+ ifn.body = new Value(parent);
+ return ifn;
+ };
+
+ UTILITIES = {
+ "extends": function() {
+ return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }";
+ },
+ bind: function() {
+ return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }';
+ },
+ indexOf: function() {
+ return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }";
+ },
+ hasProp: function() {
+ return '{}.hasOwnProperty';
+ },
+ slice: function() {
+ return '[].slice';
+ }
+ };
+
+ LEVEL_TOP = 1;
+
+ LEVEL_PAREN = 2;
+
+ LEVEL_LIST = 3;
+
+ LEVEL_COND = 4;
+
+ LEVEL_OP = 5;
+
+ LEVEL_ACCESS = 6;
+
+ TAB = ' ';
+
+ IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+
+ IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$");
+
+ SIMPLENUM = /^[+-]?\d+$/;
+
+ METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$");
+
+ IS_STRING = /^['"]/;
+
+ utility = function(name) {
+ var ref;
+ ref = "__" + name;
+ Scope.root.assign(ref, UTILITIES[name]());
+ return ref;
+ };
+
+ multident = function(code, tab) {
+ code = code.replace(/\n/g, '$&' + tab);
+ return code.replace(/\s+$/, '');
+ };
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/parser.js b/src/fauxton/assets/js/libs/ace/mode/coffee/parser.js
new file mode 100644
index 000000000..00d1b723d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/parser.js
@@ -0,0 +1,724 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+/* parser generated by jison 0.4.4 */
+/*
+ Returns a Parser object of the following structure:
+
+ Parser: {
+ yy: {}
+ }
+
+ Parser.prototype: {
+ yy: {},
+ trace: function(),
+ symbols_: {associative list: name ==> number},
+ terminals_: {associative list: number ==> name},
+ productions_: [...],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
+ table: [...],
+ defaultActions: {...},
+ parseError: function(str, hash),
+ parse: function(input),
+
+ lexer: {
+ EOF: 1,
+ parseError: function(str, hash),
+ setInput: function(input),
+ input: function(),
+ unput: function(str),
+ more: function(),
+ less: function(n),
+ pastInput: function(),
+ upcomingInput: function(),
+ showPosition: function(),
+ test_match: function(regex_match_array, rule_index),
+ next: function(),
+ lex: function(),
+ begin: function(condition),
+ popState: function(),
+ _currentRules: function(),
+ topState: function(),
+ pushState: function(condition),
+
+ options: {
+ ranges: boolean (optional: true ==> token location info will include a .range[] member)
+ flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
+ backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
+ },
+
+ performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
+ rules: [...],
+ conditions: {associative list: name ==> set},
+ }
+ }
+
+
+ token location info (@$, _$, etc.): {
+ first_line: n,
+ last_line: n,
+ first_column: n,
+ last_column: n,
+ range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
+ }
+
+
+ the parseError function receives a 'hash' object with these members for lexer and parser errors: {
+ text: (matched text)
+ token: (the produced terminal token, if any)
+ line: (yylineno)
+ }
+ while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
+ loc: (yylloc)
+ expected: (string describing the set of expected tokens)
+ recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
+ }
+*/
+
+var parser = {trace: function trace() { },
+yy: {},
+symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1},
+terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"},
+productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],
+performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
+/* this == yyval */
+
+var $0 = $$.length - 1;
+switch (yystate) {
+case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block);
+break;
+case 2:return this.$ = $$[$0];
+break;
+case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]]));
+break;
+case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0]));
+break;
+case 5:this.$ = $$[$0-1];
+break;
+case 6:this.$ = $$[$0];
+break;
+case 7:this.$ = $$[$0];
+break;
+case 8:this.$ = $$[$0];
+break;
+case 9:this.$ = $$[$0];
+break;
+case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 11:this.$ = $$[$0];
+break;
+case 12:this.$ = $$[$0];
+break;
+case 13:this.$ = $$[$0];
+break;
+case 14:this.$ = $$[$0];
+break;
+case 15:this.$ = $$[$0];
+break;
+case 16:this.$ = $$[$0];
+break;
+case 17:this.$ = $$[$0];
+break;
+case 18:this.$ = $$[$0];
+break;
+case 19:this.$ = $$[$0];
+break;
+case 20:this.$ = $$[$0];
+break;
+case 21:this.$ = $$[$0];
+break;
+case 22:this.$ = $$[$0];
+break;
+case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block);
+break;
+case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+break;
+case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 28:this.$ = $$[$0];
+break;
+case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0]));
+break;
+case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined);
+break;
+case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null);
+break;
+case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0]));
+break;
+case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0]));
+break;
+case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0]));
+break;
+case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1]));
+break;
+case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object'));
+break;
+case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object'));
+break;
+case 41:this.$ = $$[$0];
+break;
+case 42:this.$ = $$[$0];
+break;
+case 43:this.$ = $$[$0];
+break;
+case 44:this.$ = $$[$0];
+break;
+case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0]));
+break;
+case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return);
+break;
+case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0]));
+break;
+case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1]));
+break;
+case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1]));
+break;
+case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func');
+break;
+case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc');
+break;
+case 52:this.$ = $$[$0];
+break;
+case 53:this.$ = $$[$0];
+break;
+case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+break;
+case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0]));
+break;
+case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true));
+break;
+case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0]));
+break;
+case 62:this.$ = $$[$0];
+break;
+case 63:this.$ = $$[$0];
+break;
+case 64:this.$ = $$[$0];
+break;
+case 65:this.$ = $$[$0];
+break;
+case 66:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1]));
+break;
+case 67:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 68:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0]));
+break;
+case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0])));
+break;
+case 70:this.$ = $$[$0];
+break;
+case 71:this.$ = $$[$0];
+break;
+case 72:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 74:this.$ = $$[$0];
+break;
+case 75:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 78:this.$ = $$[$0];
+break;
+case 79:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0]));
+break;
+case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak'));
+break;
+case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+break;
+case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]);
+break;
+case 83:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype')));
+break;
+case 84:this.$ = $$[$0];
+break;
+case 85:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]);
+break;
+case 86:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], {
+ soak: true
+ }));
+break;
+case 87:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0]));
+break;
+case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0]));
+break;
+case 89:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated));
+break;
+case 90:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]);
+break;
+case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 92:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 93:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 94:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 95:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class);
+break;
+case 96:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0]));
+break;
+case 97:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0]));
+break;
+case 98:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0]));
+break;
+case 99:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0]));
+break;
+case 100:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0]));
+break;
+case 101:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0]));
+break;
+case 102:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0]));
+break;
+case 103:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 105:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))]));
+break;
+case 106:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0]));
+break;
+case 107:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false);
+break;
+case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true);
+break;
+case 109:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]);
+break;
+case 110:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+break;
+case 111:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
+break;
+case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this')));
+break;
+case 113:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this'));
+break;
+case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([]));
+break;
+case 115:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2]));
+break;
+case 116:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive');
+break;
+case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive');
+break;
+case 118:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2]));
+break;
+case 119:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 120:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0]));
+break;
+case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1]));
+break;
+case 122:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0]));
+break;
+case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 124:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0]));
+break;
+case 125:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0]));
+break;
+case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]);
+break;
+case 127:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2]));
+break;
+case 128:this.$ = $$[$0];
+break;
+case 129:this.$ = $$[$0];
+break;
+case 130:this.$ = $$[$0];
+break;
+case 131:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0]));
+break;
+case 132:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0]));
+break;
+case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1]));
+break;
+case 134:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0]));
+break;
+case 135:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0]));
+break;
+case 136:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]);
+break;
+case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]);
+break;
+case 138:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]);
+break;
+case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0]));
+break;
+case 140:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1]));
+break;
+case 141:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2]));
+break;
+case 142:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0]));
+break;
+case 143:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+ guard: $$[$0]
+ }));
+break;
+case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], {
+ invert: true
+ }));
+break;
+case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], {
+ invert: true,
+ guard: $$[$0]
+ }));
+break;
+case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0]));
+break;
+case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
+break;
+case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]]))));
+break;
+case 149:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]);
+break;
+case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0]));
+break;
+case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]]))));
+break;
+case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
+break;
+case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0]));
+break;
+case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1]));
+break;
+case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0]))
+ });
+break;
+case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () {
+ $$[$0].own = $$[$0-1].own;
+ $$[$0].name = $$[$0-1][0];
+ $$[$0].index = $$[$0-1][1];
+ return $$[$0];
+ }()));
+break;
+case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]);
+break;
+case 158:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+ $$[$0].own = true;
+ return $$[$0];
+ }()));
+break;
+case 159:this.$ = $$[$0];
+break;
+case 160:this.$ = $$[$0];
+break;
+case 161:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0]));
+break;
+case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]);
+break;
+case 164:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]);
+break;
+case 165:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: $$[$0]
+ });
+break;
+case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({
+ source: $$[$0],
+ object: true
+ });
+break;
+case 167:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ guard: $$[$0]
+ });
+break;
+case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ guard: $$[$0],
+ object: true
+ });
+break;
+case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({
+ source: $$[$0-2],
+ step: $$[$0]
+ });
+break;
+case 170:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+ source: $$[$0-4],
+ guard: $$[$0-2],
+ step: $$[$0]
+ });
+break;
+case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({
+ source: $$[$0-4],
+ step: $$[$0-2],
+ guard: $$[$0]
+ });
+break;
+case 172:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1]));
+break;
+case 173:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1]));
+break;
+case 174:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1]));
+break;
+case 175:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1]));
+break;
+case 176:this.$ = $$[$0];
+break;
+case 177:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0]));
+break;
+case 178:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]);
+break;
+case 179:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]);
+break;
+case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
+ type: $$[$0-2]
+ }));
+break;
+case 181:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], {
+ type: $$[$0-2]
+ }))));
+break;
+case 182:this.$ = $$[$0];
+break;
+case 183:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0]));
+break;
+case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+ type: $$[$0-1],
+ statement: true
+ }));
+break;
+case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), {
+ type: $$[$0-1],
+ statement: true
+ }));
+break;
+case 186:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0]));
+break;
+case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0]));
+break;
+case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0]));
+break;
+case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0]));
+break;
+case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0]));
+break;
+case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true));
+break;
+case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true));
+break;
+case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1]));
+break;
+case 194:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0]));
+break;
+case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0]));
+break;
+case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0]));
+break;
+case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () {
+ if ($$[$0-1].charAt(0) === '!') {
+ return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert();
+ } else {
+ return new yy.Op($$[$0-1], $$[$0-2], $$[$0]);
+ }
+ }()));
+break;
+case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1]));
+break;
+case 202:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3]));
+break;
+case 203:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2]));
+break;
+case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0]));
+break;
+}
+},
+table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[3]},{1:[2,2],6:[1,72]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,11],74:[1,96],78:[2,11],81:87,84:[1,89],85:[2,107],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],128:[2,11],129:[2,11],132:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],73:[2,12],74:[1,96],78:[2,12],81:97,84:[1,89],85:[2,107],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[1,99],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],82:100,84:[2,105],85:[1,101],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{6:[2,54],25:[2,54],27:105,28:[1,71],44:106,48:102,49:[2,54],54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{24:111,25:[1,112]},{7:113,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:115,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:116,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:117,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{12:118,13:119,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,58:45,59:46,61:121,63:23,64:24,65:25,76:[1,68],83:[1,26],88:[1,56],89:[1,57],90:[1,55],101:[1,54]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[1,125],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[1,122],131:[1,123],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[1,124]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[1,126],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{24:127,25:[1,112]},{24:128,25:[1,112]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{24:129,25:[1,112]},{7:130,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,131],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,95],6:[2,95],12:118,13:119,24:132,25:[1,112],26:[2,95],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:120,44:61,49:[2,95],54:[2,95],57:[2,95],58:45,59:46,61:134,63:23,64:24,65:25,73:[2,95],76:[1,68],78:[2,95],80:[1,133],83:[1,26],86:[2,95],88:[1,56],89:[1,57],90:[1,55],91:[2,95],93:[2,95],101:[1,54],102:[2,95],104:[2,95],105:[2,95],106:[2,95],110:[2,95],118:[2,95],126:[2,95],128:[2,95],129:[2,95],132:[2,95],133:[2,95],134:[2,95],135:[2,95],136:[2,95],137:[2,95]},{7:135,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,46],6:[2,46],7:136,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,46],103:37,104:[2,46],106:[2,46],107:38,108:[1,65],109:39,110:[2,46],111:67,119:[1,40],124:35,125:[1,62],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{4:137,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,138],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:139,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],27:145,28:[1,71],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{25:[2,50]},{25:[2,51]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],40:[2,67],49:[2,67],54:[2,67],57:[2,67],66:[2,67],67:[2,67],68:[2,67],69:[2,67],71:[2,67],73:[2,67],74:[2,67],78:[2,67],80:[2,67],84:[2,67],85:[2,67],86:[2,67],91:[2,67],93:[2,67],102:[2,67],104:[2,67],105:[2,67],106:[2,67],110:[2,67],118:[2,67],126:[2,67],128:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67],135:[2,67],136:[2,67],137:[2,67],138:[2,67]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{7:146,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:147,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:148,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:150,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:149,25:[1,112],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{27:155,28:[1,71],44:156,58:157,59:158,64:151,76:[1,68],89:[1,109],90:[1,55],113:152,114:[1,153],115:154},{112:159,116:[1,160],117:[1,161]},{6:[2,90],10:165,25:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:162,78:[2,90],89:[1,109]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],128:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25]},{1:[2,5],5:169,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],102:[2,5],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{7:170,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:171,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:172,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:173,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:174,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:175,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:176,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:177,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{7:178,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],128:[2,152],129:[2,152],132:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152]},{82:179,85:[1,101]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{85:[2,108]},{27:180,28:[1,71]},{27:181,28:[1,71]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],27:182,28:[1,71],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{27:183,28:[1,71]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{7:185,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],57:[1,189],58:45,59:46,61:34,63:23,64:24,65:25,72:184,75:186,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],92:187,93:[1,188],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{70:190,71:[1,95],74:[1,96]},{82:191,85:[1,101]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{6:[1,193],7:192,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,194],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],84:[2,106],85:[2,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[1,195],87:196,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],49:[1,198],53:200,54:[1,199]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,202],49:[2,59],54:[2,59],57:[1,201]},{6:[2,62],25:[2,62],26:[2,62],40:[2,62],49:[2,62],54:[2,62],57:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{27:145,28:[1,71]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:141,88:[1,56],89:[1,57],90:[1,55],91:[1,140],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{4:204,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,203],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:82,104:[2,186],105:[2,186],106:[2,186],109:83,110:[2,186],111:67,118:[2,186],126:[2,186],128:[2,186],129:[2,186],132:[1,73],133:[2,186],134:[2,186],135:[2,186],136:[2,186],137:[2,186]},{103:85,104:[1,63],106:[1,64],109:86,110:[1,66],111:67,126:[1,84]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:82,104:[2,187],105:[2,187],106:[2,187],109:83,110:[2,187],111:67,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,73],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:82,104:[2,188],105:[2,188],106:[2,188],109:83,110:[2,188],111:67,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,73],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,189],74:[2,71],78:[2,189],84:[2,71],85:[2,71],86:[2,189],91:[2,189],93:[2,189],102:[2,189],104:[2,189],105:[2,189],106:[2,189],110:[2,189],118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[2,189],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{62:88,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:87,84:[1,89],85:[2,107]},{62:98,66:[1,90],67:[1,91],68:[1,92],69:[1,93],70:94,71:[1,95],74:[1,96],81:97,84:[1,89],85:[2,107]},{66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],74:[2,74],84:[2,74],85:[2,74]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,190],74:[2,71],78:[2,190],84:[2,71],85:[2,71],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{6:[1,207],7:205,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,206],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:208,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{24:209,25:[1,112],125:[1,210]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],49:[2,132],54:[2,132],57:[2,132],73:[2,132],78:[2,132],86:[2,132],91:[2,132],93:[2,132],97:211,98:[1,212],99:[1,213],102:[2,132],104:[2,132],105:[2,132],106:[2,132],110:[2,132],118:[2,132],126:[2,132],128:[2,132],129:[2,132],132:[2,132],133:[2,132],134:[2,132],135:[2,132],136:[2,132],137:[2,132]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],104:[2,146],105:[2,146],106:[2,146],110:[2,146],118:[2,146],126:[2,146],128:[2,146],129:[2,146],132:[2,146],133:[2,146],134:[2,146],135:[2,146],136:[2,146],137:[2,146]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{25:[1,214],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{120:215,122:216,123:[1,217]},{1:[2,96],6:[2,96],25:[2,96],26:[2,96],49:[2,96],54:[2,96],57:[2,96],73:[2,96],78:[2,96],86:[2,96],91:[2,96],93:[2,96],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{7:218,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,99],6:[2,99],24:219,25:[1,112],26:[2,99],49:[2,99],54:[2,99],57:[2,99],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,99],74:[2,71],78:[2,99],80:[1,220],84:[2,71],85:[2,71],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],102:[2,139],103:82,104:[2,139],105:[2,139],106:[2,139],109:83,110:[2,139],111:67,118:[2,139],126:[2,139],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:82,104:[2,45],106:[2,45],109:83,110:[2,45],111:67,126:[2,45],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,72],102:[1,221]},{4:222,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,128],25:[2,128],54:[2,128],57:[1,224],91:[2,128],92:223,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114]},{6:[2,52],25:[2,52],53:225,54:[1,226],91:[2,52]},{6:[2,123],25:[2,123],26:[2,123],54:[2,123],86:[2,123],91:[2,123]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:227,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],86:[2,129],91:[2,129]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],40:[2,113],43:[2,113],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],80:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],116:[2,113],117:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113]},{24:228,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],73:[2,142],78:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],103:82,104:[1,63],105:[1,229],106:[1,64],109:83,110:[1,66],111:67,118:[2,142],126:[2,142],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:82,104:[1,63],105:[1,230],106:[1,64],109:83,110:[1,66],111:67,118:[2,144],126:[2,144],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],103:82,104:[1,63],105:[2,151],106:[1,64],109:83,110:[1,66],111:67,118:[2,151],126:[2,151],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{116:[2,157],117:[2,157]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],113:231,115:154},{54:[1,232],116:[2,163],117:[2,163]},{54:[2,159],116:[2,159],117:[2,159]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{7:233,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:234,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],53:235,54:[1,236],78:[2,52]},{6:[2,91],25:[2,91],26:[2,91],54:[2,91],78:[2,91]},{6:[2,38],25:[2,38],26:[2,38],43:[1,237],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],103:82,104:[2,194],105:[2,194],106:[2,194],109:83,110:[2,194],111:67,118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[1,73],133:[1,76],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:82,104:[2,195],105:[2,195],106:[2,195],109:83,110:[2,195],111:67,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,73],133:[1,76],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:82,104:[2,196],105:[2,196],106:[2,196],109:83,110:[2,196],111:67,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,73],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:82,104:[2,197],105:[2,197],106:[2,197],109:83,110:[2,197],111:67,118:[2,197],126:[2,197],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:82,104:[2,198],105:[2,198],106:[2,198],109:83,110:[2,198],111:67,118:[2,198],126:[2,198],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,198],136:[2,198],137:[1,80]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:82,104:[2,199],105:[2,199],106:[2,199],109:83,110:[2,199],111:67,118:[2,199],126:[2,199],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[2,199],137:[1,80]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:82,104:[2,200],105:[2,200],106:[2,200],109:83,110:[2,200],111:67,118:[2,200],126:[2,200],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[2,200],136:[2,200],137:[2,200]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:82,104:[1,63],105:[2,185],106:[1,64],109:83,110:[1,66],111:67,118:[2,185],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],103:82,104:[1,63],105:[2,184],106:[1,64],109:83,110:[1,66],111:67,118:[2,184],126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],66:[2,103],67:[2,103],68:[2,103],69:[2,103],71:[2,103],73:[2,103],74:[2,103],78:[2,103],84:[2,103],85:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],40:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],80:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{73:[1,238]},{57:[1,189],73:[2,87],92:239,93:[1,188],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{73:[2,88]},{7:240,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,122],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{11:[2,116],28:[2,116],30:[2,116],31:[2,116],33:[2,116],34:[2,116],35:[2,116],36:[2,116],37:[2,116],38:[2,116],45:[2,116],46:[2,116],47:[2,116],51:[2,116],52:[2,116],73:[2,116],76:[2,116],79:[2,116],83:[2,116],88:[2,116],89:[2,116],90:[2,116],96:[2,116],100:[2,116],101:[2,116],104:[2,116],106:[2,116],108:[2,116],110:[2,116],119:[2,116],125:[2,116],127:[2,116],128:[2,116],129:[2,116],130:[2,116],131:[2,116]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:82,104:[2,35],105:[2,35],106:[2,35],109:83,110:[2,35],111:67,118:[2,35],126:[2,35],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:241,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:242,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],49:[2,109],54:[2,109],57:[2,109],66:[2,109],67:[2,109],68:[2,109],69:[2,109],71:[2,109],73:[2,109],74:[2,109],78:[2,109],84:[2,109],85:[2,109],86:[2,109],91:[2,109],93:[2,109],102:[2,109],104:[2,109],105:[2,109],106:[2,109],110:[2,109],118:[2,109],126:[2,109],128:[2,109],129:[2,109],132:[2,109],133:[2,109],134:[2,109],135:[2,109],136:[2,109],137:[2,109]},{6:[2,52],25:[2,52],53:243,54:[1,226],86:[2,52]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],57:[1,244],86:[2,128],91:[2,128],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{50:245,51:[1,58],52:[1,59]},{6:[2,53],25:[2,53],26:[2,53],27:105,28:[1,71],44:106,55:246,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[1,247],25:[1,248]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:249,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{6:[1,72],26:[1,250]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:82,104:[2,201],105:[2,201],106:[2,201],109:83,110:[2,201],111:67,118:[2,201],126:[2,201],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:251,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:252,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:82,104:[2,204],105:[2,204],106:[2,204],109:83,110:[2,204],111:67,118:[2,204],126:[2,204],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{7:253,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],98:[1,254],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{24:255,25:[1,112]},{24:258,25:[1,112],27:256,28:[1,71],59:257,76:[1,68]},{120:259,122:216,123:[1,217]},{26:[1,260],121:[1,261],122:262,123:[1,217]},{26:[2,176],121:[2,176],123:[2,176]},{7:264,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],95:263,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,97],6:[2,97],24:265,25:[1,112],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],103:82,104:[1,63],105:[2,97],106:[1,64],109:83,110:[1,66],111:67,118:[2,97],126:[2,97],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],49:[2,100],54:[2,100],57:[2,100],73:[2,100],78:[2,100],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{7:266,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],66:[2,140],67:[2,140],68:[2,140],69:[2,140],71:[2,140],73:[2,140],74:[2,140],78:[2,140],84:[2,140],85:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],128:[2,140],129:[2,140],132:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140]},{6:[1,72],26:[1,267]},{7:268,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,66],11:[2,117],25:[2,66],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],54:[2,66],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],91:[2,66],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{6:[1,270],25:[1,271],91:[1,269]},{6:[2,53],7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],86:[2,53],88:[1,56],89:[1,57],90:[1,55],91:[2,53],94:272,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,52],25:[2,52],26:[2,52],53:273,54:[1,226]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],49:[2,180],54:[2,180],57:[2,180],73:[2,180],78:[2,180],86:[2,180],91:[2,180],93:[2,180],102:[2,180],104:[2,180],105:[2,180],106:[2,180],110:[2,180],118:[2,180],121:[2,180],126:[2,180],128:[2,180],129:[2,180],132:[2,180],133:[2,180],134:[2,180],135:[2,180],136:[2,180],137:[2,180]},{7:274,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:275,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{116:[2,158],117:[2,158]},{27:155,28:[1,71],44:156,58:157,59:158,76:[1,68],89:[1,109],90:[1,110],115:276},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],49:[2,165],54:[2,165],57:[2,165],73:[2,165],78:[2,165],86:[2,165],91:[2,165],93:[2,165],102:[2,165],103:82,104:[2,165],105:[1,277],106:[2,165],109:83,110:[2,165],111:67,118:[1,278],126:[2,165],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:82,104:[2,166],105:[1,279],106:[2,166],109:83,110:[2,166],111:67,118:[2,166],126:[2,166],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,281],25:[1,282],78:[1,280]},{6:[2,53],10:165,25:[2,53],26:[2,53],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:283,42:164,44:168,46:[1,44],78:[2,53],89:[1,109]},{7:284,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,285],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{7:286,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,73:[2,120],76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,121],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:82,104:[2,36],105:[2,36],106:[2,36],109:83,110:[2,36],111:67,118:[2,36],126:[2,36],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{26:[1,287],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],86:[1,288]},{6:[2,66],25:[2,66],26:[2,66],54:[2,66],86:[2,66],91:[2,66]},{24:289,25:[1,112]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:105,28:[1,71],44:106,55:290,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,54],25:[2,54],26:[2,54],27:105,28:[1,71],44:106,48:291,54:[2,54],55:103,56:104,58:107,59:108,76:[1,68],89:[1,109],90:[1,110]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{26:[1,292],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:82,104:[2,203],105:[2,203],106:[2,203],109:83,110:[2,203],111:67,118:[2,203],126:[2,203],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:293,25:[1,112],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{24:294,25:[1,112]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{24:295,25:[1,112]},{24:296,25:[1,112]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{26:[1,297],121:[1,298],122:262,123:[1,217]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{24:299,25:[1,112]},{26:[2,177],121:[2,177],123:[2,177]},{24:300,25:[1,112],54:[1,301]},{25:[2,130],54:[2,130],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],104:[2,98],105:[2,98],106:[2,98],110:[2,98],118:[2,98],126:[2,98],128:[2,98],129:[2,98],132:[2,98],133:[2,98],134:[2,98],135:[2,98],136:[2,98],137:[2,98]},{1:[2,101],6:[2,101],24:302,25:[1,112],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],103:82,104:[1,63],105:[2,101],106:[1,64],109:83,110:[1,66],111:67,118:[2,101],126:[2,101],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{102:[1,303]},{91:[1,304],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],94:305,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:197,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,60:144,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],87:306,88:[1,56],89:[1,57],90:[1,55],94:142,96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{6:[1,270],25:[1,271],26:[1,307]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:82,104:[1,63],105:[2,143],106:[1,64],109:83,110:[1,66],111:67,118:[2,143],126:[2,143],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:82,104:[1,63],105:[2,145],106:[1,64],109:83,110:[1,66],111:67,118:[2,145],126:[2,145],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{116:[2,164],117:[2,164]},{7:308,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:309,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:310,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,89],6:[2,89],25:[2,89],26:[2,89],40:[2,89],49:[2,89],54:[2,89],57:[2,89],66:[2,89],67:[2,89],68:[2,89],69:[2,89],71:[2,89],73:[2,89],74:[2,89],78:[2,89],84:[2,89],85:[2,89],86:[2,89],91:[2,89],93:[2,89],102:[2,89],104:[2,89],105:[2,89],106:[2,89],110:[2,89],116:[2,89],117:[2,89],118:[2,89],126:[2,89],128:[2,89],129:[2,89],132:[2,89],133:[2,89],134:[2,89],135:[2,89],136:[2,89],137:[2,89]},{10:165,27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:311,42:164,44:168,46:[1,44],89:[1,109]},{6:[2,90],10:165,25:[2,90],26:[2,90],27:166,28:[1,71],29:167,30:[1,69],31:[1,70],41:163,42:164,44:168,46:[1,44],54:[2,90],77:312,89:[1,109]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{7:313,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{73:[2,119],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],128:[2,37],129:[2,37],132:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],128:[2,48],129:[2,48],132:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:314,54:[1,199]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],104:[2,202],105:[2,202],106:[2,202],110:[2,202],118:[2,202],126:[2,202],128:[2,202],129:[2,202],132:[2,202],133:[2,202],134:[2,202],135:[2,202],136:[2,202],137:[2,202]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],98:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],104:[2,172],105:[2,172],106:[2,172],110:[2,172],118:[2,172],126:[2,172],128:[2,172],129:[2,172],132:[2,172],133:[2,172],134:[2,172],135:[2,172],136:[2,172],137:[2,172]},{24:315,25:[1,112]},{26:[1,316]},{6:[1,317],26:[2,178],121:[2,178],123:[2,178]},{7:318,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{1:[2,102],6:[2,102],25:[2,102],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],104:[2,102],105:[2,102],106:[2,102],110:[2,102],118:[2,102],126:[2,102],128:[2,102],129:[2,102],132:[2,102],133:[2,102],134:[2,102],135:[2,102],136:[2,102],137:[2,102]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{1:[2,118],6:[2,118],25:[2,118],26:[2,118],49:[2,118],54:[2,118],57:[2,118],66:[2,118],67:[2,118],68:[2,118],69:[2,118],71:[2,118],73:[2,118],74:[2,118],78:[2,118],84:[2,118],85:[2,118],86:[2,118],91:[2,118],93:[2,118],102:[2,118],104:[2,118],105:[2,118],106:[2,118],110:[2,118],118:[2,118],126:[2,118],128:[2,118],129:[2,118],132:[2,118],133:[2,118],134:[2,118],135:[2,118],136:[2,118],137:[2,118]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[2,52],25:[2,52],26:[2,52],53:319,54:[1,226]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:82,104:[2,167],105:[2,167],106:[2,167],109:83,110:[2,167],111:67,118:[1,320],126:[2,167],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:82,104:[2,169],105:[1,321],106:[2,169],109:83,110:[2,169],111:67,118:[2,169],126:[2,169],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:82,104:[2,168],105:[2,168],106:[2,168],109:83,110:[2,168],111:67,118:[2,168],126:[2,168],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,52],25:[2,52],26:[2,52],53:322,54:[1,236]},{26:[1,323],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,247],25:[1,248],26:[1,324]},{26:[1,325]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{26:[2,179],121:[2,179],123:[2,179]},{25:[2,131],54:[2,131],103:82,104:[1,63],106:[1,64],109:83,110:[1,66],111:67,126:[1,81],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[1,270],25:[1,271],26:[1,326]},{7:327,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{7:328,8:114,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:60,28:[1,71],29:47,30:[1,69],31:[1,70],32:22,33:[1,48],34:[1,49],35:[1,50],36:[1,51],37:[1,52],38:[1,53],39:21,44:61,45:[1,43],46:[1,44],47:[1,27],50:28,51:[1,58],52:[1,59],58:45,59:46,61:34,63:23,64:24,65:25,76:[1,68],79:[1,41],83:[1,26],88:[1,56],89:[1,57],90:[1,55],96:[1,36],100:[1,42],101:[1,54],103:37,104:[1,63],106:[1,64],107:38,108:[1,65],109:39,110:[1,66],111:67,119:[1,40],124:35,125:[1,62],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33]},{6:[1,281],25:[1,282],26:[1,329]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:82,104:[2,170],105:[2,170],106:[2,170],109:83,110:[2,170],111:67,118:[2,170],126:[2,170],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:82,104:[2,171],105:[2,171],106:[2,171],109:83,110:[2,171],111:67,118:[2,171],126:[2,171],128:[1,75],129:[1,74],132:[1,73],133:[1,76],134:[1,77],135:[1,78],136:[1,79],137:[1,80]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]}],
+defaultActions: {58:[2,50],59:[2,51],89:[2,108],186:[2,88]},
+parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ // ace_mod
+ var e = new Error(str)
+ e.location = hash.loc
+ throw e;
+ }
+},
+parse: function parse(input) {
+ var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
+ this.lexer.setInput(input);
+ this.lexer.yy = this.yy;
+ this.yy.lexer = this.lexer;
+ this.yy.parser = this;
+ if (typeof this.lexer.yylloc == 'undefined') {
+ this.lexer.yylloc = {};
+ }
+ var yyloc = this.lexer.yylloc;
+ lstack.push(yyloc);
+ var ranges = this.lexer.options && this.lexer.options.ranges;
+ if (typeof this.yy.parseError === 'function') {
+ this.parseError = this.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function popStack(n) {
+ stack.length = stack.length - 2 * n;
+ vstack.length = vstack.length - n;
+ lstack.length = lstack.length - n;
+ }
+ function lex() {
+ var token;
+ token = self.lexer.lex() || EOF;
+ if (typeof token !== 'number') {
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state = stack[stack.length - 1];
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol === null || typeof symbol == 'undefined') {
+ symbol = lex();
+ }
+ action = table[state] && table[state][symbol];
+ }
+ if (typeof action === 'undefined' || !action.length || !action[0]) {
+ var errStr = '';
+ expected = [];
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push('\'' + this.terminals_[p] + '\'');
+ }
+ }
+ if (this.lexer.showPosition) {
+ errStr = 'Expecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
+ } else {
+ errStr = 'Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
+ }
+ // ace_mod
+ if (this.lexer.yylloc.first_line !== yyloc.first_line) yyloc = this.lexer.yylloc;
+ this.parseError(errStr, {
+ text: this.lexer.match,
+ token: this.terminals_[symbol] || symbol,
+ line: this.lexer.yylineno,
+ loc: yyloc,
+ expected: expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
+ }
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(this.lexer.yytext);
+ lstack.push(this.lexer.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ if (!preErrorSymbol) {
+ yyleng = this.lexer.yyleng;
+ yytext = this.lexer.yytext;
+ yylineno = this.lexer.yylineno;
+ yyloc = this.lexer.yylloc;
+ if (recovering > 0) {
+ recovering--;
+ }
+ } else {
+ symbol = preErrorSymbol;
+ preErrorSymbol = null;
+ }
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
+ }
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
+ if (typeof r !== 'undefined') {
+ return r;
+ }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
+ }
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
+ }
+ }
+ return true;
+}};
+undefined
+function Parser () {
+ this.yy = {};
+}
+Parser.prototype = parser;parser.Parser = Parser;
+
+module.exports = new Parser;
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/parser_test.js b/src/fauxton/assets/js/libs/ace/mode/coffee/parser_test.js
new file mode 100644
index 000000000..001262b69
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/parser_test.js
@@ -0,0 +1,88 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../../test/assertions");
+var coffee = require("../coffee/coffee-script");
+
+function assertLocation(e, sl, sc, el, ec) {
+ assert.equal(e.location.first_line, sl);
+ assert.equal(e.location.first_column, sc);
+ assert.equal(e.location.last_line, el);
+ assert.equal(e.location.last_column, ec);
+}
+
+function parse(str) {
+ try {
+ coffee.parse(str).compile();
+ } catch (e) {
+ return e;
+ }
+}
+
+module.exports = {
+ "test parse valid coffee script": function() {
+ coffee.parse("square = (x) -> x * x");
+ },
+
+ "test parse invalid coffee script": function() {
+ var e = parse("a = 12 f");
+ assert.equal(e.message, "Unexpected 'IDENTIFIER'");
+ assertLocation(e, 0, 4, 0, 5);
+ },
+
+ "test parse missing bracket": function() {
+ var e = parse("a = 12 f {\n\n");
+ assert.equal(e.message, "missing }");
+ assertLocation(e, 0, 10, 0, 10);
+ },
+ "test unexpected indent": function() {
+ var e = parse("a\n a\n");
+ assert.equal(e.message, "Unexpected 'INDENT'");
+ assertLocation(e, 1, 0, 1, 1);
+ },
+ "test invalid destructuring": function() {
+ var e = parse("\n{b: 5} = {}");
+ assert.equal(e.message, '"5" cannot be assigned');
+ assertLocation(e, 1, 4, 1, 4);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/rewriter.js b/src/fauxton/assets/js/libs/ace/mode/coffee/rewriter.js
new file mode 100644
index 000000000..009d17d0b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/rewriter.js
@@ -0,0 +1,513 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+// Generated by CoffeeScript 1.6.3
+
+ var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref,
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
+ __slice = [].slice;
+
+ generate = function(tag, value) {
+ var tok;
+ tok = [tag, value];
+ tok.generated = true;
+ return tok;
+ };
+
+ exports.Rewriter = (function() {
+ function Rewriter() {}
+
+ Rewriter.prototype.rewrite = function(tokens) {
+ this.tokens = tokens;
+ this.removeLeadingNewlines();
+ this.removeMidExpressionNewlines();
+ this.closeOpenCalls();
+ this.closeOpenIndexes();
+ this.addImplicitIndentation();
+ this.tagPostfixConditionals();
+ this.addImplicitBracesAndParens();
+ this.addLocationDataToGeneratedTokens();
+ return this.tokens;
+ };
+
+ Rewriter.prototype.scanTokens = function(block) {
+ var i, token, tokens;
+ tokens = this.tokens;
+ i = 0;
+ while (token = tokens[i]) {
+ i += block.call(this, token, i, tokens);
+ }
+ return true;
+ };
+
+ Rewriter.prototype.detectEnd = function(i, condition, action) {
+ var levels, token, tokens, _ref, _ref1;
+ tokens = this.tokens;
+ levels = 0;
+ while (token = tokens[i]) {
+ if (levels === 0 && condition.call(this, token, i)) {
+ return action.call(this, token, i);
+ }
+ if (!token || levels < 0) {
+ return action.call(this, token, i - 1);
+ }
+ if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
+ levels += 1;
+ } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
+ levels -= 1;
+ }
+ i += 1;
+ }
+ return i - 1;
+ };
+
+ Rewriter.prototype.removeLeadingNewlines = function() {
+ var i, tag, _i, _len, _ref;
+ _ref = this.tokens;
+ for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+ tag = _ref[i][0];
+ if (tag !== 'TERMINATOR') {
+ break;
+ }
+ }
+ if (i) {
+ return this.tokens.splice(0, i);
+ }
+ };
+
+ Rewriter.prototype.removeMidExpressionNewlines = function() {
+ return this.scanTokens(function(token, i, tokens) {
+ var _ref;
+ if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) {
+ return 1;
+ }
+ tokens.splice(i, 1);
+ return 0;
+ });
+ };
+
+ Rewriter.prototype.closeOpenCalls = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')';
+ };
+ action = function(token, i) {
+ return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'CALL_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.closeOpenIndexes = function() {
+ var action, condition;
+ condition = function(token, i) {
+ var _ref;
+ return (_ref = token[0]) === ']' || _ref === 'INDEX_END';
+ };
+ action = function(token, i) {
+ return token[0] = 'INDEX_END';
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] === 'INDEX_START') {
+ this.detectEnd(i + 1, condition, action);
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.matchTags = function() {
+ var fuzz, i, j, pattern, _i, _ref, _ref1;
+ i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
+ fuzz = 0;
+ for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) {
+ while (this.tag(i + j + fuzz) === 'HERECOMMENT') {
+ fuzz += 2;
+ }
+ if (pattern[j] == null) {
+ continue;
+ }
+ if (typeof pattern[j] === 'string') {
+ pattern[j] = [pattern[j]];
+ }
+ if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ Rewriter.prototype.looksObjectish = function(j) {
+ return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':');
+ };
+
+ Rewriter.prototype.findTagsBackwards = function(i, tags) {
+ var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ backStack = [];
+ while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) {
+ if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) {
+ backStack.push(this.tag(i));
+ }
+ if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) {
+ backStack.pop();
+ }
+ i -= 1;
+ }
+ return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0;
+ };
+
+ Rewriter.prototype.addImplicitBracesAndParens = function() {
+ var stack;
+ stack = [];
+ return this.scanTokens(function(token, i, tokens) {
+ var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
+ tag = token[0];
+ prevTag = (i > 0 ? tokens[i - 1] : [])[0];
+ nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0];
+ stackTop = function() {
+ return stack[stack.length - 1];
+ };
+ startIdx = i;
+ forward = function(n) {
+ return i - startIdx + n;
+ };
+ inImplicit = function() {
+ var _ref, _ref1;
+ return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0;
+ };
+ inImplicitCall = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '(';
+ };
+ inImplicitObject = function() {
+ var _ref;
+ return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{';
+ };
+ inImplicitControl = function() {
+ var _ref;
+ return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL';
+ };
+ startImplicitCall = function(j) {
+ var idx;
+ idx = j != null ? j : i;
+ stack.push([
+ '(', idx, {
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('CALL_START', '('));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitCall = function() {
+ stack.pop();
+ tokens.splice(i, 0, generate('CALL_END', ')'));
+ return i += 1;
+ };
+ startImplicitObject = function(j, startsLine) {
+ var idx;
+ if (startsLine == null) {
+ startsLine = true;
+ }
+ idx = j != null ? j : i;
+ stack.push([
+ '{', idx, {
+ sameLine: true,
+ startsLine: startsLine,
+ ours: true
+ }
+ ]);
+ tokens.splice(idx, 0, generate('{', generate(new String('{'))));
+ if (j == null) {
+ return i += 1;
+ }
+ };
+ endImplicitObject = function(j) {
+ j = j != null ? j : i;
+ stack.pop();
+ tokens.splice(j, 0, generate('}', '}'));
+ return i += 1;
+ };
+ if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) {
+ stack.push([
+ 'CONTROL', i, {
+ ours: true
+ }
+ ]);
+ return forward(1);
+ }
+ if (tag === 'INDENT' && inImplicit()) {
+ if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') {
+ while (inImplicitCall()) {
+ endImplicitCall();
+ }
+ }
+ if (inImplicitControl()) {
+ stack.pop();
+ }
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_START, tag) >= 0) {
+ stack.push([tag, i]);
+ return forward(1);
+ }
+ if (__indexOf.call(EXPRESSION_END, tag) >= 0) {
+ while (inImplicit()) {
+ if (inImplicitCall()) {
+ endImplicitCall();
+ } else if (inImplicitObject()) {
+ endImplicitObject();
+ } else {
+ stack.pop();
+ }
+ }
+ stack.pop();
+ }
+ if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) {
+ if (tag === '?') {
+ tag = token[0] = 'FUNC_EXIST';
+ }
+ startImplicitCall(i + 1);
+ return forward(2);
+ }
+ if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) {
+ startImplicitCall(i + 1);
+ stack.push(['INDENT', i + 2]);
+ return forward(3);
+ }
+ if (tag === ':') {
+ if (this.tag(i - 2) === '@') {
+ s = i - 2;
+ } else {
+ s = i - 1;
+ }
+ while (this.tag(s - 2) === 'HERECOMMENT') {
+ s -= 2;
+ }
+ startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine;
+ if (stackTop()) {
+ _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1];
+ if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) {
+ return forward(1);
+ }
+ }
+ startImplicitObject(s, !!startsLine);
+ return forward(2);
+ }
+ if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) {
+ endImplicitCall();
+ return forward(1);
+ }
+ if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) {
+ stackTop()[2].sameLine = false;
+ }
+ if (__indexOf.call(IMPLICIT_END, tag) >= 0) {
+ while (inImplicit()) {
+ _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine);
+ if (inImplicitCall() && prevTag !== ',') {
+ endImplicitCall();
+ } else if (inImplicitObject() && sameLine && !startsLine) {
+ endImplicitObject();
+ } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) {
+ endImplicitObject();
+ } else {
+ break;
+ }
+ }
+ }
+ if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) {
+ offset = nextTag === 'OUTDENT' ? 1 : 0;
+ while (inImplicitObject()) {
+ endImplicitObject(i + offset);
+ }
+ }
+ return forward(1);
+ });
+ };
+
+ Rewriter.prototype.addLocationDataToGeneratedTokens = function() {
+ return this.scanTokens(function(token, i, tokens) {
+ var column, line, nextLocation, prevLocation, _ref, _ref1;
+ if (token[2]) {
+ return 1;
+ }
+ if (!(token.generated || token.explicit)) {
+ return 1;
+ }
+ if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) {
+ line = nextLocation.first_line, column = nextLocation.first_column;
+ } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) {
+ line = prevLocation.last_line, column = prevLocation.last_column;
+ } else {
+ line = column = 0;
+ }
+ token[2] = {
+ first_line: line,
+ first_column: column,
+ last_line: line,
+ last_column: column
+ };
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.addImplicitIndentation = function() {
+ var action, condition, indent, outdent, starter;
+ starter = indent = outdent = null;
+ condition = function(token, i) {
+ var _ref, _ref1;
+ return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>'));
+ };
+ action = function(token, i) {
+ return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent);
+ };
+ return this.scanTokens(function(token, i, tokens) {
+ var j, tag, _i, _ref, _ref1;
+ tag = token[0];
+ if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') {
+ tokens.splice(i, 1);
+ return 0;
+ }
+ if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') {
+ tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation())));
+ return 2;
+ }
+ if (tag === 'CATCH') {
+ for (j = _i = 1; _i <= 2; j = ++_i) {
+ if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) {
+ continue;
+ }
+ tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation())));
+ return 2 + j;
+ }
+ }
+ if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
+ starter = tag;
+ _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1];
+ if (starter === 'THEN') {
+ indent.fromThen = true;
+ }
+ tokens.splice(i + 1, 0, indent);
+ this.detectEnd(i + 2, condition, action);
+ if (tag === 'THEN') {
+ tokens.splice(i, 1);
+ }
+ return 1;
+ }
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.tagPostfixConditionals = function() {
+ var action, condition, original;
+ original = null;
+ condition = function(token, i) {
+ var prevTag, tag;
+ tag = token[0];
+ prevTag = this.tokens[i - 1][0];
+ return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0);
+ };
+ action = function(token, i) {
+ if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) {
+ return original[0] = 'POST_' + original[0];
+ }
+ };
+ return this.scanTokens(function(token, i) {
+ if (token[0] !== 'IF') {
+ return 1;
+ }
+ original = token;
+ this.detectEnd(i + 1, condition, action);
+ return 1;
+ });
+ };
+
+ Rewriter.prototype.indentation = function(implicit) {
+ var indent, outdent;
+ if (implicit == null) {
+ implicit = false;
+ }
+ indent = ['INDENT', 2];
+ outdent = ['OUTDENT', 2];
+ if (implicit) {
+ indent.generated = outdent.generated = true;
+ }
+ if (!implicit) {
+ indent.explicit = outdent.explicit = true;
+ }
+ return [indent, outdent];
+ };
+
+ Rewriter.prototype.generate = generate;
+
+ Rewriter.prototype.tag = function(i) {
+ var _ref;
+ return (_ref = this.tokens[i]) != null ? _ref[0] : void 0;
+ };
+
+ return Rewriter;
+
+ })();
+
+ BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']];
+
+ exports.INVERSES = INVERSES = {};
+
+ EXPRESSION_START = [];
+
+ EXPRESSION_END = [];
+
+ for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) {
+ _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1];
+ EXPRESSION_START.push(INVERSES[rite] = left);
+ EXPRESSION_END.push(INVERSES[left] = rite);
+ }
+
+ EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END);
+
+ IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
+
+ IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++'];
+
+ IMPLICIT_UNSPACED_CALL = ['+', '-'];
+
+ IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR'];
+
+ SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN'];
+
+ SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN'];
+
+ LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee/scope.js b/src/fauxton/assets/js/libs/ace/mode/coffee/scope.js
new file mode 100644
index 000000000..5834963b1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee/scope.js
@@ -0,0 +1,174 @@
+/**
+ * Copyright (c) 2009-2013 Jeremy Ashkenas
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * 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.
+ *
+ */
+
+define(function(require, exports, module) {
+// Generated by CoffeeScript 1.6.3
+
+ var Scope, extend, last, _ref;
+
+ _ref = require('./helpers'), extend = _ref.extend, last = _ref.last;
+
+ exports.Scope = Scope = (function() {
+ Scope.root = null;
+
+ function Scope(parent, expressions, method) {
+ this.parent = parent;
+ this.expressions = expressions;
+ this.method = method;
+ this.variables = [
+ {
+ name: 'arguments',
+ type: 'arguments'
+ }
+ ];
+ this.positions = {};
+ if (!this.parent) {
+ Scope.root = this;
+ }
+ }
+
+ Scope.prototype.add = function(name, type, immediate) {
+ if (this.shared && !immediate) {
+ return this.parent.add(name, type, immediate);
+ }
+ if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
+ return this.variables[this.positions[name]].type = type;
+ } else {
+ return this.positions[name] = this.variables.push({
+ name: name,
+ type: type
+ }) - 1;
+ }
+ };
+
+ Scope.prototype.namedMethod = function() {
+ var _ref1;
+ if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) {
+ return this.method;
+ }
+ return this.parent.namedMethod();
+ };
+
+ Scope.prototype.find = function(name) {
+ if (this.check(name)) {
+ return true;
+ }
+ this.add(name, 'var');
+ return false;
+ };
+
+ Scope.prototype.parameter = function(name) {
+ if (this.shared && this.parent.check(name, true)) {
+ return;
+ }
+ return this.add(name, 'param');
+ };
+
+ Scope.prototype.check = function(name) {
+ var _ref1;
+ return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
+ };
+
+ Scope.prototype.temporary = function(name, index) {
+ if (name.length > 1) {
+ return '_' + name + (index > 1 ? index - 1 : '');
+ } else {
+ return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a');
+ }
+ };
+
+ Scope.prototype.type = function(name) {
+ var v, _i, _len, _ref1;
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.name === name) {
+ return v.type;
+ }
+ }
+ return null;
+ };
+
+ Scope.prototype.freeVariable = function(name, reserve) {
+ var index, temp;
+ if (reserve == null) {
+ reserve = true;
+ }
+ index = 0;
+ while (this.check((temp = this.temporary(name, index)))) {
+ index++;
+ }
+ if (reserve) {
+ this.add(temp, 'var', true);
+ }
+ return temp;
+ };
+
+ Scope.prototype.assign = function(name, value) {
+ this.add(name, {
+ value: value,
+ assigned: true
+ }, true);
+ return this.hasAssignments = true;
+ };
+
+ Scope.prototype.hasDeclarations = function() {
+ return !!this.declaredVariables().length;
+ };
+
+ Scope.prototype.declaredVariables = function() {
+ var realVars, tempVars, v, _i, _len, _ref1;
+ realVars = [];
+ tempVars = [];
+ _ref1 = this.variables;
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type === 'var') {
+ (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name);
+ }
+ }
+ return realVars.sort().concat(tempVars.sort());
+ };
+
+ Scope.prototype.assignedVariables = function() {
+ var v, _i, _len, _ref1, _results;
+ _ref1 = this.variables;
+ _results = [];
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ v = _ref1[_i];
+ if (v.type.assigned) {
+ _results.push("" + v.name + " = " + v.type.value);
+ }
+ }
+ return _results;
+ };
+
+ return Scope;
+
+ })();
+
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/coffee_highlight_rules.js
new file mode 100644
index 000000000..a6d33abbd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee_highlight_rules.js
@@ -0,0 +1,233 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
+
+ function CoffeeHighlightRules() {
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+
+ var keywords = (
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
+ "or|on|unless|until|and|yes"
+ );
+
+ var langConstant = (
+ "true|false|null|undefined|NaN|Infinity"
+ );
+
+ var illegal = (
+ "case|const|default|function|var|void|with|enum|export|implements|" +
+ "interface|let|package|private|protected|public|static|yield|" +
+ "__hasProp|slice|bind|indexOf"
+ );
+
+ var supportClass = (
+ "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
+ "SyntaxError|TypeError|URIError|" +
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"
+ );
+
+ var supportFunction = (
+ "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|"
+ );
+
+ var variableLanguage = (
+ "window|arguments|prototype|document"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": langConstant,
+ "invalid.illegal": illegal,
+ "language.support.class": supportClass,
+ "language.support.function": supportFunction,
+ "variable.language": variableLanguage
+ }, "identifier");
+
+ var functionRule = {
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source
+ };
+
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
+
+ this.$rules = {
+ start : [
+ {
+ token : "constant.numeric",
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
+ }, {
+ stateName: "qdoc",
+ token : "string", regex : "'''", next : [
+ {token : "string", regex : "'''", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqdoc",
+ token : "string",
+ regex : '"""',
+ next : [
+ {token : "string", regex : '"""', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qstring",
+ token : "string", regex : "'", next : [
+ {token : "string", regex : "'", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqstring",
+ token : "string.start", regex : '"', next : [
+ {token : "string.end", regex : '"', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "js",
+ token : "string", regex : "`", next : [
+ {token : "string", regex : "`", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.string";
+ }
+ return "paren";
+ }
+ }, {
+ token : "string.regex",
+ regex : "///",
+ next : "heregex"
+ }, {
+ token : "string.regex",
+ regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
+ }, {
+ token : "comment",
+ regex : "###(?!#)",
+ next : "comment"
+ }, {
+ token : "comment",
+ regex : "#.*"
+ }, {
+ token : ["punctuation.operator", "text", "identifier"],
+ regex : "(\\.)(\\s*)(" + illegal + ")"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\."
+ }, {
+ //class A extends B
+ token : ["keyword", "text", "language.support.class",
+ "text", "keyword", "text", "language.support.class"],
+ regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
+ }, {
+ //play = (...) ->
+ token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
+ regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
+ },
+ functionRule,
+ {
+ token : "variable",
+ regex : "@(?:" + identifier + ")?"
+ }, {
+ token: keywordMapper,
+ regex : identifier
+ }, {
+ token : "punctuation.operator",
+ regex : "\\,|\\."
+ }, {
+ token : "storage.type",
+ regex : "[\\-=]>"
+ }, {
+ token : "keyword.operator",
+ regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
+ }, {
+ token : "paren.lparen",
+ regex : "[({[]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]})]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+
+ heregex : [{
+ token : "string.regex",
+ regex : '.*?///[imgy]{0,4}',
+ next : "start"
+ }, {
+ token : "comment.regex",
+ regex : "\\s+(?:#.*)?"
+ }, {
+ token : "string.regex",
+ regex : "\\S+"
+ }],
+
+ comment : [{
+ token : "comment",
+ regex : '###',
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }]
+ };
+ this.normalizeRules();
+ }
+
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coffee_worker.js b/src/fauxton/assets/js/libs/ace/mode/coffee_worker.js
new file mode 100644
index 000000000..a5f700f8f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coffee_worker.js
@@ -0,0 +1,74 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var coffee = require("../mode/coffee/coffee-script");
+
+window.addEventListener = function() {};
+
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(250);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+
+ try {
+ coffee.parse(value).compile();
+ } catch(e) {
+ var loc = e.location;
+ if (loc) {
+ this.sender.emit("error", {
+ row: loc.first_line,
+ column: loc.first_column,
+ endRow: loc.last_line,
+ endColumn: loc.last_column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ return;
+ }
+ this.sender.emit("ok");
+ };
+
+}).call(Worker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coldfusion.js b/src/fauxton/assets/js/libs/ace/mode/coldfusion.js
new file mode 100644
index 000000000..25a2b17ac
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coldfusion.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var XmlMode = require("./xml").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
+
+var Mode = function() {
+ XmlMode.call(this);
+
+ this.HighlightRules = ColdfusionHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+};
+oop.inherits(Mode, XmlMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coldfusion_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/coldfusion_highlight_rules.js
new file mode 100644
index 000000000..5feff6d6f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coldfusion_highlight_rules.js
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var ColdfusionHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.embedTagRules(JavaScriptHighlightRules, "cfjs-", "cfscript");
+
+ this.normalizeRules();
+};
+
+oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules);
+
+exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/coldfusion_test.js b/src/fauxton/assets/js/libs/ace/mode/coldfusion_test.js
new file mode 100644
index 000000000..b55fb1c5a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/coldfusion_test.js
@@ -0,0 +1,67 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Range = require("../range").Range;
+var ColdfusionMode = require("./coldfusion").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new ColdfusionMode();
+ },
+
+ "test: toggle comment lines" : function() {
+ var session = new EditSession([" abc", " cde", "fg"]);
+
+ var range = new Range(0, 3, 1, 1);
+ var comment = this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" <!--abc-->", " <!--cde-->", "fg"].join("\n"), session.toString());
+ },
+
+ "test: next line indent should be the same as the current line indent" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc"));
+ assert.equal("", this.mode.getNextLineIndent("start", "abc"));
+ assert.equal("\t", this.mode.getNextLineIndent("start", "\tabc"));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/csharp.js b/src/fauxton/assets/js/libs/ace/mode/csharp.js
new file mode 100644
index 000000000..95846a4ce
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/csharp.js
@@ -0,0 +1,61 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/csharp").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CSharpHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/csharp_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/csharp_highlight_rules.js
new file mode 100644
index 000000000..89cbc2d5e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/csharp_highlight_rules.js
@@ -0,0 +1,96 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var CSharpHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic",
+ "constant.language": "null|true|false"
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // character
+ regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/
+ }, {
+ token : "string", start : '"', end : '"|$', next: [
+ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},
+ {token: "invalid", regex: /\\./}
+ ]
+ }, {
+ token : "string", start : '@"', end : '"', next:[
+ {token: "constant.language.escape", regex: '""'}
+ ]
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "keyword",
+ regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(CSharpHighlightRules, TextHighlightRules);
+
+exports.CSharpHighlightRules = CSharpHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/css.js b/src/fauxton/assets/js/libs/ace/mode/css.js
new file mode 100644
index 000000000..9a4234c6c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css.js
@@ -0,0 +1,100 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ // ignore braces in comments
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("csslint", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/css/csslint.js b/src/fauxton/assets/js/libs/ace/mode/css/csslint.js
new file mode 100644
index 000000000..9f4c3bc83
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css/csslint.js
@@ -0,0 +1,9206 @@
+define(function(require, exports, module) {
+/*!
+CSSLint
+Copyright (c) 2011 Nicole Sullivan and Nicholas C. Zakas. All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+
+*/
+/* Build time: 17-January-2013 10:55:01 */
+/*!
+Parser-Lib
+Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+
+*/
+/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
+var parserlib = {};
+(function(){
+
+
+/**
+ * A generic base to inherit from for any object
+ * that needs event handling.
+ * @class EventTarget
+ * @constructor
+ */
+function EventTarget(){
+
+ /**
+ * The array of listeners for various events.
+ * @type Object
+ * @property _listeners
+ * @private
+ */
+ this._listeners = {};
+}
+
+EventTarget.prototype = {
+
+ //restore constructor
+ constructor: EventTarget,
+
+ /**
+ * Adds a listener for a given event type.
+ * @param {String} type The type of event to add a listener for.
+ * @param {Function} listener The function to call when the event occurs.
+ * @return {void}
+ * @method addListener
+ */
+ addListener: function(type, listener){
+ if (!this._listeners[type]){
+ this._listeners[type] = [];
+ }
+
+ this._listeners[type].push(listener);
+ },
+
+ /**
+ * Fires an event based on the passed-in object.
+ * @param {Object|String} event An object with at least a 'type' attribute
+ * or a string indicating the event name.
+ * @return {void}
+ * @method fire
+ */
+ fire: function(event){
+ if (typeof event == "string"){
+ event = { type: event };
+ }
+ if (typeof event.target != "undefined"){
+ event.target = this;
+ }
+
+ if (typeof event.type == "undefined"){
+ throw new Error("Event object missing 'type' property.");
+ }
+
+ if (this._listeners[event.type]){
+
+ //create a copy of the array and use that so listeners can't chane
+ var listeners = this._listeners[event.type].concat();
+ for (var i=0, len=listeners.length; i < len; i++){
+ listeners[i].call(this, event);
+ }
+ }
+ },
+
+ /**
+ * Removes a listener for a given event type.
+ * @param {String} type The type of event to remove a listener from.
+ * @param {Function} listener The function to remove from the event.
+ * @return {void}
+ * @method removeListener
+ */
+ removeListener: function(type, listener){
+ if (this._listeners[type]){
+ var listeners = this._listeners[type];
+ for (var i=0, len=listeners.length; i < len; i++){
+ if (listeners[i] === listener){
+ listeners.splice(i, 1);
+ break;
+ }
+ }
+
+
+ }
+ }
+};
+/**
+ * Convenient way to read through strings.
+ * @namespace parserlib.util
+ * @class StringReader
+ * @constructor
+ * @param {String} text The text to read.
+ */
+function StringReader(text){
+
+ /**
+ * The input text with line endings normalized.
+ * @property _input
+ * @type String
+ * @private
+ */
+ this._input = text.replace(/\n\r?/g, "\n");
+
+
+ /**
+ * The row for the character to be read next.
+ * @property _line
+ * @type int
+ * @private
+ */
+ this._line = 1;
+
+
+ /**
+ * The column for the character to be read next.
+ * @property _col
+ * @type int
+ * @private
+ */
+ this._col = 1;
+
+ /**
+ * The index of the character in the input to be read next.
+ * @property _cursor
+ * @type int
+ * @private
+ */
+ this._cursor = 0;
+}
+
+StringReader.prototype = {
+
+ //restore constructor
+ constructor: StringReader,
+
+ //-------------------------------------------------------------------------
+ // Position info
+ //-------------------------------------------------------------------------
+
+ /**
+ * Returns the column of the character to be read next.
+ * @return {int} The column of the character to be read next.
+ * @method getCol
+ */
+ getCol: function(){
+ return this._col;
+ },
+
+ /**
+ * Returns the row of the character to be read next.
+ * @return {int} The row of the character to be read next.
+ * @method getLine
+ */
+ getLine: function(){
+ return this._line ;
+ },
+
+ /**
+ * Determines if you're at the end of the input.
+ * @return {Boolean} True if there's no more input, false otherwise.
+ * @method eof
+ */
+ eof: function(){
+ return (this._cursor == this._input.length);
+ },
+
+ //-------------------------------------------------------------------------
+ // Basic reading
+ //-------------------------------------------------------------------------
+
+ /**
+ * Reads the next character without advancing the cursor.
+ * @param {int} count How many characters to look ahead (default is 1).
+ * @return {String} The next character or null if there is no next character.
+ * @method peek
+ */
+ peek: function(count){
+ var c = null;
+ count = (typeof count == "undefined" ? 1 : count);
+
+ //if we're not at the end of the input...
+ if (this._cursor < this._input.length){
+
+ //get character and increment cursor and column
+ c = this._input.charAt(this._cursor + count - 1);
+ }
+
+ return c;
+ },
+
+ /**
+ * Reads the next character from the input and adjusts the row and column
+ * accordingly.
+ * @return {String} The next character or null if there is no next character.
+ * @method read
+ */
+ read: function(){
+ var c = null;
+
+ //if we're not at the end of the input...
+ if (this._cursor < this._input.length){
+
+ //if the last character was a newline, increment row count
+ //and reset column count
+ if (this._input.charAt(this._cursor) == "\n"){
+ this._line++;
+ this._col=1;
+ } else {
+ this._col++;
+ }
+
+ //get character and increment cursor and column
+ c = this._input.charAt(this._cursor++);
+ }
+
+ return c;
+ },
+
+ //-------------------------------------------------------------------------
+ // Misc
+ //-------------------------------------------------------------------------
+
+ /**
+ * Saves the current location so it can be returned to later.
+ * @method mark
+ * @return {void}
+ */
+ mark: function(){
+ this._bookmark = {
+ cursor: this._cursor,
+ line: this._line,
+ col: this._col
+ };
+ },
+
+ reset: function(){
+ if (this._bookmark){
+ this._cursor = this._bookmark.cursor;
+ this._line = this._bookmark.line;
+ this._col = this._bookmark.col;
+ delete this._bookmark;
+ }
+ },
+
+ //-------------------------------------------------------------------------
+ // Advanced reading
+ //-------------------------------------------------------------------------
+
+ /**
+ * Reads up to and including the given string. Throws an error if that
+ * string is not found.
+ * @param {String} pattern The string to read.
+ * @return {String} The string when it is found.
+ * @throws Error when the string pattern is not found.
+ * @method readTo
+ */
+ readTo: function(pattern){
+
+ var buffer = "",
+ c;
+
+ /*
+ * First, buffer must be the same length as the pattern.
+ * Then, buffer must end with the pattern or else reach the
+ * end of the input.
+ */
+ while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) != buffer.length - pattern.length){
+ c = this.read();
+ if (c){
+ buffer += c;
+ } else {
+ throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + ".");
+ }
+ }
+
+ return buffer;
+
+ },
+
+ /**
+ * Reads characters while each character causes the given
+ * filter function to return true. The function is passed
+ * in each character and either returns true to continue
+ * reading or false to stop.
+ * @param {Function} filter The function to read on each character.
+ * @return {String} The string made up of all characters that passed the
+ * filter check.
+ * @method readWhile
+ */
+ readWhile: function(filter){
+
+ var buffer = "",
+ c = this.read();
+
+ while(c !== null && filter(c)){
+ buffer += c;
+ c = this.read();
+ }
+
+ return buffer;
+
+ },
+
+ /**
+ * Reads characters that match either text or a regular expression and
+ * returns those characters. If a match is found, the row and column
+ * are adjusted; if no match is found, the reader's state is unchanged.
+ * reading or false to stop.
+ * @param {String|RegExp} matchter If a string, then the literal string
+ * value is searched for. If a regular expression, then any string
+ * matching the pattern is search for.
+ * @return {String} The string made up of all characters that matched or
+ * null if there was no match.
+ * @method readMatch
+ */
+ readMatch: function(matcher){
+
+ var source = this._input.substring(this._cursor),
+ value = null;
+
+ //if it's a string, just do a straight match
+ if (typeof matcher == "string"){
+ if (source.indexOf(matcher) === 0){
+ value = this.readCount(matcher.length);
+ }
+ } else if (matcher instanceof RegExp){
+ if (matcher.test(source)){
+ value = this.readCount(RegExp.lastMatch.length);
+ }
+ }
+
+ return value;
+ },
+
+
+ /**
+ * Reads a given number of characters. If the end of the input is reached,
+ * it reads only the remaining characters and does not throw an error.
+ * @param {int} count The number of characters to read.
+ * @return {String} The string made up the read characters.
+ * @method readCount
+ */
+ readCount: function(count){
+ var buffer = "";
+
+ while(count--){
+ buffer += this.read();
+ }
+
+ return buffer;
+ }
+
+};
+/**
+ * Type to use when a syntax error occurs.
+ * @class SyntaxError
+ * @namespace parserlib.util
+ * @constructor
+ * @param {String} message The error message.
+ * @param {int} line The line at which the error occurred.
+ * @param {int} col The column at which the error occurred.
+ */
+function SyntaxError(message, line, col){
+
+ /**
+ * The column at which the error occurred.
+ * @type int
+ * @property col
+ */
+ this.col = col;
+
+ /**
+ * The line at which the error occurred.
+ * @type int
+ * @property line
+ */
+ this.line = line;
+
+ /**
+ * The text representation of the unit.
+ * @type String
+ * @property text
+ */
+ this.message = message;
+
+}
+
+//inherit from Error
+SyntaxError.prototype = new Error();
+/**
+ * Base type to represent a single syntactic unit.
+ * @class SyntaxUnit
+ * @namespace parserlib.util
+ * @constructor
+ * @param {String} text The text of the unit.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function SyntaxUnit(text, line, col, type){
+
+
+ /**
+ * The column of text on which the unit resides.
+ * @type int
+ * @property col
+ */
+ this.col = col;
+
+ /**
+ * The line of text on which the unit resides.
+ * @type int
+ * @property line
+ */
+ this.line = line;
+
+ /**
+ * The text representation of the unit.
+ * @type String
+ * @property text
+ */
+ this.text = text;
+
+ /**
+ * The type of syntax unit.
+ * @type int
+ * @property type
+ */
+ this.type = type;
+}
+
+/**
+ * Create a new syntax unit based solely on the given token.
+ * Convenience method for creating a new syntax unit when
+ * it represents a single token instead of multiple.
+ * @param {Object} token The token object to represent.
+ * @return {parserlib.util.SyntaxUnit} The object representing the token.
+ * @static
+ * @method fromToken
+ */
+SyntaxUnit.fromToken = function(token){
+ return new SyntaxUnit(token.value, token.startLine, token.startCol);
+};
+
+SyntaxUnit.prototype = {
+
+ //restore constructor
+ constructor: SyntaxUnit,
+
+ /**
+ * Returns the text representation of the unit.
+ * @return {String} The text representation of the unit.
+ * @method valueOf
+ */
+ valueOf: function(){
+ return this.toString();
+ },
+
+ /**
+ * Returns the text representation of the unit.
+ * @return {String} The text representation of the unit.
+ * @method toString
+ */
+ toString: function(){
+ return this.text;
+ }
+
+};
+/*global StringReader, SyntaxError*/
+
+/**
+ * Generic TokenStream providing base functionality.
+ * @class TokenStreamBase
+ * @namespace parserlib.util
+ * @constructor
+ * @param {String|StringReader} input The text to tokenize or a reader from
+ * which to read the input.
+ */
+function TokenStreamBase(input, tokenData){
+
+ /**
+ * The string reader for easy access to the text.
+ * @type StringReader
+ * @property _reader
+ * @private
+ */
+ this._reader = input ? new StringReader(input.toString()) : null;
+
+ /**
+ * Token object for the last consumed token.
+ * @type Token
+ * @property _token
+ * @private
+ */
+ this._token = null;
+
+ /**
+ * The array of token information.
+ * @type Array
+ * @property _tokenData
+ * @private
+ */
+ this._tokenData = tokenData;
+
+ /**
+ * Lookahead token buffer.
+ * @type Array
+ * @property _lt
+ * @private
+ */
+ this._lt = [];
+
+ /**
+ * Lookahead token buffer index.
+ * @type int
+ * @property _ltIndex
+ * @private
+ */
+ this._ltIndex = 0;
+
+ this._ltIndexCache = [];
+}
+
+/**
+ * Accepts an array of token information and outputs
+ * an array of token data containing key-value mappings
+ * and matching functions that the TokenStream needs.
+ * @param {Array} tokens An array of token descriptors.
+ * @return {Array} An array of processed token data.
+ * @method createTokenData
+ * @static
+ */
+TokenStreamBase.createTokenData = function(tokens){
+
+ var nameMap = [],
+ typeMap = {},
+ tokenData = tokens.concat([]),
+ i = 0,
+ len = tokenData.length+1;
+
+ tokenData.UNKNOWN = -1;
+ tokenData.unshift({name:"EOF"});
+
+ for (; i < len; i++){
+ nameMap.push(tokenData[i].name);
+ tokenData[tokenData[i].name] = i;
+ if (tokenData[i].text){
+ typeMap[tokenData[i].text] = i;
+ }
+ }
+
+ tokenData.name = function(tt){
+ return nameMap[tt];
+ };
+
+ tokenData.type = function(c){
+ return typeMap[c];
+ };
+
+ return tokenData;
+};
+
+TokenStreamBase.prototype = {
+
+ //restore constructor
+ constructor: TokenStreamBase,
+
+ //-------------------------------------------------------------------------
+ // Matching methods
+ //-------------------------------------------------------------------------
+
+ /**
+ * Determines if the next token matches the given token type.
+ * If so, that token is consumed; if not, the token is placed
+ * back onto the token stream. You can pass in any number of
+ * token types and this will return true if any of the token
+ * types is found.
+ * @param {int|int[]} tokenTypes Either a single token type or an array of
+ * token types that the next token might be. If an array is passed,
+ * it's assumed that the token can be any of these.
+ * @param {variant} channel (Optional) The channel to read from. If not
+ * provided, reads from the default (unnamed) channel.
+ * @return {Boolean} True if the token type matches, false if not.
+ * @method match
+ */
+ match: function(tokenTypes, channel){
+
+ //always convert to an array, makes things easier
+ if (!(tokenTypes instanceof Array)){
+ tokenTypes = [tokenTypes];
+ }
+
+ var tt = this.get(channel),
+ i = 0,
+ len = tokenTypes.length;
+
+ while(i < len){
+ if (tt == tokenTypes[i++]){
+ return true;
+ }
+ }
+
+ //no match found, put the token back
+ this.unget();
+ return false;
+ },
+
+ /**
+ * Determines if the next token matches the given token type.
+ * If so, that token is consumed; if not, an error is thrown.
+ * @param {int|int[]} tokenTypes Either a single token type or an array of
+ * token types that the next token should be. If an array is passed,
+ * it's assumed that the token must be one of these.
+ * @param {variant} channel (Optional) The channel to read from. If not
+ * provided, reads from the default (unnamed) channel.
+ * @return {void}
+ * @method mustMatch
+ */
+ mustMatch: function(tokenTypes, channel){
+
+ var token;
+
+ //always convert to an array, makes things easier
+ if (!(tokenTypes instanceof Array)){
+ tokenTypes = [tokenTypes];
+ }
+
+ if (!this.match.apply(this, arguments)){
+ token = this.LT(1);
+ throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
+ " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ }
+ },
+
+ //-------------------------------------------------------------------------
+ // Consuming methods
+ //-------------------------------------------------------------------------
+
+ /**
+ * Keeps reading from the token stream until either one of the specified
+ * token types is found or until the end of the input is reached.
+ * @param {int|int[]} tokenTypes Either a single token type or an array of
+ * token types that the next token should be. If an array is passed,
+ * it's assumed that the token must be one of these.
+ * @param {variant} channel (Optional) The channel to read from. If not
+ * provided, reads from the default (unnamed) channel.
+ * @return {void}
+ * @method advance
+ */
+ advance: function(tokenTypes, channel){
+
+ while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){
+ this.get();
+ }
+
+ return this.LA(0);
+ },
+
+ /**
+ * Consumes the next token from the token stream.
+ * @return {int} The token type of the token that was just consumed.
+ * @method get
+ */
+ get: function(channel){
+
+ var tokenInfo = this._tokenData,
+ reader = this._reader,
+ value,
+ i =0,
+ len = tokenInfo.length,
+ found = false,
+ token,
+ info;
+
+ //check the lookahead buffer first
+ if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){
+
+ i++;
+ this._token = this._lt[this._ltIndex++];
+ info = tokenInfo[this._token.type];
+
+ //obey channels logic
+ while((info.channel !== undefined && channel !== info.channel) &&
+ this._ltIndex < this._lt.length){
+ this._token = this._lt[this._ltIndex++];
+ info = tokenInfo[this._token.type];
+ i++;
+ }
+
+ //here be dragons
+ if ((info.channel === undefined || channel === info.channel) &&
+ this._ltIndex <= this._lt.length){
+ this._ltIndexCache.push(i);
+ return this._token.type;
+ }
+ }
+
+ //call token retriever method
+ token = this._getToken();
+
+ //if it should be hidden, don't save a token
+ if (token.type > -1 && !tokenInfo[token.type].hide){
+
+ //apply token channel
+ token.channel = tokenInfo[token.type].channel;
+
+ //save for later
+ this._token = token;
+ this._lt.push(token);
+
+ //save space that will be moved (must be done before array is truncated)
+ this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
+
+ //keep the buffer under 5 items
+ if (this._lt.length > 5){
+ this._lt.shift();
+ }
+
+ //also keep the shift buffer under 5 items
+ if (this._ltIndexCache.length > 5){
+ this._ltIndexCache.shift();
+ }
+
+ //update lookahead index
+ this._ltIndex = this._lt.length;
+ }
+
+ /*
+ * Skip to the next token if:
+ * 1. The token type is marked as hidden.
+ * 2. The token type has a channel specified and it isn't the current channel.
+ */
+ info = tokenInfo[token.type];
+ if (info &&
+ (info.hide ||
+ (info.channel !== undefined && channel !== info.channel))){
+ return this.get(channel);
+ } else {
+ //return just the type
+ return token.type;
+ }
+ },
+
+ /**
+ * Looks ahead a certain number of tokens and returns the token type at
+ * that position. This will throw an error if you lookahead past the
+ * end of input, past the size of the lookahead buffer, or back past
+ * the first token in the lookahead buffer.
+ * @param {int} The index of the token type to retrieve. 0 for the
+ * current token, 1 for the next, -1 for the previous, etc.
+ * @return {int} The token type of the token in the given position.
+ * @method LA
+ */
+ LA: function(index){
+ var total = index,
+ tt;
+ if (index > 0){
+ //TODO: Store 5 somewhere
+ if (index > 5){
+ throw new Error("Too much lookahead.");
+ }
+
+ //get all those tokens
+ while(total){
+ tt = this.get();
+ total--;
+ }
+
+ //unget all those tokens
+ while(total < index){
+ this.unget();
+ total++;
+ }
+ } else if (index < 0){
+
+ if(this._lt[this._ltIndex+index]){
+ tt = this._lt[this._ltIndex+index].type;
+ } else {
+ throw new Error("Too much lookbehind.");
+ }
+
+ } else {
+ tt = this._token.type;
+ }
+
+ return tt;
+
+ },
+
+ /**
+ * Looks ahead a certain number of tokens and returns the token at
+ * that position. This will throw an error if you lookahead past the
+ * end of input, past the size of the lookahead buffer, or back past
+ * the first token in the lookahead buffer.
+ * @param {int} The index of the token type to retrieve. 0 for the
+ * current token, 1 for the next, -1 for the previous, etc.
+ * @return {Object} The token of the token in the given position.
+ * @method LA
+ */
+ LT: function(index){
+
+ //lookahead first to prime the token buffer
+ this.LA(index);
+
+ //now find the token, subtract one because _ltIndex is already at the next index
+ return this._lt[this._ltIndex+index-1];
+ },
+
+ /**
+ * Returns the token type for the next token in the stream without
+ * consuming it.
+ * @return {int} The token type of the next token in the stream.
+ * @method peek
+ */
+ peek: function(){
+ return this.LA(1);
+ },
+
+ /**
+ * Returns the actual token object for the last consumed token.
+ * @return {Token} The token object for the last consumed token.
+ * @method token
+ */
+ token: function(){
+ return this._token;
+ },
+
+ /**
+ * Returns the name of the token for the given token type.
+ * @param {int} tokenType The type of token to get the name of.
+ * @return {String} The name of the token or "UNKNOWN_TOKEN" for any
+ * invalid token type.
+ * @method tokenName
+ */
+ tokenName: function(tokenType){
+ if (tokenType < 0 || tokenType > this._tokenData.length){
+ return "UNKNOWN_TOKEN";
+ } else {
+ return this._tokenData[tokenType].name;
+ }
+ },
+
+ /**
+ * Returns the token type value for the given token name.
+ * @param {String} tokenName The name of the token whose value should be returned.
+ * @return {int} The token type value for the given token name or -1
+ * for an unknown token.
+ * @method tokenName
+ */
+ tokenType: function(tokenName){
+ return this._tokenData[tokenName] || -1;
+ },
+
+ /**
+ * Returns the last consumed token to the token stream.
+ * @method unget
+ */
+ unget: function(){
+ //if (this._ltIndex > -1){
+ if (this._ltIndexCache.length){
+ this._ltIndex -= this._ltIndexCache.pop();//--;
+ this._token = this._lt[this._ltIndex - 1];
+ } else {
+ throw new Error("Too much lookahead.");
+ }
+ }
+
+};
+
+
+
+
+parserlib.util = {
+StringReader: StringReader,
+SyntaxError : SyntaxError,
+SyntaxUnit : SyntaxUnit,
+EventTarget : EventTarget,
+TokenStreamBase : TokenStreamBase
+};
+})();
+
+
+/*
+Parser-Lib
+Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
+
+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:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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.
+
+*/
+/* Version v0.2.2, Build time: 17-January-2013 10:26:34 */
+(function(){
+var EventTarget = parserlib.util.EventTarget,
+TokenStreamBase = parserlib.util.TokenStreamBase,
+StringReader = parserlib.util.StringReader,
+SyntaxError = parserlib.util.SyntaxError,
+SyntaxUnit = parserlib.util.SyntaxUnit;
+
+
+var Colors = {
+ aliceblue :"#f0f8ff",
+ antiquewhite :"#faebd7",
+ aqua :"#00ffff",
+ aquamarine :"#7fffd4",
+ azure :"#f0ffff",
+ beige :"#f5f5dc",
+ bisque :"#ffe4c4",
+ black :"#000000",
+ blanchedalmond :"#ffebcd",
+ blue :"#0000ff",
+ blueviolet :"#8a2be2",
+ brown :"#a52a2a",
+ burlywood :"#deb887",
+ cadetblue :"#5f9ea0",
+ chartreuse :"#7fff00",
+ chocolate :"#d2691e",
+ coral :"#ff7f50",
+ cornflowerblue :"#6495ed",
+ cornsilk :"#fff8dc",
+ crimson :"#dc143c",
+ cyan :"#00ffff",
+ darkblue :"#00008b",
+ darkcyan :"#008b8b",
+ darkgoldenrod :"#b8860b",
+ darkgray :"#a9a9a9",
+ darkgreen :"#006400",
+ darkkhaki :"#bdb76b",
+ darkmagenta :"#8b008b",
+ darkolivegreen :"#556b2f",
+ darkorange :"#ff8c00",
+ darkorchid :"#9932cc",
+ darkred :"#8b0000",
+ darksalmon :"#e9967a",
+ darkseagreen :"#8fbc8f",
+ darkslateblue :"#483d8b",
+ darkslategray :"#2f4f4f",
+ darkturquoise :"#00ced1",
+ darkviolet :"#9400d3",
+ deeppink :"#ff1493",
+ deepskyblue :"#00bfff",
+ dimgray :"#696969",
+ dodgerblue :"#1e90ff",
+ firebrick :"#b22222",
+ floralwhite :"#fffaf0",
+ forestgreen :"#228b22",
+ fuchsia :"#ff00ff",
+ gainsboro :"#dcdcdc",
+ ghostwhite :"#f8f8ff",
+ gold :"#ffd700",
+ goldenrod :"#daa520",
+ gray :"#808080",
+ green :"#008000",
+ greenyellow :"#adff2f",
+ honeydew :"#f0fff0",
+ hotpink :"#ff69b4",
+ indianred :"#cd5c5c",
+ indigo :"#4b0082",
+ ivory :"#fffff0",
+ khaki :"#f0e68c",
+ lavender :"#e6e6fa",
+ lavenderblush :"#fff0f5",
+ lawngreen :"#7cfc00",
+ lemonchiffon :"#fffacd",
+ lightblue :"#add8e6",
+ lightcoral :"#f08080",
+ lightcyan :"#e0ffff",
+ lightgoldenrodyellow :"#fafad2",
+ lightgray :"#d3d3d3",
+ lightgreen :"#90ee90",
+ lightpink :"#ffb6c1",
+ lightsalmon :"#ffa07a",
+ lightseagreen :"#20b2aa",
+ lightskyblue :"#87cefa",
+ lightslategray :"#778899",
+ lightsteelblue :"#b0c4de",
+ lightyellow :"#ffffe0",
+ lime :"#00ff00",
+ limegreen :"#32cd32",
+ linen :"#faf0e6",
+ magenta :"#ff00ff",
+ maroon :"#800000",
+ mediumaquamarine:"#66cdaa",
+ mediumblue :"#0000cd",
+ mediumorchid :"#ba55d3",
+ mediumpurple :"#9370d8",
+ mediumseagreen :"#3cb371",
+ mediumslateblue :"#7b68ee",
+ mediumspringgreen :"#00fa9a",
+ mediumturquoise :"#48d1cc",
+ mediumvioletred :"#c71585",
+ midnightblue :"#191970",
+ mintcream :"#f5fffa",
+ mistyrose :"#ffe4e1",
+ moccasin :"#ffe4b5",
+ navajowhite :"#ffdead",
+ navy :"#000080",
+ oldlace :"#fdf5e6",
+ olive :"#808000",
+ olivedrab :"#6b8e23",
+ orange :"#ffa500",
+ orangered :"#ff4500",
+ orchid :"#da70d6",
+ palegoldenrod :"#eee8aa",
+ palegreen :"#98fb98",
+ paleturquoise :"#afeeee",
+ palevioletred :"#d87093",
+ papayawhip :"#ffefd5",
+ peachpuff :"#ffdab9",
+ peru :"#cd853f",
+ pink :"#ffc0cb",
+ plum :"#dda0dd",
+ powderblue :"#b0e0e6",
+ purple :"#800080",
+ red :"#ff0000",
+ rosybrown :"#bc8f8f",
+ royalblue :"#4169e1",
+ saddlebrown :"#8b4513",
+ salmon :"#fa8072",
+ sandybrown :"#f4a460",
+ seagreen :"#2e8b57",
+ seashell :"#fff5ee",
+ sienna :"#a0522d",
+ silver :"#c0c0c0",
+ skyblue :"#87ceeb",
+ slateblue :"#6a5acd",
+ slategray :"#708090",
+ snow :"#fffafa",
+ springgreen :"#00ff7f",
+ steelblue :"#4682b4",
+ tan :"#d2b48c",
+ teal :"#008080",
+ thistle :"#d8bfd8",
+ tomato :"#ff6347",
+ turquoise :"#40e0d0",
+ violet :"#ee82ee",
+ wheat :"#f5deb3",
+ white :"#ffffff",
+ whitesmoke :"#f5f5f5",
+ yellow :"#ffff00",
+ yellowgreen :"#9acd32",
+ //CSS2 system colors http://www.w3.org/TR/css3-color/#css2-system
+ activeBorder :"Active window border.",
+ activecaption :"Active window caption.",
+ appworkspace :"Background color of multiple document interface.",
+ background :"Desktop background.",
+ buttonface :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttonhighlight :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttonshadow :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttontext :"Text on push buttons.",
+ captiontext :"Text in caption, size box, and scrollbar arrow box.",
+ graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
+ highlight :"Item(s) selected in a control.",
+ highlighttext :"Text of item(s) selected in a control.",
+ inactiveborder :"Inactive window border.",
+ inactivecaption :"Inactive window caption.",
+ inactivecaptiontext :"Color of text in an inactive caption.",
+ infobackground :"Background color for tooltip controls.",
+ infotext :"Text color for tooltip controls.",
+ menu :"Menu background.",
+ menutext :"Text in menus.",
+ scrollbar :"Scroll bar gray area.",
+ threeddarkshadow :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedface :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedhighlight :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedlightshadow :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedshadow :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ window :"Window background.",
+ windowframe :"Window frame.",
+ windowtext :"Text in windows."
+};
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a selector combinator (whitespace, +, >).
+ * @namespace parserlib.css
+ * @class Combinator
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {String} text The text representation of the unit.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function Combinator(text, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);
+
+ /**
+ * The type of modifier.
+ * @type String
+ * @property type
+ */
+ this.type = "unknown";
+
+ //pretty simple
+ if (/^\s+$/.test(text)){
+ this.type = "descendant";
+ } else if (text == ">"){
+ this.type = "child";
+ } else if (text == "+"){
+ this.type = "adjacent-sibling";
+ } else if (text == "~"){
+ this.type = "sibling";
+ }
+
+}
+
+Combinator.prototype = new SyntaxUnit();
+Combinator.prototype.constructor = Combinator;
+
+
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a media feature, such as max-width:500.
+ * @namespace parserlib.css
+ * @class MediaFeature
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {SyntaxUnit} name The name of the feature.
+ * @param {SyntaxUnit} value The value of the feature or null if none.
+ */
+function MediaFeature(name, value){
+
+ SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
+
+ /**
+ * The name of the media feature
+ * @type String
+ * @property name
+ */
+ this.name = name;
+
+ /**
+ * The value for the feature or null if there is none.
+ * @type SyntaxUnit
+ * @property value
+ */
+ this.value = value;
+}
+
+MediaFeature.prototype = new SyntaxUnit();
+MediaFeature.prototype.constructor = MediaFeature;
+
+
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents an individual media query.
+ * @namespace parserlib.css
+ * @class MediaQuery
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {String} modifier The modifier "not" or "only" (or null).
+ * @param {String} mediaType The type of media (i.e., "print").
+ * @param {Array} parts Array of selectors parts making up this selector.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function MediaQuery(modifier, mediaType, features, line, col){
+
+ SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
+
+ /**
+ * The media modifier ("not" or "only")
+ * @type String
+ * @property modifier
+ */
+ this.modifier = modifier;
+
+ /**
+ * The mediaType (i.e., "print")
+ * @type String
+ * @property mediaType
+ */
+ this.mediaType = mediaType;
+
+ /**
+ * The parts that make up the selector.
+ * @type Array
+ * @property features
+ */
+ this.features = features;
+
+}
+
+MediaQuery.prototype = new SyntaxUnit();
+MediaQuery.prototype.constructor = MediaQuery;
+
+
+/*global Tokens, TokenStream, SyntaxError, Properties, Validation, ValidationError, SyntaxUnit,
+ PropertyValue, PropertyValuePart, SelectorPart, SelectorSubPart, Selector,
+ PropertyName, Combinator, MediaFeature, MediaQuery, EventTarget */
+
+/**
+ * A CSS3 parser.
+ * @namespace parserlib.css
+ * @class Parser
+ * @constructor
+ * @param {Object} options (Optional) Various options for the parser:
+ * starHack (true|false) to allow IE6 star hack as valid,
+ * underscoreHack (true|false) to interpret leading underscores
+ * as IE6-7 targeting for known properties, ieFilters (true|false)
+ * to indicate that IE < 8 filters should be accepted and not throw
+ * syntax errors.
+ */
+function Parser(options){
+
+ //inherit event functionality
+ EventTarget.call(this);
+
+
+ this.options = options || {};
+
+ this._tokenStream = null;
+}
+
+//Static constants
+Parser.DEFAULT_TYPE = 0;
+Parser.COMBINATOR_TYPE = 1;
+Parser.MEDIA_FEATURE_TYPE = 2;
+Parser.MEDIA_QUERY_TYPE = 3;
+Parser.PROPERTY_NAME_TYPE = 4;
+Parser.PROPERTY_VALUE_TYPE = 5;
+Parser.PROPERTY_VALUE_PART_TYPE = 6;
+Parser.SELECTOR_TYPE = 7;
+Parser.SELECTOR_PART_TYPE = 8;
+Parser.SELECTOR_SUB_PART_TYPE = 9;
+
+Parser.prototype = function(){
+
+ var proto = new EventTarget(), //new prototype
+ prop,
+ additions = {
+
+ //restore constructor
+ constructor: Parser,
+
+ //instance constants - yuck
+ DEFAULT_TYPE : 0,
+ COMBINATOR_TYPE : 1,
+ MEDIA_FEATURE_TYPE : 2,
+ MEDIA_QUERY_TYPE : 3,
+ PROPERTY_NAME_TYPE : 4,
+ PROPERTY_VALUE_TYPE : 5,
+ PROPERTY_VALUE_PART_TYPE : 6,
+ SELECTOR_TYPE : 7,
+ SELECTOR_PART_TYPE : 8,
+ SELECTOR_SUB_PART_TYPE : 9,
+
+ //-----------------------------------------------------------------
+ // Grammar
+ //-----------------------------------------------------------------
+
+ _stylesheet: function(){
+
+ /*
+ * stylesheet
+ * : [ CHARSET_SYM S* STRING S* ';' ]?
+ * [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*
+ * [ namespace [S|CDO|CDC]* ]*
+ * [ [ ruleset | media | page | font_face | keyframes ] [S|CDO|CDC]* ]*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ charset = null,
+ count,
+ token,
+ tt;
+
+ this.fire("startstylesheet");
+
+ //try to read character set
+ this._charset();
+
+ this._skipCruft();
+
+ //try to read imports - may be more than one
+ while (tokenStream.peek() == Tokens.IMPORT_SYM){
+ this._import();
+ this._skipCruft();
+ }
+
+ //try to read namespaces - may be more than one
+ while (tokenStream.peek() == Tokens.NAMESPACE_SYM){
+ this._namespace();
+ this._skipCruft();
+ }
+
+ //get the next token
+ tt = tokenStream.peek();
+
+ //try to read the rest
+ while(tt > Tokens.EOF){
+
+ try {
+
+ switch(tt){
+ case Tokens.MEDIA_SYM:
+ this._media();
+ this._skipCruft();
+ break;
+ case Tokens.PAGE_SYM:
+ this._page();
+ this._skipCruft();
+ break;
+ case Tokens.FONT_FACE_SYM:
+ this._font_face();
+ this._skipCruft();
+ break;
+ case Tokens.KEYFRAMES_SYM:
+ this._keyframes();
+ this._skipCruft();
+ break;
+ case Tokens.UNKNOWN_SYM: //unknown @ rule
+ tokenStream.get();
+ if (!this.options.strict){
+
+ //fire error event
+ this.fire({
+ type: "error",
+ error: null,
+ message: "Unknown @ rule: " + tokenStream.LT(0).value + ".",
+ line: tokenStream.LT(0).startLine,
+ col: tokenStream.LT(0).startCol
+ });
+
+ //skip braces
+ count=0;
+ while (tokenStream.advance([Tokens.LBRACE, Tokens.RBRACE]) == Tokens.LBRACE){
+ count++; //keep track of nesting depth
+ }
+
+ while(count){
+ tokenStream.advance([Tokens.RBRACE]);
+ count--;
+ }
+
+ } else {
+ //not a syntax error, rethrow it
+ throw new SyntaxError("Unknown @ rule.", tokenStream.LT(0).startLine, tokenStream.LT(0).startCol);
+ }
+ break;
+ case Tokens.S:
+ this._readWhitespace();
+ break;
+ default:
+ if(!this._ruleset()){
+
+ //error handling for known issues
+ switch(tt){
+ case Tokens.CHARSET_SYM:
+ token = tokenStream.LT(1);
+ this._charset(false);
+ throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
+ case Tokens.IMPORT_SYM:
+ token = tokenStream.LT(1);
+ this._import(false);
+ throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
+ case Tokens.NAMESPACE_SYM:
+ token = tokenStream.LT(1);
+ this._namespace(false);
+ throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
+ default:
+ tokenStream.get(); //get the last token
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ }
+ }
+ } catch(ex) {
+ if (ex instanceof SyntaxError && !this.options.strict){
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+ } else {
+ throw ex;
+ }
+ }
+
+ tt = tokenStream.peek();
+ }
+
+ if (tt != Tokens.EOF){
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ this.fire("endstylesheet");
+ },
+
+ _charset: function(emit){
+ var tokenStream = this._tokenStream,
+ charset,
+ token,
+ line,
+ col;
+
+ if (tokenStream.match(Tokens.CHARSET_SYM)){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.STRING);
+
+ token = tokenStream.token();
+ charset = token.value;
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+
+ if (emit !== false){
+ this.fire({
+ type: "charset",
+ charset:charset,
+ line: line,
+ col: col
+ });
+ }
+ }
+ },
+
+ _import: function(emit){
+ /*
+ * import
+ * : IMPORT_SYM S*
+ * [STRING|URI] S* media_query_list? ';' S*
+ */
+
+ var tokenStream = this._tokenStream,
+ tt,
+ uri,
+ importToken,
+ mediaList = [];
+
+ //read import symbol
+ tokenStream.mustMatch(Tokens.IMPORT_SYM);
+ importToken = tokenStream.token();
+ this._readWhitespace();
+
+ tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
+
+ //grab the URI value
+ uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
+
+ this._readWhitespace();
+
+ mediaList = this._media_query_list();
+
+ //must end with a semicolon
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+ this._readWhitespace();
+
+ if (emit !== false){
+ this.fire({
+ type: "import",
+ uri: uri,
+ media: mediaList,
+ line: importToken.startLine,
+ col: importToken.startCol
+ });
+ }
+
+ },
+
+ _namespace: function(emit){
+ /*
+ * namespace
+ * : NAMESPACE_SYM S* [namespace_prefix S*]? [STRING|URI] S* ';' S*
+ */
+
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ prefix,
+ uri;
+
+ //read import symbol
+ tokenStream.mustMatch(Tokens.NAMESPACE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ this._readWhitespace();
+
+ //it's a namespace prefix - no _namespace_prefix() method because it's just an IDENT
+ if (tokenStream.match(Tokens.IDENT)){
+ prefix = tokenStream.token().value;
+ this._readWhitespace();
+ }
+
+ tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
+ /*if (!tokenStream.match(Tokens.STRING)){
+ tokenStream.mustMatch(Tokens.URI);
+ }*/
+
+ //grab the URI value
+ uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
+
+ this._readWhitespace();
+
+ //must end with a semicolon
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+ this._readWhitespace();
+
+ if (emit !== false){
+ this.fire({
+ type: "namespace",
+ prefix: prefix,
+ uri: uri,
+ line: line,
+ col: col
+ });
+ }
+
+ },
+
+ _media: function(){
+ /*
+ * media
+ * : MEDIA_SYM S* media_query_list S* '{' S* ruleset* '}' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ mediaList;// = [];
+
+ //look for @media
+ tokenStream.mustMatch(Tokens.MEDIA_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ mediaList = this._media_query_list();
+
+ tokenStream.mustMatch(Tokens.LBRACE);
+ this._readWhitespace();
+
+ this.fire({
+ type: "startmedia",
+ media: mediaList,
+ line: line,
+ col: col
+ });
+
+ while(true) {
+ if (tokenStream.peek() == Tokens.PAGE_SYM){
+ this._page();
+ } else if (!this._ruleset()){
+ break;
+ }
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACE);
+ this._readWhitespace();
+
+ this.fire({
+ type: "endmedia",
+ media: mediaList,
+ line: line,
+ col: col
+ });
+ },
+
+
+ //CSS3 Media Queries
+ _media_query_list: function(){
+ /*
+ * media_query_list
+ * : S* [media_query [ ',' S* media_query ]* ]?
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ mediaList = [];
+
+
+ this._readWhitespace();
+
+ if (tokenStream.peek() == Tokens.IDENT || tokenStream.peek() == Tokens.LPAREN){
+ mediaList.push(this._media_query());
+ }
+
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ mediaList.push(this._media_query());
+ }
+
+ return mediaList;
+ },
+
+ /*
+ * Note: "expression" in the grammar maps to the _media_expression
+ * method.
+
+ */
+ _media_query: function(){
+ /*
+ * media_query
+ * : [ONLY | NOT]? S* media_type S* [ AND S* expression ]*
+ * | expression [ AND S* expression ]*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ type = null,
+ ident = null,
+ token = null,
+ expressions = [];
+
+ if (tokenStream.match(Tokens.IDENT)){
+ ident = tokenStream.token().value.toLowerCase();
+
+ //since there's no custom tokens for these, need to manually check
+ if (ident != "only" && ident != "not"){
+ tokenStream.unget();
+ ident = null;
+ } else {
+ token = tokenStream.token();
+ }
+ }
+
+ this._readWhitespace();
+
+ if (tokenStream.peek() == Tokens.IDENT){
+ type = this._media_type();
+ if (token === null){
+ token = tokenStream.token();
+ }
+ } else if (tokenStream.peek() == Tokens.LPAREN){
+ if (token === null){
+ token = tokenStream.LT(1);
+ }
+ expressions.push(this._media_expression());
+ }
+
+ if (type === null && expressions.length === 0){
+ return null;
+ } else {
+ this._readWhitespace();
+ while (tokenStream.match(Tokens.IDENT)){
+ if (tokenStream.token().value.toLowerCase() != "and"){
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ this._readWhitespace();
+ expressions.push(this._media_expression());
+ }
+ }
+
+ return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
+ },
+
+ //CSS3 Media Queries
+ _media_type: function(){
+ /*
+ * media_type
+ * : IDENT
+ * ;
+ */
+ return this._media_feature();
+ },
+
+ /**
+ * Note: in CSS3 Media Queries, this is called "expression".
+ * Renamed here to avoid conflict with CSS3 Selectors
+ * definition of "expression". Also note that "expr" in the
+ * grammar now maps to "expression" from CSS3 selectors.
+ * @method _media_expression
+ * @private
+ */
+ _media_expression: function(){
+ /*
+ * expression
+ * : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ feature = null,
+ token,
+ expression = null;
+
+ tokenStream.mustMatch(Tokens.LPAREN);
+
+ feature = this._media_feature();
+ this._readWhitespace();
+
+ if (tokenStream.match(Tokens.COLON)){
+ this._readWhitespace();
+ token = tokenStream.LT(1);
+ expression = this._expression();
+ }
+
+ tokenStream.mustMatch(Tokens.RPAREN);
+ this._readWhitespace();
+
+ return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
+ },
+
+ //CSS3 Media Queries
+ _media_feature: function(){
+ /*
+ * media_feature
+ * : IDENT
+ * ;
+ */
+ var tokenStream = this._tokenStream;
+
+ tokenStream.mustMatch(Tokens.IDENT);
+
+ return SyntaxUnit.fromToken(tokenStream.token());
+ },
+
+ //CSS3 Paged Media
+ _page: function(){
+ /*
+ * page:
+ * PAGE_SYM S* IDENT? pseudo_page? S*
+ * '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ identifier = null,
+ pseudoPage = null;
+
+ //look for @page
+ tokenStream.mustMatch(Tokens.PAGE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ if (tokenStream.match(Tokens.IDENT)){
+ identifier = tokenStream.token().value;
+
+ //The value 'auto' may not be used as a page name and MUST be treated as a syntax error.
+ if (identifier.toLowerCase() === "auto"){
+ this._unexpectedToken(tokenStream.token());
+ }
+ }
+
+ //see if there's a colon upcoming
+ if (tokenStream.peek() == Tokens.COLON){
+ pseudoPage = this._pseudo_page();
+ }
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startpage",
+ id: identifier,
+ pseudo: pseudoPage,
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true, true);
+
+ this.fire({
+ type: "endpage",
+ id: identifier,
+ pseudo: pseudoPage,
+ line: line,
+ col: col
+ });
+
+ },
+
+ //CSS3 Paged Media
+ _margin: function(){
+ /*
+ * margin :
+ * margin_sym S* '{' declaration [ ';' S* declaration? ]* '}' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ marginSym = this._margin_sym();
+
+ if (marginSym){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this.fire({
+ type: "startpagemargin",
+ margin: marginSym,
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endpagemargin",
+ margin: marginSym,
+ line: line,
+ col: col
+ });
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ //CSS3 Paged Media
+ _margin_sym: function(){
+
+ /*
+ * margin_sym :
+ * TOPLEFTCORNER_SYM |
+ * TOPLEFT_SYM |
+ * TOPCENTER_SYM |
+ * TOPRIGHT_SYM |
+ * TOPRIGHTCORNER_SYM |
+ * BOTTOMLEFTCORNER_SYM |
+ * BOTTOMLEFT_SYM |
+ * BOTTOMCENTER_SYM |
+ * BOTTOMRIGHT_SYM |
+ * BOTTOMRIGHTCORNER_SYM |
+ * LEFTTOP_SYM |
+ * LEFTMIDDLE_SYM |
+ * LEFTBOTTOM_SYM |
+ * RIGHTTOP_SYM |
+ * RIGHTMIDDLE_SYM |
+ * RIGHTBOTTOM_SYM
+ * ;
+ */
+
+ var tokenStream = this._tokenStream;
+
+ if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
+ Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM,
+ Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
+ Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM,
+ Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
+ Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM,
+ Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM]))
+ {
+ return SyntaxUnit.fromToken(tokenStream.token());
+ } else {
+ return null;
+ }
+
+ },
+
+ _pseudo_page: function(){
+ /*
+ * pseudo_page
+ * : ':' IDENT
+ * ;
+ */
+
+ var tokenStream = this._tokenStream;
+
+ tokenStream.mustMatch(Tokens.COLON);
+ tokenStream.mustMatch(Tokens.IDENT);
+
+ //TODO: CSS3 Paged Media says only "left", "center", and "right" are allowed
+
+ return tokenStream.token().value;
+ },
+
+ _font_face: function(){
+ /*
+ * font_face
+ * : FONT_FACE_SYM S*
+ * '{' S* declaration [ ';' S* declaration ]* '}' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ line,
+ col;
+
+ //look for @page
+ tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startfontface",
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endfontface",
+ line: line,
+ col: col
+ });
+ },
+
+ _operator: function(inFunction){
+
+ /*
+ * operator (outside function)
+ * : '/' S* | ',' S* | /( empty )/
+ * operator (inside function)
+ * : '/' S* | '+' S* | '*' S* | '-' S* /( empty )/
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ token = null;
+
+ if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) ||
+ (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))){
+ token = tokenStream.token();
+ this._readWhitespace();
+ }
+ return token ? PropertyValuePart.fromToken(token) : null;
+
+ },
+
+ _combinator: function(){
+
+ /*
+ * combinator
+ * : PLUS S* | GREATER S* | TILDE S* | S+
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ token;
+
+ if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){
+ token = tokenStream.token();
+ value = new Combinator(token.value, token.startLine, token.startCol);
+ this._readWhitespace();
+ }
+
+ return value;
+ },
+
+ _unary_operator: function(){
+
+ /*
+ * unary_operator
+ * : '-' | '+'
+ * ;
+ */
+
+ var tokenStream = this._tokenStream;
+
+ if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])){
+ return tokenStream.token().value;
+ } else {
+ return null;
+ }
+ },
+
+ _property: function(){
+
+ /*
+ * property
+ * : IDENT S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ hack = null,
+ tokenValue,
+ token,
+ line,
+ col;
+
+ //check for star hack - throws error if not allowed
+ if (tokenStream.peek() == Tokens.STAR && this.options.starHack){
+ tokenStream.get();
+ token = tokenStream.token();
+ hack = token.value;
+ line = token.startLine;
+ col = token.startCol;
+ }
+
+ if(tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+ tokenValue = token.value;
+
+ //check for underscore hack - no error if not allowed because it's valid CSS syntax
+ if (tokenValue.charAt(0) == "_" && this.options.underscoreHack){
+ hack = "_";
+ tokenValue = tokenValue.substring(1);
+ }
+
+ value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol));
+ this._readWhitespace();
+ }
+
+ return value;
+ },
+
+ //Augmented with CSS3 Selectors
+ _ruleset: function(){
+ /*
+ * ruleset
+ * : selectors_group
+ * '{' S* declaration? [ ';' S* declaration? ]* '}' S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ tt,
+ selectors;
+
+
+ /*
+ * Error Recovery: If even a single selector fails to parse,
+ * then the entire ruleset should be thrown away.
+ */
+ try {
+ selectors = this._selectors_group();
+ } catch (ex){
+ if (ex instanceof SyntaxError && !this.options.strict){
+
+ //fire error event
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+
+ //skip over everything until closing brace
+ tt = tokenStream.advance([Tokens.RBRACE]);
+ if (tt == Tokens.RBRACE){
+ //if there's a right brace, the rule is finished so don't do anything
+ } else {
+ //otherwise, rethrow the error because it wasn't handled properly
+ throw ex;
+ }
+
+ } else {
+ //not a syntax error, rethrow it
+ throw ex;
+ }
+
+ //trigger parser to continue
+ return true;
+ }
+
+ //if it got here, all selectors parsed
+ if (selectors){
+
+ this.fire({
+ type: "startrule",
+ selectors: selectors,
+ line: selectors[0].line,
+ col: selectors[0].col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endrule",
+ selectors: selectors,
+ line: selectors[0].line,
+ col: selectors[0].col
+ });
+
+ }
+
+ return selectors;
+
+ },
+
+ //CSS3 Selectors
+ _selectors_group: function(){
+
+ /*
+ * selectors_group
+ * : selector [ COMMA S* selector ]*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ selectors = [],
+ selector;
+
+ selector = this._selector();
+ if (selector !== null){
+
+ selectors.push(selector);
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ selector = this._selector();
+ if (selector !== null){
+ selectors.push(selector);
+ } else {
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+ }
+ }
+
+ return selectors.length ? selectors : null;
+ },
+
+ //CSS3 Selectors
+ _selector: function(){
+ /*
+ * selector
+ * : simple_selector_sequence [ combinator simple_selector_sequence ]*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ selector = [],
+ nextSelector = null,
+ combinator = null,
+ ws = null;
+
+ //if there's no simple selector, then there's no selector
+ nextSelector = this._simple_selector_sequence();
+ if (nextSelector === null){
+ return null;
+ }
+
+ selector.push(nextSelector);
+
+ do {
+
+ //look for a combinator
+ combinator = this._combinator();
+
+ if (combinator !== null){
+ selector.push(combinator);
+ nextSelector = this._simple_selector_sequence();
+
+ //there must be a next selector
+ if (nextSelector === null){
+ this._unexpectedToken(tokenStream.LT(1));
+ } else {
+
+ //nextSelector is an instance of SelectorPart
+ selector.push(nextSelector);
+ }
+ } else {
+
+ //if there's not whitespace, we're done
+ if (this._readWhitespace()){
+
+ //add whitespace separator
+ ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);
+
+ //combinator is not required
+ combinator = this._combinator();
+
+ //selector is required if there's a combinator
+ nextSelector = this._simple_selector_sequence();
+ if (nextSelector === null){
+ if (combinator !== null){
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+ } else {
+
+ if (combinator !== null){
+ selector.push(combinator);
+ } else {
+ selector.push(ws);
+ }
+
+ selector.push(nextSelector);
+ }
+ } else {
+ break;
+ }
+
+ }
+ } while(true);
+
+ return new Selector(selector, selector[0].line, selector[0].col);
+ },
+
+ //CSS3 Selectors
+ _simple_selector_sequence: function(){
+ /*
+ * simple_selector_sequence
+ * : [ type_selector | universal ]
+ * [ HASH | class | attrib | pseudo | negation ]*
+ * | [ HASH | class | attrib | pseudo | negation ]+
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+
+ //parts of a simple selector
+ elementName = null,
+ modifiers = [],
+
+ //complete selector text
+ selectorText= "",
+
+ //the different parts after the element name to search for
+ components = [
+ //HASH
+ function(){
+ return tokenStream.match(Tokens.HASH) ?
+ new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
+ null;
+ },
+ this._class,
+ this._attrib,
+ this._pseudo,
+ this._negation
+ ],
+ i = 0,
+ len = components.length,
+ component = null,
+ found = false,
+ line,
+ col;
+
+
+ //get starting line and column for the selector
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+
+ elementName = this._type_selector();
+ if (!elementName){
+ elementName = this._universal();
+ }
+
+ if (elementName !== null){
+ selectorText += elementName;
+ }
+
+ while(true){
+
+ //whitespace means we're done
+ if (tokenStream.peek() === Tokens.S){
+ break;
+ }
+
+ //check for each component
+ while(i < len && component === null){
+ component = components[i++].call(this);
+ }
+
+ if (component === null){
+
+ //we don't have a selector
+ if (selectorText === ""){
+ return null;
+ } else {
+ break;
+ }
+ } else {
+ i = 0;
+ modifiers.push(component);
+ selectorText += component.toString();
+ component = null;
+ }
+ }
+
+
+ return selectorText !== "" ?
+ new SelectorPart(elementName, modifiers, selectorText, line, col) :
+ null;
+ },
+
+ //CSS3 Selectors
+ _type_selector: function(){
+ /*
+ * type_selector
+ * : [ namespace_prefix ]? element_name
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ ns = this._namespace_prefix(),
+ elementName = this._element_name();
+
+ if (!elementName){
+ /*
+ * Need to back out the namespace that was read due to both
+ * type_selector and universal reading namespace_prefix
+ * first. Kind of hacky, but only way I can figure out
+ * right now how to not change the grammar.
+ */
+ if (ns){
+ tokenStream.unget();
+ if (ns.length > 1){
+ tokenStream.unget();
+ }
+ }
+
+ return null;
+ } else {
+ if (ns){
+ elementName.text = ns + elementName.text;
+ elementName.col -= ns.length;
+ }
+ return elementName;
+ }
+ },
+
+ //CSS3 Selectors
+ _class: function(){
+ /*
+ * class
+ * : '.' IDENT
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.DOT)){
+ tokenStream.mustMatch(Tokens.IDENT);
+ token = tokenStream.token();
+ return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
+ } else {
+ return null;
+ }
+
+ },
+
+ //CSS3 Selectors
+ _element_name: function(){
+ /*
+ * element_name
+ * : IDENT
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+ return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);
+
+ } else {
+ return null;
+ }
+ },
+
+ //CSS3 Selectors
+ _namespace_prefix: function(){
+ /*
+ * namespace_prefix
+ * : [ IDENT | '*' ]? '|'
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ value = "";
+
+ //verify that this is a namespace prefix
+ if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){
+
+ if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){
+ value += tokenStream.token().value;
+ }
+
+ tokenStream.mustMatch(Tokens.PIPE);
+ value += "|";
+
+ }
+
+ return value.length ? value : null;
+ },
+
+ //CSS3 Selectors
+ _universal: function(){
+ /*
+ * universal
+ * : [ namespace_prefix ]? '*'
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ value = "",
+ ns;
+
+ ns = this._namespace_prefix();
+ if(ns){
+ value += ns;
+ }
+
+ if(tokenStream.match(Tokens.STAR)){
+ value += "*";
+ }
+
+ return value.length ? value : null;
+
+ },
+
+ //CSS3 Selectors
+ _attrib: function(){
+ /*
+ * attrib
+ * : '[' S* [ namespace_prefix ]? IDENT S*
+ * [ [ PREFIXMATCH |
+ * SUFFIXMATCH |
+ * SUBSTRINGMATCH |
+ * '=' |
+ * INCLUDES |
+ * DASHMATCH ] S* [ IDENT | STRING ] S*
+ * ]? ']'
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ ns,
+ token;
+
+ if (tokenStream.match(Tokens.LBRACKET)){
+ token = tokenStream.token();
+ value = token.value;
+ value += this._readWhitespace();
+
+ ns = this._namespace_prefix();
+
+ if (ns){
+ value += ns;
+ }
+
+ tokenStream.mustMatch(Tokens.IDENT);
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+
+ if(tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH,
+ Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])){
+
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+
+ tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACKET);
+
+ return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol);
+ } else {
+ return null;
+ }
+ },
+
+ //CSS3 Selectors
+ _pseudo: function(){
+
+ /*
+ * pseudo
+ * : ':' ':'? [ IDENT | functional_pseudo ]
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ pseudo = null,
+ colons = ":",
+ line,
+ col;
+
+ if (tokenStream.match(Tokens.COLON)){
+
+ if (tokenStream.match(Tokens.COLON)){
+ colons += ":";
+ }
+
+ if (tokenStream.match(Tokens.IDENT)){
+ pseudo = tokenStream.token().value;
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol - colons.length;
+ } else if (tokenStream.peek() == Tokens.FUNCTION){
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol - colons.length;
+ pseudo = this._functional_pseudo();
+ }
+
+ if (pseudo){
+ pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col);
+ }
+ }
+
+ return pseudo;
+ },
+
+ //CSS3 Selectors
+ _functional_pseudo: function(){
+ /*
+ * functional_pseudo
+ * : FUNCTION S* expression ')'
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ value = null;
+
+ if(tokenStream.match(Tokens.FUNCTION)){
+ value = tokenStream.token().value;
+ value += this._readWhitespace();
+ value += this._expression();
+ tokenStream.mustMatch(Tokens.RPAREN);
+ value += ")";
+ }
+
+ return value;
+ },
+
+ //CSS3 Selectors
+ _expression: function(){
+ /*
+ * expression
+ * : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ value = "";
+
+ while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
+ Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
+ Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
+ Tokens.RESOLUTION, Tokens.SLASH])){
+
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+ }
+
+ return value.length ? value : null;
+
+ },
+
+ //CSS3 Selectors
+ _negation: function(){
+ /*
+ * negation
+ * : NOT S* negation_arg S* ')'
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ value = "",
+ arg,
+ subpart = null;
+
+ if (tokenStream.match(Tokens.NOT)){
+ value = tokenStream.token().value;
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ value += this._readWhitespace();
+ arg = this._negation_arg();
+ value += arg;
+ value += this._readWhitespace();
+ tokenStream.match(Tokens.RPAREN);
+ value += tokenStream.token().value;
+
+ subpart = new SelectorSubPart(value, "not", line, col);
+ subpart.args.push(arg);
+ }
+
+ return subpart;
+ },
+
+ //CSS3 Selectors
+ _negation_arg: function(){
+ /*
+ * negation_arg
+ * : type_selector | universal | HASH | class | attrib | pseudo
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ args = [
+ this._type_selector,
+ this._universal,
+ function(){
+ return tokenStream.match(Tokens.HASH) ?
+ new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
+ null;
+ },
+ this._class,
+ this._attrib,
+ this._pseudo
+ ],
+ arg = null,
+ i = 0,
+ len = args.length,
+ elementName,
+ line,
+ col,
+ part;
+
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+
+ while(i < len && arg === null){
+
+ arg = args[i].call(this);
+ i++;
+ }
+
+ //must be a negation arg
+ if (arg === null){
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+
+ //it's an element name
+ if (arg.type == "elementName"){
+ part = new SelectorPart(arg, [], arg.toString(), line, col);
+ } else {
+ part = new SelectorPart(null, [arg], arg.toString(), line, col);
+ }
+
+ return part;
+ },
+
+ _declaration: function(){
+
+ /*
+ * declaration
+ * : property ':' S* expr prio?
+ * | /( empty )/
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ property = null,
+ expr = null,
+ prio = null,
+ error = null,
+ invalid = null,
+ propertyName= "";
+
+ property = this._property();
+ if (property !== null){
+
+ tokenStream.mustMatch(Tokens.COLON);
+ this._readWhitespace();
+
+ expr = this._expr();
+
+ //if there's no parts for the value, it's an error
+ if (!expr || expr.length === 0){
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+
+ prio = this._prio();
+
+ /*
+ * If hacks should be allowed, then only check the root
+ * property. If hacks should not be allowed, treat
+ * _property or *property as invalid properties.
+ */
+ propertyName = property.toString();
+ if (this.options.starHack && property.hack == "*" ||
+ this.options.underscoreHack && property.hack == "_") {
+
+ propertyName = property.text;
+ }
+
+ try {
+ this._validateProperty(propertyName, expr);
+ } catch (ex) {
+ invalid = ex;
+ }
+
+ this.fire({
+ type: "property",
+ property: property,
+ value: expr,
+ important: prio,
+ line: property.line,
+ col: property.col,
+ invalid: invalid
+ });
+
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ _prio: function(){
+ /*
+ * prio
+ * : IMPORTANT_SYM S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ result = tokenStream.match(Tokens.IMPORTANT_SYM);
+
+ this._readWhitespace();
+ return result;
+ },
+
+ _expr: function(inFunction){
+ /*
+ * expr
+ * : term [ operator term ]*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ values = [],
+ //valueParts = [],
+ value = null,
+ operator = null;
+
+ value = this._term();
+ if (value !== null){
+
+ values.push(value);
+
+ do {
+ operator = this._operator(inFunction);
+
+ //if there's an operator, keep building up the value parts
+ if (operator){
+ values.push(operator);
+ } /*else {
+ //if there's not an operator, you have a full value
+ values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
+ valueParts = [];
+ }*/
+
+ value = this._term();
+
+ if (value === null){
+ break;
+ } else {
+ values.push(value);
+ }
+ } while(true);
+ }
+
+ //cleanup
+ /*if (valueParts.length){
+ values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
+ }*/
+
+ return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
+ },
+
+ _term: function(){
+
+ /*
+ * term
+ * : unary_operator?
+ * [ NUMBER S* | PERCENTAGE S* | LENGTH S* | ANGLE S* |
+ * TIME S* | FREQ S* | function | ie_function ]
+ * | STRING S* | IDENT S* | URI S* | UNICODERANGE S* | hexcolor
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ unary = null,
+ value = null,
+ token,
+ line,
+ col;
+
+ //returns the operator or null
+ unary = this._unary_operator();
+ if (unary !== null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+
+ //exception for IE filters
+ if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){
+
+ value = this._ie_function();
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+
+ //see if there's a simple match
+ } else if (tokenStream.match([Tokens.NUMBER, Tokens.PERCENTAGE, Tokens.LENGTH,
+ Tokens.ANGLE, Tokens.TIME,
+ Tokens.FREQ, Tokens.STRING, Tokens.IDENT, Tokens.URI, Tokens.UNICODE_RANGE])){
+
+ value = tokenStream.token().value;
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ this._readWhitespace();
+ } else {
+
+ //see if it's a color
+ token = this._hexcolor();
+ if (token === null){
+
+ //if there's no unary, get the start of the next token for line/col info
+ if (unary === null){
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+ }
+
+ //has to be a function
+ if (value === null){
+
+ /*
+ * This checks for alpha(opacity=0) style of IE
+ * functions. IE_FUNCTION only presents progid: style.
+ */
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
+ }
+
+ /*if (value === null){
+ return null;
+ //throw new Error("Expected identifier at line " + tokenStream.token().startLine + ", character " + tokenStream.token().startCol + ".");
+ }*/
+
+ } else {
+ value = token.value;
+ if (unary === null){
+ line = token.startLine;
+ col = token.startCol;
+ }
+ }
+
+ }
+
+ return value !== null ?
+ new PropertyValuePart(unary !== null ? unary + value : value, line, col) :
+ null;
+
+ },
+
+ _function: function(){
+
+ /*
+ * function
+ * : FUNCTION S* expr ')' S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ functionText = null,
+ expr = null,
+ lt;
+
+ if (tokenStream.match(Tokens.FUNCTION)){
+ functionText = tokenStream.token().value;
+ this._readWhitespace();
+ expr = this._expr(true);
+ functionText += expr;
+
+ //START: Horrible hack in case it's an IE filter
+ if (this.options.ieFilters && tokenStream.peek() == Tokens.EQUALS){
+ do {
+
+ if (this._readWhitespace()){
+ functionText += tokenStream.token().value;
+ }
+
+ //might be second time in the loop
+ if (tokenStream.LA(0) == Tokens.COMMA){
+ functionText += tokenStream.token().value;
+ }
+
+ tokenStream.match(Tokens.IDENT);
+ functionText += tokenStream.token().value;
+
+ tokenStream.match(Tokens.EQUALS);
+ functionText += tokenStream.token().value;
+
+ //functionText += this._term();
+ lt = tokenStream.peek();
+ while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){
+ tokenStream.get();
+ functionText += tokenStream.token().value;
+ lt = tokenStream.peek();
+ }
+ } while(tokenStream.match([Tokens.COMMA, Tokens.S]));
+ }
+
+ //END: Horrible Hack
+
+ tokenStream.match(Tokens.RPAREN);
+ functionText += ")";
+ this._readWhitespace();
+ }
+
+ return functionText;
+ },
+
+ _ie_function: function(){
+
+ /* (My own extension)
+ * ie_function
+ * : IE_FUNCTION S* IDENT '=' term [S* ','? IDENT '=' term]+ ')' S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ functionText = null,
+ expr = null,
+ lt;
+
+ //IE function can begin like a regular function, too
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
+ functionText = tokenStream.token().value;
+
+ do {
+
+ if (this._readWhitespace()){
+ functionText += tokenStream.token().value;
+ }
+
+ //might be second time in the loop
+ if (tokenStream.LA(0) == Tokens.COMMA){
+ functionText += tokenStream.token().value;
+ }
+
+ tokenStream.match(Tokens.IDENT);
+ functionText += tokenStream.token().value;
+
+ tokenStream.match(Tokens.EQUALS);
+ functionText += tokenStream.token().value;
+
+ //functionText += this._term();
+ lt = tokenStream.peek();
+ while(lt != Tokens.COMMA && lt != Tokens.S && lt != Tokens.RPAREN){
+ tokenStream.get();
+ functionText += tokenStream.token().value;
+ lt = tokenStream.peek();
+ }
+ } while(tokenStream.match([Tokens.COMMA, Tokens.S]));
+
+ tokenStream.match(Tokens.RPAREN);
+ functionText += ")";
+ this._readWhitespace();
+ }
+
+ return functionText;
+ },
+
+ _hexcolor: function(){
+ /*
+ * There is a constraint on the color that it must
+ * have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])
+ * after the "#"; e.g., "#000" is OK, but "#abcd" is not.
+ *
+ * hexcolor
+ * : HASH S*
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ token = null,
+ color;
+
+ if(tokenStream.match(Tokens.HASH)){
+
+ //need to do some validation here
+
+ token = tokenStream.token();
+ color = token.value;
+ if (!/#[a-f0-9]{3,6}/i.test(color)){
+ throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ }
+ this._readWhitespace();
+ }
+
+ return token;
+ },
+
+ //-----------------------------------------------------------------
+ // Animations methods
+ //-----------------------------------------------------------------
+
+ _keyframes: function(){
+
+ /*
+ * keyframes:
+ * : KEYFRAMES_SYM S* keyframe_name S* '{' S* keyframe_rule* '}' {
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ token,
+ tt,
+ name,
+ prefix = "";
+
+ tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
+ this._readWhitespace();
+ name = this._keyframe_name();
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.LBRACE);
+
+ this.fire({
+ type: "startkeyframes",
+ name: name,
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
+ });
+
+ this._readWhitespace();
+ tt = tokenStream.peek();
+
+ //check for key
+ while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) {
+ this._keyframe_rule();
+ this._readWhitespace();
+ tt = tokenStream.peek();
+ }
+
+ this.fire({
+ type: "endkeyframes",
+ name: name,
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
+ });
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.RBRACE);
+
+ },
+
+ _keyframe_name: function(){
+
+ /*
+ * keyframe_name:
+ * : IDENT
+ * | STRING
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ token;
+
+ tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
+ return SyntaxUnit.fromToken(tokenStream.token());
+ },
+
+ _keyframe_rule: function(){
+
+ /*
+ * keyframe_rule:
+ * : key_list S*
+ * '{' S* declaration [ ';' S* declaration ]* '}' S*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ token,
+ keyList = this._key_list();
+
+ this.fire({
+ type: "startkeyframerule",
+ keys: keyList,
+ line: keyList[0].line,
+ col: keyList[0].col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endkeyframerule",
+ keys: keyList,
+ line: keyList[0].line,
+ col: keyList[0].col
+ });
+
+ },
+
+ _key_list: function(){
+
+ /*
+ * key_list:
+ * : key [ S* ',' S* key]*
+ * ;
+ */
+ var tokenStream = this._tokenStream,
+ token,
+ key,
+ keyList = [];
+
+ //must be least one key
+ keyList.push(this._key());
+
+ this._readWhitespace();
+
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ keyList.push(this._key());
+ this._readWhitespace();
+ }
+
+ return keyList;
+ },
+
+ _key: function(){
+ /*
+ * There is a restriction that IDENT can be only "from" or "to".
+ *
+ * key
+ * : PERCENTAGE
+ * | IDENT
+ * ;
+ */
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.PERCENTAGE)){
+ return SyntaxUnit.fromToken(tokenStream.token());
+ } else if (tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+
+ if (/from|to/i.test(token.value)){
+ return SyntaxUnit.fromToken(token);
+ }
+
+ tokenStream.unget();
+ }
+
+ //if it gets here, there wasn't a valid token, so time to explode
+ this._unexpectedToken(tokenStream.LT(1));
+ },
+
+ //-----------------------------------------------------------------
+ // Helper methods
+ //-----------------------------------------------------------------
+
+ /**
+ * Not part of CSS grammar, but useful for skipping over
+ * combination of white space and HTML-style comments.
+ * @return {void}
+ * @method _skipCruft
+ * @private
+ */
+ _skipCruft: function(){
+ while(this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])){
+ //noop
+ }
+ },
+
+ /**
+ * Not part of CSS grammar, but this pattern occurs frequently
+ * in the official CSS grammar. Split out here to eliminate
+ * duplicate code.
+ * @param {Boolean} checkStart Indicates if the rule should check
+ * for the left brace at the beginning.
+ * @param {Boolean} readMargins Indicates if the rule should check
+ * for margin patterns.
+ * @return {void}
+ * @method _readDeclarations
+ * @private
+ */
+ _readDeclarations: function(checkStart, readMargins){
+ /*
+ * Reads the pattern
+ * S* '{' S* declaration [ ';' S* declaration ]* '}' S*
+ * or
+ * S* '{' S* [ declaration | margin ]? [ ';' S* [ declaration | margin ]? ]* '}' S*
+ * Note that this is how it is described in CSS3 Paged Media, but is actually incorrect.
+ * A semicolon is only necessary following a delcaration is there's another declaration
+ * or margin afterwards.
+ */
+ var tokenStream = this._tokenStream,
+ tt;
+
+
+ this._readWhitespace();
+
+ if (checkStart){
+ tokenStream.mustMatch(Tokens.LBRACE);
+ }
+
+ this._readWhitespace();
+
+ try {
+
+ while(true){
+
+ if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
+ //noop
+ } else if (this._declaration()){
+ if (!tokenStream.match(Tokens.SEMICOLON)){
+ break;
+ }
+ } else {
+ break;
+ }
+
+ //if ((!this._margin() && !this._declaration()) || !tokenStream.match(Tokens.SEMICOLON)){
+ // break;
+ //}
+ this._readWhitespace();
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACE);
+ this._readWhitespace();
+
+ } catch (ex) {
+ if (ex instanceof SyntaxError && !this.options.strict){
+
+ //fire error event
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+
+ //see if there's another declaration
+ tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
+ if (tt == Tokens.SEMICOLON){
+ //if there's a semicolon, then there might be another declaration
+ this._readDeclarations(false, readMargins);
+ } else if (tt != Tokens.RBRACE){
+ //if there's a right brace, the rule is finished so don't do anything
+ //otherwise, rethrow the error because it wasn't handled properly
+ throw ex;
+ }
+
+ } else {
+ //not a syntax error, rethrow it
+ throw ex;
+ }
+ }
+
+ },
+
+ /**
+ * In some cases, you can end up with two white space tokens in a
+ * row. Instead of making a change in every function that looks for
+ * white space, this function is used to match as much white space
+ * as necessary.
+ * @method _readWhitespace
+ * @return {String} The white space if found, empty string if not.
+ * @private
+ */
+ _readWhitespace: function(){
+
+ var tokenStream = this._tokenStream,
+ ws = "";
+
+ while(tokenStream.match(Tokens.S)){
+ ws += tokenStream.token().value;
+ }
+
+ return ws;
+ },
+
+
+ /**
+ * Throws an error when an unexpected token is found.
+ * @param {Object} token The token that was found.
+ * @method _unexpectedToken
+ * @return {void}
+ * @private
+ */
+ _unexpectedToken: function(token){
+ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ },
+
+ /**
+ * Helper method used for parsing subparts of a style sheet.
+ * @return {void}
+ * @method _verifyEnd
+ * @private
+ */
+ _verifyEnd: function(){
+ if (this._tokenStream.LA(1) != Tokens.EOF){
+ this._unexpectedToken(this._tokenStream.LT(1));
+ }
+ },
+
+ //-----------------------------------------------------------------
+ // Validation methods
+ //-----------------------------------------------------------------
+ _validateProperty: function(property, value){
+ Validation.validate(property, value);
+ },
+
+ //-----------------------------------------------------------------
+ // Parsing methods
+ //-----------------------------------------------------------------
+
+ parse: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._stylesheet();
+ },
+
+ parseStyleSheet: function(input){
+ //just passthrough
+ return this.parse(input);
+ },
+
+ parseMediaQuery: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+ var result = this._media_query();
+
+ //if there's anything more, then it's an invalid selector
+ this._verifyEnd();
+
+ //otherwise return result
+ return result;
+ },
+
+ /**
+ * Parses a property value (everything after the semicolon).
+ * @return {parserlib.css.PropertyValue} The property value.
+ * @throws parserlib.util.SyntaxError If an unexpected token is found.
+ * @method parserPropertyValue
+ */
+ parsePropertyValue: function(input){
+
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readWhitespace();
+
+ var result = this._expr();
+
+ //okay to have a trailing white space
+ this._readWhitespace();
+
+ //if there's anything more, then it's an invalid selector
+ this._verifyEnd();
+
+ //otherwise return result
+ return result;
+ },
+
+ /**
+ * Parses a complete CSS rule, including selectors and
+ * properties.
+ * @param {String} input The text to parser.
+ * @return {Boolean} True if the parse completed successfully, false if not.
+ * @method parseRule
+ */
+ parseRule: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+
+ //skip any leading white space
+ this._readWhitespace();
+
+ var result = this._ruleset();
+
+ //skip any trailing white space
+ this._readWhitespace();
+
+ //if there's anything more, then it's an invalid selector
+ this._verifyEnd();
+
+ //otherwise return result
+ return result;
+ },
+
+ /**
+ * Parses a single CSS selector (no comma)
+ * @param {String} input The text to parse as a CSS selector.
+ * @return {Selector} An object representing the selector.
+ * @throws parserlib.util.SyntaxError If an unexpected token is found.
+ * @method parseSelector
+ */
+ parseSelector: function(input){
+
+ this._tokenStream = new TokenStream(input, Tokens);
+
+ //skip any leading white space
+ this._readWhitespace();
+
+ var result = this._selector();
+
+ //skip any trailing white space
+ this._readWhitespace();
+
+ //if there's anything more, then it's an invalid selector
+ this._verifyEnd();
+
+ //otherwise return result
+ return result;
+ },
+
+ /**
+ * Parses an HTML style attribute: a set of CSS declarations
+ * separated by semicolons.
+ * @param {String} input The text to parse as a style attribute
+ * @return {void}
+ * @method parseStyleAttribute
+ */
+ parseStyleAttribute: function(input){
+ input += "}"; // for error recovery in _readDeclarations()
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readDeclarations();
+ }
+ };
+
+ //copy over onto prototype
+ for (prop in additions){
+ if (additions.hasOwnProperty(prop)){
+ proto[prop] = additions[prop];
+ }
+ }
+
+ return proto;
+}();
+
+
+/*
+nth
+ : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
+ ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
+ ;
+*/
+/*global Validation, ValidationTypes, ValidationError*/
+var Properties = {
+
+ //A
+ "alignment-adjust" : "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | <percentage> | <length>",
+ "alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "animation" : 1,
+ "animation-delay" : { multi: "<time>", comma: true },
+ "animation-direction" : { multi: "normal | alternate", comma: true },
+ "animation-duration" : { multi: "<time>", comma: true },
+ "animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "animation-name" : { multi: "none | <ident>", comma: true },
+ "animation-play-state" : { multi: "running | paused", comma: true },
+ "animation-timing-function" : 1,
+
+ //vendor prefixed
+ "-moz-animation-delay" : { multi: "<time>", comma: true },
+ "-moz-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-moz-animation-duration" : { multi: "<time>", comma: true },
+ "-moz-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-moz-animation-name" : { multi: "none | <ident>", comma: true },
+ "-moz-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-ms-animation-delay" : { multi: "<time>", comma: true },
+ "-ms-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-ms-animation-duration" : { multi: "<time>", comma: true },
+ "-ms-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-ms-animation-name" : { multi: "none | <ident>", comma: true },
+ "-ms-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-webkit-animation-delay" : { multi: "<time>", comma: true },
+ "-webkit-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-webkit-animation-duration" : { multi: "<time>", comma: true },
+ "-webkit-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-webkit-animation-name" : { multi: "none | <ident>", comma: true },
+ "-webkit-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "-o-animation-delay" : { multi: "<time>", comma: true },
+ "-o-animation-direction" : { multi: "normal | alternate", comma: true },
+ "-o-animation-duration" : { multi: "<time>", comma: true },
+ "-o-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
+ "-o-animation-name" : { multi: "none | <ident>", comma: true },
+ "-o-animation-play-state" : { multi: "running | paused", comma: true },
+
+ "appearance" : "icon | window | desktop | workspace | document | tooltip | dialog | button | push-button | hyperlink | radio-button | checkbox | menu-item | tab | menu | menubar | pull-down-menu | pop-up-menu | list-menu | radio-group | checkbox-group | outline-tree | range | field | combo-box | signature | password | normal | none | inherit",
+ "azimuth" : function (expression) {
+ var simple = "<angle> | leftwards | rightwards | inherit",
+ direction = "left-side | far-left | left | center-left | center | center-right | right | far-right | right-side",
+ behind = false,
+ valid = false,
+ part;
+
+ if (!ValidationTypes.isAny(expression, simple)) {
+ if (ValidationTypes.isAny(expression, "behind")) {
+ behind = true;
+ valid = true;
+ }
+
+ if (ValidationTypes.isAny(expression, direction)) {
+ valid = true;
+ if (!behind) {
+ ValidationTypes.isAny(expression, "behind");
+ }
+ }
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (<'azimuth'>) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+
+ //B
+ "backface-visibility" : "visible | hidden",
+ "background" : 1,
+ "background-attachment" : { multi: "<attachment>", comma: true },
+ "background-clip" : { multi: "<box>", comma: true },
+ "background-color" : "<color> | inherit",
+ "background-image" : { multi: "<bg-image>", comma: true },
+ "background-origin" : { multi: "<box>", comma: true },
+ "background-position" : { multi: "<bg-position>", comma: true },
+ "background-repeat" : { multi: "<repeat-style>" },
+ "background-size" : { multi: "<bg-size>", comma: true },
+ "baseline-shift" : "baseline | sub | super | <percentage> | <length>",
+ "behavior" : 1,
+ "binding" : 1,
+ "bleed" : "<length>",
+ "bookmark-label" : "<content> | <attr> | <string>",
+ "bookmark-level" : "none | <integer>",
+ "bookmark-state" : "open | closed",
+ "bookmark-target" : "none | <uri> | <attr>",
+ "border" : "<border-width> || <border-style> || <color>",
+ "border-bottom" : "<border-width> || <border-style> || <color>",
+ "border-bottom-color" : "<color>",
+ "border-bottom-left-radius" : "<x-one-radius>",
+ "border-bottom-right-radius" : "<x-one-radius>",
+ "border-bottom-style" : "<border-style>",
+ "border-bottom-width" : "<border-width>",
+ "border-collapse" : "collapse | separate | inherit",
+ "border-color" : { multi: "<color> | inherit", max: 4 },
+ "border-image" : 1,
+ "border-image-outset" : { multi: "<length> | <number>", max: 4 },
+ "border-image-repeat" : { multi: "stretch | repeat | round", max: 2 },
+ "border-image-slice" : function(expression) {
+
+ var valid = false,
+ numeric = "<number> | <percentage>",
+ fill = false,
+ count = 0,
+ max = 4,
+ part;
+
+ if (ValidationTypes.isAny(expression, "fill")) {
+ fill = true;
+ valid = true;
+ }
+
+ while (expression.hasNext() && count < max) {
+ valid = ValidationTypes.isAny(expression, numeric);
+ if (!valid) {
+ break;
+ }
+ count++;
+ }
+
+
+ if (!fill) {
+ ValidationTypes.isAny(expression, "fill");
+ } else {
+ valid = true;
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected ([<number> | <percentage>]{1,4} && fill?) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "border-image-source" : "<image> | none",
+ "border-image-width" : { multi: "<length> | <percentage> | <number> | auto", max: 4 },
+ "border-left" : "<border-width> || <border-style> || <color>",
+ "border-left-color" : "<color> | inherit",
+ "border-left-style" : "<border-style>",
+ "border-left-width" : "<border-width>",
+ "border-radius" : function(expression) {
+
+ var valid = false,
+ numeric = "<length> | <percentage>",
+ slash = false,
+ fill = false,
+ count = 0,
+ max = 8,
+ part;
+
+ while (expression.hasNext() && count < max) {
+ valid = ValidationTypes.isAny(expression, numeric);
+ if (!valid) {
+
+ if (expression.peek() == "/" && count > 0 && !slash) {
+ slash = true;
+ max = count + 5;
+ expression.next();
+ } else {
+ break;
+ }
+ }
+ count++;
+ }
+
+ if (expression.hasNext()) {
+ part = expression.next();
+ if (valid) {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (<'border-radius'>) but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "border-right" : "<border-width> || <border-style> || <color>",
+ "border-right-color" : "<color> | inherit",
+ "border-right-style" : "<border-style>",
+ "border-right-width" : "<border-width>",
+ "border-spacing" : { multi: "<length> | inherit", max: 2 },
+ "border-style" : { multi: "<border-style>", max: 4 },
+ "border-top" : "<border-width> || <border-style> || <color>",
+ "border-top-color" : "<color> | inherit",
+ "border-top-left-radius" : "<x-one-radius>",
+ "border-top-right-radius" : "<x-one-radius>",
+ "border-top-style" : "<border-style>",
+ "border-top-width" : "<border-width>",
+ "border-width" : { multi: "<border-width>", max: 4 },
+ "bottom" : "<margin-width> | inherit",
+ "box-align" : "start | end | center | baseline | stretch", //http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
+ "box-decoration-break" : "slice |clone",
+ "box-direction" : "normal | reverse | inherit",
+ "box-flex" : "<number>",
+ "box-flex-group" : "<integer>",
+ "box-lines" : "single | multiple",
+ "box-ordinal-group" : "<integer>",
+ "box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "box-pack" : "start | end | center | justify",
+ "box-shadow" : function (expression) {
+ var result = false,
+ part;
+
+ if (!ValidationTypes.isAny(expression, "none")) {
+ Validation.multiProperty("<shadow>", expression, true, Infinity);
+ } else {
+ if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+ }
+ },
+ "box-sizing" : "content-box | border-box | inherit",
+ "break-after" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
+ "break-before" : "auto | always | avoid | left | right | page | column | avoid-page | avoid-column",
+ "break-inside" : "auto | avoid | avoid-page | avoid-column",
+
+ //C
+ "caption-side" : "top | bottom | inherit",
+ "clear" : "none | right | left | both | inherit",
+ "clip" : 1,
+ "color" : "<color> | inherit",
+ "color-profile" : 1,
+ "column-count" : "<integer> | auto", //http://www.w3.org/TR/css3-multicol/
+ "column-fill" : "auto | balance",
+ "column-gap" : "<length> | normal",
+ "column-rule" : "<border-width> || <border-style> || <color>",
+ "column-rule-color" : "<color>",
+ "column-rule-style" : "<border-style>",
+ "column-rule-width" : "<border-width>",
+ "column-span" : "none | all",
+ "column-width" : "<length> | auto",
+ "columns" : 1,
+ "content" : 1,
+ "counter-increment" : 1,
+ "counter-reset" : 1,
+ "crop" : "<shape> | auto",
+ "cue" : "cue-after | cue-before | inherit",
+ "cue-after" : 1,
+ "cue-before" : 1,
+ "cursor" : 1,
+
+ //D
+ "direction" : "ltr | rtl | inherit",
+ "display" : "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | box | inline-box | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker",
+ "dominant-baseline" : 1,
+ "drop-initial-after-adjust" : "central | middle | after-edge | text-after-edge | ideographic | alphabetic | mathematical | <percentage> | <length>",
+ "drop-initial-after-align" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "drop-initial-before-adjust" : "before-edge | text-before-edge | central | middle | hanging | mathematical | <percentage> | <length>",
+ "drop-initial-before-align" : "caps-height | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
+ "drop-initial-size" : "auto | line | <length> | <percentage>",
+ "drop-initial-value" : "initial | <integer>",
+
+ //E
+ "elevation" : "<angle> | below | level | above | higher | lower | inherit",
+ "empty-cells" : "show | hide | inherit",
+
+ //F
+ "filter" : 1,
+ "fit" : "fill | hidden | meet | slice",
+ "fit-position" : 1,
+ "float" : "left | right | none | inherit",
+ "float-offset" : 1,
+ "font" : 1,
+ "font-family" : 1,
+ "font-size" : "<absolute-size> | <relative-size> | <length> | <percentage> | inherit",
+ "font-size-adjust" : "<number> | none | inherit",
+ "font-stretch" : "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit",
+ "font-style" : "normal | italic | oblique | inherit",
+ "font-variant" : "normal | small-caps | inherit",
+ "font-weight" : "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit",
+
+ //G
+ "grid-cell-stacking" : "columns | rows | layer",
+ "grid-column" : 1,
+ "grid-columns" : 1,
+ "grid-column-align" : "start | end | center | stretch",
+ "grid-column-sizing" : 1,
+ "grid-column-span" : "<integer>",
+ "grid-flow" : "none | rows | columns",
+ "grid-layer" : "<integer>",
+ "grid-row" : 1,
+ "grid-rows" : 1,
+ "grid-row-align" : "start | end | center | stretch",
+ "grid-row-span" : "<integer>",
+ "grid-row-sizing" : 1,
+
+ //H
+ "hanging-punctuation" : 1,
+ "height" : "<margin-width> | inherit",
+ "hyphenate-after" : "<integer> | auto",
+ "hyphenate-before" : "<integer> | auto",
+ "hyphenate-character" : "<string> | auto",
+ "hyphenate-lines" : "no-limit | <integer>",
+ "hyphenate-resource" : 1,
+ "hyphens" : "none | manual | auto",
+
+ //I
+ "icon" : 1,
+ "image-orientation" : "angle | auto",
+ "image-rendering" : 1,
+ "image-resolution" : 1,
+ "inline-box-align" : "initial | last | <integer>",
+
+ //L
+ "left" : "<margin-width> | inherit",
+ "letter-spacing" : "<length> | normal | inherit",
+ "line-height" : "<number> | <length> | <percentage> | normal | inherit",
+ "line-break" : "auto | loose | normal | strict",
+ "line-stacking" : 1,
+ "line-stacking-ruby" : "exclude-ruby | include-ruby",
+ "line-stacking-shift" : "consider-shifts | disregard-shifts",
+ "line-stacking-strategy" : "inline-line-height | block-line-height | max-height | grid-height",
+ "list-style" : 1,
+ "list-style-image" : "<uri> | none | inherit",
+ "list-style-position" : "inside | outside | inherit",
+ "list-style-type" : "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit",
+
+ //M
+ "margin" : { multi: "<margin-width> | inherit", max: 4 },
+ "margin-bottom" : "<margin-width> | inherit",
+ "margin-left" : "<margin-width> | inherit",
+ "margin-right" : "<margin-width> | inherit",
+ "margin-top" : "<margin-width> | inherit",
+ "mark" : 1,
+ "mark-after" : 1,
+ "mark-before" : 1,
+ "marks" : 1,
+ "marquee-direction" : 1,
+ "marquee-play-count" : 1,
+ "marquee-speed" : 1,
+ "marquee-style" : 1,
+ "max-height" : "<length> | <percentage> | none | inherit",
+ "max-width" : "<length> | <percentage> | none | inherit",
+ "min-height" : "<length> | <percentage> | inherit",
+ "min-width" : "<length> | <percentage> | inherit",
+ "move-to" : 1,
+
+ //N
+ "nav-down" : 1,
+ "nav-index" : 1,
+ "nav-left" : 1,
+ "nav-right" : 1,
+ "nav-up" : 1,
+
+ //O
+ "opacity" : "<number> | inherit",
+ "orphans" : "<integer> | inherit",
+ "outline" : 1,
+ "outline-color" : "<color> | invert | inherit",
+ "outline-offset" : 1,
+ "outline-style" : "<border-style> | inherit",
+ "outline-width" : "<border-width> | inherit",
+ "overflow" : "visible | hidden | scroll | auto | inherit",
+ "overflow-style" : 1,
+ "overflow-x" : 1,
+ "overflow-y" : 1,
+
+ //P
+ "padding" : { multi: "<padding-width> | inherit", max: 4 },
+ "padding-bottom" : "<padding-width> | inherit",
+ "padding-left" : "<padding-width> | inherit",
+ "padding-right" : "<padding-width> | inherit",
+ "padding-top" : "<padding-width> | inherit",
+ "page" : 1,
+ "page-break-after" : "auto | always | avoid | left | right | inherit",
+ "page-break-before" : "auto | always | avoid | left | right | inherit",
+ "page-break-inside" : "auto | avoid | inherit",
+ "page-policy" : 1,
+ "pause" : 1,
+ "pause-after" : 1,
+ "pause-before" : 1,
+ "perspective" : 1,
+ "perspective-origin" : 1,
+ "phonemes" : 1,
+ "pitch" : 1,
+ "pitch-range" : 1,
+ "play-during" : 1,
+ "pointer-events" : "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
+ "position" : "static | relative | absolute | fixed | inherit",
+ "presentation-level" : 1,
+ "punctuation-trim" : 1,
+
+ //Q
+ "quotes" : 1,
+
+ //R
+ "rendering-intent" : 1,
+ "resize" : 1,
+ "rest" : 1,
+ "rest-after" : 1,
+ "rest-before" : 1,
+ "richness" : 1,
+ "right" : "<margin-width> | inherit",
+ "rotation" : 1,
+ "rotation-point" : 1,
+ "ruby-align" : 1,
+ "ruby-overhang" : 1,
+ "ruby-position" : 1,
+ "ruby-span" : 1,
+
+ //S
+ "size" : 1,
+ "speak" : "normal | none | spell-out | inherit",
+ "speak-header" : "once | always | inherit",
+ "speak-numeral" : "digits | continuous | inherit",
+ "speak-punctuation" : "code | none | inherit",
+ "speech-rate" : 1,
+ "src" : 1,
+ "stress" : 1,
+ "string-set" : 1,
+
+ "table-layout" : "auto | fixed | inherit",
+ "tab-size" : "<integer> | <length>",
+ "target" : 1,
+ "target-name" : 1,
+ "target-new" : 1,
+ "target-position" : 1,
+ "text-align" : "left | right | center | justify | inherit" ,
+ "text-align-last" : 1,
+ "text-decoration" : 1,
+ "text-emphasis" : 1,
+ "text-height" : 1,
+ "text-indent" : "<length> | <percentage> | inherit",
+ "text-justify" : "auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida",
+ "text-outline" : 1,
+ "text-overflow" : 1,
+ "text-rendering" : "auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit",
+ "text-shadow" : 1,
+ "text-transform" : "capitalize | uppercase | lowercase | none | inherit",
+ "text-wrap" : "normal | none | avoid",
+ "top" : "<margin-width> | inherit",
+ "transform" : 1,
+ "transform-origin" : 1,
+ "transform-style" : 1,
+ "transition" : 1,
+ "transition-delay" : 1,
+ "transition-duration" : 1,
+ "transition-property" : 1,
+ "transition-timing-function" : 1,
+
+ //U
+ "unicode-bidi" : "normal | embed | bidi-override | inherit",
+ "user-modify" : "read-only | read-write | write-only | inherit",
+ "user-select" : "none | text | toggle | element | elements | all | inherit",
+
+ //V
+ "vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",
+ "visibility" : "visible | hidden | collapse | inherit",
+ "voice-balance" : 1,
+ "voice-duration" : 1,
+ "voice-family" : 1,
+ "voice-pitch" : 1,
+ "voice-pitch-range" : 1,
+ "voice-rate" : 1,
+ "voice-stress" : 1,
+ "voice-volume" : 1,
+ "volume" : 1,
+
+ //W
+ "white-space" : "normal | pre | nowrap | pre-wrap | pre-line | inherit | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap", //http://perishablepress.com/wrapping-content/
+ "white-space-collapse" : 1,
+ "widows" : "<integer> | inherit",
+ "width" : "<length> | <percentage> | auto | inherit" ,
+ "word-break" : "normal | keep-all | break-all",
+ "word-spacing" : "<length> | normal | inherit",
+ "word-wrap" : 1,
+
+ //Z
+ "z-index" : "<integer> | auto | inherit",
+ "zoom" : "<number> | <percentage> | normal"
+};
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a selector combinator (whitespace, +, >).
+ * @namespace parserlib.css
+ * @class PropertyName
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {String} text The text representation of the unit.
+ * @param {String} hack The type of IE hack applied ("*", "_", or null).
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function PropertyName(text, hack, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);
+
+ /**
+ * The type of IE hack applied ("*", "_", or null).
+ * @type String
+ * @property hack
+ */
+ this.hack = hack;
+
+}
+
+PropertyName.prototype = new SyntaxUnit();
+PropertyName.prototype.constructor = PropertyName;
+PropertyName.prototype.toString = function(){
+ return (this.hack ? this.hack : "") + this.text;
+};
+
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a single part of a CSS property value, meaning that it represents
+ * just everything single part between ":" and ";". If there are multiple values
+ * separated by commas, this type represents just one of the values.
+ * @param {String[]} parts An array of value parts making up this value.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ * @namespace parserlib.css
+ * @class PropertyValue
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ */
+function PropertyValue(parts, line, col){
+
+ SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);
+
+ /**
+ * The parts that make up the selector.
+ * @type Array
+ * @property parts
+ */
+ this.parts = parts;
+
+}
+
+PropertyValue.prototype = new SyntaxUnit();
+PropertyValue.prototype.constructor = PropertyValue;
+
+
+/*global SyntaxUnit, Parser*/
+/**
+ * A utility class that allows for easy iteration over the various parts of a
+ * property value.
+ * @param {parserlib.css.PropertyValue} value The property value to iterate over.
+ * @namespace parserlib.css
+ * @class PropertyValueIterator
+ * @constructor
+ */
+function PropertyValueIterator(value){
+
+ /**
+ * Iterator value
+ * @type int
+ * @property _i
+ * @private
+ */
+ this._i = 0;
+
+ /**
+ * The parts that make up the value.
+ * @type Array
+ * @property _parts
+ * @private
+ */
+ this._parts = value.parts;
+
+ /**
+ * Keeps track of bookmarks along the way.
+ * @type Array
+ * @property _marks
+ * @private
+ */
+ this._marks = [];
+
+ /**
+ * Holds the original property value.
+ * @type parserlib.css.PropertyValue
+ * @property value
+ */
+ this.value = value;
+
+}
+
+/**
+ * Returns the total number of parts in the value.
+ * @return {int} The total number of parts in the value.
+ * @method count
+ */
+PropertyValueIterator.prototype.count = function(){
+ return this._parts.length;
+};
+
+/**
+ * Indicates if the iterator is positioned at the first item.
+ * @return {Boolean} True if positioned at first item, false if not.
+ * @method isFirst
+ */
+PropertyValueIterator.prototype.isFirst = function(){
+ return this._i === 0;
+};
+
+/**
+ * Indicates if there are more parts of the property value.
+ * @return {Boolean} True if there are more parts, false if not.
+ * @method hasNext
+ */
+PropertyValueIterator.prototype.hasNext = function(){
+ return (this._i < this._parts.length);
+};
+
+/**
+ * Marks the current spot in the iteration so it can be restored to
+ * later on.
+ * @return {void}
+ * @method mark
+ */
+PropertyValueIterator.prototype.mark = function(){
+ this._marks.push(this._i);
+};
+
+/**
+ * Returns the next part of the property value or null if there is no next
+ * part. Does not move the internal counter forward.
+ * @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
+ * part.
+ * @method peek
+ */
+PropertyValueIterator.prototype.peek = function(count){
+ return this.hasNext() ? this._parts[this._i + (count || 0)] : null;
+};
+
+/**
+ * Returns the next part of the property value or null if there is no next
+ * part.
+ * @return {parserlib.css.PropertyValuePart} The next part of the property value or null if there is no next
+ * part.
+ * @method next
+ */
+PropertyValueIterator.prototype.next = function(){
+ return this.hasNext() ? this._parts[this._i++] : null;
+};
+
+/**
+ * Returns the previous part of the property value or null if there is no
+ * previous part.
+ * @return {parserlib.css.PropertyValuePart} The previous part of the
+ * property value or null if there is no next part.
+ * @method previous
+ */
+PropertyValueIterator.prototype.previous = function(){
+ return this._i > 0 ? this._parts[--this._i] : null;
+};
+
+/**
+ * Restores the last saved bookmark.
+ * @return {void}
+ * @method restore
+ */
+PropertyValueIterator.prototype.restore = function(){
+ if (this._marks.length){
+ this._i = this._marks.pop();
+ }
+};
+
+
+/*global SyntaxUnit, Parser, Colors*/
+/**
+ * Represents a single part of a CSS property value, meaning that it represents
+ * just one part of the data between ":" and ";".
+ * @param {String} text The text representation of the unit.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ * @namespace parserlib.css
+ * @class PropertyValuePart
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ */
+function PropertyValuePart(text, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);
+
+ /**
+ * Indicates the type of value unit.
+ * @type String
+ * @property type
+ */
+ this.type = "unknown";
+
+ //figure out what type of data it is
+
+ var temp;
+
+ //it is a measurement?
+ if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){ //dimension
+ this.type = "dimension";
+ this.value = +RegExp.$1;
+ this.units = RegExp.$2;
+
+ //try to narrow down
+ switch(this.units.toLowerCase()){
+
+ case "em":
+ case "rem":
+ case "ex":
+ case "px":
+ case "cm":
+ case "mm":
+ case "in":
+ case "pt":
+ case "pc":
+ case "ch":
+ this.type = "length";
+ break;
+
+ case "deg":
+ case "rad":
+ case "grad":
+ this.type = "angle";
+ break;
+
+ case "ms":
+ case "s":
+ this.type = "time";
+ break;
+
+ case "hz":
+ case "khz":
+ this.type = "frequency";
+ break;
+
+ case "dpi":
+ case "dpcm":
+ this.type = "resolution";
+ break;
+
+ //default
+
+ }
+
+ } else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
+ this.type = "percentage";
+ this.value = +RegExp.$1;
+ } else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
+ this.type = "percentage";
+ this.value = +RegExp.$1;
+ } else if (/^([+\-]?\d+)$/i.test(text)){ //integer
+ this.type = "integer";
+ this.value = +RegExp.$1;
+ } else if (/^([+\-]?[\d\.]+)$/i.test(text)){ //number
+ this.type = "number";
+ this.value = +RegExp.$1;
+
+ } else if (/^#([a-f0-9]{3,6})/i.test(text)){ //hexcolor
+ this.type = "color";
+ temp = RegExp.$1;
+ if (temp.length == 3){
+ this.red = parseInt(temp.charAt(0)+temp.charAt(0),16);
+ this.green = parseInt(temp.charAt(1)+temp.charAt(1),16);
+ this.blue = parseInt(temp.charAt(2)+temp.charAt(2),16);
+ } else {
+ this.red = parseInt(temp.substring(0,2),16);
+ this.green = parseInt(temp.substring(2,4),16);
+ this.blue = parseInt(temp.substring(4,6),16);
+ }
+ } else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)){ //rgb() color with absolute numbers
+ this.type = "color";
+ this.red = +RegExp.$1;
+ this.green = +RegExp.$2;
+ this.blue = +RegExp.$3;
+ } else if (/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){ //rgb() color with percentages
+ this.type = "color";
+ this.red = +RegExp.$1 * 255 / 100;
+ this.green = +RegExp.$2 * 255 / 100;
+ this.blue = +RegExp.$3 * 255 / 100;
+ } else if (/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //rgba() color with absolute numbers
+ this.type = "color";
+ this.red = +RegExp.$1;
+ this.green = +RegExp.$2;
+ this.blue = +RegExp.$3;
+ this.alpha = +RegExp.$4;
+ } else if (/^rgba\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //rgba() color with percentages
+ this.type = "color";
+ this.red = +RegExp.$1 * 255 / 100;
+ this.green = +RegExp.$2 * 255 / 100;
+ this.blue = +RegExp.$3 * 255 / 100;
+ this.alpha = +RegExp.$4;
+ } else if (/^hsl\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){ //hsl()
+ this.type = "color";
+ this.hue = +RegExp.$1;
+ this.saturation = +RegExp.$2 / 100;
+ this.lightness = +RegExp.$3 / 100;
+ } else if (/^hsla\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*,\s*([\d\.]+)\s*\)/i.test(text)){ //hsla() color with percentages
+ this.type = "color";
+ this.hue = +RegExp.$1;
+ this.saturation = +RegExp.$2 / 100;
+ this.lightness = +RegExp.$3 / 100;
+ this.alpha = +RegExp.$4;
+ } else if (/^url\(["']?([^\)"']+)["']?\)/i.test(text)){ //URI
+ this.type = "uri";
+ this.uri = RegExp.$1;
+ } else if (/^([^\(]+)\(/i.test(text)){
+ this.type = "function";
+ this.name = RegExp.$1;
+ this.value = text;
+ } else if (/^["'][^"']*["']/.test(text)){ //string
+ this.type = "string";
+ this.value = eval(text);
+ } else if (Colors[text.toLowerCase()]){ //named color
+ this.type = "color";
+ temp = Colors[text.toLowerCase()].substring(1);
+ this.red = parseInt(temp.substring(0,2),16);
+ this.green = parseInt(temp.substring(2,4),16);
+ this.blue = parseInt(temp.substring(4,6),16);
+ } else if (/^[\,\/]$/.test(text)){
+ this.type = "operator";
+ this.value = text;
+ } else if (/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)){
+ this.type = "identifier";
+ this.value = text;
+ }
+
+}
+
+PropertyValuePart.prototype = new SyntaxUnit();
+PropertyValuePart.prototype.constructor = PropertyValuePart;
+
+/**
+ * Create a new syntax unit based solely on the given token.
+ * Convenience method for creating a new syntax unit when
+ * it represents a single token instead of multiple.
+ * @param {Object} token The token object to represent.
+ * @return {parserlib.css.PropertyValuePart} The object representing the token.
+ * @static
+ * @method fromToken
+ */
+PropertyValuePart.fromToken = function(token){
+ return new PropertyValuePart(token.value, token.startLine, token.startCol);
+};
+var Pseudos = {
+ ":first-letter": 1,
+ ":first-line": 1,
+ ":before": 1,
+ ":after": 1
+};
+
+Pseudos.ELEMENT = 1;
+Pseudos.CLASS = 2;
+
+Pseudos.isElement = function(pseudo){
+ return pseudo.indexOf("::") === 0 || Pseudos[pseudo.toLowerCase()] == Pseudos.ELEMENT;
+};
+/*global SyntaxUnit, Parser, Specificity*/
+/**
+ * Represents an entire single selector, including all parts but not
+ * including multiple selectors (those separated by commas).
+ * @namespace parserlib.css
+ * @class Selector
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {Array} parts Array of selectors parts making up this selector.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function Selector(parts, line, col){
+
+ SyntaxUnit.call(this, parts.join(" "), line, col, Parser.SELECTOR_TYPE);
+
+ /**
+ * The parts that make up the selector.
+ * @type Array
+ * @property parts
+ */
+ this.parts = parts;
+
+ /**
+ * The specificity of the selector.
+ * @type parserlib.css.Specificity
+ * @property specificity
+ */
+ this.specificity = Specificity.calculate(this);
+
+}
+
+Selector.prototype = new SyntaxUnit();
+Selector.prototype.constructor = Selector;
+
+
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a single part of a selector string, meaning a single set of
+ * element name and modifiers. This does not include combinators such as
+ * spaces, +, >, etc.
+ * @namespace parserlib.css
+ * @class SelectorPart
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {String} elementName The element name in the selector or null
+ * if there is no element name.
+ * @param {Array} modifiers Array of individual modifiers for the element.
+ * May be empty if there are none.
+ * @param {String} text The text representation of the unit.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function SelectorPart(elementName, modifiers, text, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);
+
+ /**
+ * The tag name of the element to which this part
+ * of the selector affects.
+ * @type String
+ * @property elementName
+ */
+ this.elementName = elementName;
+
+ /**
+ * The parts that come after the element name, such as class names, IDs,
+ * pseudo classes/elements, etc.
+ * @type Array
+ * @property modifiers
+ */
+ this.modifiers = modifiers;
+
+}
+
+SelectorPart.prototype = new SyntaxUnit();
+SelectorPart.prototype.constructor = SelectorPart;
+
+
+/*global SyntaxUnit, Parser*/
+/**
+ * Represents a selector modifier string, meaning a class name, element name,
+ * element ID, pseudo rule, etc.
+ * @namespace parserlib.css
+ * @class SelectorSubPart
+ * @extends parserlib.util.SyntaxUnit
+ * @constructor
+ * @param {String} text The text representation of the unit.
+ * @param {String} type The type of selector modifier.
+ * @param {int} line The line of text on which the unit resides.
+ * @param {int} col The column of text on which the unit resides.
+ */
+function SelectorSubPart(text, type, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);
+
+ /**
+ * The type of modifier.
+ * @type String
+ * @property type
+ */
+ this.type = type;
+
+ /**
+ * Some subparts have arguments, this represents them.
+ * @type Array
+ * @property args
+ */
+ this.args = [];
+
+}
+
+SelectorSubPart.prototype = new SyntaxUnit();
+SelectorSubPart.prototype.constructor = SelectorSubPart;
+
+
+/*global Pseudos, SelectorPart*/
+/**
+ * Represents a selector's specificity.
+ * @namespace parserlib.css
+ * @class Specificity
+ * @constructor
+ * @param {int} a Should be 1 for inline styles, zero for stylesheet styles
+ * @param {int} b Number of ID selectors
+ * @param {int} c Number of classes and pseudo classes
+ * @param {int} d Number of element names and pseudo elements
+ */
+function Specificity(a, b, c, d){
+ this.a = a;
+ this.b = b;
+ this.c = c;
+ this.d = d;
+}
+
+Specificity.prototype = {
+ constructor: Specificity,
+
+ /**
+ * Compare this specificity to another.
+ * @param {Specificity} other The other specificity to compare to.
+ * @return {int} -1 if the other specificity is larger, 1 if smaller, 0 if equal.
+ * @method compare
+ */
+ compare: function(other){
+ var comps = ["a", "b", "c", "d"],
+ i, len;
+
+ for (i=0, len=comps.length; i < len; i++){
+ if (this[comps[i]] < other[comps[i]]){
+ return -1;
+ } else if (this[comps[i]] > other[comps[i]]){
+ return 1;
+ }
+ }
+
+ return 0;
+ },
+
+ /**
+ * Creates a numeric value for the specificity.
+ * @return {int} The numeric value for the specificity.
+ * @method valueOf
+ */
+ valueOf: function(){
+ return (this.a * 1000) + (this.b * 100) + (this.c * 10) + this.d;
+ },
+
+ /**
+ * Returns a string representation for specificity.
+ * @return {String} The string representation of specificity.
+ * @method toString
+ */
+ toString: function(){
+ return this.a + "," + this.b + "," + this.c + "," + this.d;
+ }
+
+};
+
+/**
+ * Calculates the specificity of the given selector.
+ * @param {parserlib.css.Selector} The selector to calculate specificity for.
+ * @return {parserlib.css.Specificity} The specificity of the selector.
+ * @static
+ * @method calculate
+ */
+Specificity.calculate = function(selector){
+
+ var i, len,
+ part,
+ b=0, c=0, d=0;
+
+ function updateValues(part){
+
+ var i, j, len, num,
+ elementName = part.elementName ? part.elementName.text : "",
+ modifier;
+
+ if (elementName && elementName.charAt(elementName.length-1) != "*") {
+ d++;
+ }
+
+ for (i=0, len=part.modifiers.length; i < len; i++){
+ modifier = part.modifiers[i];
+ switch(modifier.type){
+ case "class":
+ case "attribute":
+ c++;
+ break;
+
+ case "id":
+ b++;
+ break;
+
+ case "pseudo":
+ if (Pseudos.isElement(modifier.text)){
+ d++;
+ } else {
+ c++;
+ }
+ break;
+
+ case "not":
+ for (j=0, num=modifier.args.length; j < num; j++){
+ updateValues(modifier.args[j]);
+ }
+ }
+ }
+ }
+
+ for (i=0, len=selector.parts.length; i < len; i++){
+ part = selector.parts[i];
+
+ if (part instanceof SelectorPart){
+ updateValues(part);
+ }
+ }
+
+ return new Specificity(0, b, c, d);
+};
+
+/*global Tokens, TokenStreamBase*/
+
+var h = /^[0-9a-fA-F]$/,
+ nonascii = /^[\u0080-\uFFFF]$/,
+ nl = /\n|\r\n|\r|\f/;
+
+//-----------------------------------------------------------------------------
+// Helper functions
+//-----------------------------------------------------------------------------
+
+
+function isHexDigit(c){
+ return c !== null && h.test(c);
+}
+
+function isDigit(c){
+ return c !== null && /\d/.test(c);
+}
+
+function isWhitespace(c){
+ return c !== null && /\s/.test(c);
+}
+
+function isNewLine(c){
+ return c !== null && nl.test(c);
+}
+
+function isNameStart(c){
+ return c !== null && (/[a-z_\u0080-\uFFFF\\]/i.test(c));
+}
+
+function isNameChar(c){
+ return c !== null && (isNameStart(c) || /[0-9\-\\]/.test(c));
+}
+
+function isIdentStart(c){
+ return c !== null && (isNameStart(c) || /\-\\/.test(c));
+}
+
+function mix(receiver, supplier){
+ for (var prop in supplier){
+ if (supplier.hasOwnProperty(prop)){
+ receiver[prop] = supplier[prop];
+ }
+ }
+ return receiver;
+}
+
+//-----------------------------------------------------------------------------
+// CSS Token Stream
+//-----------------------------------------------------------------------------
+
+
+/**
+ * A token stream that produces CSS tokens.
+ * @param {String|Reader} input The source of text to tokenize.
+ * @constructor
+ * @class TokenStream
+ * @namespace parserlib.css
+ */
+function TokenStream(input){
+ TokenStreamBase.call(this, input, Tokens);
+}
+
+TokenStream.prototype = mix(new TokenStreamBase(), {
+
+ /**
+ * Overrides the TokenStreamBase method of the same name
+ * to produce CSS tokens.
+ * @param {variant} channel The name of the channel to use
+ * for the next token.
+ * @return {Object} A token object representing the next token.
+ * @method _getToken
+ * @private
+ */
+ _getToken: function(channel){
+
+ var c,
+ reader = this._reader,
+ token = null,
+ startLine = reader.getLine(),
+ startCol = reader.getCol();
+
+ c = reader.read();
+
+
+ while(c){
+ switch(c){
+
+ /*
+ * Potential tokens:
+ * - COMMENT
+ * - SLASH
+ * - CHAR
+ */
+ case "/":
+
+ if(reader.peek() == "*"){
+ token = this.commentToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+
+ /*
+ * Potential tokens:
+ * - DASHMATCH
+ * - INCLUDES
+ * - PREFIXMATCH
+ * - SUFFIXMATCH
+ * - SUBSTRINGMATCH
+ * - CHAR
+ */
+ case "|":
+ case "~":
+ case "^":
+ case "$":
+ case "*":
+ if(reader.peek() == "="){
+ token = this.comparisonToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+
+ /*
+ * Potential tokens:
+ * - STRING
+ * - INVALID
+ */
+ case "\"":
+ case "'":
+ token = this.stringToken(c, startLine, startCol);
+ break;
+
+ /*
+ * Potential tokens:
+ * - HASH
+ * - CHAR
+ */
+ case "#":
+ if (isNameChar(reader.peek())){
+ token = this.hashToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+
+ /*
+ * Potential tokens:
+ * - DOT
+ * - NUMBER
+ * - DIMENSION
+ * - PERCENTAGE
+ */
+ case ".":
+ if (isDigit(reader.peek())){
+ token = this.numberToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+
+ /*
+ * Potential tokens:
+ * - CDC
+ * - MINUS
+ * - NUMBER
+ * - DIMENSION
+ * - PERCENTAGE
+ */
+ case "-":
+ if (reader.peek() == "-"){ //could be closing HTML-style comment
+ token = this.htmlCommentEndToken(c, startLine, startCol);
+ } else if (isNameStart(reader.peek())){
+ token = this.identOrFunctionToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+
+ /*
+ * Potential tokens:
+ * - IMPORTANT_SYM
+ * - CHAR
+ */
+ case "!":
+ token = this.importantToken(c, startLine, startCol);
+ break;
+
+ /*
+ * Any at-keyword or CHAR
+ */
+ case "@":
+ token = this.atRuleToken(c, startLine, startCol);
+ break;
+
+ /*
+ * Potential tokens:
+ * - NOT
+ * - CHAR
+ */
+ case ":":
+ token = this.notToken(c, startLine, startCol);
+ break;
+
+ /*
+ * Potential tokens:
+ * - CDO
+ * - CHAR
+ */
+ case "<":
+ token = this.htmlCommentStartToken(c, startLine, startCol);
+ break;
+
+ /*
+ * Potential tokens:
+ * - UNICODE_RANGE
+ * - URL
+ * - CHAR
+ */
+ case "U":
+ case "u":
+ if (reader.peek() == "+"){
+ token = this.unicodeRangeToken(c, startLine, startCol);
+ break;
+ }
+ /* falls through */
+ default:
+
+ /*
+ * Potential tokens:
+ * - NUMBER
+ * - DIMENSION
+ * - LENGTH
+ * - FREQ
+ * - TIME
+ * - EMS
+ * - EXS
+ * - ANGLE
+ */
+ if (isDigit(c)){
+ token = this.numberToken(c, startLine, startCol);
+ } else
+
+ /*
+ * Potential tokens:
+ * - S
+ */
+ if (isWhitespace(c)){
+ token = this.whitespaceToken(c, startLine, startCol);
+ } else
+
+ /*
+ * Potential tokens:
+ * - IDENT
+ */
+ if (isIdentStart(c)){
+ token = this.identOrFunctionToken(c, startLine, startCol);
+ } else
+
+ /*
+ * Potential tokens:
+ * - CHAR
+ * - PLUS
+ */
+ {
+ token = this.charToken(c, startLine, startCol);
+ }
+
+
+
+
+
+
+ }
+
+ //make sure this token is wanted
+ //TODO: check channel
+ break;
+ }
+
+ if (!token && c === null){
+ token = this.createToken(Tokens.EOF,null,startLine,startCol);
+ }
+
+ return token;
+ },
+
+ //-------------------------------------------------------------------------
+ // Methods to create tokens
+ //-------------------------------------------------------------------------
+
+ /**
+ * Produces a token based on available data and the current
+ * reader position information. This method is called by other
+ * private methods to create tokens and is never called directly.
+ * @param {int} tt The token type.
+ * @param {String} value The text value of the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @param {Object} options (Optional) Specifies a channel property
+ * to indicate that a different channel should be scanned
+ * and/or a hide property indicating that the token should
+ * be hidden.
+ * @return {Object} A token object.
+ * @method createToken
+ */
+ createToken: function(tt, value, startLine, startCol, options){
+ var reader = this._reader;
+ options = options || {};
+
+ return {
+ value: value,
+ type: tt,
+ channel: options.channel,
+ hide: options.hide || false,
+ startLine: startLine,
+ startCol: startCol,
+ endLine: reader.getLine(),
+ endCol: reader.getCol()
+ };
+ },
+
+ //-------------------------------------------------------------------------
+ // Methods to create specific tokens
+ //-------------------------------------------------------------------------
+
+ /**
+ * Produces a token for any at-rule. If the at-rule is unknown, then
+ * the token is for a single "@" character.
+ * @param {String} first The first character for the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method atRuleToken
+ */
+ atRuleToken: function(first, startLine, startCol){
+ var rule = first,
+ reader = this._reader,
+ tt = Tokens.CHAR,
+ valid = false,
+ ident,
+ c;
+
+ /*
+ * First, mark where we are. There are only four @ rules,
+ * so anything else is really just an invalid token.
+ * Basically, if this doesn't match one of the known @
+ * rules, just return '@' as an unknown token and allow
+ * parsing to continue after that point.
+ */
+ reader.mark();
+
+ //try to find the at-keyword
+ ident = this.readName();
+ rule = first + ident;
+ tt = Tokens.type(rule.toLowerCase());
+
+ //if it's not valid, use the first character only and reset the reader
+ if (tt == Tokens.CHAR || tt == Tokens.UNKNOWN){
+ if (rule.length > 1){
+ tt = Tokens.UNKNOWN_SYM;
+ } else {
+ tt = Tokens.CHAR;
+ rule = first;
+ reader.reset();
+ }
+ }
+
+ return this.createToken(tt, rule, startLine, startCol);
+ },
+
+ /**
+ * Produces a character token based on the given character
+ * and location in the stream. If there's a special (non-standard)
+ * token name, this is used; otherwise CHAR is used.
+ * @param {String} c The character for the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method charToken
+ */
+ charToken: function(c, startLine, startCol){
+ var tt = Tokens.type(c);
+
+ if (tt == -1){
+ tt = Tokens.CHAR;
+ }
+
+ return this.createToken(tt, c, startLine, startCol);
+ },
+
+ /**
+ * Produces a character token based on the given character
+ * and location in the stream. If there's a special (non-standard)
+ * token name, this is used; otherwise CHAR is used.
+ * @param {String} first The first character for the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method commentToken
+ */
+ commentToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ comment = this.readComment(first);
+
+ return this.createToken(Tokens.COMMENT, comment, startLine, startCol);
+ },
+
+ /**
+ * Produces a comparison token based on the given character
+ * and location in the stream. The next character must be
+ * read and is already known to be an equals sign.
+ * @param {String} c The character for the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method comparisonToken
+ */
+ comparisonToken: function(c, startLine, startCol){
+ var reader = this._reader,
+ comparison = c + reader.read(),
+ tt = Tokens.type(comparison) || Tokens.CHAR;
+
+ return this.createToken(tt, comparison, startLine, startCol);
+ },
+
+ /**
+ * Produces a hash token based on the specified information. The
+ * first character provided is the pound sign (#) and then this
+ * method reads a name afterward.
+ * @param {String} first The first character (#) in the hash name.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method hashToken
+ */
+ hashToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ name = this.readName(first);
+
+ return this.createToken(Tokens.HASH, name, startLine, startCol);
+ },
+
+ /**
+ * Produces a CDO or CHAR token based on the specified information. The
+ * first character is provided and the rest is read by the function to determine
+ * the correct token to create.
+ * @param {String} first The first character in the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method htmlCommentStartToken
+ */
+ htmlCommentStartToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(3);
+
+ if (text == "<!--"){
+ return this.createToken(Tokens.CDO, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+
+ /**
+ * Produces a CDC or CHAR token based on the specified information. The
+ * first character is provided and the rest is read by the function to determine
+ * the correct token to create.
+ * @param {String} first The first character in the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method htmlCommentEndToken
+ */
+ htmlCommentEndToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(2);
+
+ if (text == "-->"){
+ return this.createToken(Tokens.CDC, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+
+ /**
+ * Produces an IDENT or FUNCTION token based on the specified information. The
+ * first character is provided and the rest is read by the function to determine
+ * the correct token to create.
+ * @param {String} first The first character in the identifier.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method identOrFunctionToken
+ */
+ identOrFunctionToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ ident = this.readName(first),
+ tt = Tokens.IDENT;
+
+ //if there's a left paren immediately after, it's a URI or function
+ if (reader.peek() == "("){
+ ident += reader.read();
+ if (ident.toLowerCase() == "url("){
+ tt = Tokens.URI;
+ ident = this.readURI(ident);
+
+ //didn't find a valid URL or there's no closing paren
+ if (ident.toLowerCase() == "url("){
+ tt = Tokens.FUNCTION;
+ }
+ } else {
+ tt = Tokens.FUNCTION;
+ }
+ } else if (reader.peek() == ":"){ //might be an IE function
+
+ //IE-specific functions always being with progid:
+ if (ident.toLowerCase() == "progid"){
+ ident += reader.readTo("(");
+ tt = Tokens.IE_FUNCTION;
+ }
+ }
+
+ return this.createToken(tt, ident, startLine, startCol);
+ },
+
+ /**
+ * Produces an IMPORTANT_SYM or CHAR token based on the specified information. The
+ * first character is provided and the rest is read by the function to determine
+ * the correct token to create.
+ * @param {String} first The first character in the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method importantToken
+ */
+ importantToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ important = first,
+ tt = Tokens.CHAR,
+ temp,
+ c;
+
+ reader.mark();
+ c = reader.read();
+
+ while(c){
+
+ //there can be a comment in here
+ if (c == "/"){
+
+ //if the next character isn't a star, then this isn't a valid !important token
+ if (reader.peek() != "*"){
+ break;
+ } else {
+ temp = this.readComment(c);
+ if (temp === ""){ //broken!
+ break;
+ }
+ }
+ } else if (isWhitespace(c)){
+ important += c + this.readWhitespace();
+ } else if (/i/i.test(c)){
+ temp = reader.readCount(8);
+ if (/mportant/i.test(temp)){
+ important += c + temp;
+ tt = Tokens.IMPORTANT_SYM;
+
+ }
+ break; //we're done
+ } else {
+ break;
+ }
+
+ c = reader.read();
+ }
+
+ if (tt == Tokens.CHAR){
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ } else {
+ return this.createToken(tt, important, startLine, startCol);
+ }
+
+
+ },
+
+ /**
+ * Produces a NOT or CHAR token based on the specified information. The
+ * first character is provided and the rest is read by the function to determine
+ * the correct token to create.
+ * @param {String} first The first character in the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method notToken
+ */
+ notToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(4);
+
+ if (text.toLowerCase() == ":not("){
+ return this.createToken(Tokens.NOT, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+
+ /**
+ * Produces a number token based on the given character
+ * and location in the stream. This may return a token of
+ * NUMBER, EMS, EXS, LENGTH, ANGLE, TIME, FREQ, DIMENSION,
+ * or PERCENTAGE.
+ * @param {String} first The first character for the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method numberToken
+ */
+ numberToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = this.readNumber(first),
+ ident,
+ tt = Tokens.NUMBER,
+ c = reader.peek();
+
+ if (isIdentStart(c)){
+ ident = this.readName(reader.read());
+ value += ident;
+
+ if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){
+ tt = Tokens.LENGTH;
+ } else if (/^deg|^rad$|^grad$/i.test(ident)){
+ tt = Tokens.ANGLE;
+ } else if (/^ms$|^s$/i.test(ident)){
+ tt = Tokens.TIME;
+ } else if (/^hz$|^khz$/i.test(ident)){
+ tt = Tokens.FREQ;
+ } else if (/^dpi$|^dpcm$/i.test(ident)){
+ tt = Tokens.RESOLUTION;
+ } else {
+ tt = Tokens.DIMENSION;
+ }
+
+ } else if (c == "%"){
+ value += reader.read();
+ tt = Tokens.PERCENTAGE;
+ }
+
+ return this.createToken(tt, value, startLine, startCol);
+ },
+
+ /**
+ * Produces a string token based on the given character
+ * and location in the stream. Since strings may be indicated
+ * by single or double quotes, a failure to match starting
+ * and ending quotes results in an INVALID token being generated.
+ * The first character in the string is passed in and then
+ * the rest are read up to and including the final quotation mark.
+ * @param {String} first The first character in the string.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method stringToken
+ */
+ stringToken: function(first, startLine, startCol){
+ var delim = first,
+ string = first,
+ reader = this._reader,
+ prev = first,
+ tt = Tokens.STRING,
+ c = reader.read();
+
+ while(c){
+ string += c;
+
+ //if the delimiter is found with an escapement, we're done.
+ if (c == delim && prev != "\\"){
+ break;
+ }
+
+ //if there's a newline without an escapement, it's an invalid string
+ if (isNewLine(reader.peek()) && c != "\\"){
+ tt = Tokens.INVALID;
+ break;
+ }
+
+ //save previous and get next
+ prev = c;
+ c = reader.read();
+ }
+
+ //if c is null, that means we're out of input and the string was never closed
+ if (c === null){
+ tt = Tokens.INVALID;
+ }
+
+ return this.createToken(tt, string, startLine, startCol);
+ },
+
+ unicodeRangeToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = first,
+ temp,
+ tt = Tokens.CHAR;
+
+ //then it should be a unicode range
+ if (reader.peek() == "+"){
+ reader.mark();
+ value += reader.read();
+ value += this.readUnicodeRangePart(true);
+
+ //ensure there's an actual unicode range here
+ if (value.length == 2){
+ reader.reset();
+ } else {
+
+ tt = Tokens.UNICODE_RANGE;
+
+ //if there's a ? in the first part, there can't be a second part
+ if (value.indexOf("?") == -1){
+
+ if (reader.peek() == "-"){
+ reader.mark();
+ temp = reader.read();
+ temp += this.readUnicodeRangePart(false);
+
+ //if there's not another value, back up and just take the first
+ if (temp.length == 1){
+ reader.reset();
+ } else {
+ value += temp;
+ }
+ }
+
+ }
+ }
+ }
+
+ return this.createToken(tt, value, startLine, startCol);
+ },
+
+ /**
+ * Produces a S token based on the specified information. Since whitespace
+ * may have multiple characters, this consumes all whitespace characters
+ * into a single token.
+ * @param {String} first The first character in the token.
+ * @param {int} startLine The beginning line for the character.
+ * @param {int} startCol The beginning column for the character.
+ * @return {Object} A token object.
+ * @method whitespaceToken
+ */
+ whitespaceToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = first + this.readWhitespace();
+ return this.createToken(Tokens.S, value, startLine, startCol);
+ },
+
+
+
+
+ //-------------------------------------------------------------------------
+ // Methods to read values from the string stream
+ //-------------------------------------------------------------------------
+
+ readUnicodeRangePart: function(allowQuestionMark){
+ var reader = this._reader,
+ part = "",
+ c = reader.peek();
+
+ //first read hex digits
+ while(isHexDigit(c) && part.length < 6){
+ reader.read();
+ part += c;
+ c = reader.peek();
+ }
+
+ //then read question marks if allowed
+ if (allowQuestionMark){
+ while(c == "?" && part.length < 6){
+ reader.read();
+ part += c;
+ c = reader.peek();
+ }
+ }
+
+ //there can't be any other characters after this point
+
+ return part;
+ },
+
+ readWhitespace: function(){
+ var reader = this._reader,
+ whitespace = "",
+ c = reader.peek();
+
+ while(isWhitespace(c)){
+ reader.read();
+ whitespace += c;
+ c = reader.peek();
+ }
+
+ return whitespace;
+ },
+ readNumber: function(first){
+ var reader = this._reader,
+ number = first,
+ hasDot = (first == "."),
+ c = reader.peek();
+
+
+ while(c){
+ if (isDigit(c)){
+ number += reader.read();
+ } else if (c == "."){
+ if (hasDot){
+ break;
+ } else {
+ hasDot = true;
+ number += reader.read();
+ }
+ } else {
+ break;
+ }
+
+ c = reader.peek();
+ }
+
+ return number;
+ },
+ readString: function(){
+ var reader = this._reader,
+ delim = reader.read(),
+ string = delim,
+ prev = delim,
+ c = reader.peek();
+
+ while(c){
+ c = reader.read();
+ string += c;
+
+ //if the delimiter is found with an escapement, we're done.
+ if (c == delim && prev != "\\"){
+ break;
+ }
+
+ //if there's a newline without an escapement, it's an invalid string
+ if (isNewLine(reader.peek()) && c != "\\"){
+ string = "";
+ break;
+ }
+
+ //save previous and get next
+ prev = c;
+ c = reader.peek();
+ }
+
+ //if c is null, that means we're out of input and the string was never closed
+ if (c === null){
+ string = "";
+ }
+
+ return string;
+ },
+ readURI: function(first){
+ var reader = this._reader,
+ uri = first,
+ inner = "",
+ c = reader.peek();
+
+ reader.mark();
+
+ //skip whitespace before
+ while(c && isWhitespace(c)){
+ reader.read();
+ c = reader.peek();
+ }
+
+ //it's a string
+ if (c == "'" || c == "\""){
+ inner = this.readString();
+ } else {
+ inner = this.readURL();
+ }
+
+ c = reader.peek();
+
+ //skip whitespace after
+ while(c && isWhitespace(c)){
+ reader.read();
+ c = reader.peek();
+ }
+
+ //if there was no inner value or the next character isn't closing paren, it's not a URI
+ if (inner === "" || c != ")"){
+ uri = first;
+ reader.reset();
+ } else {
+ uri += inner + reader.read();
+ }
+
+ return uri;
+ },
+ readURL: function(){
+ var reader = this._reader,
+ url = "",
+ c = reader.peek();
+
+ //TODO: Check for escape and nonascii
+ while (/^[!#$%&\\*-~]$/.test(c)){
+ url += reader.read();
+ c = reader.peek();
+ }
+
+ return url;
+
+ },
+ readName: function(first){
+ var reader = this._reader,
+ ident = first || "",
+ c = reader.peek();
+
+ while(true){
+ if (c == "\\"){
+ ident += this.readEscape(reader.read());
+ c = reader.peek();
+ } else if(c && isNameChar(c)){
+ ident += reader.read();
+ c = reader.peek();
+ } else {
+ break;
+ }
+ }
+
+ return ident;
+ },
+
+ readEscape: function(first){
+ var reader = this._reader,
+ cssEscape = first || "",
+ i = 0,
+ c = reader.peek();
+
+ if (isHexDigit(c)){
+ do {
+ cssEscape += reader.read();
+ c = reader.peek();
+ } while(c && isHexDigit(c) && ++i < 6);
+ }
+
+ if (cssEscape.length == 3 && /\s/.test(c) ||
+ cssEscape.length == 7 || cssEscape.length == 1){
+ reader.read();
+ } else {
+ c = "";
+ }
+
+ return cssEscape + c;
+ },
+
+ readComment: function(first){
+ var reader = this._reader,
+ comment = first || "",
+ c = reader.read();
+
+ if (c == "*"){
+ while(c){
+ comment += c;
+
+ //look for end of comment
+ if (comment.length > 2 && c == "*" && reader.peek() == "/"){
+ comment += reader.read();
+ break;
+ }
+
+ c = reader.read();
+ }
+
+ return comment;
+ } else {
+ return "";
+ }
+
+ }
+});
+
+
+var Tokens = [
+
+ /*
+ * The following token names are defined in CSS3 Grammar: http://www.w3.org/TR/css3-syntax/#lexical
+ */
+
+ //HTML-style comments
+ { name: "CDO"},
+ { name: "CDC"},
+
+ //ignorables
+ { name: "S", whitespace: true/*, channel: "ws"*/},
+ { name: "COMMENT", comment: true, hide: true, channel: "comment" },
+
+ //attribute equality
+ { name: "INCLUDES", text: "~="},
+ { name: "DASHMATCH", text: "|="},
+ { name: "PREFIXMATCH", text: "^="},
+ { name: "SUFFIXMATCH", text: "$="},
+ { name: "SUBSTRINGMATCH", text: "*="},
+
+ //identifier types
+ { name: "STRING"},
+ { name: "IDENT"},
+ { name: "HASH"},
+
+ //at-keywords
+ { name: "IMPORT_SYM", text: "@import"},
+ { name: "PAGE_SYM", text: "@page"},
+ { name: "MEDIA_SYM", text: "@media"},
+ { name: "FONT_FACE_SYM", text: "@font-face"},
+ { name: "CHARSET_SYM", text: "@charset"},
+ { name: "NAMESPACE_SYM", text: "@namespace"},
+ { name: "UNKNOWN_SYM" },
+ //{ name: "ATKEYWORD"},
+
+ //CSS3 animations
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
+
+ //important symbol
+ { name: "IMPORTANT_SYM"},
+
+ //measurements
+ { name: "LENGTH"},
+ { name: "ANGLE"},
+ { name: "TIME"},
+ { name: "FREQ"},
+ { name: "DIMENSION"},
+ { name: "PERCENTAGE"},
+ { name: "NUMBER"},
+
+ //functions
+ { name: "URI"},
+ { name: "FUNCTION"},
+
+ //Unicode ranges
+ { name: "UNICODE_RANGE"},
+
+ /*
+ * The following token names are defined in CSS3 Selectors: http://www.w3.org/TR/css3-selectors/#selector-syntax
+ */
+
+ //invalid string
+ { name: "INVALID"},
+
+ //combinators
+ { name: "PLUS", text: "+" },
+ { name: "GREATER", text: ">"},
+ { name: "COMMA", text: ","},
+ { name: "TILDE", text: "~"},
+
+ //modifier
+ { name: "NOT"},
+
+ /*
+ * Defined in CSS3 Paged Media
+ */
+ { name: "TOPLEFTCORNER_SYM", text: "@top-left-corner"},
+ { name: "TOPLEFT_SYM", text: "@top-left"},
+ { name: "TOPCENTER_SYM", text: "@top-center"},
+ { name: "TOPRIGHT_SYM", text: "@top-right"},
+ { name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner"},
+ { name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner"},
+ { name: "BOTTOMLEFT_SYM", text: "@bottom-left"},
+ { name: "BOTTOMCENTER_SYM", text: "@bottom-center"},
+ { name: "BOTTOMRIGHT_SYM", text: "@bottom-right"},
+ { name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner"},
+ { name: "LEFTTOP_SYM", text: "@left-top"},
+ { name: "LEFTMIDDLE_SYM", text: "@left-middle"},
+ { name: "LEFTBOTTOM_SYM", text: "@left-bottom"},
+ { name: "RIGHTTOP_SYM", text: "@right-top"},
+ { name: "RIGHTMIDDLE_SYM", text: "@right-middle"},
+ { name: "RIGHTBOTTOM_SYM", text: "@right-bottom"},
+
+ /*
+ * The following token names are defined in CSS3 Media Queries: http://www.w3.org/TR/css3-mediaqueries/#syntax
+ */
+ /*{ name: "MEDIA_ONLY", state: "media"},
+ { name: "MEDIA_NOT", state: "media"},
+ { name: "MEDIA_AND", state: "media"},*/
+ { name: "RESOLUTION", state: "media"},
+
+ /*
+ * The following token names are not defined in any CSS specification but are used by the lexer.
+ */
+
+ //not a real token, but useful for stupid IE filters
+ { name: "IE_FUNCTION" },
+
+ //part of CSS3 grammar but not the Flex code
+ { name: "CHAR" },
+
+ //TODO: Needed?
+ //Not defined as tokens, but might as well be
+ {
+ name: "PIPE",
+ text: "|"
+ },
+ {
+ name: "SLASH",
+ text: "/"
+ },
+ {
+ name: "MINUS",
+ text: "-"
+ },
+ {
+ name: "STAR",
+ text: "*"
+ },
+
+ {
+ name: "LBRACE",
+ text: "{"
+ },
+ {
+ name: "RBRACE",
+ text: "}"
+ },
+ {
+ name: "LBRACKET",
+ text: "["
+ },
+ {
+ name: "RBRACKET",
+ text: "]"
+ },
+ {
+ name: "EQUALS",
+ text: "="
+ },
+ {
+ name: "COLON",
+ text: ":"
+ },
+ {
+ name: "SEMICOLON",
+ text: ";"
+ },
+
+ {
+ name: "LPAREN",
+ text: "("
+ },
+ {
+ name: "RPAREN",
+ text: ")"
+ },
+ {
+ name: "DOT",
+ text: "."
+ }
+];
+
+(function(){
+
+ var nameMap = [],
+ typeMap = {};
+
+ Tokens.UNKNOWN = -1;
+ Tokens.unshift({name:"EOF"});
+ for (var i=0, len = Tokens.length; i < len; i++){
+ nameMap.push(Tokens[i].name);
+ Tokens[Tokens[i].name] = i;
+ if (Tokens[i].text){
+ if (Tokens[i].text instanceof Array){
+ for (var j=0; j < Tokens[i].text.length; j++){
+ typeMap[Tokens[i].text[j]] = i;
+ }
+ } else {
+ typeMap[Tokens[i].text] = i;
+ }
+ }
+ }
+
+ Tokens.name = function(tt){
+ return nameMap[tt];
+ };
+
+ Tokens.type = function(c){
+ return typeMap[c] || -1;
+ };
+
+})();
+
+
+
+
+//This file will likely change a lot! Very experimental!
+/*global Properties, ValidationTypes, ValidationError, PropertyValueIterator */
+var Validation = {
+
+ validate: function(property, value){
+
+ //normalize name
+ var name = property.toString().toLowerCase(),
+ parts = value.parts,
+ expression = new PropertyValueIterator(value),
+ spec = Properties[name],
+ part,
+ valid,
+ j, count,
+ msg,
+ types,
+ last,
+ literals,
+ max, multi, group;
+
+ if (!spec) {
+ if (name.indexOf("-") !== 0){ //vendor prefixed are ok
+ throw new ValidationError("Unknown property '" + property + "'.", property.line, property.col);
+ }
+ } else if (typeof spec != "number"){
+
+ //initialization
+ if (typeof spec == "string"){
+ if (spec.indexOf("||") > -1) {
+ this.groupProperty(spec, expression);
+ } else {
+ this.singleProperty(spec, expression, 1);
+ }
+
+ } else if (spec.multi) {
+ this.multiProperty(spec.multi, expression, spec.comma, spec.max || Infinity);
+ } else if (typeof spec == "function") {
+ spec(expression);
+ }
+
+ }
+
+ },
+
+ singleProperty: function(types, expression, max, partial) {
+
+ var result = false,
+ value = expression.value,
+ count = 0,
+ part;
+
+ while (expression.hasNext() && count < max) {
+ result = ValidationTypes.isAny(expression, types);
+ if (!result) {
+ break;
+ }
+ count++;
+ }
+
+ if (!result) {
+ if (expression.hasNext() && !expression.isFirst()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+
+ },
+
+ multiProperty: function (types, expression, comma, max) {
+
+ var result = false,
+ value = expression.value,
+ count = 0,
+ sep = false,
+ part;
+
+ while(expression.hasNext() && !result && count < max) {
+ if (ValidationTypes.isAny(expression, types)) {
+ count++;
+ if (!expression.hasNext()) {
+ result = true;
+
+ } else if (comma) {
+ if (expression.peek() == ",") {
+ part = expression.next();
+ } else {
+ break;
+ }
+ }
+ } else {
+ break;
+
+ }
+ }
+
+ if (!result) {
+ if (expression.hasNext() && !expression.isFirst()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ part = expression.previous();
+ if (comma && part == ",") {
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ }
+
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+
+ },
+
+ groupProperty: function (types, expression, comma) {
+
+ var result = false,
+ value = expression.value,
+ typeCount = types.split("||").length,
+ groups = { count: 0 },
+ partial = false,
+ name,
+ part;
+
+ while(expression.hasNext() && !result) {
+ name = ValidationTypes.isAnyOfGroup(expression, types);
+ if (name) {
+
+ //no dupes
+ if (groups[name]) {
+ break;
+ } else {
+ groups[name] = 1;
+ groups.count++;
+ partial = true;
+
+ if (groups.count == typeCount || !expression.hasNext()) {
+ result = true;
+ }
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (!result) {
+ if (partial && expression.hasNext()) {
+ part = expression.peek();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ } else {
+ throw new ValidationError("Expected (" + types + ") but found '" + value + "'.", value.line, value.col);
+ }
+ } else if (expression.hasNext()) {
+ part = expression.next();
+ throw new ValidationError("Expected end of value but found '" + part + "'.", part.line, part.col);
+ }
+ }
+
+
+
+};
+/**
+ * Type to use when a validation error occurs.
+ * @class ValidationError
+ * @namespace parserlib.util
+ * @constructor
+ * @param {String} message The error message.
+ * @param {int} line The line at which the error occurred.
+ * @param {int} col The column at which the error occurred.
+ */
+function ValidationError(message, line, col){
+
+ /**
+ * The column at which the error occurred.
+ * @type int
+ * @property col
+ */
+ this.col = col;
+
+ /**
+ * The line at which the error occurred.
+ * @type int
+ * @property line
+ */
+ this.line = line;
+
+ /**
+ * The text representation of the unit.
+ * @type String
+ * @property text
+ */
+ this.message = message;
+
+}
+
+//inherit from Error
+ValidationError.prototype = new Error();
+//This file will likely change a lot! Very experimental!
+/*global Properties, Validation, ValidationError, PropertyValueIterator, console*/
+var ValidationTypes = {
+
+ isLiteral: function (part, literals) {
+ var text = part.text.toString().toLowerCase(),
+ args = literals.split(" | "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found; i++){
+ if (text == args[i].toLowerCase()){
+ found = true;
+ }
+ }
+
+ return found;
+ },
+
+ isSimple: function(type) {
+ return !!this.simple[type];
+ },
+
+ isComplex: function(type) {
+ return !!this.complex[type];
+ },
+
+ /**
+ * Determines if the next part(s) of the given expression
+ * are any of the given types.
+ */
+ isAny: function (expression, types) {
+ var args = types.split(" | "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found && expression.hasNext(); i++){
+ found = this.isType(expression, args[i]);
+ }
+
+ return found;
+ },
+
+ /**
+ * Determines if the next part(s) of the given expression
+ * are one of a group.
+ */
+ isAnyOfGroup: function(expression, types) {
+ var args = types.split(" || "),
+ i, len, found = false;
+
+ for (i=0,len=args.length; i < len && !found; i++){
+ found = this.isType(expression, args[i]);
+ }
+
+ return found ? args[i-1] : false;
+ },
+
+ /**
+ * Determines if the next part(s) of the given expression
+ * are of a given type.
+ */
+ isType: function (expression, type) {
+ var part = expression.peek(),
+ result = false;
+
+ if (type.charAt(0) != "<") {
+ result = this.isLiteral(part, type);
+ if (result) {
+ expression.next();
+ }
+ } else if (this.simple[type]) {
+ result = this.simple[type](part);
+ if (result) {
+ expression.next();
+ }
+ } else {
+ result = this.complex[type](expression);
+ }
+
+ return result;
+ },
+
+
+
+ simple: {
+
+ "<absolute-size>": function(part){
+ return ValidationTypes.isLiteral(part, "xx-small | x-small | small | medium | large | x-large | xx-large");
+ },
+
+ "<attachment>": function(part){
+ return ValidationTypes.isLiteral(part, "scroll | fixed | local");
+ },
+
+ "<attr>": function(part){
+ return part.type == "function" && part.name == "attr";
+ },
+
+ "<bg-image>": function(part){
+ return this["<image>"](part) || this["<gradient>"](part) || part == "none";
+ },
+
+ "<gradient>": function(part) {
+ return part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?(?:repeating\-)?(?:radial\-|linear\-)?gradient/i.test(part);
+ },
+
+ "<box>": function(part){
+ return ValidationTypes.isLiteral(part, "padding-box | border-box | content-box");
+ },
+
+ "<content>": function(part){
+ return part.type == "function" && part.name == "content";
+ },
+
+ "<relative-size>": function(part){
+ return ValidationTypes.isLiteral(part, "smaller | larger");
+ },
+
+ //any identifier
+ "<ident>": function(part){
+ return part.type == "identifier";
+ },
+
+ "<length>": function(part){
+ if (part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(part)){
+ return true;
+ }else{
+ return part.type == "length" || part.type == "number" || part.type == "integer" || part == "0";
+ }
+ },
+
+ "<color>": function(part){
+ return part.type == "color" || part == "transparent";
+ },
+
+ "<number>": function(part){
+ return part.type == "number" || this["<integer>"](part);
+ },
+
+ "<integer>": function(part){
+ return part.type == "integer";
+ },
+
+ "<line>": function(part){
+ return part.type == "integer";
+ },
+
+ "<angle>": function(part){
+ return part.type == "angle";
+ },
+
+ "<uri>": function(part){
+ return part.type == "uri";
+ },
+
+ "<image>": function(part){
+ return this["<uri>"](part);
+ },
+
+ "<percentage>": function(part){
+ return part.type == "percentage" || part == "0";
+ },
+
+ "<border-width>": function(part){
+ return this["<length>"](part) || ValidationTypes.isLiteral(part, "thin | medium | thick");
+ },
+
+ "<border-style>": function(part){
+ return ValidationTypes.isLiteral(part, "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset");
+ },
+
+ "<margin-width>": function(part){
+ return this["<length>"](part) || this["<percentage>"](part) || ValidationTypes.isLiteral(part, "auto");
+ },
+
+ "<padding-width>": function(part){
+ return this["<length>"](part) || this["<percentage>"](part);
+ },
+
+ "<shape>": function(part){
+ return part.type == "function" && (part.name == "rect" || part.name == "inset-rect");
+ },
+
+ "<time>": function(part) {
+ return part.type == "time";
+ }
+ },
+
+ complex: {
+
+ "<bg-position>": function(expression){
+ var types = this,
+ result = false,
+ numeric = "<percentage> | <length>",
+ xDir = "left | right",
+ yDir = "top | bottom",
+ count = 0,
+ hasNext = function() {
+ return expression.hasNext() && expression.peek() != ",";
+ };
+
+ while (expression.peek(count) && expression.peek(count) != ",") {
+ count++;
+ }
+
+/*
+<position> = [
+ [ left | center | right | top | bottom | <percentage> | <length> ]
+|
+ [ left | center | right | <percentage> | <length> ]
+ [ top | center | bottom | <percentage> | <length> ]
+|
+ [ center | [ left | right ] [ <percentage> | <length> ]? ] &&
+ [ center | [ top | bottom ] [ <percentage> | <length> ]? ]
+]
+*/
+
+ if (count < 3) {
+ if (ValidationTypes.isAny(expression, xDir + " | center | " + numeric)) {
+ result = true;
+ ValidationTypes.isAny(expression, yDir + " | center | " + numeric);
+ } else if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, xDir + " | center");
+ }
+ } else {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ result = true;
+ }
+ }
+ } else if (ValidationTypes.isAny(expression, yDir)) {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ result = true;
+ }
+ }
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ if (ValidationTypes.isAny(expression, xDir + " | " + yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ }
+ }
+ }
+
+ return result;
+ },
+
+ "<bg-size>": function(expression){
+ //<bg-size> = [ <length> | <percentage> | auto ]{1,2} | cover | contain
+ var types = this,
+ result = false,
+ numeric = "<percentage> | <length> | auto",
+ part,
+ i, len;
+
+ if (ValidationTypes.isAny(expression, "cover | contain")) {
+ result = true;
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ }
+
+ return result;
+ },
+
+ "<repeat-style>": function(expression){
+ //repeat-x | repeat-y | [repeat | space | round | no-repeat]{1,2}
+ var result = false,
+ values = "repeat | space | round | no-repeat",
+ part;
+
+ if (expression.hasNext()){
+ part = expression.next();
+
+ if (ValidationTypes.isLiteral(part, "repeat-x | repeat-y")) {
+ result = true;
+ } else if (ValidationTypes.isLiteral(part, values)) {
+ result = true;
+
+ if (expression.hasNext() && ValidationTypes.isLiteral(expression.peek(), values)) {
+ expression.next();
+ }
+ }
+ }
+
+ return result;
+
+ },
+
+ "<shadow>": function(expression) {
+ //inset? && [ <length>{2,4} && <color>? ]
+ var result = false,
+ count = 0,
+ inset = false,
+ color = false,
+ part;
+
+ if (expression.hasNext()) {
+
+ if (ValidationTypes.isAny(expression, "inset")){
+ inset = true;
+ }
+
+ if (ValidationTypes.isAny(expression, "<color>")) {
+ color = true;
+ }
+
+ while (ValidationTypes.isAny(expression, "<length>") && count < 4) {
+ count++;
+ }
+
+
+ if (expression.hasNext()) {
+ if (!color) {
+ ValidationTypes.isAny(expression, "<color>");
+ }
+
+ if (!inset) {
+ ValidationTypes.isAny(expression, "inset");
+ }
+
+ }
+
+ result = (count >= 2 && count <= 4);
+
+ }
+
+ return result;
+ },
+
+ "<x-one-radius>": function(expression) {
+ //[ <length> | <percentage> ] [ <length> | <percentage> ]?
+ var result = false,
+ count = 0,
+ numeric = "<length> | <percentage>",
+ part;
+
+ if (ValidationTypes.isAny(expression, numeric)){
+ result = true;
+
+ ValidationTypes.isAny(expression, numeric);
+ }
+
+ return result;
+ }
+ }
+};
+
+
+
+parserlib.css = {
+Colors :Colors,
+Combinator :Combinator,
+Parser :Parser,
+PropertyName :PropertyName,
+PropertyValue :PropertyValue,
+PropertyValuePart :PropertyValuePart,
+MediaFeature :MediaFeature,
+MediaQuery :MediaQuery,
+Selector :Selector,
+SelectorPart :SelectorPart,
+SelectorSubPart :SelectorSubPart,
+Specificity :Specificity,
+TokenStream :TokenStream,
+Tokens :Tokens,
+ValidationError :ValidationError
+};
+})();
+
+
+/**
+ * Main CSSLint object.
+ * @class CSSLint
+ * @static
+ * @extends parserlib.util.EventTarget
+ */
+/*global parserlib, Reporter*/
+var CSSLint = (function(){
+
+ var rules = [],
+ formatters = [],
+ embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
+ api = new parserlib.util.EventTarget();
+
+ api.version = "0.9.10";
+
+ //-------------------------------------------------------------------------
+ // Rule Management
+ //-------------------------------------------------------------------------
+
+ /**
+ * Adds a new rule to the engine.
+ * @param {Object} rule The rule to add.
+ * @method addRule
+ */
+ api.addRule = function(rule){
+ rules.push(rule);
+ rules[rule.id] = rule;
+ };
+
+ /**
+ * Clears all rule from the engine.
+ * @method clearRules
+ */
+ api.clearRules = function(){
+ rules = [];
+ };
+
+ /**
+ * Returns the rule objects.
+ * @return An array of rule objects.
+ * @method getRules
+ */
+ api.getRules = function(){
+ return [].concat(rules).sort(function(a,b){
+ return a.id > b.id ? 1 : 0;
+ });
+ };
+
+ /**
+ * Returns a ruleset configuration object with all current rules.
+ * @return A ruleset object.
+ * @method getRuleset
+ */
+ api.getRuleset = function() {
+ var ruleset = {},
+ i = 0,
+ len = rules.length;
+
+ while (i < len){
+ ruleset[rules[i++].id] = 1; //by default, everything is a warning
+ }
+
+ return ruleset;
+ };
+
+ /**
+ * Returns a ruleset object based on embedded rules.
+ * @param {String} text A string of css containing embedded rules.
+ * @param {Object} ruleset A ruleset object to modify.
+ * @return {Object} A ruleset object.
+ * @method getEmbeddedRuleset
+ */
+ function applyEmbeddedRuleset(text, ruleset){
+ var valueMap,
+ embedded = text && text.match(embeddedRuleset),
+ rules = embedded && embedded[1];
+
+ if (rules) {
+ valueMap = {
+ "true": 2, // true is error
+ "": 1, // blank is warning
+ "false": 0, // false is ignore
+
+ "2": 2, // explicit error
+ "1": 1, // explicit warning
+ "0": 0 // explicit ignore
+ };
+
+ rules.toLowerCase().split(",").forEach(function(rule){
+ var pair = rule.split(":"),
+ property = pair[0] || "",
+ value = pair[1] || "";
+
+ ruleset[property.trim()] = valueMap[value.trim()];
+ });
+ }
+
+ return ruleset;
+ }
+
+ //-------------------------------------------------------------------------
+ // Formatters
+ //-------------------------------------------------------------------------
+
+ /**
+ * Adds a new formatter to the engine.
+ * @param {Object} formatter The formatter to add.
+ * @method addFormatter
+ */
+ api.addFormatter = function(formatter) {
+ // formatters.push(formatter);
+ formatters[formatter.id] = formatter;
+ };
+
+ /**
+ * Retrieves a formatter for use.
+ * @param {String} formatId The name of the format to retrieve.
+ * @return {Object} The formatter or undefined.
+ * @method getFormatter
+ */
+ api.getFormatter = function(formatId){
+ return formatters[formatId];
+ };
+
+ /**
+ * Formats the results in a particular format for a single file.
+ * @param {Object} result The results returned from CSSLint.verify().
+ * @param {String} filename The filename for which the results apply.
+ * @param {String} formatId The name of the formatter to use.
+ * @param {Object} options (Optional) for special output handling.
+ * @return {String} A formatted string for the results.
+ * @method format
+ */
+ api.format = function(results, filename, formatId, options) {
+ var formatter = this.getFormatter(formatId),
+ result = null;
+
+ if (formatter){
+ result = formatter.startFormat();
+ result += formatter.formatResults(results, filename, options || {});
+ result += formatter.endFormat();
+ }
+
+ return result;
+ };
+
+ /**
+ * Indicates if the given format is supported.
+ * @param {String} formatId The ID of the format to check.
+ * @return {Boolean} True if the format exists, false if not.
+ * @method hasFormat
+ */
+ api.hasFormat = function(formatId){
+ return formatters.hasOwnProperty(formatId);
+ };
+
+ //-------------------------------------------------------------------------
+ // Verification
+ //-------------------------------------------------------------------------
+
+ /**
+ * Starts the verification process for the given CSS text.
+ * @param {String} text The CSS text to verify.
+ * @param {Object} ruleset (Optional) List of rules to apply. If null, then
+ * all rules are used. If a rule has a value of 1 then it's a warning,
+ * a value of 2 means it's an error.
+ * @return {Object} Results of the verification.
+ * @method verify
+ */
+ api.verify = function(text, ruleset){
+
+ var i = 0,
+ len = rules.length,
+ reporter,
+ lines,
+ report,
+ parser = new parserlib.css.Parser({ starHack: true, ieFilters: true,
+ underscoreHack: true, strict: false });
+
+ // normalize line endings
+ lines = text.replace(/\n\r?/g, "$split$").split('$split$');
+
+ if (!ruleset){
+ ruleset = this.getRuleset();
+ }
+
+ if (embeddedRuleset.test(text)){
+ ruleset = applyEmbeddedRuleset(text, ruleset);
+ }
+
+ reporter = new Reporter(lines, ruleset);
+
+ ruleset.errors = 2; //always report parsing errors as errors
+ for (i in ruleset){
+ if(ruleset.hasOwnProperty(i) && ruleset[i]){
+ if (rules[i]){
+ rules[i].init(parser, reporter);
+ }
+ }
+ }
+
+
+ //capture most horrible error type
+ try {
+ parser.parse(text);
+ } catch (ex) {
+ reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {});
+ }
+
+ report = {
+ messages : reporter.messages,
+ stats : reporter.stats,
+ ruleset : reporter.ruleset
+ };
+
+ //sort by line numbers, rollups at the bottom
+ report.messages.sort(function (a, b){
+ if (a.rollup && !b.rollup){
+ return 1;
+ } else if (!a.rollup && b.rollup){
+ return -1;
+ } else {
+ return a.line - b.line;
+ }
+ });
+
+ return report;
+ };
+
+ //-------------------------------------------------------------------------
+ // Publish the API
+ //-------------------------------------------------------------------------
+
+ return api;
+
+})();
+/*global CSSLint*/
+/**
+ * An instance of Report is used to report results of the
+ * verification back to the main API.
+ * @class Reporter
+ * @constructor
+ * @param {String[]} lines The text lines of the source.
+ * @param {Object} ruleset The set of rules to work with, including if
+ * they are errors or warnings.
+ */
+function Reporter(lines, ruleset){
+
+ /**
+ * List of messages being reported.
+ * @property messages
+ * @type String[]
+ */
+ this.messages = [];
+
+ /**
+ * List of statistics being reported.
+ * @property stats
+ * @type String[]
+ */
+ this.stats = [];
+
+ /**
+ * Lines of code being reported on. Used to provide contextual information
+ * for messages.
+ * @property lines
+ * @type String[]
+ */
+ this.lines = lines;
+
+ /**
+ * Information about the rules. Used to determine whether an issue is an
+ * error or warning.
+ * @property ruleset
+ * @type Object
+ */
+ this.ruleset = ruleset;
+}
+
+Reporter.prototype = {
+
+ //restore constructor
+ constructor: Reporter,
+
+ /**
+ * Report an error.
+ * @param {String} message The message to store.
+ * @param {int} line The line number.
+ * @param {int} col The column number.
+ * @param {Object} rule The rule this message relates to.
+ * @method error
+ */
+ error: function(message, line, col, rule){
+ this.messages.push({
+ type : "error",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule || {}
+ });
+ },
+
+ /**
+ * Report an warning.
+ * @param {String} message The message to store.
+ * @param {int} line The line number.
+ * @param {int} col The column number.
+ * @param {Object} rule The rule this message relates to.
+ * @method warn
+ * @deprecated Use report instead.
+ */
+ warn: function(message, line, col, rule){
+ this.report(message, line, col, rule);
+ },
+
+ /**
+ * Report an issue.
+ * @param {String} message The message to store.
+ * @param {int} line The line number.
+ * @param {int} col The column number.
+ * @param {Object} rule The rule this message relates to.
+ * @method report
+ */
+ report: function(message, line, col, rule){
+ this.messages.push({
+ type : this.ruleset[rule.id] == 2 ? "error" : "warning",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule
+ });
+ },
+
+ /**
+ * Report some informational text.
+ * @param {String} message The message to store.
+ * @param {int} line The line number.
+ * @param {int} col The column number.
+ * @param {Object} rule The rule this message relates to.
+ * @method info
+ */
+ info: function(message, line, col, rule){
+ this.messages.push({
+ type : "info",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule
+ });
+ },
+
+ /**
+ * Report some rollup error information.
+ * @param {String} message The message to store.
+ * @param {Object} rule The rule this message relates to.
+ * @method rollupError
+ */
+ rollupError: function(message, rule){
+ this.messages.push({
+ type : "error",
+ rollup : true,
+ message : message,
+ rule : rule
+ });
+ },
+
+ /**
+ * Report some rollup warning information.
+ * @param {String} message The message to store.
+ * @param {Object} rule The rule this message relates to.
+ * @method rollupWarn
+ */
+ rollupWarn: function(message, rule){
+ this.messages.push({
+ type : "warning",
+ rollup : true,
+ message : message,
+ rule : rule
+ });
+ },
+
+ /**
+ * Report a statistic.
+ * @param {String} name The name of the stat to store.
+ * @param {Variant} value The value of the stat.
+ * @method stat
+ */
+ stat: function(name, value){
+ this.stats[name] = value;
+ }
+};
+
+//expose for testing purposes
+CSSLint._Reporter = Reporter;
+
+/*global CSSLint*/
+
+/*
+ * Utility functions that make life easier.
+ */
+CSSLint.Util = {
+ /*
+ * Adds all properties from supplier onto receiver,
+ * overwriting if the same name already exists on
+ * reciever.
+ * @param {Object} The object to receive the properties.
+ * @param {Object} The object to provide the properties.
+ * @return {Object} The receiver
+ */
+ mix: function(receiver, supplier){
+ var prop;
+
+ for (prop in supplier){
+ if (supplier.hasOwnProperty(prop)){
+ receiver[prop] = supplier[prop];
+ }
+ }
+
+ return prop;
+ },
+
+ /*
+ * Polyfill for array indexOf() method.
+ * @param {Array} values The array to search.
+ * @param {Variant} value The value to search for.
+ * @return {int} The index of the value if found, -1 if not.
+ */
+ indexOf: function(values, value){
+ if (values.indexOf){
+ return values.indexOf(value);
+ } else {
+ for (var i=0, len=values.length; i < len; i++){
+ if (values[i] === value){
+ return i;
+ }
+ }
+ return -1;
+ }
+ },
+
+ /*
+ * Polyfill for array forEach() method.
+ * @param {Array} values The array to operate on.
+ * @param {Function} func The function to call on each item.
+ * @return {void}
+ */
+ forEach: function(values, func) {
+ if (values.forEach){
+ return values.forEach(func);
+ } else {
+ for (var i=0, len=values.length; i < len; i++){
+ func(values[i], i, values);
+ }
+ }
+ }
+};
+/*global CSSLint*/
+/*
+ * Rule: Don't use adjoining classes (.foo.bar).
+ */
+CSSLint.addRule({
+
+ //rule information
+ id: "adjoining-classes",
+ name: "Disallow adjoining classes",
+ desc: "Don't use adjoining classes.",
+ browsers: "IE6",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ classCount,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ classCount = 0;
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type == "class"){
+ classCount++;
+ }
+ if (classCount > 1){
+ reporter.report("Don't use adjoining classes.", part.line, part.col, rule);
+ }
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+/*global CSSLint*/
+
+/*
+ * Rule: Don't use width or height when using padding or border.
+ */
+CSSLint.addRule({
+
+ //rule information
+ id: "box-model",
+ name: "Beware of broken box size",
+ desc: "Don't use width or height when using padding or border.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ widthProperties = {
+ border: 1,
+ "border-left": 1,
+ "border-right": 1,
+ padding: 1,
+ "padding-left": 1,
+ "padding-right": 1
+ },
+ heightProperties = {
+ border: 1,
+ "border-bottom": 1,
+ "border-top": 1,
+ padding: 1,
+ "padding-bottom": 1,
+ "padding-top": 1
+ },
+ properties,
+ boxSizing = false;
+
+ function startRule(){
+ properties = {};
+ boxSizing = false;
+ }
+
+ function endRule(){
+ var prop, value;
+
+ if (!boxSizing) {
+ if (properties.height){
+ for (prop in heightProperties){
+ if (heightProperties.hasOwnProperty(prop) && properties[prop]){
+ value = properties[prop].value;
+ //special case for padding
+ if (!(prop == "padding" && value.parts.length === 2 && value.parts[0].value === 0)){
+ reporter.report("Using height with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
+ }
+ }
+ }
+ }
+
+ if (properties.width){
+ for (prop in widthProperties){
+ if (widthProperties.hasOwnProperty(prop) && properties[prop]){
+ value = properties[prop].value;
+
+ if (!(prop == "padding" && value.parts.length === 2 && value.parts[1].value === 0)){
+ reporter.report("Using width with " + prop + " can sometimes make elements larger than you expect.", properties[prop].line, properties[prop].col, rule);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ if (heightProperties[name] || widthProperties[name]){
+ if (!/^0\S*$/.test(event.value) && !(name == "border" && event.value == "none")){
+ properties[name] = { line: event.property.line, col: event.property.col, value: event.value };
+ }
+ } else {
+ if (/^(width|height)/i.test(name) && /^(length|percentage)/.test(event.value.parts[0].type)){
+ properties[name] = 1;
+ } else if (name == "box-sizing") {
+ boxSizing = true;
+ }
+ }
+
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ }
+
+});
+/*global CSSLint*/
+
+/*
+ * Rule: box-sizing doesn't work in IE6 and IE7.
+ */
+CSSLint.addRule({
+
+ //rule information
+ id: "box-sizing",
+ name: "Disallow use of box-sizing",
+ desc: "The box-sizing properties isn't supported in IE6 and IE7.",
+ browsers: "IE6, IE7",
+ tags: ["Compatibility"],
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ if (name == "box-sizing"){
+ reporter.report("The box-sizing property isn't supported in IE6 and IE7.", event.line, event.col, rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Use the bulletproof @font-face syntax to avoid 404's in old IE
+ * (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax)
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "bulletproof-font-face",
+ name: "Use the bulletproof @font-face syntax",
+ desc: "Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0,
+ fontFaceRule = false,
+ firstSrc = true,
+ ruleFailed = false,
+ line, col;
+
+ // Mark the start of a @font-face declaration so we only test properties inside it
+ parser.addListener("startfontface", function(event){
+ fontFaceRule = true;
+ });
+
+ parser.addListener("property", function(event){
+ // If we aren't inside an @font-face declaration then just return
+ if (!fontFaceRule) {
+ return;
+ }
+
+ var propertyName = event.property.toString().toLowerCase(),
+ value = event.value.toString();
+
+ // Set the line and col numbers for use in the endfontface listener
+ line = event.line;
+ col = event.col;
+
+ // This is the property that we care about, we can ignore the rest
+ if (propertyName === 'src') {
+ var regex = /^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;
+
+ // We need to handle the advanced syntax with two src properties
+ if (!value.match(regex) && firstSrc) {
+ ruleFailed = true;
+ firstSrc = false;
+ } else if (value.match(regex) && !firstSrc) {
+ ruleFailed = false;
+ }
+ }
+
+
+ });
+
+ // Back to normal rules that we don't need to test
+ parser.addListener("endfontface", function(event){
+ fontFaceRule = false;
+
+ if (ruleFailed) {
+ reporter.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.", line, col, rule);
+ }
+ });
+ }
+});
+/*
+ * Rule: Include all compatible vendor prefixes to reach a wider
+ * range of users.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "compatible-vendor-prefixes",
+ name: "Require compatible vendor prefixes",
+ desc: "Include all compatible vendor prefixes to reach a wider range of users.",
+ browsers: "All",
+
+ //initialization
+ init: function (parser, reporter) {
+ var rule = this,
+ compatiblePrefixes,
+ properties,
+ prop,
+ variations,
+ prefixed,
+ i,
+ len,
+ inKeyFrame = false,
+ arrayPush = Array.prototype.push,
+ applyTo = [];
+
+ // See http://peter.sh/experiments/vendor-prefixed-css-property-overview/ for details
+ compatiblePrefixes = {
+ "animation" : "webkit moz",
+ "animation-delay" : "webkit moz",
+ "animation-direction" : "webkit moz",
+ "animation-duration" : "webkit moz",
+ "animation-fill-mode" : "webkit moz",
+ "animation-iteration-count" : "webkit moz",
+ "animation-name" : "webkit moz",
+ "animation-play-state" : "webkit moz",
+ "animation-timing-function" : "webkit moz",
+ "appearance" : "webkit moz",
+ "border-end" : "webkit moz",
+ "border-end-color" : "webkit moz",
+ "border-end-style" : "webkit moz",
+ "border-end-width" : "webkit moz",
+ "border-image" : "webkit moz o",
+ "border-radius" : "webkit",
+ "border-start" : "webkit moz",
+ "border-start-color" : "webkit moz",
+ "border-start-style" : "webkit moz",
+ "border-start-width" : "webkit moz",
+ "box-align" : "webkit moz ms",
+ "box-direction" : "webkit moz ms",
+ "box-flex" : "webkit moz ms",
+ "box-lines" : "webkit ms",
+ "box-ordinal-group" : "webkit moz ms",
+ "box-orient" : "webkit moz ms",
+ "box-pack" : "webkit moz ms",
+ "box-sizing" : "webkit moz",
+ "box-shadow" : "webkit moz",
+ "column-count" : "webkit moz ms",
+ "column-gap" : "webkit moz ms",
+ "column-rule" : "webkit moz ms",
+ "column-rule-color" : "webkit moz ms",
+ "column-rule-style" : "webkit moz ms",
+ "column-rule-width" : "webkit moz ms",
+ "column-width" : "webkit moz ms",
+ "hyphens" : "epub moz",
+ "line-break" : "webkit ms",
+ "margin-end" : "webkit moz",
+ "margin-start" : "webkit moz",
+ "marquee-speed" : "webkit wap",
+ "marquee-style" : "webkit wap",
+ "padding-end" : "webkit moz",
+ "padding-start" : "webkit moz",
+ "tab-size" : "moz o",
+ "text-size-adjust" : "webkit ms",
+ "transform" : "webkit moz ms o",
+ "transform-origin" : "webkit moz ms o",
+ "transition" : "webkit moz o",
+ "transition-delay" : "webkit moz o",
+ "transition-duration" : "webkit moz o",
+ "transition-property" : "webkit moz o",
+ "transition-timing-function" : "webkit moz o",
+ "user-modify" : "webkit moz",
+ "user-select" : "webkit moz ms",
+ "word-break" : "epub ms",
+ "writing-mode" : "epub ms"
+ };
+
+
+ for (prop in compatiblePrefixes) {
+ if (compatiblePrefixes.hasOwnProperty(prop)) {
+ variations = [];
+ prefixed = compatiblePrefixes[prop].split(' ');
+ for (i = 0, len = prefixed.length; i < len; i++) {
+ variations.push('-' + prefixed[i] + '-' + prop);
+ }
+ compatiblePrefixes[prop] = variations;
+ arrayPush.apply(applyTo, variations);
+ }
+ }
+
+ parser.addListener("startrule", function () {
+ properties = [];
+ });
+
+ parser.addListener("startkeyframes", function (event) {
+ inKeyFrame = event.prefix || true;
+ });
+
+ parser.addListener("endkeyframes", function (event) {
+ inKeyFrame = false;
+ });
+
+ parser.addListener("property", function (event) {
+ var name = event.property;
+ if (CSSLint.Util.indexOf(applyTo, name.text) > -1) {
+
+ // e.g., -moz-transform is okay to be alone in @-moz-keyframes
+ if (!inKeyFrame || typeof inKeyFrame != "string" ||
+ name.text.indexOf("-" + inKeyFrame + "-") !== 0) {
+ properties.push(name);
+ }
+ }
+ });
+
+ parser.addListener("endrule", function (event) {
+ if (!properties.length) {
+ return;
+ }
+
+ var propertyGroups = {},
+ i,
+ len,
+ name,
+ prop,
+ variations,
+ value,
+ full,
+ actual,
+ item,
+ propertiesSpecified;
+
+ for (i = 0, len = properties.length; i < len; i++) {
+ name = properties[i];
+
+ for (prop in compatiblePrefixes) {
+ if (compatiblePrefixes.hasOwnProperty(prop)) {
+ variations = compatiblePrefixes[prop];
+ if (CSSLint.Util.indexOf(variations, name.text) > -1) {
+ if (!propertyGroups[prop]) {
+ propertyGroups[prop] = {
+ full : variations.slice(0),
+ actual : [],
+ actualNodes: []
+ };
+ }
+ if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
+ propertyGroups[prop].actual.push(name.text);
+ propertyGroups[prop].actualNodes.push(name);
+ }
+ }
+ }
+ }
+ }
+
+ for (prop in propertyGroups) {
+ if (propertyGroups.hasOwnProperty(prop)) {
+ value = propertyGroups[prop];
+ full = value.full;
+ actual = value.actual;
+
+ if (full.length > actual.length) {
+ for (i = 0, len = full.length; i < len; i++) {
+ item = full[i];
+ if (CSSLint.Util.indexOf(actual, item) === -1) {
+ propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length == 2) ? actual.join(" and ") : actual.join(", ");
+ reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
+ }
+ }
+
+ }
+ }
+ }
+ });
+ }
+});
+/*
+ * Rule: Certain properties don't play well with certain display values.
+ * - float should not be used with inline-block
+ * - height, width, margin-top, margin-bottom, float should not be used with inline
+ * - vertical-align should not be used with block
+ * - margin, float should not be used with table-*
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "display-property-grouping",
+ name: "Require properties appropriate for display",
+ desc: "Certain properties shouldn't be used with certain display property values.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ var propertiesToCheck = {
+ display: 1,
+ "float": "none",
+ height: 1,
+ width: 1,
+ margin: 1,
+ "margin-left": 1,
+ "margin-right": 1,
+ "margin-bottom": 1,
+ "margin-top": 1,
+ padding: 1,
+ "padding-left": 1,
+ "padding-right": 1,
+ "padding-bottom": 1,
+ "padding-top": 1,
+ "vertical-align": 1
+ },
+ properties;
+
+ function reportProperty(name, display, msg){
+ if (properties[name]){
+ if (typeof propertiesToCheck[name] != "string" || properties[name].value.toLowerCase() != propertiesToCheck[name]){
+ reporter.report(msg || name + " can't be used with display: " + display + ".", properties[name].line, properties[name].col, rule);
+ }
+ }
+ }
+
+ function startRule(){
+ properties = {};
+ }
+
+ function endRule(){
+
+ var display = properties.display ? properties.display.value : null;
+ if (display){
+ switch(display){
+
+ case "inline":
+ //height, width, margin-top, margin-bottom, float should not be used with inline
+ reportProperty("height", display);
+ reportProperty("width", display);
+ reportProperty("margin", display);
+ reportProperty("margin-top", display);
+ reportProperty("margin-bottom", display);
+ reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
+ break;
+
+ case "block":
+ //vertical-align should not be used with block
+ reportProperty("vertical-align", display);
+ break;
+
+ case "inline-block":
+ //float should not be used with inline-block
+ reportProperty("float", display);
+ break;
+
+ default:
+ //margin, float should not be used with table
+ if (display.indexOf("table-") === 0){
+ reportProperty("margin", display);
+ reportProperty("margin-left", display);
+ reportProperty("margin-right", display);
+ reportProperty("margin-top", display);
+ reportProperty("margin-bottom", display);
+ reportProperty("float", display);
+ }
+
+ //otherwise do nothing
+ }
+ }
+
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startkeyframerule", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startpage", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ if (propertiesToCheck[name]){
+ properties[name] = { value: event.value.text, line: event.property.line, col: event.property.col };
+ }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endpage", endRule);
+
+ }
+
+});
+/*
+ * Rule: Disallow duplicate background-images (using url).
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "duplicate-background-images",
+ name: "Disallow duplicate background images",
+ desc: "Every background-image should be unique. Use a common class for e.g. sprites.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ stack = {};
+
+ parser.addListener("property", function(event){
+ var name = event.property.text,
+ value = event.value,
+ i, len;
+
+ if (name.match(/background/i)) {
+ for (i=0, len=value.parts.length; i < len; i++) {
+ if (value.parts[i].type == 'uri') {
+ if (typeof stack[value.parts[i].uri] === 'undefined') {
+ stack[value.parts[i].uri] = event;
+ }
+ else {
+ reporter.report("Background image '" + value.parts[i].uri + "' was used multiple times, first declared at line " + stack[value.parts[i].uri].line + ", col " + stack[value.parts[i].uri].col + ".", event.line, event.col, rule);
+ }
+ }
+ }
+ }
+ });
+ }
+});
+/*
+ * Rule: Duplicate properties must appear one after the other. If an already-defined
+ * property appears somewhere else in the rule, then it's likely an error.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "duplicate-properties",
+ name: "Disallow duplicate properties",
+ desc: "Duplicate properties must appear one after the other.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ properties,
+ lastProperty;
+
+ function startRule(event){
+ properties = {};
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var property = event.property,
+ name = property.text.toLowerCase();
+
+ if (properties[name] && (lastProperty != name || properties[name] == event.value.text)){
+ reporter.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
+ }
+
+ properties[name] = event.value.text;
+ lastProperty = name;
+
+ });
+
+
+ }
+
+});
+/*
+ * Rule: Style rules without any properties defined should be removed.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "empty-rules",
+ name: "Disallow empty rules",
+ desc: "Rules without any properties specified should be removed.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+ parser.addListener("startrule", function(){
+ count=0;
+ });
+
+ parser.addListener("property", function(){
+ count++;
+ });
+
+ parser.addListener("endrule", function(event){
+ var selectors = event.selectors;
+ if (count === 0){
+ reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: There should be no syntax errors. (Duh.)
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "errors",
+ name: "Parsing Errors",
+ desc: "This rule looks for recoverable syntax errors.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("error", function(event){
+ reporter.error(event.message, event.line, event.col, rule);
+ });
+
+ }
+
+});
+
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "fallback-colors",
+ name: "Require fallback colors",
+ desc: "For older browsers that don't support RGBA, HSL, or HSLA, provide a fallback color.",
+ browsers: "IE6,IE7,IE8",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ lastProperty,
+ propertiesToCheck = {
+ color: 1,
+ background: 1,
+ "border-color": 1,
+ "border-top-color": 1,
+ "border-right-color": 1,
+ "border-bottom-color": 1,
+ "border-left-color": 1,
+ border: 1,
+ "border-top": 1,
+ "border-right": 1,
+ "border-bottom": 1,
+ "border-left": 1,
+ "background-color": 1
+ },
+ properties;
+
+ function startRule(event){
+ properties = {};
+ lastProperty = null;
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var property = event.property,
+ name = property.text.toLowerCase(),
+ parts = event.value.parts,
+ i = 0,
+ colorType = "",
+ len = parts.length;
+
+ if(propertiesToCheck[name]){
+ while(i < len){
+ if (parts[i].type == "color"){
+ if ("alpha" in parts[i] || "hue" in parts[i]){
+
+ if (/([^\)]+)\(/.test(parts[i])){
+ colorType = RegExp.$1.toUpperCase();
+ }
+
+ if (!lastProperty || (lastProperty.property.text.toLowerCase() != name || lastProperty.colorType != "compat")){
+ reporter.report("Fallback " + name + " (hex or RGB) should precede " + colorType + " " + name + ".", event.line, event.col, rule);
+ }
+ } else {
+ event.colorType = "compat";
+ }
+ }
+
+ i++;
+ }
+ }
+
+ lastProperty = event;
+ });
+
+ }
+
+});
+/*
+ * Rule: You shouldn't use more than 10 floats. If you do, there's probably
+ * room for some abstraction.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "floats",
+ name: "Disallow too many floats",
+ desc: "This rule tests if the float property is used too many times",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+ var count = 0;
+
+ //count how many times "float" is used
+ parser.addListener("property", function(event){
+ if (event.property.text.toLowerCase() == "float" &&
+ event.value.text.toLowerCase() != "none"){
+ count++;
+ }
+ });
+
+ //report the results
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("floats", count);
+ if (count >= 10){
+ reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Avoid too many @font-face declarations in the same stylesheet.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "font-faces",
+ name: "Don't use too many web fonts",
+ desc: "Too many different web fonts in the same stylesheet.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+
+ parser.addListener("startfontface", function(){
+ count++;
+ });
+
+ parser.addListener("endstylesheet", function(){
+ if (count > 5){
+ reporter.rollupWarn("Too many @font-face declarations (" + count + ").", rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: You shouldn't need more than 9 font-size declarations.
+ */
+
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "font-sizes",
+ name: "Disallow too many font sizes",
+ desc: "Checks the number of font-size declarations.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+ //check for use of "font-size"
+ parser.addListener("property", function(event){
+ if (event.property == "font-size"){
+ count++;
+ }
+ });
+
+ //report the results
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("font-sizes", count);
+ if (count >= 10){
+ reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: When using a vendor-prefixed gradient, make sure to use them all.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "gradients",
+ name: "Require all gradient definitions",
+ desc: "When using a vendor-prefixed gradient, make sure to use them all.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ gradients;
+
+ parser.addListener("startrule", function(){
+ gradients = {
+ moz: 0,
+ webkit: 0,
+ oldWebkit: 0,
+ o: 0
+ };
+ });
+
+ parser.addListener("property", function(event){
+
+ if (/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)){
+ gradients[RegExp.$1] = 1;
+ } else if (/\-webkit\-gradient/i.test(event.value)){
+ gradients.oldWebkit = 1;
+ }
+
+ });
+
+ parser.addListener("endrule", function(event){
+ var missing = [];
+
+ if (!gradients.moz){
+ missing.push("Firefox 3.6+");
+ }
+
+ if (!gradients.webkit){
+ missing.push("Webkit (Safari 5+, Chrome)");
+ }
+
+ if (!gradients.oldWebkit){
+ missing.push("Old Webkit (Safari 4+, Chrome)");
+ }
+
+ if (!gradients.o){
+ missing.push("Opera 11.1+");
+ }
+
+ if (missing.length && missing.length < 4){
+ reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
+ }
+
+ });
+
+ }
+
+});
+/*
+ * Rule: Don't use IDs for selectors.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "ids",
+ name: "Disallow IDs in selectors",
+ desc: "Selectors should not contain IDs.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ idCount,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ idCount = 0;
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type == "id"){
+ idCount++;
+ }
+ }
+ }
+ }
+
+ if (idCount == 1){
+ reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
+ } else if (idCount > 1){
+ reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
+ }
+ }
+
+ });
+ }
+
+});
+/*
+ * Rule: Don't use @import, use <link> instead.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "import",
+ name: "Disallow @import",
+ desc: "Don't use @import, use <link> instead.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("import", function(event){
+ reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
+ });
+
+ }
+
+});
+/*
+ * Rule: Make sure !important is not overused, this could lead to specificity
+ * war. Display a warning on !important declarations, an error if it's
+ * used more at least 10 times.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "important",
+ name: "Disallow !important",
+ desc: "Be careful when using !important declaration",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+ //warn that important is used and increment the declaration counter
+ parser.addListener("property", function(event){
+ if (event.important === true){
+ count++;
+ reporter.report("Use of !important", event.line, event.col, rule);
+ }
+ });
+
+ //if there are more than 10, show an error
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("important", count);
+ if (count >= 10){
+ reporter.rollupWarn("Too many !important declarations (" + count + "), try to use less than 10 to avoid specificity issues.", rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Properties should be known (listed in CSS3 specification) or
+ * be a vendor-prefixed property.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "known-properties",
+ name: "Require use of known properties",
+ desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ // the check is handled entirely by the parser-lib (https://github.com/nzakas/parser-lib)
+ if (event.invalid) {
+ reporter.report(event.invalid.message, event.line, event.col, rule);
+ }
+
+ });
+ }
+
+});
+/*
+ * Rule: outline: none or outline: 0 should only be used in a :focus rule
+ * and only if there are other properties in the same rule.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "outline-none",
+ name: "Disallow outline: none",
+ desc: "Use of outline: none or outline: 0 should be limited to :focus rules.",
+ browsers: "All",
+ tags: ["Accessibility"],
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ lastRule;
+
+ function startRule(event){
+ if (event.selectors){
+ lastRule = {
+ line: event.line,
+ col: event.col,
+ selectors: event.selectors,
+ propCount: 0,
+ outline: false
+ };
+ } else {
+ lastRule = null;
+ }
+ }
+
+ function endRule(event){
+ if (lastRule){
+ if (lastRule.outline){
+ if (lastRule.selectors.toString().toLowerCase().indexOf(":focus") == -1){
+ reporter.report("Outlines should only be modified using :focus.", lastRule.line, lastRule.col, rule);
+ } else if (lastRule.propCount == 1) {
+ reporter.report("Outlines shouldn't be hidden unless other visual changes are made.", lastRule.line, lastRule.col, rule);
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase(),
+ value = event.value;
+
+ if (lastRule){
+ lastRule.propCount++;
+ if (name == "outline" && (value == "none" || value == "0")){
+ lastRule.outline = true;
+ }
+ }
+
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+
+ }
+
+});
+/*
+ * Rule: Don't use classes or IDs with elements (a.foo or a#foo).
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "overqualified-elements",
+ name: "Disallow overqualified elements",
+ desc: "Don't use classes or IDs with elements (a.foo or a#foo).",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ classes = {};
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (part.elementName && modifier.type == "id"){
+ reporter.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
+ } else if (modifier.type == "class"){
+
+ if (!classes[modifier]){
+ classes[modifier] = [];
+ }
+ classes[modifier].push({ modifier: modifier, part: part });
+ }
+ }
+ }
+ }
+ }
+ });
+
+ parser.addListener("endstylesheet", function(){
+
+ var prop;
+ for (prop in classes){
+ if (classes.hasOwnProperty(prop)){
+
+ //one use means that this is overqualified
+ if (classes[prop].length == 1 && classes[prop][0].part.elementName){
+ reporter.report("Element (" + classes[prop][0].part + ") is overqualified, just use " + classes[prop][0].modifier + " without element name.", classes[prop][0].part.line, classes[prop][0].part.col, rule);
+ }
+ }
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Headings (h1-h6) should not be qualified (namespaced).
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "qualified-headings",
+ name: "Disallow qualified headings",
+ desc: "Headings should not be qualified (namespaced).",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ i, j;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0){
+ reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Selectors that look like regular expressions are slow and should be avoided.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "regex-selectors",
+ name: "Disallow selectors that look like regexs",
+ desc: "Selectors that look like regular expressions are slow and should be avoided.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type == "attribute"){
+ if (/([\~\|\^\$\*]=)/.test(modifier)){
+ reporter.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
+ }
+ }
+
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Total number of rules should not exceed x.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "rules-count",
+ name: "Rules Count",
+ desc: "Track how many rules there are.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+ //count each rule
+ parser.addListener("startrule", function(){
+ count++;
+ });
+
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("rule-count", count);
+ });
+ }
+
+});
+/*
+ * Rule: Warn people with approaching the IE 4095 limit
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "selector-max-approaching",
+ name: "Warn when approaching the 4095 selector limit for IE",
+ desc: "Will warn when selector count is >= 3800 selectors.",
+ browsers: "IE",
+
+ //initialization
+ init: function(parser, reporter) {
+ var rule = this, count = 0;
+
+ parser.addListener('startrule', function(event) {
+ count += event.selectors.length;
+ });
+
+ parser.addListener("endstylesheet", function() {
+ if (count >= 3800) {
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Warn people past the IE 4095 limit
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "selector-max",
+ name: "Error when past the 4095 selector limit for IE",
+ desc: "Will error when selector count is > 4095.",
+ browsers: "IE",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this, count = 0;
+
+ parser.addListener('startrule',function(event) {
+ count += event.selectors.length;
+ });
+
+ parser.addListener("endstylesheet", function() {
+ if (count > 4095) {
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Use shorthand properties where possible.
+ *
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "shorthand",
+ name: "Require shorthand properties",
+ desc: "Use shorthand properties where possible.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ prop, i, len,
+ propertiesToCheck = {},
+ properties,
+ mapping = {
+ "margin": [
+ "margin-top",
+ "margin-bottom",
+ "margin-left",
+ "margin-right"
+ ],
+ "padding": [
+ "padding-top",
+ "padding-bottom",
+ "padding-left",
+ "padding-right"
+ ]
+ };
+
+ //initialize propertiesToCheck
+ for (prop in mapping){
+ if (mapping.hasOwnProperty(prop)){
+ for (i=0, len=mapping[prop].length; i < len; i++){
+ propertiesToCheck[mapping[prop][i]] = prop;
+ }
+ }
+ }
+
+ function startRule(event){
+ properties = {};
+ }
+
+ //event handler for end of rules
+ function endRule(event){
+
+ var prop, i, len, total;
+
+ //check which properties this rule has
+ for (prop in mapping){
+ if (mapping.hasOwnProperty(prop)){
+ total=0;
+
+ for (i=0, len=mapping[prop].length; i < len; i++){
+ total += properties[mapping[prop][i]] ? 1 : 0;
+ }
+
+ if (total == mapping[prop].length){
+ reporter.report("The properties " + mapping[prop].join(", ") + " can be replaced by " + prop + ".", event.line, event.col, rule);
+ }
+ }
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+
+ //check for use of "font-size"
+ parser.addListener("property", function(event){
+ var name = event.property.toString().toLowerCase(),
+ value = event.value.parts[0].value;
+
+ if (propertiesToCheck[name]){
+ properties[name] = 1;
+ }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+
+ }
+
+});
+/*
+ * Rule: Don't use properties with a star prefix.
+ *
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "star-property-hack",
+ name: "Disallow properties with a star prefix",
+ desc: "Checks for the star property hack (targets IE6/7)",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ //check if property name starts with "*"
+ parser.addListener("property", function(event){
+ var property = event.property;
+
+ if (property.hack == "*") {
+ reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+/*
+ * Rule: Don't use text-indent for image replacement if you need to support rtl.
+ *
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "text-indent",
+ name: "Disallow negative text-indent",
+ desc: "Checks for text indent less than -99px",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ textIndent,
+ direction;
+
+
+ function startRule(event){
+ textIndent = false;
+ direction = "inherit";
+ }
+
+ //event handler for end of rules
+ function endRule(event){
+ if (textIndent && direction != "ltr"){
+ reporter.report("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set direction for that item to ltr.", textIndent.line, textIndent.col, rule);
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+
+ //check for use of "font-size"
+ parser.addListener("property", function(event){
+ var name = event.property.toString().toLowerCase(),
+ value = event.value;
+
+ if (name == "text-indent" && value.parts[0].value < -99){
+ textIndent = event.property;
+ } else if (name == "direction" && value == "ltr"){
+ direction = "ltr";
+ }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+
+ }
+
+});
+/*
+ * Rule: Don't use properties with a underscore prefix.
+ *
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "underscore-property-hack",
+ name: "Disallow properties with an underscore prefix",
+ desc: "Checks for the underscore property hack (targets IE6)",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ //check if property name starts with "_"
+ parser.addListener("property", function(event){
+ var property = event.property;
+
+ if (property.hack == "_") {
+ reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+/*
+ * Rule: Headings (h1-h6) should be defined only once.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "unique-headings",
+ name: "Headings should only be defined once",
+ desc: "Headings should be defined only once.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ var headings = {
+ h1: 0,
+ h2: 0,
+ h3: 0,
+ h4: 0,
+ h5: 0,
+ h6: 0
+ };
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ pseudo,
+ i, j;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ part = selector.parts[selector.parts.length-1];
+
+ if (part.elementName && /(h[1-6])/i.test(part.elementName.toString())){
+
+ for (j=0; j < part.modifiers.length; j++){
+ if (part.modifiers[j].type == "pseudo"){
+ pseudo = true;
+ break;
+ }
+ }
+
+ if (!pseudo){
+ headings[RegExp.$1]++;
+ if (headings[RegExp.$1] > 1) {
+ reporter.report("Heading (" + part.elementName + ") has already been defined.", part.line, part.col, rule);
+ }
+ }
+ }
+ }
+ });
+
+ parser.addListener("endstylesheet", function(event){
+ var prop,
+ messages = [];
+
+ for (prop in headings){
+ if (headings.hasOwnProperty(prop)){
+ if (headings[prop] > 1){
+ messages.push(headings[prop] + " " + prop + "s");
+ }
+ }
+ }
+
+ if (messages.length){
+ reporter.rollupWarn("You have " + messages.join(", ") + " defined in this stylesheet.", rule);
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Don't use universal selector because it's slow.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "universal-selector",
+ name: "Disallow universal selector",
+ desc: "The universal selector (*) is known to be slow.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ part = selector.parts[selector.parts.length-1];
+ if (part.elementName == "*"){
+ reporter.report(rule.desc, part.line, part.col, rule);
+ }
+ }
+ });
+ }
+
+});
+/*
+ * Rule: Don't use unqualified attribute selectors because they're just like universal selectors.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "unqualified-attributes",
+ name: "Disallow unqualified attribute selectors",
+ desc: "Unqualified attribute selectors are known to be slow.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ part = selector.parts[selector.parts.length-1];
+ if (part.type == parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type == "attribute" && (!part.elementName || part.elementName == "*")){
+ reporter.report(rule.desc, part.line, part.col, rule);
+ }
+ }
+ }
+
+ }
+ });
+ }
+
+});
+/*
+ * Rule: When using a vendor-prefixed property, make sure to
+ * include the standard one.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "vendor-prefix",
+ name: "Require standard property with vendor prefix",
+ desc: "When using a vendor-prefixed property, make sure to include the standard one.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this,
+ properties,
+ num,
+ propertiesToCheck = {
+ "-webkit-border-radius": "border-radius",
+ "-webkit-border-top-left-radius": "border-top-left-radius",
+ "-webkit-border-top-right-radius": "border-top-right-radius",
+ "-webkit-border-bottom-left-radius": "border-bottom-left-radius",
+ "-webkit-border-bottom-right-radius": "border-bottom-right-radius",
+
+ "-o-border-radius": "border-radius",
+ "-o-border-top-left-radius": "border-top-left-radius",
+ "-o-border-top-right-radius": "border-top-right-radius",
+ "-o-border-bottom-left-radius": "border-bottom-left-radius",
+ "-o-border-bottom-right-radius": "border-bottom-right-radius",
+
+ "-moz-border-radius": "border-radius",
+ "-moz-border-radius-topleft": "border-top-left-radius",
+ "-moz-border-radius-topright": "border-top-right-radius",
+ "-moz-border-radius-bottomleft": "border-bottom-left-radius",
+ "-moz-border-radius-bottomright": "border-bottom-right-radius",
+
+ "-moz-column-count": "column-count",
+ "-webkit-column-count": "column-count",
+
+ "-moz-column-gap": "column-gap",
+ "-webkit-column-gap": "column-gap",
+
+ "-moz-column-rule": "column-rule",
+ "-webkit-column-rule": "column-rule",
+
+ "-moz-column-rule-style": "column-rule-style",
+ "-webkit-column-rule-style": "column-rule-style",
+
+ "-moz-column-rule-color": "column-rule-color",
+ "-webkit-column-rule-color": "column-rule-color",
+
+ "-moz-column-rule-width": "column-rule-width",
+ "-webkit-column-rule-width": "column-rule-width",
+
+ "-moz-column-width": "column-width",
+ "-webkit-column-width": "column-width",
+
+ "-webkit-column-span": "column-span",
+ "-webkit-columns": "columns",
+
+ "-moz-box-shadow": "box-shadow",
+ "-webkit-box-shadow": "box-shadow",
+
+ "-moz-transform" : "transform",
+ "-webkit-transform" : "transform",
+ "-o-transform" : "transform",
+ "-ms-transform" : "transform",
+
+ "-moz-transform-origin" : "transform-origin",
+ "-webkit-transform-origin" : "transform-origin",
+ "-o-transform-origin" : "transform-origin",
+ "-ms-transform-origin" : "transform-origin",
+
+ "-moz-box-sizing" : "box-sizing",
+ "-webkit-box-sizing" : "box-sizing",
+
+ "-moz-user-select" : "user-select",
+ "-khtml-user-select" : "user-select",
+ "-webkit-user-select" : "user-select"
+ };
+
+ //event handler for beginning of rules
+ function startRule(){
+ properties = {};
+ num=1;
+ }
+
+ //event handler for end of rules
+ function endRule(event){
+ var prop,
+ i, len,
+ standard,
+ needed,
+ actual,
+ needsStandard = [];
+
+ for (prop in properties){
+ if (propertiesToCheck[prop]){
+ needsStandard.push({ actual: prop, needed: propertiesToCheck[prop]});
+ }
+ }
+
+ for (i=0, len=needsStandard.length; i < len; i++){
+ needed = needsStandard[i].needed;
+ actual = needsStandard[i].actual;
+
+ if (!properties[needed]){
+ reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
+ } else {
+ //make sure standard property is last
+ if (properties[needed][0].pos < properties[actual][0].pos){
+ reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
+ }
+ }
+ }
+
+ }
+
+ parser.addListener("startrule", startRule);
+ parser.addListener("startfontface", startRule);
+ parser.addListener("startpage", startRule);
+ parser.addListener("startpagemargin", startRule);
+ parser.addListener("startkeyframerule", startRule);
+
+ parser.addListener("property", function(event){
+ var name = event.property.text.toLowerCase();
+
+ if (!properties[name]){
+ properties[name] = [];
+ }
+
+ properties[name].push({ name: event.property, value : event.value, pos:num++ });
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ }
+
+});
+/*
+ * Rule: You don't need to specify units when a value is 0.
+ */
+/*global CSSLint*/
+CSSLint.addRule({
+
+ //rule information
+ id: "zero-units",
+ name: "Disallow units for 0 values",
+ desc: "You don't need to specify units when a value is 0.",
+ browsers: "All",
+
+ //initialization
+ init: function(parser, reporter){
+ var rule = this;
+
+ //count how many times "float" is used
+ parser.addListener("property", function(event){
+ var parts = event.value.parts,
+ i = 0,
+ len = parts.length;
+
+ while(i < len){
+ if ((parts[i].units || parts[i].type == "percentage") && parts[i].value === 0 && parts[i].type != "time"){
+ reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
+ }
+ i++;
+ }
+
+ });
+
+ }
+
+});
+/*global CSSLint*/
+(function() {
+
+ /**
+ * Replace special characters before write to output.
+ *
+ * Rules:
+ * - single quotes is the escape sequence for double-quotes
+ * - &amp; is the escape sequence for &
+ * - &lt; is the escape sequence for <
+ * - &gt; is the escape sequence for >
+ *
+ * @param {String} message to escape
+ * @return escaped message as {String}
+ */
+ var xmlEscape = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+
+ return str.replace(/[\"&><]/g, function(match) {
+ switch (match) {
+ case "\"":
+ return "&quot;";
+ case "&":
+ return "&amp;";
+ case "<":
+ return "&lt;";
+ case ">":
+ return "&gt;";
+ }
+ });
+ };
+
+ CSSLint.addFormatter({
+ //format information
+ id: "checkstyle-xml",
+ name: "Checkstyle XML format",
+
+ /**
+ * Return opening root XML tag.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><checkstyle>";
+ },
+
+ /**
+ * Return closing root XML tag.
+ * @return {String} to append after all results
+ */
+ endFormat: function(){
+ return "</checkstyle>";
+ },
+
+ /**
+ * Returns message when there is a file read error.
+ * @param {String} filename The name of the file that caused the error.
+ * @param {String} message The error message
+ * @return {String} The error message.
+ */
+ readError: function(filename, message) {
+ return "<file name=\"" + xmlEscape(filename) + "\"><error line=\"0\" column=\"0\" severty=\"error\" message=\"" + xmlEscape(message) + "\"></error></file>";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (UNUSED for now) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = [];
+
+ /**
+ * Generate a source string for a rule.
+ * Checkstyle source strings usually resemble Java class names e.g
+ * net.csslint.SomeRuleName
+ * @param {Object} rule
+ * @return rule source as {String}
+ */
+ var generateSource = function(rule) {
+ if (!rule || !('name' in rule)) {
+ return "";
+ }
+ return 'net.csslint.' + rule.name.replace(/\s/g,'');
+ };
+
+
+
+ if (messages.length > 0) {
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message, i) {
+ //ignore rollups for now
+ if (!message.rollup) {
+ output.push("<error line=\"" + message.line + "\" column=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " message=\"" + xmlEscape(message.message) + "\" source=\"" + generateSource(message.rule) +"\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+ });
+
+}());
+/*global CSSLint*/
+CSSLint.addFormatter({
+ //format information
+ id: "compact",
+ name: "Compact, 'porcelain' format",
+
+ /**
+ * Return content to be printed before all file results.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function() {
+ return "";
+ },
+
+ /**
+ * Return content to be printed after all file results.
+ * @return {String} to append after all results
+ */
+ endFormat: function() {
+ return "";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (Optional) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = "";
+ options = options || {};
+
+ /**
+ * Capitalize and return given string.
+ * @param str {String} to capitalize
+ * @return {String} capitalized
+ */
+ var capitalize = function(str) {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+ };
+
+ if (messages.length === 0) {
+ return options.quiet ? "" : filename + ": Lint Free!";
+ }
+
+ CSSLint.Util.forEach(messages, function(message, i) {
+ if (message.rollup) {
+ output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
+ } else {
+ output += filename + ": " + "line " + message.line +
+ ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + "\n";
+ }
+ });
+
+ return output;
+ }
+});
+/*global CSSLint*/
+CSSLint.addFormatter({
+ //format information
+ id: "csslint-xml",
+ name: "CSSLint XML format",
+
+ /**
+ * Return opening root XML tag.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><csslint>";
+ },
+
+ /**
+ * Return closing root XML tag.
+ * @return {String} to append after all results
+ */
+ endFormat: function(){
+ return "</csslint>";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (UNUSED for now) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = [];
+
+ /**
+ * Replace special characters before write to output.
+ *
+ * Rules:
+ * - single quotes is the escape sequence for double-quotes
+ * - &amp; is the escape sequence for &
+ * - &lt; is the escape sequence for <
+ * - &gt; is the escape sequence for >
+ *
+ * @param {String} message to escape
+ * @return escaped message as {String}
+ */
+ var escapeSpecialCharacters = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+ return str.replace(/\"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ };
+
+ if (messages.length > 0) {
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message, i) {
+ if (message.rollup) {
+ output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ } else {
+ output.push("<issue line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+});
+/*global CSSLint*/
+CSSLint.addFormatter({
+ //format information
+ id: "junit-xml",
+ name: "JUNIT XML format",
+
+ /**
+ * Return opening root XML tag.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuites>";
+ },
+
+ /**
+ * Return closing root XML tag.
+ * @return {String} to append after all results
+ */
+ endFormat: function() {
+ return "</testsuites>";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (UNUSED for now) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+
+ var messages = results.messages,
+ output = [],
+ tests = {
+ 'error': 0,
+ 'failure': 0
+ };
+
+ /**
+ * Generate a source string for a rule.
+ * JUNIT source strings usually resemble Java class names e.g
+ * net.csslint.SomeRuleName
+ * @param {Object} rule
+ * @return rule source as {String}
+ */
+ var generateSource = function(rule) {
+ if (!rule || !('name' in rule)) {
+ return "";
+ }
+ return 'net.csslint.' + rule.name.replace(/\s/g,'');
+ };
+
+ /**
+ * Replace special characters before write to output.
+ *
+ * Rules:
+ * - single quotes is the escape sequence for double-quotes
+ * - &lt; is the escape sequence for <
+ * - &gt; is the escape sequence for >
+ *
+ * @param {String} message to escape
+ * @return escaped message as {String}
+ */
+ var escapeSpecialCharacters = function(str) {
+
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+
+ return str.replace(/\"/g, "'").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+
+ };
+
+ if (messages.length > 0) {
+
+ messages.forEach(function (message, i) {
+
+ // since junit has no warning class
+ // all issues as errors
+ var type = message.type === 'warning' ? 'error' : message.type;
+
+ //ignore rollups for now
+ if (!message.rollup) {
+
+ // build the test case seperately, once joined
+ // we'll add it to a custom array filtered by type
+ output.push("<testcase time=\"0\" name=\"" + generateSource(message.rule) + "\">");
+ output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\"><![CDATA[" + message.line + ':' + message.col + ':' + escapeSpecialCharacters(message.evidence) + "]]></" + type + ">");
+ output.push("</testcase>");
+
+ tests[type] += 1;
+
+ }
+
+ });
+
+ output.unshift("<testsuite time=\"0\" tests=\"" + messages.length + "\" skipped=\"0\" errors=\"" + tests.error + "\" failures=\"" + tests.failure + "\" package=\"net.csslint\" name=\"" + filename + "\">");
+ output.push("</testsuite>");
+
+ }
+
+ return output.join("");
+
+ }
+});
+/*global CSSLint*/
+CSSLint.addFormatter({
+ //format information
+ id: "lint-xml",
+ name: "Lint XML format",
+
+ /**
+ * Return opening root XML tag.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><lint>";
+ },
+
+ /**
+ * Return closing root XML tag.
+ * @return {String} to append after all results
+ */
+ endFormat: function(){
+ return "</lint>";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (UNUSED for now) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = [];
+
+ /**
+ * Replace special characters before write to output.
+ *
+ * Rules:
+ * - single quotes is the escape sequence for double-quotes
+ * - &amp; is the escape sequence for &
+ * - &lt; is the escape sequence for <
+ * - &gt; is the escape sequence for >
+ *
+ * @param {String} message to escape
+ * @return escaped message as {String}
+ */
+ var escapeSpecialCharacters = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+ return str.replace(/\"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ };
+
+ if (messages.length > 0) {
+
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message, i) {
+ if (message.rollup) {
+ output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ } else {
+ output.push("<issue line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+});
+/*global CSSLint*/
+CSSLint.addFormatter({
+ //format information
+ id: "text",
+ name: "Plain Text",
+
+ /**
+ * Return content to be printed before all file results.
+ * @return {String} to prepend before all results
+ */
+ startFormat: function() {
+ return "";
+ },
+
+ /**
+ * Return content to be printed after all file results.
+ * @return {String} to append after all results
+ */
+ endFormat: function() {
+ return "";
+ },
+
+ /**
+ * Given CSS Lint results for a file, return output for this format.
+ * @param results {Object} with error and warning messages
+ * @param filename {String} relative file path
+ * @param options {Object} (Optional) specifies special handling of output
+ * @return {String} output for results
+ */
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = "";
+ options = options || {};
+
+ if (messages.length === 0) {
+ return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + ".";
+ }
+
+ output = "\n\ncsslint: There are " + messages.length + " problems in " + filename + ".";
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos === -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+ CSSLint.Util.forEach(messages, function (message, i) {
+ output = output + "\n\n" + shortFilename;
+ if (message.rollup) {
+ output += "\n" + (i+1) + ": " + message.type;
+ output += "\n" + message.message;
+ } else {
+ output += "\n" + (i+1) + ": " + message.type + " at line " + message.line + ", col " + message.col;
+ output += "\n" + message.message;
+ output += "\n" + message.evidence;
+ }
+ });
+
+ return output;
+ }
+});
+
+exports.CSSLint = CSSLint;
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/css_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/css_highlight_rules.js
new file mode 100644
index 000000000..12b3d8fa4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css_highlight_rules.js
@@ -0,0 +1,179 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+
+/* All exports are for Stylus highlighter */
+var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
+var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
+var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
+var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
+var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
+
+var CssHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": supportFunction,
+ "support.constant": supportConstant,
+ "support.type": supportType,
+ "support.constant.color": supportConstantColor,
+ "support.constant.fonts": supportConstantFonts
+ }, "text", true);
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "@.*?{",
+ push: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media" : [{
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ push: "ruleset"
+ }, {
+ token: "string",
+ regex: "\\}",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "comment" : [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }],
+
+ "ruleset" : [
+ {
+ token : "paren.rparen",
+ regex : "\\}",
+ next: "pop"
+ }, {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ push : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : ["constant.numeric", "keyword"],
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : pseudoClasses
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/css_test.js b/src/fauxton/assets/js/libs/ace/mode/css_test.js
new file mode 100644
index 000000000..2ccb177d6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css_test.js
@@ -0,0 +1,78 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var CssMode = require("./css").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+
+ name: "CSS",
+
+ setUp : function() {
+ this.mode = new CssMode();
+ },
+
+ "test: toggle comment lines" : function() {
+ var session = new EditSession([" abc", "cde", "fg"].join("\n"));
+
+ var comment = this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal(["/* abc*/", "/*cde*/", "fg"].join("\n"), session.toString());
+ },
+
+
+ "test: lines should keep indentation" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc", " "));
+ assert.equal("\t", this.mode.getNextLineIndent("start", "\tabc", " "));
+ },
+
+ "test: new line after { should increase indent" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc{", " "));
+ assert.equal("\t ", this.mode.getNextLineIndent("start", "\tabc { ", " "));
+ },
+
+ "test: no indent increase after { in a comment" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " /*{", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", " /*{ ", " "));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/css_worker.js b/src/fauxton/assets/js/libs/ace/mode/css_worker.js
new file mode 100644
index 000000000..e5ef2eb1c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css_worker.js
@@ -0,0 +1,95 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var CSSLint = require("./css/csslint").CSSLint;
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.ruleset = null;
+ this.setDisabledRules("ids");
+ this.setInfoRules("adjoining-classes|qualified-headings|zero-units|gradients|import|outline-none");
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+ this.setInfoRules = function(ruleNames) {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ this.infoRules = lang.arrayToMap(ruleNames);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.setDisabledRules = function(ruleNames) {
+ if (!ruleNames) {
+ this.ruleset = null;
+ } else {
+ if (typeof ruleNames == "string")
+ ruleNames = ruleNames.split("|");
+ var all = {};
+
+ CSSLint.getRules().forEach(function(x){
+ all[x.id] = true;
+ });
+ ruleNames.forEach(function(x) {
+ delete all[x];
+ });
+
+ this.ruleset = all;
+ }
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var infoRules = this.infoRules;
+
+ var result = CSSLint.verify(value, this.ruleset);
+ this.sender.emit("csslint", result.messages.map(function(msg) {
+ return {
+ row: msg.line - 1,
+ column: msg.col - 1,
+ text: msg.message,
+ type: infoRules[msg.rule.id] ? "info" : msg.type,
+ rule: msg.rule.name
+ }
+ }));
+ };
+
+}).call(Worker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/css_worker_test.js b/src/fauxton/assets/js/libs/ace/mode/css_worker_test.js
new file mode 100644
index 000000000..5d5243e27
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/css_worker_test.js
@@ -0,0 +1,68 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+var Worker = require("./css_worker").Worker;
+
+
+module.exports = {
+ setUp : function() {
+ this.sender = {
+ on: function() {},
+ callback: function(data, id) {
+ this.data = data;
+ },
+ events: [],
+ emit: function(type, e) {
+ this.events.push([type, e]);
+ }
+ };
+ },
+
+ "test check for syntax error": function() {
+ var worker = new Worker(this.sender);
+ worker.setValue("Juhu Kinners");
+ worker.deferredUpdate.call();
+ assert.equal(this.sender.events[0][1][0].type, "error");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/curly.js b/src/fauxton/assets/js/libs/ace/mode/curly.js
new file mode 100644
index 000000000..c98ab2e97
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/curly.js
@@ -0,0 +1,63 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Libo Cannici <libo AT zendesk DOT com>
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+// defines the parent mode
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+// defines the language specific highlighters and folding rules
+var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = CurlyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/curly_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/curly_highlight_rules.js
new file mode 100644
index 000000000..92e6f539f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/curly_highlight_rules.js
@@ -0,0 +1,66 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Libo Cannici <libo AT zendesk DOT com>
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+
+var CurlyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token: "variable",
+ regex: "{{",
+ push: "curly-start"
+ });
+
+ this.$rules["curly-start"] = [{
+ token: "variable",
+ regex: "}}",
+ next: "pop"
+ }];
+
+ this.normalizeRules();
+};
+
+oop.inherits(CurlyHighlightRules, HtmlHighlightRules);
+
+exports.CurlyHighlightRules = CurlyHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/d.js b/src/fauxton/assets/js/libs/ace/mode/d.js
new file mode 100644
index 000000000..26803662e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/d.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var DHighlightRules = require("./d_highlight_rules").DHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "/\\+";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/d_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/d_highlight_rules.js
new file mode 100644
index 000000000..d0879feed
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/d_highlight_rules.js
@@ -0,0 +1,318 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from G:\Program Files\sublime2\Data\Packages\D\D.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'punctuation.definition.comment.d', regex: '/\\*\\*/' },
+ { include: 'text.html.javadoc' },
+ { token:
+ [ 'meta.definition.class.d',
+ 'storage.modifier.d',
+ 'storage.type.structure.d',
+ 'meta.definition.class.d',
+ 'entity.name.type.class.d',
+ 'meta.definition.class.d',
+ 'meta.definition.class.d',
+ 'storage.type.template.d',
+ 'meta.definition.class.d',
+ 'meta.definition.class.d',
+ 'meta.definition.class.d',
+ 'punctuation.separator.inheritance.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d',
+ 'meta.definition.class.d',
+ 'entity.other.inherited-class.d' ],
+ regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(class|interface)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)(?:(\\s*)(:)(\\s*)(\\w+)(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?)?',
+ push:
+ [ { token: 'meta.definition.class.d', regex: '(?={)', next: 'pop' },
+ { token: 'storage.modifier.d',
+ regex: '\\b(?:_|:)\\b',
+ push:
+ [ { token: [], regex: '(?={)', next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.definition.class.extends.d' } ] },
+ { defaultToken: 'meta.definition.class.d' } ] },
+ { token:
+ [ 'meta.definition.struct.d',
+ 'storage.modifier.d',
+ 'storage.type.structure.d',
+ 'meta.definition.struct.d',
+ 'entity.name.type.struct.d',
+ 'meta.definition.struct.d',
+ 'meta.definition.struct.d',
+ 'storage.type.template.d',
+ 'meta.definition.struct.d',
+ 'meta.definition.struct.d' ],
+ regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(struct)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)',
+ push:
+ [ { token: 'meta.definition.struct.d',
+ regex: '(?={)',
+ next: 'pop' },
+ { token: 'storage.modifier.d',
+ regex: '\\b(?:_|:)\\b',
+ push:
+ [ { token: [], regex: '(?={)', next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.definition.class.extends.d' } ] },
+ { defaultToken: 'meta.definition.struct.d' } ] },
+ { token:
+ [ 'meta.definition.constructor.d',
+ 'storage.modifier.d',
+ 'entity.name.function.constructor.d',
+ 'meta.definition.constructor.d' ],
+ regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(\\bthis)(\\s*)(?!.*;)(?=\\()' },
+ { token:
+ [ 'storage.modifier.d',
+ 'entity.name.function.destructor.d',
+ 'meta.definition.destructor.d',
+ 'meta.definition.destructor.d' ],
+ regex: '(?:^|)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(~this)(\\s*)(\\()',
+ TODO: '(?<!else|new|=) were disallowed in original regex'},
+ { token:
+ [ 'meta.definition.method.d',
+ 'storage.modifier.d',
+ 'storage.type.structure.d',
+ 'meta.definition.method.d',
+ 'entity.name.function.d',
+ 'meta.definition.method.d' ],
+ regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|lazy|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(\\b(?:void|boolean|byte|char|short|int|float|long|double|[\\w_]+[\\w0-9_]*|(?:\\w+\\.)*[A-Z]\\w+)\\b(?:<(?:(?:\\w+\\.)*[A-Z]\\w+(?:\\s*,\\s*)?)+>|(?:\\[\\s*\\])*)?)(\\s*)(\\w+)(\\s*)(?!.*;)(?=\\()' },
+ { token: 'constant.other.d', regex: '\\b[A-Z][A-Z0-9_]+\\b' },
+ { include: '#comments' },
+ { include: '#all-types' },
+ { token: 'storage.modifier.access-control.d',
+ regex: '\\b(?:private|protected|public|export)\\b' },
+ { token: 'storage.modifier.d',
+ regex: '\\b(?:auto|static|override|final|const|abstract|volatile|synchronized|lazy)\\b' },
+ { token: 'storage.type.structure.d',
+ regex: '\\b(?:template|interface|class|enum|struct|union)\\b' },
+ { token: 'storage.type.d',
+ regex: '\\b(?:ushort|int|uint|long|ulong|float|void|byte|ubyte|double|bit|char|wchar|ucent|cent|short|bool|dchar|real|ireal|ifloat|idouble|creal|cfloat|cdouble|lazy)\\b' },
+ { token: 'keyword.control.exception.d',
+ regex: '\\b(?:try|catch|finally|throw)\\b' },
+ { token: 'keyword.control.d',
+ regex: '\\b(?:return|break|case|continue|default|do|while|for|switch|if|else)\\b' },
+ { token: 'keyword.control.conditional.d',
+ regex: '\\b(?:if|else|switch|iftype)\\b' },
+ { token: 'keyword.control.branch.d',
+ regex: '\\b(?:goto|break|continue)\\b' },
+ { token: 'keyword.control.repeat.d',
+ regex: '\\b(?:while|for|do|foreach(?:_reverse)?)\\b' },
+ { token: 'keyword.control.statement.d',
+ regex: '\\b(?:version|return|with|invariant|body|scope|in|out|inout|asm|mixin|function|delegate)\\b' },
+ { token: 'keyword.control.pragma.d', regex: '\\bpragma\\b' },
+ { token: 'keyword.control.alias.d',
+ regex: '\\b(?:alias|typedef)\\b' },
+ { token: 'keyword.control.import.d', regex: '\\bimport\\b' },
+ { token:
+ [ 'meta.module.d',
+ 'keyword.control.module.d',
+ 'meta.module.d',
+ 'entity.name.function.package.d',
+ 'meta.module.d' ],
+ regex: '^(\\s*)(module)(\\s+)([^ ;]+?)(;)' },
+ { token: 'constant.language.boolean.d',
+ regex: '\\b(?:true|false)\\b' },
+ { token: 'constant.language.d',
+ regex: '\\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|null)\\b' },
+ { token: 'variable.language.d', regex: '\\b(?:this|super)\\b' },
+ { token: 'constant.numeric.d',
+ regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' },
+ { include: '#string_escaped_char' },
+ { include: '#strings' },
+ { token: 'keyword.operator.comparison.d',
+ regex: '==|!=|<=|>=|<>|<|>' },
+ { token: 'keyword.operator.increment-decrement.d',
+ regex: '\\-\\-|\\+\\+' },
+ { token: 'keyword.operator.arithmetic.d',
+ regex: '\\-|\\+|\\*|\\/|~|%' },
+ { token: 'keyword.operator.logical.d', regex: '!|&&|\\|\\|' },
+ { token: 'keyword.operator.overload.d',
+ regex: '\\b(?:opNeg|opCom|opPostInc|opPostDec|opCast|opAdd|opSub|opSub_r|opMul|opDiv|opDiv_r|opMod|opMod_r|opAnd|opOr|opXor|opShl|opShl_r|opShr|opShr_r|opUShr|opUShr_r|opCat|opCat_r|opEquals|opEquals|opCmp|opCmp|opCmp|opCmp|opAddAssign|opSubAssign|opMulAssign|opDivAssign|opModAssign|opAndAssign|opOrAssign|opXorAssign|opShlAssign|opShrAssign|opUShrAssign|opCatAssign|opIndex|opIndexAssign|opCall|opSlice|opSliceAssign|opPos|opAdd_r|opMul_r|opAnd_r|opOr_r|opXor_r)\\b' },
+ { token: 'keyword.operator.d',
+ regex: '\\b(?:new|delete|typeof|typeid|cast|align|is)\\b' },
+ { token: 'keyword.other.class-fns.d',
+ regex: '\\b(?:new|throws)\\b' },
+ { token: 'keyword.other.external.d',
+ regex: '\\b(?:package|extern)\\b' },
+ { token: 'keyword.other.debug.d',
+ regex: '\\b(?:deprecated|unittest|debug)\\b' },
+ { token: 'support.type.sys-types.c',
+ regex: '\\b(?:u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b' },
+ { token: 'support.type.pthread.c',
+ regex: '\\b(?:pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b' },
+ { token: 'support.type.stdint.c',
+ regex: '\\b(?:int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\\b' } ],
+ '#all-types':
+ [ { include: '#support-type-built-ins-d' },
+ { include: '#support-type-d' },
+ { include: '#storage-type-d' } ],
+ '#comments':
+ [ { token: 'punctuation.definition.comment.d',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.d',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.d' } ] },
+ { token: 'punctuation.definition.comment.d',
+ regex: '/\\+',
+ push:
+ [ { token: 'punctuation.definition.comment.d',
+ regex: '\\+/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.nested.d' } ] },
+ { token:
+ [ 'punctuation.definition.comment.d',
+ 'comment.line.double-slash.d' ],
+ regex: '(//)(.*$)' } ],
+ '#constant_placeholder':
+ [ { token: 'constant.other.placeholder.d',
+ regex: '%(?:\\([a-z_]+\\))?#?0?\\-?[ ]?\\+?(?:[0-9]*|\\*)(?:\\.(?:[0-9]*|\\*))?[hL]?[a-z%]',
+ caseInsensitive: true } ],
+ '#regular_expressions': [{token: "constant.character.escape", regex: "\\\\."}], //[ { include: 'source.regexp.python' } ],
+ '#statement-remainder':
+ [ { token: 'meta.definition.param-list.d',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.definition.param-list.d',
+ regex: '(?=\\))',
+ next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.definition.param-list.d' } ] },
+ { token: 'keyword.other.class-fns.d',
+ regex: 'throws',
+ push:
+ [ { token: [], regex: '(?={)', next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.definition.throws.d' } ] } ],
+ '#storage-type-d':
+ [ { token: 'storage.type.d',
+ regex: '\\b(?:void|byte|short|char|int|long|float|double|boolean|(?:[a-z]\\w+\\.)*[A-Z]\\w+)\\b' } ],
+ '#string_escaped_char':
+ [ { token: 'constant.character.escape.d',
+ regex: '\\\\(?:\\\\|[abefnprtv\'"?]|[0-3]\\d{,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\\w+;)' },
+ { token: 'invalid.illegal.unknown-escape.d', regex: '\\\\.' } ],
+ '#strings':
+ [ { token: 'punctuation.definition.string.begin.d',
+ regex: '"',
+ push:
+ [ { include: '#string_escaped_char' },
+ { token: 'punctuation.definition.string.end.d',
+ regex: '"',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.d' } ] },
+ { token:
+ [ 'storage.type.string.d',
+ 'punctuation.definition.string.begin.d' ],
+ regex: '(r)(")',
+ push:
+ [ { token: 'punctuation.definition.string.end.d',
+ regex: '"',
+ next: 'pop' },
+ { include: '#regular_expressions' },
+ { defaultToken: 'string.quoted.double.raw.d' } ] },
+ { token: 'punctuation.definition.string.begin.d',
+ regex: '`',
+ push:
+ [ { token: 'punctuation.definition.string.end.d',
+ regex: '`',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.raw.backtick.d' } ] },
+ { token: 'punctuation.definition.string.begin.d',
+ regex: '\'',
+ push:
+ [ { include: '#string_escaped_char' },
+ { token: 'punctuation.definition.string.end.d',
+ regex: '\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.d' } ] } ],
+ '#support-type-built-ins-classes-d':
+ [ { token: 'support.type.built-ins.classes.d',
+ regex: '\\b(?:AbstractServer|ArchiveMember|ArgParser|Barrier|BomSniffer|Buffer|BufferInput|BufferOutput|BufferSlice|BufferedFile|BufferedStream|BzipInput|BzipOutput|CFile|CacheInvalidatee|CacheInvalidator|CacheServer|CacheThread|Certificate|CertificateStore|CertificateStoreCtx|ChunkInput|ChunkOutput|ClassInfo|Cluster|ClusterCache|ClusterQueue|ClusterThread|CmdParser|ComObject|Compress|Condition|Conduit|Cookie|CookieParser|CookieStack|CounterInput|CounterOutput|DataFileInput|DataFileOutput|DataInput|DataOutput|Database|DatagramConduit|DeviceConduit|DigestInput|DigestOutput|DocPrinter|Document|DummyInputStream|DummyOutputStream|EndianInput|EndianOutput|EndianProtocol|EndianStream|EventSeekInputStream|EventSeekOutputStream|FTPConnection|Fiber|Field|File|FileConduit|FileFolder|FileGroup|FileInput|FileOutput|FilePath|FileScan|FilterStream|Foo|FormatOutput|GreedyInput|GreedyOutput|Gregorian|GrowBuffer|HeapCopy|HeapSlice|Hierarchy|HttpClient|HttpCookies|HttpCookiesView|HttpGet|HttpHeaders|HttpHeadersView|HttpParams|HttpPost|HttpStack|HttpTokens|HttpTriplet|IPv4Address|IUnknown|InputFilter|InternetAddress|InternetHost|Layout|LineInput|LineIterator|LinkedFolder|Log|MapInput|MapOutput|MappedBuffer|Md2|Md4|MemoryQueue|MemoryStream|MmFile|MmFileStream|ModuleInfo|MulticastConduit|Mutex|NativeProtocol|NetCall|NetHost|NetworkAlert|NetworkCache|NetworkCall|NetworkClient|NetworkCombo|NetworkMessage|NetworkQueue|NetworkRegistry|NetworkTask|NotImplemented|Object|Observer|OutBuffer|OutputFilter|PersistQueue|Pipe|PipeConduit|Print|PrivateKey|Process|Properties|Protocol|ProtocolReader|ProtocolWriter|PublicKey|PullParser|QueueFile|QueueServer|QueueThread|QueuedCache|QuoteIterator|Random|Range|ReadWriteMutex|Reader|Record|RegExp|RegExpT|RegexIterator|RollCall|SSLCtx|SSLServerSocket|SSLSocketConduit|SaxParser|SelectionKey|Semaphore|ServerSocket|ServerThread|Service|SimpleIterator|SliceInputStream|SliceSeekInputStream|SliceSeekOutputStream|SliceStream|SnoopInput|SnoopOutput|Socket|SocketConduit|SocketListener|SocketSet|SocketStream|Sprint|Stream|StreamIterator|TArrayStream|TaskServer|TaskThread|TcpSocket|Telnet|TempFile|Text|TextFileInput|TextFileOutput|TextView|Thread|ThreadGroup|ThreadLocal|ThreadPool|Token|TypeInfo|TypeInfo_AC|TypeInfo_Aa|TypeInfo_Ab|TypeInfo_Ac|TypeInfo_Ad|TypeInfo_Ae|TypeInfo_Af|TypeInfo_Ag|TypeInfo_Ah|TypeInfo_Ai|TypeInfo_Aj|TypeInfo_Ak|TypeInfo_Al|TypeInfo_Am|TypeInfo_Ao|TypeInfo_Ap|TypeInfo_Aq|TypeInfo_Ar|TypeInfo_Array|TypeInfo_As|TypeInfo_AssociativeArray|TypeInfo_At|TypeInfo_Au|TypeInfo_Av|TypeInfo_Aw|TypeInfo_C|TypeInfo_Class|TypeInfo_D|TypeInfo_Delegate|TypeInfo_Enum|TypeInfo_Function|TypeInfo_Interface|TypeInfo_P|TypeInfo_Pointer|TypeInfo_StaticArray|TypeInfo_Struct|TypeInfo_Tuple|TypeInfo_Typedef|TypeInfo_a|TypeInfo_b|TypeInfo_c|TypeInfo_d|TypeInfo_e|TypeInfo_f|TypeInfo_g|TypeInfo_h|TypeInfo_i|TypeInfo_j|TypeInfo_k|TypeInfo_l|TypeInfo_m|TypeInfo_o|TypeInfo_p|TypeInfo_q|TypeInfo_r|TypeInfo_s|TypeInfo_t|TypeInfo_u|TypeInfo_v|TypeInfo_w|TypedInput|TypedOutput|URIerror|UdpSocket|UnCompress|UniText|UnicodeBom|UnicodeFile|UnknownAddress|Uri|UtfInput|UtfOutput|VirtualFolder|WrapSeekInputStream|WrapSeekOutputStream|Writer|XmlPrinter|ZipArchive|ZipBlockReader|ZipBlockWriter|ZipEntry|ZipEntryVerifier|ZipFile|ZipFileGroup|ZipFolder|ZipSubFolder|ZipSubFolderEntry|ZipSubFolderGroup|ZlibInput|ZlibOutput)\\b' } ],
+ '#support-type-built-ins-d':
+ [ { include: '#support-type-built-ins-exceptions-d' },
+ { include: '#support-type-built-ins-classes-d' },
+ { include: '#support-type-built-ins-interfaces-d' },
+ { include: '#support-type-built-ins-structs-d' } ],
+ '#support-type-built-ins-exceptions-d':
+ [ { token: 'support.type.built-ins.exceptions.d',
+ regex: '\\b(?:AddressException|ArrayBoundsError|ArrayBoundsException|AssertError|AssertException|Base64CharException|Base64Exception|BzipClosedException|BzipException|ClusterEmptyException|ClusterFullException|ConvError|ConvOverflowError|ConversionException|CorruptedIteratorException|DatabaseException|DateParseError|Exception|FTPException|FiberException|FileException|FinalizeException|FormatError|HostException|IOException|IllegalArgumentException|IllegalElementException|InvalidKeyException|InvalidTypeException|LocaleException|ModuleCtorError|NoSuchElementException|OpenException|OpenRJException|OutOfMemoryException|PlatformException|ProcessCreateException|ProcessException|ProcessForkException|ProcessKillException|ProcessWaitException|ReadException|RegExpException|RegexException|RegistryException|SeekException|SharedLibException|SocketAcceptException|SocketException|StdioException|StreamException|StreamFileException|StringException|SwitchError|SwitchException|SyncException|TextException|ThreadError|ThreadException|UnboxException|UnicodeException|UtfException|VariantTypeMismatchException|Win32Exception|WriteException|XmlException|ZipChecksumException|ZipException|ZipExhaustedException|ZipNotSupportedException|ZlibClosedException|ZlibException|OurUnwindException|SysError)\\b' } ],
+ '#support-type-built-ins-interfaces-d':
+ [ { token: 'support.type.built-ins.interfaces.d',
+ regex: '\\b(?:Buffered|HttpParamsView|ICache|IChannel|IClassFactory|ICluster|IConduit|IConsumer|IEvent|IHierarchy|ILevel|IListener|IMessage|IMessageLoader|IOStream|IReadable|ISelectable|ISelectionSet|ISelector|IServer|IUnknown|IWritable|IXmlPrinter|InputStream|OutputStream|PathView|VfsFile|VfsFiles|VfsFolder|VfsFolderEntry|VfsFolders|VfsHost|VfsSync|ZipReader|ZipWriter)\\b' } ],
+ '#support-type-built-ins-structs-d':
+ [ { token: 'support.type.built-ins.structs.d',
+ regex: '\\b(?:ABC|ABCFLOAT|ACCEL|ACCESSTIMEOUT|ACCESS_ALLOWED_ACE|ACCESS_DENIED_ACE|ACE_HEADER|ACL|ACL_REVISION_INFORMATION|ACL_SIZE_INFORMATION|ACTION_HEADER|ADAPTER_STATUS|ADDJOB_INFO_1|ANIMATIONINFO|APPBARDATA|Argument|Atomic|Attribute|BITMAP|BITMAPCOREHEADER|BITMAPCOREINFO|BITMAPINFO|BITMAPINFOHEADER|BITMAPV4HEADER|BLOB|BROWSEINFO|BY_HANDLE_FILE_INFORMATION|Bar|Baz|BitArray|Box|BracketResult|ByteSwap|CANDIDATEFORM|CANDIDATELIST|CBTACTIVATESTRUCT|CBT_CREATEWND|CHARFORMAT|CHARRANGE|CHARSET|CHARSETINFO|CHAR_INFO|CIDA|CIEXYZ|CIEXYZTRIPLE|CLIENTCREATESTRUCT|CMINVOKECOMMANDINFO|COLORADJUSTMENT|COLORMAP|COMMCONFIG|COMMPROP|COMMTIMEOUTS|COMPAREITEMSTRUCT|COMPCOLOR|COMPOSITIONFORM|COMSTAT|CONNECTDLGSTRUCT|CONSOLE_CURSOR_INFO|CONTEXT|CONVCONTEXT|CONVINFO|COORD|COPYDATASTRUCT|CPINFO|CPLINFO|CREATESTRUCT|CREATE_PROCESS_DEBUG_INFO|CREATE_THREAD_DEBUG_INFO|CRITICAL_SECTION|CRITICAL_SECTION_DEBUG|CURRENCYFMT|CURSORSHAPE|CWPRETSTRUCT|CWPSTRUCT|CharClass|CharRange|Clock|CodePage|Console|DATATYPES_INFO_1|DCB|DDEACK|DDEADVISE|DDEDATA|DDELN|DDEML_MSG_HOOK_DATA|DDEPOKE|DDEUP|DEBUGHOOKINFO|DEBUG_EVENT|DELETEITEMSTRUCT|DEVMODE|DEVNAMES|DEV_BROADCAST_HDR|DEV_BROADCAST_OEM|DEV_BROADCAST_PORT|DEV_BROADCAST_VOLUME|DIBSECTION|DIR|DISCDLGSTRUCT|DISK_GEOMETRY|DISK_PERFORMANCE|DOCINFO|DOC_INFO_1|DOC_INFO_2|DRAGLISTINFO|DRAWITEMSTRUCT|DRAWTEXTPARAMS|DRIVER_INFO_1|DRIVER_INFO_2|DRIVER_INFO_3|DRIVE_LAYOUT_INFORMATION|Date|DateParse|DateTime|DirEntry|DynArg|EDITSTREAM|EMPTYRECORD|EMR|EMRABORTPATH|EMRANGLEARC|EMRARC|EMRBITBLT|EMRCREATEBRUSHINDIRECT|EMRCREATECOLORSPACE|EMRCREATEDIBPATTERNBRUSHPT|EMRCREATEMONOBRUSH|EMRCREATEPALETTE|EMRCREATEPEN|EMRELLIPSE|EMREOF|EMREXCLUDECLIPRECT|EMREXTCREATEFONTINDIRECTW|EMREXTCREATEPEN|EMREXTFLOODFILL|EMREXTSELECTCLIPRGN|EMREXTTEXTOUTA|EMRFILLPATH|EMRFILLRGN|EMRFORMAT|EMRFRAMERGN|EMRGDICOMMENT|EMRINVERTRGN|EMRLINETO|EMRMASKBLT|EMRMODIFYWORLDTRANSFORM|EMROFFSETCLIPRGN|EMRPLGBLT|EMRPOLYDRAW|EMRPOLYDRAW16|EMRPOLYLINE|EMRPOLYLINE16|EMRPOLYPOLYLINE|EMRPOLYPOLYLINE16|EMRPOLYTEXTOUTA|EMRRESIZEPALETTE|EMRRESTOREDC|EMRROUNDRECT|EMRSCALEVIEWPORTEXTEX|EMRSELECTCLIPPATH|EMRSELECTCOLORSPACE|EMRSELECTOBJECT|EMRSELECTPALETTE|EMRSETARCDIRECTION|EMRSETBKCOLOR|EMRSETCOLORADJUSTMENT|EMRSETDIBITSTODEVICE|EMRSETMAPPERFLAGS|EMRSETMITERLIMIT|EMRSETPALETTEENTRIES|EMRSETPIXELV|EMRSETVIEWPORTEXTEX|EMRSETVIEWPORTORGEX|EMRSETWORLDTRANSFORM|EMRSTRETCHBLT|EMRSTRETCHDIBITS|EMRTEXT|ENCORRECTTEXT|ENDROPFILES|ENHMETAHEADER|ENHMETARECORD|ENOLEOPFAILED|ENPROTECTED|ENSAVECLIPBOARD|ENUMLOGFONT|ENUMLOGFONTEX|ENUM_SERVICE_STATUS|EVENTLOGRECORD|EVENTMSG|EXCEPTION_DEBUG_INFO|EXCEPTION_POINTERS|EXCEPTION_RECORD|EXIT_PROCESS_DEBUG_INFO|EXIT_THREAD_DEBUG_INFO|EXTLOGFONT|EXTLOGPEN|EXT_BUTTON|EmptySlot|EndOfCDRecord|Environment|FILETIME|FILTERKEYS|FINDREPLACE|FINDTEXTEX|FIND_NAME_BUFFER|FIND_NAME_HEADER|FIXED|FLOATING_SAVE_AREA|FMS_GETDRIVEINFO|FMS_GETFILESEL|FMS_LOAD|FMS_TOOLBARLOAD|FOCUS_EVENT_RECORD|FONTSIGNATURE|FORMATRANGE|FORMAT_PARAMETERS|FORM_INFO_1|FileConst|FileHeader|FileRoots|FileSystem|FoldingCaseData|Foo|FtpConnectionDetail|FtpFeature|FtpFileInfo|FtpResponse|GC|GCP_RESULTS|GCStats|GENERIC_MAPPING|GLYPHMETRICS|GLYPHMETRICSFLOAT|GROUP_INFO_2|GUID|HANDLETABLE|HD_HITTESTINFO|HD_ITEM|HD_LAYOUT|HD_NOTIFY|HELPINFO|HELPWININFO|HIGHCONTRAST|HSZPAIR|HeaderElement|HttpConst|HttpHeader|HttpHeaderName|HttpResponses|HttpStatus|HttpToken|ICONINFO|ICONMETRICS|IMAGEINFO|IMAGE_DOS_HEADER|INPUT_RECORD|ITEMIDLIST|IeeeFlags|Interface|JOB_INFO_1|JOB_INFO_2|KERNINGPAIR|LANA_ENUM|LAYERPLANEDESCRIPTOR|LDT_ENTRY|LIST_ENTRY|LOAD_DLL_DEBUG_INFO|LOCALESIGNATURE|LOCALGROUP_INFO_0|LOCALGROUP_MEMBERS_INFO_0|LOCALGROUP_MEMBERS_INFO_3|LOGBRUSH|LOGCOLORSPACE|LOGFONT|LOGFONTA|LOGFONTW|LOGPALETTE|LOGPEN|LUID_AND_ATTRIBUTES|LV_COLUMN|LV_DISPINFO|LV_FINDINFO|LV_HITTESTINFO|LV_ITEM|LV_KEYDOWN|LocalFileHeader|MAT2|MD5_CTX|MDICREATESTRUCT|MEASUREITEMSTRUCT|MEMORYSTATUS|MEMORY_BASIC_INFORMATION|MENUEX_TEMPLATE_HEADER|MENUEX_TEMPLATE_ITEM|MENUITEMINFO|MENUITEMTEMPLATE|MENUITEMTEMPLATEHEADER|MENUTEMPLATE|MENU_EVENT_RECORD|METAFILEPICT|METARECORD|MINIMIZEDMETRICS|MINMAXINFO|MODEMDEVCAPS|MODEMSETTINGS|MONCBSTRUCT|MONCONVSTRUCT|MONERRSTRUCT|MONHSZSTRUCT|MONITOR_INFO_1|MONITOR_INFO_2|MONLINKSTRUCT|MONMSGSTRUCT|MOUSEHOOKSTRUCT|MOUSEKEYS|MOUSE_EVENT_RECORD|MSG|MSGBOXPARAMS|MSGFILTER|MULTIKEYHELP|NAME_BUFFER|NCB|NCCALCSIZE_PARAMS|NDDESHAREINFO|NETCONNECTINFOSTRUCT|NETINFOSTRUCT|NETRESOURCE|NEWCPLINFO|NEWTEXTMETRIC|NEWTEXTMETRICEX|NMHDR|NM_LISTVIEW|NM_TREEVIEW|NM_UPDOWNW|NONCLIENTMETRICS|NS_SERVICE_INFO|NUMBERFMT|OFNOTIFY|OFSTRUCT|OPENFILENAME|OPENFILENAMEA|OPENFILENAMEW|OSVERSIONINFO|OUTLINETEXTMETRIC|OUTPUT_DEBUG_STRING_INFO|OVERLAPPED|OffsetTypeInfo|PAINTSTRUCT|PALETTEENTRY|PANOSE|PARAFORMAT|PARTITION_INFORMATION|PERF_COUNTER_BLOCK|PERF_COUNTER_DEFINITION|PERF_DATA_BLOCK|PERF_INSTANCE_DEFINITION|PERF_OBJECT_TYPE|PIXELFORMATDESCRIPTOR|POINT|POINTFLOAT|POINTFX|POINTL|POINTS|POLYTEXT|PORT_INFO_1|PORT_INFO_2|PREVENT_MEDIA_REMOVAL|PRINTER_DEFAULTS|PRINTER_INFO_1|PRINTER_INFO_2|PRINTER_INFO_3|PRINTER_INFO_4|PRINTER_INFO_5|PRINTER_NOTIFY_INFO|PRINTER_NOTIFY_INFO_DATA|PRINTER_NOTIFY_OPTIONS|PRINTER_NOTIFY_OPTIONS_TYPE|PRINTPROCESSOR_INFO_1|PRIVILEGE_SET|PROCESS_HEAPENTRY|PROCESS_INFORMATION|PROPSHEETHEADER|PROPSHEETHEADER_U1|PROPSHEETHEADER_U2|PROPSHEETHEADER_U3|PROPSHEETPAGE|PROPSHEETPAGE_U1|PROPSHEETPAGE_U2|PROTOCOL_INFO|PROVIDOR_INFO_1|PSHNOTIFY|PUNCTUATION|PassByCopy|PassByRef|Phase1Info|PropertyConfigurator|QUERY_SERVICE_CONFIG|QUERY_SERVICE_LOCK_STATUS|RASAMB|RASCONN|RASCONNSTATUS|RASDIALEXTENSIONS|RASDIALPARAMS|RASENTRYNAME|RASPPPIP|RASPPPIPX|RASPPPNBF|RASTERIZER_STATUS|REASSIGN_BLOCKS|RECT|RECTL|REMOTE_NAME_INFO|REPASTESPECIAL|REQRESIZE|RGBQUAD|RGBTRIPLE|RGNDATA|RGNDATAHEADER|RIP_INFO|Runtime|SCROLLINFO|SECURITY_ATTRIBUTES|SECURITY_DESCRIPTOR|SECURITY_QUALITY_OF_SERVICE|SELCHANGE|SERIALKEYS|SERVICE_ADDRESS|SERVICE_ADDRESSES|SERVICE_INFO|SERVICE_STATUS|SERVICE_TABLE_ENTRY|SERVICE_TYPE_INFO_ABS|SERVICE_TYPE_VALUE_ABS|SESSION_BUFFER|SESSION_HEADER|SET_PARTITION_INFORMATION|SHFILEINFO|SHFILEOPSTRUCT|SHITEMID|SHNAMEMAPPING|SID|SID_AND_ATTRIBUTES|SID_IDENTIFIER_AUTHORITY|SINGLE_LIST_ENTRY|SIZE|SMALL_RECT|SOUNDSENTRY|STARTUPINFO|STICKYKEYS|STRRET|STYLEBUF|STYLESTRUCT|SYSTEMTIME|SYSTEM_AUDIT_ACE|SYSTEM_INFO|SYSTEM_INFO_U|SYSTEM_POWER_STATUS|Signal|SjLj_Function_Context|SpecialCaseData|TAPE_ERASE|TAPE_GET_DRIVE_PARAMETERS|TAPE_GET_MEDIA_PARAMETERS|TAPE_GET_POSITION|TAPE_PREPARE|TAPE_SET_DRIVE_PARAMETERS|TAPE_SET_MEDIA_PARAMETERS|TAPE_SET_POSITION|TAPE_WRITE_MARKS|TBADDBITMAP|TBBUTTON|TBNOTIFY|TBSAVEPARAMS|TCHOOSECOLOR|TCHOOSEFONT|TC_HITTESTINFO|TC_ITEM|TC_ITEMHEADER|TC_KEYDOWN|TEXTMETRIC|TEXTMETRICA|TEXTRANGE|TFINDTEXT|TIME_ZONE_INFORMATION|TOGGLEKEYS|TOKEN_CONTROL|TOKEN_DEFAULT_DACL|TOKEN_GROUPS|TOKEN_OWNER|TOKEN_PRIMARY_GROUP|TOKEN_PRIVILEGES|TOKEN_SOURCE|TOKEN_STATISTICS|TOKEN_USER|TOOLINFO|TOOLTIPTEXT|TPAGESETUPDLG|TPMPARAMS|TRANSMIT_FILE_BUFFERS|TREEITEM|TSMALLPOINT|TTHITTESTINFO|TTPOLYCURVE|TTPOLYGONHEADER|TVARIANT|TV_DISPINFO|TV_HITTESTINFO|TV_INSERTSTRUCT|TV_ITEM|TV_KEYDOWN|TV_SORTCB|Time|TimeOfDay|TimeSpan|Tuple|UDACCEL|ULARGE_INTEGER|UNIVERSAL_NAME_INFO|UNLOAD_DLL_DEBUG_INFO|USEROBJECTFLAGS|USER_INFO_0|USER_INFO_2|USER_INFO_3|UnicodeData|VALENT|VA_LIST|VERIFY_INFORMATION|VS_FIXEDFILEINFO|Variant|VfsFilterInfo|WIN32_FILE_ATTRIBUTE_DATA|WIN32_FIND_DATA|WIN32_FIND_DATAW|WIN32_STREAM_ID|WINDOWINFO|WINDOWPLACEMENT|WINDOWPOS|WINDOW_BUFFER_SIZE_RECORD|WNDCLASS|WNDCLASSA|WNDCLASSEX|WNDCLASSEXA|WSADATA|WallClock|XFORM|ZipEntryInfo)\\b' } ],
+ '#support-type-d':
+ [ { token: 'support.type.d',
+ regex: '\\b(?:tango|std)\\.[\\w\\.]+\\b' } ] }
+
+ this.normalizeRules();
+};
+
+DHighlightRules.metaData = { comment: 'D language',
+ fileTypes: [ 'd', 'di' ],
+ firstLineMatch: '^#!.*\\bg?dmd\\b.',
+ foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))',
+ foldingStopMarker: '(?<!\\*)\\*\\*/|^\\s*\\}',
+ keyEquivalent: '^~D',
+ name: 'D',
+ scopeName: 'source.d' }
+
+
+oop.inherits(DHighlightRules, TextHighlightRules);
+
+exports.DHighlightRules = DHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/dart.js b/src/fauxton/assets/js/libs/ace/mode/dart.js
new file mode 100644
index 000000000..a94e33cd1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/dart.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = DartHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/dart_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/dart_highlight_rules.js
new file mode 100644
index 000000000..08055502f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/dart_highlight_rules.js
@@ -0,0 +1,182 @@
+/*
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 958518BC-799F-477A-99F9-5B28EBF230F6) */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DartHighlightRules = function() {
+
+ var constantLanguage = "true|false|null";
+ var variableLanguage = "this|super";
+ var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new";
+ var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef";
+ var storageModifier = "static|final|const";
+ var storageType = "void|bool|num|int|double|dynamic|var|String";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.dart": constantLanguage,
+ "variable.language.dart": variableLanguage,
+ "keyword.control.dart": keywordControl,
+ "keyword.declaration.dart": keywordDeclaration,
+ "storage.modifier.dart": storageModifier,
+ "storage.type.primitive.dart": storageType
+ }, "identifier");
+
+ var stringfill = {
+ token : "string",
+ regex : ".+"
+ };
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ },
+ {
+ token: ["meta.preprocessor.script.dart"],
+ regex: "^(#!.*)$"
+ },
+ {
+ token: "keyword.other.import.dart",
+ regex: "(?:\\b)(?:library|import|part|of)(?:\\b)"
+ },
+ {
+ token : ["keyword.other.import.dart", "text"],
+ regex : "(?:\\b)(prefix)(\\s*:)"
+ },
+ {
+ regex: "\\bas\\b",
+ token: "keyword.cast.dart"
+ },
+ {
+ regex: "\\?|:",
+ token: "keyword.control.ternary.dart"
+ },
+ {
+ regex: "(?:\\b)(is\\!?)(?:\\b)",
+ token: ["keyword.operator.dart"]
+ },
+ {
+ regex: "(<<|>>>?|~|\\^|\\||&)",
+ token: ["keyword.operator.bitwise.dart"]
+ },
+ {
+ regex: "((?:&|\\^|\\||<<|>>>?)=)",
+ token: ["keyword.operator.assignment.bitwise.dart"]
+ },
+ {
+ regex: "(===?|!==?|<=?|>=?)",
+ token: ["keyword.operator.comparison.dart"]
+ },
+ {
+ regex: "((?:[+*/%-]|\\~)=)",
+ token: ["keyword.operator.assignment.arithmetic.dart"]
+ },
+ {
+ regex: "=",
+ token: "keyword.operator.assignment.dart"
+ },
+ {
+ token : "string",
+ regex : "'''",
+ next : "qdoc"
+ },
+ {
+ token : "string",
+ regex : '"""',
+ next : "qqdoc"
+ },
+ {
+ token : "string",
+ regex : "'",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"',
+ next : "qqstring"
+ },
+ {
+ regex: "(\\-\\-|\\+\\+)",
+ token: ["keyword.operator.increment-decrement.dart"]
+ },
+ {
+ regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)",
+ token: ["keyword.operator.arithmetic.dart"]
+ },
+ {
+ regex: "(!|&&|\\|\\|)",
+ token: ["keyword.operator.logical.dart"]
+ },
+ {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ },
+ {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qdoc" : [
+ {
+ token : "string",
+ regex : ".*?'''",
+ next : "start"
+ }, stringfill],
+
+ "qqdoc" : [
+ {
+ token : "string",
+ regex : '.*?"""',
+ next : "start"
+ }, stringfill],
+
+ "qstring" : [
+ {
+ token : "string",
+ regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
+ next : "start"
+ }, stringfill],
+
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next : "start"
+ }, stringfill]
+}
+
+};
+
+oop.inherits(DartHighlightRules, TextHighlightRules);
+
+exports.DartHighlightRules = DartHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/diff.js b/src/fauxton/assets/js/libs/ace/mode/diff.js
new file mode 100644
index 000000000..24e156e32
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/diff.js
@@ -0,0 +1,52 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
+var FoldMode = require("./folding/diff").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/diff_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/diff_highlight_rules.js
new file mode 100644
index 000000000..899639728
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/diff_highlight_rules.js
@@ -0,0 +1,108 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DiffHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [{
+ regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
+ token: "punctuation.definition.separator.diff",
+ "name": "keyword"
+ }, { //diff.range.unified
+ regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
+ token: [
+ "constant",
+ "constant.numeric",
+ "constant",
+ "comment.doc.tag"
+ ]
+ }, { //diff.range.normal
+ regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
+ token: [
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "constant.function",
+ "constant.numeric",
+ "punctuation.definition.range.diff",
+ "invalid"
+ ],
+ "name": "meta."
+ }, {
+ regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$",
+ token: [
+ "constant.numeric",
+ "meta.tag"
+ ]
+ }, { // added
+ regex: "^([!+>])(.*?)(\\s*)$",
+ token: [
+ "support.constant",
+ "text",
+ "invalid"
+ ]
+ }, { // removed
+ regex: "^([<\\-])(.*?)(\\s*)$",
+ token: [
+ "support.function",
+ "string",
+ "invalid"
+ ]
+ }, {
+ regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
+ token: ["variable", "variable", "keyword", "variable"]
+ }, {
+ regex: "^Index.+$",
+ token: "variable"
+ }, {
+ regex: "^\\s+$",
+ token: "text"
+ }, {
+ regex: "\\s*$",
+ token: "invalid"
+ }, {
+ defaultToken: "invisible",
+ caseInsensitive: true
+ }
+ ]
+ };
+};
+
+oop.inherits(DiffHighlightRules, TextHighlightRules);
+
+exports.DiffHighlightRules = DiffHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/django.js b/src/fauxton/assets/js/libs/ace/mode/django.js
new file mode 100644
index 000000000..4a68bb7b0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/django.js
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DjangoHighlightRules = function(){
+ this.$rules = {
+ 'start': [{
+ token: "string",
+ regex: '".*?"'
+ }, {
+ token: "string",
+ regex: "'.*?'"
+ }, {
+ token: "constant",
+ regex: '[0-9]+'
+ }, {
+ token: "variable",
+ regex: "[-_a-zA-Z0-9:]+"
+ }],
+ 'comment': [{
+ token : "comment.block",
+ merge: true,
+ regex : ".+?"
+ }],
+ 'tag': [{
+ token: "entity.name.function",
+ regex: "[a-zA-Z][_a-zA-Z0-9]*",
+ next: "start"
+ }]
+ };
+};
+
+oop.inherits(DjangoHighlightRules, TextHighlightRules)
+
+var DjangoHtmlHighlightRules = function() {
+ this.$rules = new HtmlHighlightRules().getRules();
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "comment.line",
+ regex: "\\{#.*?#\\}"
+ }, {
+ token: "comment.block",
+ regex: "\\{\\%\\s*comment\\s*\\%\\}",
+ merge: true,
+ next: "django-comment"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\{",
+ next: "django-start"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\%",
+ next: "django-tag"
+ });
+ this.embedRules(DjangoHighlightRules, "django-", [{
+ token: "comment.block",
+ regex: "\\{\\%\\s*endcomment\\s*\\%\\}",
+ merge: true,
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\%\\}",
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\}\\}",
+ next: "start"
+ }]);
+ }
+};
+
+oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules);
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = DjangoHtmlHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/doc_comment_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/doc_comment_highlight_rules.js
new file mode 100644
index 000000000..5262a8e89
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/doc_comment_highlight_rules.js
@@ -0,0 +1,73 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DocCommentHighlightRules = function() {
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment.doc.tag",
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
+ }, {
+ token : "comment.doc.tag",
+ regex : "\\bTODO\\b"
+ }, {
+ defaultToken : "comment.doc"
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getStartRule = function(start) {
+ return {
+ token : "comment.doc", // doc comment
+ regex : "\\/\\*(?=\\*)",
+ next : start
+ };
+};
+
+DocCommentHighlightRules.getEndRule = function (start) {
+ return {
+ token : "comment.doc", // closing comment
+ regex : "\\*\\/",
+ next : start
+ };
+};
+
+
+exports.DocCommentHighlightRules = DocCommentHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/dot.js b/src/fauxton/assets/js/libs/ace/mode/dot.js
new file mode 100644
index 000000000..116b2d270
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/dot.js
@@ -0,0 +1,55 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules;
+var DotFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DotHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new DotFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/dot_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/dot_highlight_rules.js
new file mode 100644
index 000000000..a4fe3b0b4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/dot_highlight_rules.js
@@ -0,0 +1,126 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+
+var DotHighlightRules = function() {
+
+ var keywords = lang.arrayToMap(
+ ("strict|node|edge|graph|digraph|subgraph").split("|")
+ );
+
+ var attributes = lang.arrayToMap(
+ ("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z").split("|")
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ }, {
+ token : "comment",
+ regex : /#.*$/
+ }, {
+ token : "comment", // multi line comment
+ merge : true,
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric",
+ regex : /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/
+ }, {
+ token : "keyword.operator",
+ regex : /\+|=|\->/
+ }, {
+ token : "punctuation.operator",
+ regex : /,|;/
+ }, {
+ token : "paren.lparen",
+ regex : /[\[{]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\]}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }, {
+ token: function(value) {
+ if (keywords.hasOwnProperty(value.toLowerCase())) {
+ return "keyword";
+ }
+ else if (attributes.hasOwnProperty(value.toLowerCase())) {
+ return "variable";
+ }
+ else {
+ return "text";
+ }
+ },
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ merge : true,
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ merge : true,
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '[^"\\\\]+',
+ merge : true
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring",
+ merge : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start",
+ merge : true
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "[^'\\\\]+",
+ merge : true
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring",
+ merge : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start",
+ merge : true
+ }
+ ]
+ };
+};
+
+oop.inherits(DotHighlightRules, TextHighlightRules);
+
+exports.DotHighlightRules = DotHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ejs.js b/src/fauxton/assets/js/libs/ace/mode/ejs.js
new file mode 100644
index 000000000..50293e90a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ejs.js
@@ -0,0 +1,109 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var EjsHighlightRules = function(start, end) {
+ HtmlHighlightRules.call(this);
+
+ if (!start)
+ start = "(?:<%|<\\?|{{)";
+ if (!end)
+ end = "(?:%>|\\?>|}})";
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token : "markup.list.meta.tag",
+ regex : start + "(?![>}])[-=]?",
+ push : "ejs-start"
+ });
+ }
+
+ this.embedRules(JavaScriptHighlightRules, "ejs-");
+
+ this.$rules["ejs-start"].unshift({
+ token : "markup.list.meta.tag",
+ regex : "-?" + end,
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "//.*?" + end,
+ next: "pop"
+ });
+
+ this.$rules["ejs-no_regex"].unshift({
+ token : "markup.list.meta.tag",
+ regex : "-?" + end,
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "//.*?" + end,
+ next: "pop"
+ });
+
+ this.normalizeRules();
+};
+
+
+oop.inherits(EjsHighlightRules, HtmlHighlightRules);
+
+exports.EjsHighlightRules = EjsHighlightRules;
+
+
+var oop = require("../lib/oop");
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = EjsHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ejs-": JavaScriptMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/erlang.js b/src/fauxton/assets/js/libs/ace/mode/erlang.js
new file mode 100644
index 000000000..d3d2e42ea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/erlang.js
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ErlangHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/erlang_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/erlang_highlight_rules.js
new file mode 100644
index 000000000..5ee7bfb5d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/erlang_highlight_rules.js
@@ -0,0 +1,876 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from tm bundles\erlang.tmbundle\Syntaxes\Erlang.plist (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ErlangHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { include: '#module-directive' },
+ { include: '#import-export-directive' },
+ { include: '#behaviour-directive' },
+ { include: '#record-directive' },
+ { include: '#define-directive' },
+ { include: '#macro-directive' },
+ { include: '#directive' },
+ { include: '#function' },
+ { include: '#everything-else' } ],
+ '#atom':
+ [ { token: 'punctuation.definition.symbol.begin.erlang',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.symbol.end.erlang',
+ regex: '\'',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.definition.escape.erlang',
+ 'constant.other.symbol.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.other.symbol.escape.erlang',
+ 'constant.other.symbol.escape.erlang' ],
+ regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' },
+ { defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] },
+ { token: 'constant.other.symbol.unquoted.erlang',
+ regex: '[a-z][a-zA-Z\\d@_]*' } ],
+ '#behaviour-directive':
+ [ { token:
+ [ 'meta.directive.behaviour.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'keyword.control.directive.behaviour.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'entity.name.type.class.behaviour.definition.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#binary':
+ [ { token: 'punctuation.definition.binary.begin.erlang',
+ regex: '<<',
+ push:
+ [ { token: 'punctuation.definition.binary.end.erlang',
+ regex: '>>',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.separator.binary.erlang',
+ 'punctuation.separator.value-size.erlang' ],
+ regex: '(,)|(:)' },
+ { include: '#internal-type-specifiers' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.binary.erlang' } ] } ],
+ '#character':
+ [ { token:
+ [ 'punctuation.definition.character.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'constant.character.escape.erlang' ],
+ regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.character.erlang',
+ regex: '\\$\\\\\\^?.?' },
+ { token:
+ [ 'punctuation.definition.character.erlang',
+ 'constant.character.erlang' ],
+ regex: '(\\$)(\\S)' },
+ { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ],
+ '#comment':
+ [ { token: 'punctuation.definition.comment.erlang',
+ regex: '%.*$',
+ push_:
+ [ { token: 'comment.line.percentage.erlang',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.percentage.erlang' } ] } ],
+ '#define-directive':
+ [ { token:
+ [ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.define.erlang',
+ 'keyword.control.directive.define.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.define.erlang',
+ 'entity.name.function.macro.definition.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.define.erlang' } ] },
+ { token: 'meta.directive.define.erlang',
+ regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { token:
+ [ 'text',
+ 'punctuation.section.directive.begin.erlang',
+ 'text',
+ 'keyword.control.directive.define.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'text',
+ 'entity.name.function.macro.definition.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'text',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '(\\))(\\s*)(,)',
+ next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.define.erlang',
+ regex: '\\|\\||\\||:|;|,|\\.|->' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.define.erlang' } ] } ],
+ '#directive':
+ [ { token:
+ [ 'meta.directive.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.erlang',
+ 'keyword.control.directive.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\)?)(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.erlang' } ] },
+ { token:
+ [ 'meta.directive.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.erlang',
+ 'keyword.control.directive.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ],
+ '#everything-else':
+ [ { include: '#comment' },
+ { include: '#record-usage' },
+ { include: '#macro-usage' },
+ { include: '#expression' },
+ { include: '#keyword' },
+ { include: '#textual-operator' },
+ { include: '#function-call' },
+ { include: '#tuple' },
+ { include: '#list' },
+ { include: '#binary' },
+ { include: '#parenthesized-expression' },
+ { include: '#character' },
+ { include: '#number' },
+ { include: '#atom' },
+ { include: '#string' },
+ { include: '#symbolic-operator' },
+ { include: '#variable' } ],
+ '#expression':
+ [ { token: 'keyword.control.if.erlang',
+ regex: '\\bif\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.if.erlang' } ] },
+ { token: 'keyword.control.case.erlang',
+ regex: '\\bcase\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.case.erlang' } ] },
+ { token: 'keyword.control.receive.erlang',
+ regex: '\\breceive\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.receive.erlang' } ] },
+ { token:
+ [ 'keyword.control.fun.erlang',
+ 'text',
+ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.separator.function-arity.erlang' ],
+ regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' },
+ { token: 'keyword.control.fun.erlang',
+ regex: '\\bfun\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clauses.erlang',
+ regex: ';|(?=\\bend\\b)',
+ next: 'pop' },
+ { include: '#internal-function-parts' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.fun.erlang' } ] },
+ { token: 'keyword.control.try.erlang',
+ regex: '\\btry\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.try.erlang' } ] },
+ { token: 'keyword.control.begin.erlang',
+ regex: '\\bbegin\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.begin.erlang' } ] },
+ { token: 'keyword.control.query.erlang',
+ regex: '\\bquery\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.query.erlang' } ] } ],
+ '#function':
+ [ { token:
+ [ 'meta.function.erlang',
+ 'entity.name.function.definition.erlang',
+ 'meta.function.erlang' ],
+ regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()',
+ push:
+ [ { token: 'punctuation.terminator.function.erlang',
+ regex: '\\.',
+ next: 'pop' },
+ { token: [ 'text', 'entity.name.function.erlang', 'text' ],
+ regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' },
+ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clauses.erlang',
+ regex: ';|(?=\\.)',
+ next: 'pop' },
+ { include: '#parenthesized-expression' },
+ { include: '#internal-function-parts' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.function.erlang' } ] } ],
+ '#function-call':
+ [ { token: 'meta.function-call.erlang',
+ regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { token:
+ [ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.guard.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()',
+ push:
+ [ { token: 'text', regex: '(?=\\))', next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token:
+ [ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()',
+ push:
+ [ { token: 'text', regex: '(?=\\))', next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { defaultToken: 'meta.function-call.erlang' } ] } ],
+ '#import-export-directive':
+ [ { token:
+ [ 'meta.directive.import.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.import.erlang',
+ 'keyword.control.directive.import.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.import.erlang',
+ 'entity.name.type.class.module.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-function-list' },
+ { defaultToken: 'meta.directive.import.erlang' } ] },
+ { token:
+ [ 'meta.directive.export.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.export.erlang',
+ 'keyword.control.directive.export.erlang',
+ 'meta.directive.export.erlang',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.export.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-function-list' },
+ { defaultToken: 'meta.directive.export.erlang' } ] } ],
+ '#internal-expression-punctuation':
+ [ { token:
+ [ 'punctuation.separator.clause-head-body.erlang',
+ 'punctuation.separator.clauses.erlang',
+ 'punctuation.separator.expressions.erlang' ],
+ regex: '(->)|(;)|(,)' } ],
+ '#internal-function-list':
+ [ { token: 'punctuation.definition.list.begin.erlang',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.list.end.erlang',
+ regex: '\\]',
+ next: 'pop' },
+ { token:
+ [ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.separator.function-arity.erlang' ],
+ regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)',
+ push:
+ [ { token: 'punctuation.separator.list.erlang',
+ regex: ',|(?=\\])',
+ next: 'pop' },
+ { include: '#everything-else' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.list.function.erlang' } ] } ],
+ '#internal-function-parts':
+ [ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clause-head-body.erlang',
+ regex: '->',
+ next: 'pop' },
+ { token: 'punctuation.definition.parameters.begin.erlang',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.guards.erlang', regex: ',|;' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.expressions.erlang',
+ regex: ',' },
+ { include: '#everything-else' } ],
+ '#internal-record-body':
+ [ { token: 'punctuation.definition.class.record.begin.erlang',
+ regex: '\\{',
+ push:
+ [ { token: 'meta.structure.record.erlang',
+ regex: '(?=\\})',
+ next: 'pop' },
+ { token:
+ [ 'variable.other.field.erlang',
+ 'variable.language.omitted.field.erlang',
+ 'text',
+ 'keyword.operator.assignment.erlang' ],
+ regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)',
+ push:
+ [ { token: 'punctuation.separator.class.record.erlang',
+ regex: ',|(?=\\})',
+ next: 'pop' },
+ { include: '#everything-else' } ] },
+ { token:
+ [ 'variable.other.field.erlang',
+ 'text',
+ 'punctuation.separator.class.record.erlang' ],
+ regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.record.erlang' } ] } ],
+ '#internal-type-specifiers':
+ [ { token: 'punctuation.separator.value-type.erlang',
+ regex: '/',
+ push:
+ [ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' },
+ { token:
+ [ 'storage.type.erlang',
+ 'storage.modifier.signedness.erlang',
+ 'storage.modifier.endianness.erlang',
+ 'storage.modifier.unit.erlang',
+ 'punctuation.separator.type-specifiers.erlang' ],
+ regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ],
+ '#keyword':
+ [ { token: 'keyword.control.erlang',
+ regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ],
+ '#list':
+ [ { token: 'punctuation.definition.list.begin.erlang',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.list.end.erlang',
+ regex: '\\]',
+ next: 'pop' },
+ { token: 'punctuation.separator.list.erlang',
+ regex: '\\||\\|\\||,' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.list.erlang' } ] } ],
+ '#macro-directive':
+ [ { token:
+ [ 'meta.directive.ifdef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'keyword.control.directive.ifdef.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
+ { token:
+ [ 'meta.directive.ifndef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'keyword.control.directive.ifndef.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
+ { token:
+ [ 'meta.directive.undef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.undef.erlang',
+ 'keyword.control.directive.undef.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.undef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#macro-usage':
+ [ { token:
+ [ 'keyword.operator.macro.erlang',
+ 'meta.macro-usage.erlang',
+ 'entity.name.function.macro.erlang' ],
+ regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ],
+ '#module-directive':
+ [ { token:
+ [ 'meta.directive.module.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.module.erlang',
+ 'keyword.control.directive.module.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.module.erlang',
+ 'entity.name.type.class.module.definition.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#number':
+ [ { token: 'text',
+ regex: '(?=\\d)',
+ push:
+ [ { token: 'text', regex: '(?!\\d)', next: 'pop' },
+ { token:
+ [ 'constant.numeric.float.erlang',
+ 'punctuation.separator.integer-float.erlang',
+ 'constant.numeric.float.erlang',
+ 'punctuation.separator.float-exponent.erlang' ],
+ regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' },
+ { token:
+ [ 'constant.numeric.integer.binary.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.binary.erlang' ],
+ regex: '(2)(#)([0-1]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-3.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-3.erlang' ],
+ regex: '(3)(#)([0-2]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-4.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-4.erlang' ],
+ regex: '(4)(#)([0-3]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-5.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-5.erlang' ],
+ regex: '(5)(#)([0-4]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-6.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-6.erlang' ],
+ regex: '(6)(#)([0-5]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-7.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-7.erlang' ],
+ regex: '(7)(#)([0-6]+)' },
+ { token:
+ [ 'constant.numeric.integer.octal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.octal.erlang' ],
+ regex: '(8)(#)([0-7]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-9.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-9.erlang' ],
+ regex: '(9)(#)([0-8]+)' },
+ { token:
+ [ 'constant.numeric.integer.decimal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.decimal.erlang' ],
+ regex: '(10)(#)(\\d+)' },
+ { token:
+ [ 'constant.numeric.integer.base-11.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-11.erlang' ],
+ regex: '(11)(#)([\\daA]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-12.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-12.erlang' ],
+ regex: '(12)(#)([\\da-bA-B]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-13.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-13.erlang' ],
+ regex: '(13)(#)([\\da-cA-C]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-14.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-14.erlang' ],
+ regex: '(14)(#)([\\da-dA-D]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-15.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-15.erlang' ],
+ regex: '(15)(#)([\\da-eA-E]+)' },
+ { token:
+ [ 'constant.numeric.integer.hexadecimal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.hexadecimal.erlang' ],
+ regex: '(16)(#)([\\da-fA-F]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-17.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-17.erlang' ],
+ regex: '(17)(#)([\\da-gA-G]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-18.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-18.erlang' ],
+ regex: '(18)(#)([\\da-hA-H]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-19.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-19.erlang' ],
+ regex: '(19)(#)([\\da-iA-I]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-20.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-20.erlang' ],
+ regex: '(20)(#)([\\da-jA-J]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-21.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-21.erlang' ],
+ regex: '(21)(#)([\\da-kA-K]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-22.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-22.erlang' ],
+ regex: '(22)(#)([\\da-lA-L]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-23.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-23.erlang' ],
+ regex: '(23)(#)([\\da-mA-M]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-24.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-24.erlang' ],
+ regex: '(24)(#)([\\da-nA-N]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-25.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-25.erlang' ],
+ regex: '(25)(#)([\\da-oA-O]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-26.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-26.erlang' ],
+ regex: '(26)(#)([\\da-pA-P]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-27.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-27.erlang' ],
+ regex: '(27)(#)([\\da-qA-Q]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-28.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-28.erlang' ],
+ regex: '(28)(#)([\\da-rA-R]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-29.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-29.erlang' ],
+ regex: '(29)(#)([\\da-sA-S]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-30.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-30.erlang' ],
+ regex: '(30)(#)([\\da-tA-T]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-31.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-31.erlang' ],
+ regex: '(31)(#)([\\da-uA-U]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-32.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-32.erlang' ],
+ regex: '(32)(#)([\\da-vA-V]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-33.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-33.erlang' ],
+ regex: '(33)(#)([\\da-wA-W]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-34.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-34.erlang' ],
+ regex: '(34)(#)([\\da-xA-X]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-35.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-35.erlang' ],
+ regex: '(35)(#)([\\da-yA-Y]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-36.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-36.erlang' ],
+ regex: '(36)(#)([\\da-zA-Z]+)' },
+ { token: 'invalid.illegal.integer.erlang',
+ regex: '\\d+#[\\da-zA-Z]+' },
+ { token: 'constant.numeric.integer.decimal.erlang',
+ regex: '\\d+' } ] } ],
+ '#parenthesized-expression':
+ [ { token: 'punctuation.section.expression.begin.erlang',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.section.expression.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.parenthesized' } ] } ],
+ '#record-directive':
+ [ { token:
+ [ 'meta.directive.record.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.record.erlang',
+ 'keyword.control.directive.import.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.record.erlang',
+ 'entity.name.type.class.record.definition.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.class.record.end.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\})(\\s*)(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-record-body' },
+ { defaultToken: 'meta.directive.record.erlang' } ] } ],
+ '#record-usage':
+ [ { token:
+ [ 'keyword.operator.record.erlang',
+ 'meta.record-usage.erlang',
+ 'entity.name.type.class.record.erlang',
+ 'meta.record-usage.erlang',
+ 'punctuation.separator.record-field.erlang',
+ 'meta.record-usage.erlang',
+ 'variable.other.field.erlang' ],
+ regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' },
+ { token:
+ [ 'keyword.operator.record.erlang',
+ 'meta.record-usage.erlang',
+ 'entity.name.type.class.record.erlang' ],
+ regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')',
+ push:
+ [ { token: 'punctuation.definition.class.record.end.erlang',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#internal-record-body' },
+ { defaultToken: 'meta.record-usage.erlang' } ] } ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.erlang',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.erlang',
+ regex: '"',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'constant.character.escape.erlang' ],
+ regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' },
+ { token:
+ [ 'punctuation.definition.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'constant.other.placeholder.erlang' ],
+ regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' },
+ { token:
+ [ 'punctuation.definition.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'constant.other.placeholder.erlang' ],
+ regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' },
+ { token: 'invalid.illegal.string.erlang', regex: '~.?' },
+ { defaultToken: 'string.quoted.double.erlang' } ] } ],
+ '#symbolic-operator':
+ [ { token: 'keyword.operator.symbolic.erlang',
+ regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ],
+ '#textual-operator':
+ [ { token: 'keyword.operator.textual.erlang',
+ regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ],
+ '#tuple':
+ [ { token: 'punctuation.definition.tuple.begin.erlang',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.tuple.end.erlang',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'punctuation.separator.tuple.erlang', regex: ',' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.tuple.erlang' } ] } ],
+ '#variable':
+ [ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ],
+ regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] }
+
+ this.normalizeRules();
+};
+
+ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp',
+ fileTypes: [ 'erl', 'hrl' ],
+ keyEquivalent: '^~E',
+ name: 'Erlang',
+ scopeName: 'source.erlang' }
+
+
+oop.inherits(ErlangHighlightRules, TextHighlightRules);
+
+exports.ErlangHighlightRules = ErlangHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/asciidoc.js b/src/fauxton/assets/js/libs/ace/mode/folding/asciidoc.js
new file mode 100644
index 000000000..d684917e0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/asciidoc.js
@@ -0,0 +1,142 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/;
+ this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (!this.foldingStartMarker.test(line))
+ return ""
+
+ if (line[0] == "=") {
+ if (this.singleLineHeadingRe.test(line))
+ return "start";
+ if (session.getLine(row - 1).length != session.getLine(row).length)
+ return "";
+ return "start";
+ }
+ if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock")
+ return "end";
+ return "start";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+ if (!line.match(this.foldingStartMarker))
+ return;
+
+ var token;
+ function getTokenType(row) {
+ token = session.getTokens(row)[0];
+ return token && token.type;
+ }
+
+ var levels = ["=","-","~","^","+"];
+ var heading = "markup.heading";
+ var singleLineHeadingRe = this.singleLineHeadingRe;
+ function getLevel() {
+ var match = token.value.match(singleLineHeadingRe);
+ if (match)
+ return match[0].length;
+ var level = levels.indexOf(token.value[0]) + 1;
+ if (level == 1) {
+ if (session.getLine(row - 1).length != session.getLine(row).length)
+ return Infinity;
+ }
+ return level;
+ }
+
+ if (getTokenType(row) == heading) {
+ var startHeadingLevel = getLevel();
+ while (++row < maxRow) {
+ if (getTokenType(row) != heading)
+ continue;
+ var level = getLevel();
+ if (level <= startHeadingLevel)
+ break;
+ }
+
+ var isSingleLineHeading = token && token.value.match(this.singleLineHeadingRe);
+ endRow = isSingleLineHeading ? row - 1 : row - 2;
+
+ if (endRow > startRow) {
+ while (endRow > startRow && (!getTokenType(endRow) || token.value[0] == "["))
+ endRow--;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ } else {
+ var state = session.bgTokenizer.getState(row);
+ if (state == "dissallowDelimitedBlock") {
+ while (row -- > 0) {
+ if (session.bgTokenizer.getState(row).lastIndexOf("Block") == -1)
+ break;
+ }
+ endRow = row + 1;
+ if (endRow < startRow) {
+ var endColumn = session.getLine(row).length;
+ return new Range(endRow, 5, startRow, startColumn - 5);
+ }
+ } else {
+ while (++row < maxRow) {
+ if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock")
+ break;
+ }
+ endRow = row;
+ if (endRow > startRow) {
+ var endColumn = session.getLine(row).length;
+ return new Range(startRow, 5, endRow, endColumn - 5);
+ }
+ }
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/c9search.js b/src/fauxton/assets/js/libs/ace/mode/folding/c9search.js
new file mode 100644
index 000000000..dd6a0b4ff
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/c9search.js
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^(\S.*\:|Searching for.*)$/;
+ this.foldingStopMarker = /^(\s+|Found.*)$/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var lines = session.doc.getAllLines(row);
+ var line = lines[row];
+ var level1 = /^(Found.*|Searching for.*)$/;
+ var level2 = /^(\S.*\:|\s*)$/;
+ var re = level1.test(line) ? level1 : level2;
+
+ if (this.foldingStartMarker.test(line)) {
+ for (var i = row + 1, l = session.getLength(); i < l; i++) {
+ if (re.test(lines[i]))
+ break;
+ }
+
+ return new Range(row, line.length, i, 0);
+ }
+
+ if (this.foldingStopMarker.test(line)) {
+ for (var i = row - 1; i >= 0; i--) {
+ line = lines[i];
+ if (re.test(line))
+ break;
+ }
+
+ return new Range(i, line.length, row, 0);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/coffee.js b/src/fauxton/assets/js/libs/ace/mode/folding/coffee.js
new file mode 100644
index 000000000..fe03a5684
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/coffee.js
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "#")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "#")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ // must return "" if there's no fold, to enable caching
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+
+ // documentation comments
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/coffee_test.js b/src/fauxton/assets/js/libs/ace/mode/folding/coffee_test.js
new file mode 100644
index 000000000..2abd1fe89
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/coffee_test.js
@@ -0,0 +1,101 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined")
+ require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var CoffeeMode = require("../coffee").Mode;
+var EditSession = require("../../edit_session").EditSession;
+var assert = require("../../test/assertions");
+function testFoldWidgets(array) {
+ var session = array.filter(function(_, i){return i % 2 == 1});
+ session = new EditSession(session);
+ var mode = new CoffeeMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ var widgets = array.filter(function(_, i){return i % 2 == 0});
+ widgets.forEach(function(w, i){
+ session.foldWidgets[i] = session.getFoldWidget(i);
+ })
+ widgets.forEach(function(w, i){
+ w = w.split(",");
+ var type = w[0] == ">" ? "start" : w[0] == "<" ? "end" : "";
+ assert.equal(session.foldWidgets[i], type);
+ if (!type)
+ return;
+ var range = session.getFoldWidgetRange(i);
+ if (!w[1]) {
+ assert.equal(range, null);
+ return;
+ }
+ assert.equal(range.start.row, i);
+ assert.equal(range.end.row - range.start.row, parseInt(w[1]));
+ testColumn(w[2], range.start);
+ testColumn(w[3], range.end);
+ });
+
+ function testColumn(w, pos) {
+ if (!w)
+ return;
+ if (w == "l")
+ w = session.getLine(pos.row).length;
+ else
+ w = parseInt(w);
+ assert.equal(pos.column, w);
+ }
+}
+module.exports = {
+ "test: coffee script indentation based folding": function() {
+ testFoldWidgets([
+ '>,1,l,l', ' ## indented comment',
+ '', ' # ',
+ '', '',
+ '>,1,l,l', ' # plain comment',
+ '', ' # ',
+ '>,2', ' function (x)=>',
+ '', ' ',
+ '', ' x++',
+ '', ' ',
+ '', ' ',
+ '>,2', ' bar = ',
+ '', ' foo: 1',
+ '', ' baz: lighter'
+ ]);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main)
+ require("asyncjs").test.testcase(module.exports).exec();
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/csharp.js b/src/fauxton/assets/js/libs/ace/mode/folding/csharp.js
new file mode 100644
index 000000000..c45075346
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/csharp.js
@@ -0,0 +1,138 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var CFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, CFoldMode);
+
+(function() {
+ this.usingRe = /^\s*using \S/;
+
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+ this.getFoldWidgetBase = this.getFoldWidget;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
+ if (!fw) {
+ var line = session.getLine(row);
+ if (/^\s*#region\b/.test(line))
+ return "start";
+ var usingRe = this.usingRe;
+ if (usingRe.test(line)) {
+ var prev = session.getLine(row - 1);
+ var next = session.getLine(row + 1);
+ if (!usingRe.test(prev) && usingRe.test(next))
+ return "start"
+ }
+ }
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row);
+ if (range)
+ return range;
+
+ var line = session.getLine(row);
+ if (this.usingRe.test(line))
+ return this.getUsingStatementBlock(session, line, row);
+
+ if (/^\s*#region\b/.test(line))
+ return this.getRegionBlock(session, line, row);
+ };
+
+ this.getUsingStatementBlock = function(session, line, row) {
+ var startColumn = line.match(this.usingRe)[0].length - 1;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ if (!this.usingRe.test(line))
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ this.getRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*#(end)?region\b/
+ var depth = 1
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m)
+ continue;
+ if (m[1])
+ depth--;
+ else
+ depth++;
+
+ if (!depth)
+ break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ var endColumn = line.search(/\S/);
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/cstyle.js b/src/fauxton/assets/js/libs/ace/mode/folding/cstyle.js
new file mode 100644
index 000000000..8be20d270
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/cstyle.js
@@ -0,0 +1,83 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
+ }
+
+ if (foldStyle !== "markbeginend")
+ return;
+
+ var match = line.match(this.foldingStopMarker);
+ if (match) {
+ var i = match.index + match[0].length;
+
+ if (match[1])
+ return this.closingBracketBlock(session, match[1], row, i);
+
+ return session.getCommentFoldRange(row, i, -1);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/cstyle_test.js b/src/fauxton/assets/js/libs/ace/mode/folding/cstyle_test.js
new file mode 100644
index 000000000..e007c792e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/cstyle_test.js
@@ -0,0 +1,85 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined")
+ require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var JavaScriptMode = require("../javascript").Mode;
+var EditSession = require("../../edit_session").EditSession;
+var assert = require("../../test/assertions");
+
+module.exports = {
+
+ "test: fold comments": function() {
+ var session = new EditSession([
+ '/*',
+ 'stuff',
+ '*/'
+ ]);
+
+ var mode = new JavaScriptMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 2, 2, 0);
+ assert.range(session.getFoldWidgetRange(2), 0, 2, 2, 0);
+ },
+
+ "test: fold doc style comments": function() {
+ var session = new EditSession([
+ '/**',
+ ' * stuff',
+ ' * *** */'
+ ]);
+
+ var mode = new JavaScriptMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 2, 2, 7);
+ assert.range(session.getFoldWidgetRange(2), 0, 2, 2, 7);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main)
+ require("asyncjs").test.testcase(module.exports).exec();
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/diff.js b/src/fauxton/assets/js/libs/ace/mode/folding/diff.js
new file mode 100644
index 000000000..23c0e2d09
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/diff.js
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function(levels, flag) {
+ this.regExpList = levels;
+ this.flag = flag;
+ this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag);
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var start = {row: row, column: line.length};
+
+ var regList = this.regExpList;
+ for (var i = 1; i <= regList.length; i++) {
+ var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag);
+ if (re.test(line))
+ break;
+ }
+
+ for (var l = session.getLength(); ++row < l; ) {
+ line = session.getLine(row);
+ if (re.test(line))
+ break;
+ }
+ if (row == start.row + 1)
+ return;
+ return Range.fromPoints(start, {row: row - 1, column: line.length});
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/fold_mode.js b/src/fauxton/assets/js/libs/ace/mode/folding/fold_mode.js
new file mode 100644
index 000000000..9272cdcde
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/fold_mode.js
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+
+(function() {
+
+ this.foldingStartMarker = null;
+ this.foldingStopMarker = null;
+
+ // must return "" if there's no fold, to enable caching
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (this.foldingStartMarker.test(line))
+ return "start";
+ if (foldStyle == "markbeginend"
+ && this.foldingStopMarker
+ && this.foldingStopMarker.test(line))
+ return "end";
+ return "";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ return null;
+ };
+
+ this.indentationBlock = function(session, row, column) {
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1)
+ return;
+
+ var startColumn = column || line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ var level = session.getLine(row).search(re);
+
+ if (level == -1)
+ continue;
+
+ if (level <= startLevel)
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
+ var start = {row: row, column: column + 1};
+ var end = session.$findClosingBracket(bracket, start, typeRe);
+ if (!end)
+ return;
+
+ var fw = session.foldWidgets[end.row];
+ if (fw == null)
+ fw = this.getFoldWidget(session, end.row);
+
+ if (fw == "start" && end.row > start.row) {
+ end.row --;
+ end.column = session.getLine(end.row).length;
+ }
+ return Range.fromPoints(start, end);
+ };
+
+ this.closingBracketBlock = function(session, bracket, row, column, typeRe) {
+ var end = {row: row, column: column};
+ var start = session.$findOpeningBracket(bracket, end);
+
+ if (!start)
+ return;
+
+ start.column++;
+ end.column--;
+
+ return Range.fromPoints(start, end);
+ };
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/html.js b/src/fauxton/assets/js/libs/ace/mode/folding/html.js
new file mode 100644
index 000000000..fbfa1e9ed
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/html.js
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var MixedFoldMode = require("./mixed").FoldMode;
+var XmlFoldMode = require("./xml").FoldMode;
+var CStyleFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+ MixedFoldMode.call(this, new XmlFoldMode({
+ // void elements
+ "area": 1,
+ "base": 1,
+ "br": 1,
+ "col": 1,
+ "command": 1,
+ "embed": 1,
+ "hr": 1,
+ "img": 1,
+ "input": 1,
+ "keygen": 1,
+ "link": 1,
+ "meta": 1,
+ "param": 1,
+ "source": 1,
+ "track": 1,
+ "wbr": 1,
+
+ // optional tags
+ "li": 1,
+ "dt": 1,
+ "dd": 1,
+ "p": 1,
+ "rt": 1,
+ "rp": 1,
+ "optgroup": 1,
+ "option": 1,
+ "colgroup": 1,
+ "td": 1,
+ "th": 1
+ }), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/html_test.js b/src/fauxton/assets/js/libs/ace/mode/folding/html_test.js
new file mode 100644
index 000000000..3e42cfe0e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/html_test.js
@@ -0,0 +1,162 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined")
+ require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var HtmlMode = require("../html").Mode;
+var EditSession = require("../../edit_session").EditSession;
+var assert = require("../../test/assertions");
+
+module.exports = {
+
+ "test: fold mixed html and javascript": function() {
+ var session = new EditSession([
+ '<script type="text/javascript"> ',
+ 'function() foo {',
+ ' var bar = 1;',
+ '}',
+ '</script>'
+ ]);
+
+ var mode = new HtmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "start");
+ assert.equal(session.getFoldWidget(2), "");
+ assert.equal(session.getFoldWidget(3), "end");
+ assert.equal(session.getFoldWidget(4), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 8, 4, 0);
+ assert.range(session.getFoldWidgetRange(4), 0, 8, 4, 0);
+
+ assert.range(session.getFoldWidgetRange(1), 1, 16, 3, 0);
+ assert.range(session.getFoldWidgetRange(3), 1, 16, 3, 0);
+ },
+
+ "test: fold mixed html and css": function() {
+ var session = new EditSession([
+ '<style type="text/css">',
+ ' .text-layer {',
+ ' font-family: Monaco, "Courier New", monospace;',
+ ' }',
+ '</style>'
+ ]);
+
+ var mode = new HtmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "start");
+ assert.equal(session.getFoldWidget(2), "");
+ assert.equal(session.getFoldWidget(3), "end");
+ assert.equal(session.getFoldWidget(4), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 7, 4, 0);
+ assert.range(session.getFoldWidgetRange(4), 0, 7, 4, 0);
+
+ assert.range(session.getFoldWidgetRange(1), 1, 17, 3, 4);
+ assert.range(session.getFoldWidgetRange(3), 1, 17, 3, 4);
+ },
+
+ "test: fold should skip self closing elements": function() {
+ var session = new EditSession([
+ '<body>',
+ '<br />',
+ '</body>'
+ ]);
+
+ var mode = new HtmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 6, 2, 0);
+ assert.range(session.getFoldWidgetRange(2), 0, 6, 2, 0);
+ },
+
+ "test: fold should skip void elements": function() {
+ var session = new EditSession([
+ '<body>',
+ '<br>',
+ '</body>'
+ ]);
+
+ var mode = new HtmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 6, 2, 0);
+ assert.range(session.getFoldWidgetRange(2), 0, 6, 2, 0);
+ },
+
+ "test: fold multiple unclosed elements": function() {
+ var session = new EditSession([
+ '<div>',
+ '<p>',
+ 'juhu',
+ '<p>',
+ 'kinners',
+ '</div>'
+ ]);
+
+ var mode = new HtmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "");
+ assert.equal(session.getFoldWidget(3), "");
+ assert.equal(session.getFoldWidget(4), "");
+ assert.equal(session.getFoldWidget(5), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 5, 5, 0);
+ assert.range(session.getFoldWidgetRange(5), 0, 5, 5, 0);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main)
+ require("asyncjs").test.testcase(module.exports).exec();
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/ini.js b/src/fauxton/assets/js/libs/ace/mode/folding/ini.js
new file mode 100644
index 000000000..ef4eaa0b1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/ini.js
@@ -0,0 +1,80 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var re = this.foldingStartMarker;
+ var line = session.getLine(row);
+
+ var m = line.match(re);
+
+ if (!m) return;
+
+ var startName = m[1] + ".";
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ m = line.match(re);
+ if (m && m[1].lastIndexOf(startName, 0) !== 0)
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/latex.js b/src/fauxton/assets/js/libs/ace/mode/folding/latex.js
new file mode 100644
index 000000000..b80775eb8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/latex.js
@@ -0,0 +1,162 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/;
+ this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.doc.getLine(row);
+ var match = this.foldingStartMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.latexBlock(session, row, match[0].length - 1);
+ if (match[2])
+ return this.latexSection(session, row, match[0].length - 1);
+
+ return this.openingBracketBlock(session, "{", row, match.index);
+ }
+
+ var match = this.foldingStopMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.latexBlock(session, row, match[0].length - 1);
+
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
+ }
+ };
+
+ this.latexBlock = function(session, row, column) {
+ var keywords = {
+ "\\begin": 1,
+ "\\end": -1
+ };
+
+ var stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || token.type !== "keyword")
+ return;
+
+ var val = token.value;
+ var dir = keywords[val];
+
+ var getType = function() {
+ var token = stream.stepForward();
+ var type = token.type == "lparen" ?stream.stepForward().value : "";
+ if (dir === -1) {
+ stream.stepBackward();
+ if (type)
+ stream.stepBackward();
+ }
+ return type;
+ };
+ var stack = [getType()];
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
+ var startRow = row;
+
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
+ while(token = stream.step()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = keywords[token.value];
+ if (!level)
+ continue;
+ var type = getType();
+ if (level === dir)
+ stack.unshift(type);
+ else if (stack.shift() !== type || !stack.length)
+ break;
+ }
+
+ if (stack.length)
+ return;
+
+ var row = stream.getCurrentTokenRow();
+ if (dir === -1)
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
+ stream.stepBackward();
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
+ };
+
+ this.latexSection = function(session, row, column) {
+ var keywords = ["\\subsection", "\\section", "\\begin", "\\end"];
+
+ var stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "keyword")
+ return;
+
+ var startLevel = keywords.indexOf(token.value);
+ var stackDepth = 0
+ var endRow = row;
+
+ while(token = stream.stepForward()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = keywords.indexOf(token.value);
+
+ if (level >= 2) {
+ if (!stackDepth)
+ endRow = stream.getCurrentTokenRow() - 1;
+ stackDepth += level == 2 ? 1 : - 1;
+ if (stackDepth < 0)
+ break
+ } else if (level >= startLevel)
+ break;
+ }
+
+ if (!stackDepth)
+ endRow = stream.getCurrentTokenRow() - 1;
+
+ while (endRow > row && !/\S/.test(session.getLine(endRow)))
+ endRow--;
+
+ return new Range(
+ row, session.getLine(row).length,
+ endRow, session.getLine(endRow).length
+ );
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/lua.js b/src/fauxton/assets/js/libs/ace/mode/folding/lua.js
new file mode 100644
index 000000000..f4b523342
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/lua.js
@@ -0,0 +1,163 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/;
+ this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var isStart = this.foldingStartMarker.test(line);
+ var isEnd = this.foldingStopMarker.test(line);
+
+ if (isStart && !isEnd) {
+ var match = line.match(this.foldingStartMarker);
+ if (match[1] == "then" && /\belseif\b/.test(line))
+ return;
+ if (match[1]) {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "start";
+ } else if (match[2]) {
+ var type = session.bgTokenizer.getState(row) || "";
+ if (type[0] == "bracketedComment" || type[0] == "bracketedString")
+ return "start";
+ } else {
+ return "start";
+ }
+ }
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
+ return "";
+
+ var match = line.match(this.foldingStopMarker);
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return "end";
+ } else if (match[0][0] === "]") {
+ var type = session.bgTokenizer.getState(row - 1) || "";
+ if (type[0] == "bracketedComment" || type[0] == "bracketedString")
+ return "end";
+ } else
+ return "end";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.doc.getLine(row);
+ var match = this.foldingStartMarker.exec(line);
+ if (match) {
+ if (match[1])
+ return this.luaBlock(session, row, match.index + 1);
+
+ if (match[2])
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.openingBracketBlock(session, "{", row, match.index);
+ }
+
+ var match = this.foldingStopMarker.exec(line);
+ if (match) {
+ if (match[0] === "end") {
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
+ return this.luaBlock(session, row, match.index + 1);
+ }
+
+ if (match[0][0] === "]")
+ return session.getCommentFoldRange(row, match.index + 1);
+
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
+ }
+ };
+
+ this.luaBlock = function(session, row, column) {
+ var stream = new TokenIterator(session, row, column);
+ var indentKeywords = {
+ "function": 1,
+ "do": 1,
+ "then": 1,
+ "elseif": -1,
+ "end": -1,
+ "repeat": 1,
+ "until": -1
+ };
+
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "keyword")
+ return;
+
+ var val = token.value;
+ var stack = [val];
+ var dir = indentKeywords[val];
+
+ if (!dir)
+ return;
+
+ var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
+ var startRow = row;
+
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
+ while(token = stream.step()) {
+ if (token.type !== "keyword")
+ continue;
+ var level = dir * indentKeywords[token.value];
+
+ if (level > 0) {
+ stack.unshift(token.value);
+ } else if (level <= 0) {
+ stack.shift();
+ if (!stack.length && token.value != "elseif")
+ break;
+ if (level === 0)
+ stack.unshift(token.value);
+ }
+ }
+
+ var row = stream.getCurrentTokenRow();
+ if (dir === -1)
+ return new Range(row, session.getLine(row).length, startRow, startColumn);
+ else
+ return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/markdown.js b/src/fauxton/assets/js/libs/ace/mode/folding/markdown.js
new file mode 100644
index 000000000..aae7179a3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/markdown.js
@@ -0,0 +1,125 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ if (!this.foldingStartMarker.test(line))
+ return "";
+
+ if (line[0] == "`") {
+ if (session.bgTokenizer.getState(row) == "start")
+ return "end";
+ return "start";
+ }
+
+ return "start";
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+ if (!line.match(this.foldingStartMarker))
+ return;
+
+ if (line[0] == "`") {
+ if (session.bgTokenizer.getState(row) !== "start") {
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (line[0] == "`" & line.substring(0, 3) == "```")
+ break;
+ }
+ return new Range(startRow, startColumn, row, 0);
+ } else {
+ while (row -- > 0) {
+ line = session.getLine(row);
+ if (line[0] == "`" & line.substring(0, 3) == "```")
+ break;
+ }
+ return new Range(row, line.length, startRow, 0);
+ }
+ }
+
+ var token;
+ function isHeading(row) {
+ token = session.getTokens(row)[0];
+ return token && token.type.lastIndexOf(heading, 0) === 0;
+ }
+
+ var heading = "markup.heading";
+ function getLevel() {
+ var ch = token.value[0];
+ if (ch == "=") return 6;
+ if (ch == "-") return 5;
+ return 7 - token.value.search(/[^#]/);
+ }
+
+ if (isHeading(row)) {
+ var startHeadingLevel = getLevel();
+ while (++row < maxRow) {
+ if (!isHeading(row))
+ continue;
+ var level = getLevel();
+ if (level >= startHeadingLevel)
+ break;
+ }
+
+ endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2);
+
+ if (endRow > startRow) {
+ while (endRow > startRow && /^\s*$/.test(session.getLine(endRow)))
+ endRow--;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/mixed.js b/src/fauxton/assets/js/libs/ace/mode/folding/mixed.js
new file mode 100644
index 000000000..40d2cda8a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/mixed.js
@@ -0,0 +1,83 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
+ this.defaultMode = defaultMode;
+ this.subModes = subModes;
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+
+ this.$getMode = function(state) {
+ if (typeof state != "string")
+ state = state[0];
+ for (var key in this.subModes) {
+ if (state.indexOf(key) === 0)
+ return this.subModes[key];
+ }
+ return null;
+ };
+
+ this.$tryMode = function(state, session, foldStyle, row) {
+ var mode = this.$getMode(state);
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ return (
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
+ );
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var mode = this.$getMode(session.getState(row-1));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.$getMode(session.getState(row));
+
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
+ mode = this.defaultMode;
+
+ return mode.getFoldWidgetRange(session, foldStyle, row);
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/pythonic.js b/src/fauxton/assets/js/libs/ace/mode/folding/pythonic.js
new file mode 100644
index 000000000..4c7ec11be
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/pythonic.js
@@ -0,0 +1,58 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(markers) {
+ this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$");
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ if (match[1])
+ return this.openingBracketBlock(session, match[1], row, match.index);
+ if (match[2])
+ return this.indentationBlock(session, row, match.index + match[2].length);
+ return this.indentationBlock(session, row);
+ }
+ }
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/pythonic_test.js b/src/fauxton/assets/js/libs/ace/mode/folding/pythonic_test.js
new file mode 100644
index 000000000..e30785b8a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/pythonic_test.js
@@ -0,0 +1,98 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined")
+ require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var PythonMode = require("../python").Mode;
+var EditSession = require("../../edit_session").EditSession;
+var assert = require("../../test/assertions");
+
+module.exports = {
+
+ "test: bracket folding": function() {
+ var session = new EditSession([
+ '[ ',
+ 'stuff',
+ ']',
+ '[ ',
+ '{ ',
+ '[ #-'
+ ]);
+
+ var mode = new PythonMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "");
+ assert.equal(session.getFoldWidget(3), "start");
+ assert.equal(session.getFoldWidget(4), "start");
+ assert.equal(session.getFoldWidget(5), "");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 1, 2, 0);
+ assert.equal(session.getFoldWidgetRange(3), null);
+ assert.equal(session.getFoldWidgetRange(5), null);
+ },
+
+ "test: indentation folding": function() {
+ var session = new EditSession([
+ 'def a: #',
+ '',
+ ' b:',
+ ' c',
+ ' ',
+ ' c',
+ '',
+ ' ',
+ ''
+ ]);
+
+ var mode = new PythonMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "start");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 6, 5, 3);
+ assert.range(session.getFoldWidgetRange(2), 2, 3, 5, 3);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main)
+ require("asyncjs").test.testcase(module.exports).exec();
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/velocity.js b/src/fauxton/assets/js/libs/ace/mode/folding/velocity.js
new file mode 100644
index 000000000..ce235b49c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/velocity.js
@@ -0,0 +1,120 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.indentationBlock(session, row);
+ if (range)
+ return range;
+
+ var re = /\S/;
+ var line = session.getLine(row);
+ var startLevel = line.search(re);
+ if (startLevel == -1 || line[startLevel] != "##")
+ return;
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var level = line.search(re);
+
+ if (level == -1)
+ continue;
+
+ if (line[level] != "##")
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ // must return "" if there's no fold, to enable caching
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+ var indent = line.search(/\S/);
+ var next = session.getLine(row + 1);
+ var prev = session.getLine(row - 1);
+ var prevIndent = prev.search(/\S/);
+ var nextIndent = next.search(/\S/);
+
+ if (indent == -1) {
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
+ return "";
+ }
+
+ // documentation comments
+ if (prevIndent == -1) {
+ if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") {
+ session.foldWidgets[row - 1] = "";
+ session.foldWidgets[row + 1] = "";
+ return "start";
+ }
+ } else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") {
+ if (session.getLine(row - 2).search(/\S/) == -1) {
+ session.foldWidgets[row - 1] = "start";
+ session.foldWidgets[row + 1] = "";
+ return "";
+ }
+ }
+
+ if (prevIndent!= -1 && prevIndent < indent)
+ session.foldWidgets[row - 1] = "start";
+ else
+ session.foldWidgets[row - 1] = "";
+
+ if (indent < nextIndent)
+ return "start";
+ else
+ return "";
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/xml.js b/src/fauxton/assets/js/libs/ace/mode/folding/xml.js
new file mode 100644
index 000000000..5e8e4b9ad
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/xml.js
@@ -0,0 +1,254 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var lang = require("../../lib/lang");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function(voidElements) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (tag.closing)
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
+ return "";
+
+ if (tag.selfClosing)
+ return "";
+
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
+ return "";
+
+ return "start";
+ };
+
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var value = "";
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type.lastIndexOf("meta.tag", 0) === 0)
+ value += token.value;
+ else
+ value += lang.stringRepeat(" ", token.value.length);
+ }
+
+ return this._parseTag(value);
+ };
+
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
+ this._parseTag = function(tag) {
+
+ var match = tag.match(this.tagRe);
+ var column = 0;
+
+ return {
+ value: tag,
+ match: match ? match[2] : "",
+ closing: match ? !!match[3] : false,
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
+ tagName: match ? match[4] : "",
+ column: match[1] ? column + match[1].length : column
+ };
+ };
+
+ /*
+ * reads a full tag and places the iterator after the tag
+ */
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var start;
+
+ do {
+ if (token.type.lastIndexOf("meta.tag", 0) === 0) {
+ if (!start) {
+ var start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ }
+ value += token.value;
+ if (value.indexOf(">") !== -1) {
+ var tag = this._parseTag(value);
+ tag.start = start;
+ tag.end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ iterator.stepForward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepForward());
+
+ return null;
+ };
+
+ this._readTagBackward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var value = "";
+ var end;
+
+ do {
+ if (token.type.lastIndexOf("meta.tag", 0) === 0) {
+ if (!end) {
+ end = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn() + token.value.length
+ };
+ }
+ value = token.value + value;
+ if (value.indexOf("<") !== -1) {
+ var tag = this._parseTag(value);
+ tag.end = end;
+ tag.start = {
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ };
+ iterator.stepBackward();
+ return tag;
+ }
+ }
+ } while(token = iterator.stepBackward());
+
+ return null;
+ };
+
+ this._pop = function(stack, tag) {
+ while (stack.length) {
+
+ var top = stack[stack.length-1];
+ if (!tag || top.tagName == tag.tagName) {
+ return stack.pop();
+ }
+ else if (this.voidElements[tag.tagName]) {
+ return;
+ }
+ else if (this.voidElements[top.tagName]) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag.match)
+ return null;
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.column);
+ var start = {
+ row: row,
+ column: firstTag.column + firstTag.tagName.length + 2
+ };
+ while (tag = this._readTagForward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0)
+ return Range.fromPoints(start, tag.start);
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+ else {
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
+ var end = {
+ row: row,
+ column: firstTag.column
+ };
+
+ while (tag = this._readTagBackward(iterator)) {
+ if (tag.selfClosing) {
+ if (!stack.length) {
+ tag.start.column += tag.tagName.length + 2;
+ tag.end.column -= 2;
+ return Range.fromPoints(tag.start, tag.end);
+ } else
+ continue;
+ }
+
+ if (!tag.closing) {
+ this._pop(stack, tag);
+ if (stack.length == 0) {
+ tag.start.column += tag.tagName.length + 2;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag)
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/folding/xml_test.js b/src/fauxton/assets/js/libs/ace/mode/folding/xml_test.js
new file mode 100644
index 000000000..ec07cc05a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/folding/xml_test.js
@@ -0,0 +1,110 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined")
+ require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var XmlMode = require("../xml").Mode;
+var EditSession = require("../../edit_session").EditSession;
+var assert = require("../../test/assertions");
+
+module.exports = {
+
+ "test: fold multi line self closing element": function() {
+ var session = new EditSession([
+ '<person',
+ ' firstname="fabian"',
+ ' lastname="jakobs"/>'
+ ]);
+
+ var mode = new XmlMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 8, 2, 19);
+ assert.range(session.getFoldWidgetRange(2), 0, 8, 2, 19);
+ },
+
+ "test: fold should skip self closing elements": function() {
+ var session = new EditSession([
+ '<person>',
+ ' <attrib value="fabian"/>',
+ '</person>'
+ ]);
+
+ var mode = new XmlMode();
+ session.setFoldStyle("markbeginend");
+ session.setMode(mode);
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "");
+ assert.equal(session.getFoldWidget(2), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 8, 2, 0);
+ assert.range(session.getFoldWidgetRange(2), 0, 8, 2, 0);
+ },
+
+ "test: fold should skip multi line self closing elements": function() {
+ var session = new EditSession([
+ '<person>',
+ ' <attib',
+ ' key="name"',
+ ' value="fabian"/>',
+ '</person>'
+ ]);
+
+ var mode = new XmlMode();
+ session.setMode(mode);
+ session.setFoldStyle("markbeginend");
+
+ assert.equal(session.getFoldWidget(0), "start");
+ assert.equal(session.getFoldWidget(1), "start");
+ assert.equal(session.getFoldWidget(2), "");
+ assert.equal(session.getFoldWidget(3), "end");
+ assert.equal(session.getFoldWidget(4), "end");
+
+ assert.range(session.getFoldWidgetRange(0), 0, 8, 4, 0);
+ assert.range(session.getFoldWidgetRange(1), 1, 9, 3, 19);
+ assert.range(session.getFoldWidgetRange(3), 1, 9, 3, 19);
+ assert.range(session.getFoldWidgetRange(4), 0, 8, 4, 0);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main)
+ require("asyncjs").test.testcase(module.exports).exec();
diff --git a/src/fauxton/assets/js/libs/ace/mode/forth.js b/src/fauxton/assets/js/libs/ace/mode/forth.js
new file mode 100644
index 000000000..1ee65e209
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/forth.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ForthHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "(?<=^|\\s)\\.?\\( [^)]*\\)";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/forth_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/forth_highlight_rules.js
new file mode 100644
index 000000000..2fbe76d57
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/forth_highlight_rules.js
@@ -0,0 +1,164 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from https://raw.github.com/vze26m98/Forth.tmbundle/master/Syntaxes/Forth.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ForthHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start: [ { include: '#forth' } ],
+ '#comment':
+ [ { token: 'comment.line.double-dash.forth',
+ regex: '(?:^|\\s)--\\s.*$',
+ comment: 'line comments for iForth' },
+ { token: 'comment.line.backslash.forth',
+ regex: '(?:^|\\s)\\\\[\\s\\S]*$',
+ comment: 'ANSI line comment' },
+ { token: 'comment.line.backslash-g.forth',
+ regex: '(?:^|\\s)\\\\[Gg] .*$',
+ comment: 'gForth line comment' },
+ { token: 'comment.block.forth',
+ regex: '(?:^|\\s)\\(\\*(?=\\s|$)',
+ push:
+ [ { token: 'comment.block.forth',
+ regex: '(?:^|\\s)\\*\\)(?=\\s|$)',
+ next: 'pop' },
+ { defaultToken: 'comment.block.forth' } ],
+ comment: 'multiline comments for iForth' },
+ { token: 'comment.block.documentation.forth',
+ regex: '\\bDOC\\b',
+ caseInsensitive: true,
+ push:
+ [ { token: 'comment.block.documentation.forth',
+ regex: '\\bENDDOC\\b',
+ caseInsensitive: true,
+ next: 'pop' },
+ { defaultToken: 'comment.block.documentation.forth' } ],
+ comment: 'documentation comments for iForth' },
+ { token: 'comment.line.parentheses.forth',
+ regex: '(?:^|\\s)\\.?\\( [^)]*\\)',
+ comment: 'ANSI line comment' } ],
+ '#constant':
+ [ { token: 'constant.language.forth',
+ regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'constant.numeric.forth',
+ regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
+ { token: 'constant.character.forth',
+ regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
+ '#forth':
+ [ { include: '#constant' },
+ { include: '#comment' },
+ { include: '#string' },
+ { include: '#word' },
+ { include: '#variable' },
+ { include: '#storage' },
+ { include: '#word-def' } ],
+ '#storage':
+ [ { token: 'storage.type.forth',
+ regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
+ caseInsensitive: true}],
+ '#string':
+ [ { token: 'string.quoted.double.forth',
+ regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
+ caseInsensitive: true},
+ { token: 'string.unquoted.forth',
+ regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
+ caseInsensitive: true}],
+ '#variable':
+ [ { token: 'variable.language.forth',
+ regex: '\\b(?:I|J)\\b',
+ caseInsensitive: true } ],
+ '#word':
+ [ { token: 'keyword.control.immediate.forth',
+ regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.immediate.forth',
+ regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.control.compile-only.forth',
+ regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.compile-only.forth',
+ regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.non-immediate.forth',
+ regex: '(?:^|\\s)(?:\'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.warning.forth',
+ regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
+ caseInsensitive: true}],
+ '#word-def':
+ [ { token:
+ [ 'keyword.other.compile-only.forth',
+ 'keyword.other.compile-only.forth',
+ 'meta.block.forth',
+ 'entity.name.function.forth' ],
+ regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)',
+ caseInsensitive: true,
+ push:
+ [ { token: 'keyword.other.compile-only.forth',
+ regex: ';(?:CODE)?',
+ caseInsensitive: true,
+ next: 'pop' },
+ { include: '#constant' },
+ { include: '#comment' },
+ { include: '#string' },
+ { include: '#word' },
+ { include: '#variable' },
+ { include: '#storage' },
+ { defaultToken: 'meta.block.forth' } ] } ] }
+
+ this.normalizeRules();
+};
+
+ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ],
+ foldingStartMarker: '/\\*\\*|\\{\\s*$',
+ foldingStopMarker: '\\*\\*/|^\\s*\\}',
+ keyEquivalent: '^~F',
+ name: 'Forth',
+ scopeName: 'source.forth' }
+
+
+oop.inherits(ForthHighlightRules, TextHighlightRules);
+
+exports.ForthHighlightRules = ForthHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/ftl.js b/src/fauxton/assets/js/libs/ace/mode/ftl.js
new file mode 100644
index 000000000..a07dcaacc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ftl.js
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = FtlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ftl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/ftl_highlight_rules.js
new file mode 100644
index 000000000..0a79520fe
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ftl_highlight_rules.js
@@ -0,0 +1,195 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var FtlLangHighlightRules = function () {
+
+ var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
+ + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
+ + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
+ + "upper_case|word_list|xhtml|xml";
+ var numberBuiltIns = "c|round|floor|ceiling";
+ var dateBuiltIns = "iso_[a-z_]+";
+ var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
+ var hashBuiltIns = "keys|values";
+ var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
+ var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
+ + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
+ var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
+ + xmlBuiltIns + expertBuiltIns;
+
+ var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
+
+ var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
+ + "now|output_encoding|template_name|url_escaping_charset|vars|version";
+
+ var operators = "gt|gte|lt|lte|as|in|using";
+
+ var reserved = "true|false";
+
+ var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
+ + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
+ + "attributes";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant.character.entity",
+ regex : /&[^;]+;/
+ }, {
+ token : "support.function",
+ regex : "\\?("+allBuiltIns+")"
+ }, {
+ token : "support.function.deprecated",
+ regex : "\\?("+deprecatedBuiltIns+")"
+ }, {
+ token : "language.variable",
+ regex : "\\.(?:"+variables+")"
+ }, {
+ token : "constant.language",
+ regex : "\\b("+reserved+")\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\b(?:"+operators+")\\b"
+ }, {
+ token : "entity.other.attribute-name",
+ regex : attributes
+ }, {
+ token : "string", //
+ regex : /['"]/,
+ next : "qstring"
+ }, {
+ // Deal with variable names that contains number
+ // e.g. <#if var42 == 42 >
+ token : function(value) {
+ if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
+ return "constant.numeric";
+ } else {
+ return "variable";
+ }
+ },
+ regex : /[\w.+\-]+/
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+ "qstring" : [{
+ token : "constant.character.escape",
+ regex : '\\\\[nrtvef\\\\"$]'
+ }, {
+ token : "string",
+ regex : /['"]/,
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }]
+ };
+};
+
+oop.inherits(FtlLangHighlightRules, TextHighlightRules);
+
+var FtlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
+ + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
+ + "setting|stop|switch|t|visit";
+
+ var startRules = [
+ {
+ token : "comment",
+ regex : "<#--",
+ next : "ftl-dcomment"
+ }, {
+ token : "string.interpolated",
+ regex : "\\${",
+ push : "ftl-start"
+ }, {
+ token : "keyword.function",
+ regex : "</?#("+directives+")",
+ push : "ftl-start"
+ }, {
+ token : "keyword.other",
+ regex : "</?@[a-zA-Z\\.]+",
+ push : "ftl-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "keyword",
+ regex : "/?>",
+ next : "pop"
+ }, {
+ token : "string.interpolated",
+ regex : "}",
+ next : "pop"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]);
+
+ this.addRules({
+ "ftl-dcomment" : [{
+ token : "comment",
+ regex : ".*?-->",
+ next : "pop"
+ }, {
+ token : "comment",
+ regex : ".+"
+ }]
+ });
+
+ this.normalizeRules();
+};
+
+oop.inherits(FtlHighlightRules, HtmlHighlightRules);
+
+exports.FtlHighlightRules = FtlHighlightRules;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/glsl.js b/src/fauxton/assets/js/libs/ace/mode/glsl.js
new file mode 100644
index 000000000..202ec9f7a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/glsl.js
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = glslHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/glsl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/glsl_highlight_rules.js
new file mode 100644
index 000000000..552df6c4b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/glsl_highlight_rules.js
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules;
+
+var glslHighlightRules = function() {
+
+ var keywords = (
+ "attribute|const|uniform|varying|break|continue|do|for|while|" +
+ "if|else|in|out|inout|float|int|void|bool|true|false|" +
+ "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" +
+ "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" +
+ "samplerCube|struct"
+ );
+
+ var buildinConstants = (
+ "radians|degrees|sin|cos|tan|asin|acos|atan|pow|" +
+ "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" +
+ "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" +
+ "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" +
+ "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" +
+ "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" +
+ "texture2DProjLod|textureCube|textureCubeLod|" +
+ "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" +
+ "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" +
+ "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" +
+ "gl_DepthRangeParameters|gl_DepthRange|" +
+ // The following two are only for MIME x-shader/x-vertex.
+ "gl_Position|gl_PointSize|" +
+ // The following five are only for MIME x-shader/x-fragment.
+ "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ this.$rules = new c_cppHighlightRules().$rules;
+ this.$rules.start.forEach(function(rule) {
+ if (typeof rule.token == "function")
+ rule.token = keywordMapper;
+ })
+};
+
+oop.inherits(glslHighlightRules, c_cppHighlightRules);
+
+exports.glslHighlightRules = glslHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/golang.js b/src/fauxton/assets/js/libs/ace/mode/golang.js
new file mode 100644
index 000000000..62b687552
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/golang.js
@@ -0,0 +1,55 @@
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = GolangHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };//end getNextLineIndent
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/golang_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/golang_highlight_rules.js
new file mode 100644
index 000000000..5bd40b444
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/golang_highlight_rules.js
@@ -0,0 +1,111 @@
+define(function(require, exports, module) {
+ var oop = require("../lib/oop");
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var GolangHighlightRules = function() {
+ var keywords = (
+ "else|break|case|return|goto|if|const|select|" +
+ "continue|struct|default|switch|for|range|" +
+ "func|import|package|chan|defer|fallthrough|go|interface|map|range|" +
+ "select|type|var"
+ );
+ var builtinTypes = (
+ "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" +
+ "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error"
+ );
+ var builtinFunctions = (
+ "make|close|new|panic|recover"
+ );
+ var builtinConstants = ("nil|true|false|iota");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "support.function": builtinFunctions,
+ "support.type": builtinTypes
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : '[`](?:[^`]*)[`]'
+ }, {
+ token : "string", // multi line string start
+ merge : true,
+ regex : '[`](?:[^`]*)$',
+ next : "bqstring"
+ }, {
+ token : "constant.numeric", // rune
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token: "invalid",
+ regex: "\\s+$"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "bqstring" : [
+ {
+ token : "string",
+ regex : '(?:[^`]*)`',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ };
+ oop.inherits(GolangHighlightRules, TextHighlightRules);
+
+ exports.GolangHighlightRules = GolangHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/groovy.js b/src/fauxton/assets/js/libs/ace/mode/groovy.js
new file mode 100644
index 000000000..91d88e08b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/groovy.js
@@ -0,0 +1,24 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = GroovyHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/groovy_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/groovy_highlight_rules.js
new file mode 100644
index 000000000..fb3b78e2e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/groovy_highlight_rules.js
@@ -0,0 +1,173 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var GroovyHighlightRules = function() {
+
+ var keywords = (
+ "assert|with|abstract|continue|for|new|switch|" +
+ "assert|default|goto|package|synchronized|" +
+ "boolean|do|if|private|this|" +
+ "break|double|implements|protected|throw|" +
+ "byte|else|import|public|throws|" +
+ "case|enum|instanceof|return|transient|" +
+ "catch|extends|int|short|try|" +
+ "char|final|interface|static|void|" +
+ "class|finally|long|strictfp|volatile|" +
+ "def|float|native|super|while"
+ );
+
+ var buildinConstants = (
+ "null|Infinity|NaN|undefined"
+ );
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object"
+ );
+
+ // TODO var importClasses = "";
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "support.function": langClasses,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : "'''",
+ next : "qstring"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$[\w\d]+/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$\{[^"\}]+\}?/
+ }, {
+ token : "string",
+ regex : '"{3,5}',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+?'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/
+ }, {
+ token : "string",
+ regex : "'{3,5}",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+?"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(GroovyHighlightRules, TextHighlightRules);
+
+exports.GroovyHighlightRules = GroovyHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/haml.js b/src/fauxton/assets/js/libs/ace/mode/haml.js
new file mode 100644
index 000000000..23ea9e696
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haml.js
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian < gjtorikian AT gmail DOT com >
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HamlHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ["//", "#"];
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/haml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/haml_highlight_rules.js
new file mode 100644
index 000000000..6219bc70b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haml_highlight_rules.js
@@ -0,0 +1,132 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RubyExports = require("./ruby_highlight_rules");
+var RubyHighlightRules = RubyExports.RubyHighlightRules;
+
+var HamlHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "punctuation.section.comment",
+ regex : /^\s*\/.*/
+ },
+ {
+ token : "punctuation.section.comment",
+ regex : /^\s*#.*/
+ },
+ {
+ token: "string.quoted.double",
+ regex: "==.+?=="
+ },
+ {
+ token: "keyword.other.doctype",
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ {
+ token: ["entity.name.tag.haml"],
+ regex: /^\s*%[\w:]+/,
+ next: "tag_single"
+ },
+ {
+ token: [ "meta.escape.haml" ],
+ regex: "^\\s*\\\\."
+ },
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+
+ RubyExports.constantOtherSymbol,
+ {
+ token: "text",
+ regex: "=|-|~",
+ next: "embedded_ruby"
+ }
+ ],
+ "tag_single": [
+ {
+ token: "entity.other.attribute-name.class.haml",
+ regex: "\\.[\\w-]+"
+ },
+ {
+ token: "entity.other.attribute-name.id.haml",
+ regex: "#[\\w-]+"
+ },
+ {
+ token: "punctuation.section",
+ regex: "\\{",
+ next: "section"
+ },
+
+ RubyExports.constantOtherSymbol,
+
+ {
+ token: "text",
+ regex: /\s/,
+ next: "start"
+ },
+ {
+ token: "empty",
+ regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)",
+ next: "start"
+ }
+ ],
+ "section": [
+ RubyExports.constantOtherSymbol,
+
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token: "punctuation.section",
+ regex: "\\}",
+ next: "start"
+ }
+ ],
+ "embedded_ruby": [
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+ {
+ token : new RubyHighlightRules().getKeywords(),
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token : ["keyword", "text", "text"],
+ regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
+ next : "start"
+ },
+ {
+ token : ["text"],
+ regex : "^$",
+ next : "start"
+ },
+ {
+ token : ["text"],
+ regex : "^(?!.*\\|\\s*$)",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(HamlHighlightRules, TextHighlightRules);
+
+exports.HamlHighlightRules = HamlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/handlebars.js b/src/fauxton/assets/js/libs/ace/mode/handlebars.js
new file mode 100644
index 000000000..55af534c3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/handlebars.js
@@ -0,0 +1,29 @@
+/* global define */
+
+define(function(require, exports, module) {
+ "use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HandlebarsHighlightRules;
+ this.$behaviour = new HtmlBehaviour();
+
+
+ this.foldingRules = new HtmlFoldMode();
+};
+
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/handlebars_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/handlebars_highlight_rules.js
new file mode 100644
index 000000000..e224335f3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/handlebars_highlight_rules.js
@@ -0,0 +1,72 @@
+/* global define */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var xmlUtil = require("./xml_util");
+function pop2(currentState, stack) {
+ stack.splice(0, 3);
+ return stack.shift() || "start";
+}
+var HandlebarsHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var hbs = {
+ regex : "(?={{)",
+ push : "handlebars"
+ }
+ for (var key in this.$rules) {
+ this.$rules[key].unshift(hbs);
+ }
+ this.$rules.handlebars = [{
+ token : "comment.start",
+ regex : "{{!--",
+ push : [{
+ token : "comment.end",
+ regex : "--}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "comment.start",
+ regex : "{{!",
+ push : [{
+ token : "comment.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "storage.type.start", // begin section
+ regex : "{{[#\\^/&]?",
+ push : [{
+ token : "storage.type.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }, {
+ token : "support.function", // unescaped variable
+ regex : "{{{",
+ push : [{
+ token : "support.function",
+ regex : "}}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }];
+
+ this.normalizeRules();
+};
+
+oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules);
+
+exports.HandlebarsHighlightRules = HandlebarsHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/haskell.js b/src/fauxton/assets/js/libs/ace/mode/haskell.js
new file mode 100644
index 000000000..5b36905c2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haskell.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HaskellHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/haskell_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/haskell_highlight_rules.js
new file mode 100644
index 000000000..fdfaa53ef
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haskell_highlight_rules.js
@@ -0,0 +1,246 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from tm bundles\haskell.tmbundle\Syntaxes\Haskell.plist (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var HaskellHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token:
+ [ 'punctuation.definition.entity.haskell',
+ 'keyword.operator.function.infix.haskell',
+ 'punctuation.definition.entity.haskell' ],
+ regex: '(`)([a-zA-Z_\']*?)(`)',
+ comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' },
+ { token: 'constant.language.unit.haskell', regex: '\\(\\)' },
+ { token: 'constant.language.empty-list.haskell',
+ regex: '\\[\\]' },
+ { token: 'keyword.other.haskell',
+ regex: 'module',
+ push:
+ [ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' },
+ { include: '#module_name' },
+ { include: '#module_exports' },
+ { token: 'invalid', regex: '[a-z]+' },
+ { defaultToken: 'meta.declaration.module.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\bclass\\b',
+ push:
+ [ { token: 'keyword.other.haskell',
+ regex: '\\bwhere\\b',
+ next: 'pop' },
+ { token: 'support.class.prelude.haskell',
+ regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' },
+ { token: 'entity.other.inherited-class.haskell',
+ regex: '[A-Z][A-Za-z_\']*' },
+ { token: 'variable.other.generic-type.haskell',
+ regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
+ { defaultToken: 'meta.declaration.class.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\binstance\\b',
+ push:
+ [ { token: 'keyword.other.haskell',
+ regex: '\\bwhere\\b|$',
+ next: 'pop' },
+ { include: '#type_signature' },
+ { defaultToken: 'meta.declaration.instance.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: 'import',
+ push:
+ [ { token: 'meta.import.haskell', regex: '$|;', next: 'pop' },
+ { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' },
+ { include: '#module_name' },
+ { include: '#module_exports' },
+ { defaultToken: 'meta.import.haskell' } ] },
+ { token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ],
+ regex: '(deriving)(\\s*\\()',
+ push:
+ [ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' },
+ { token: 'entity.other.inherited-class.haskell',
+ regex: '\\b[A-Z][a-zA-Z_\']*' },
+ { defaultToken: 'meta.deriving.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' },
+ { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' },
+ { token: 'keyword.control.haskell',
+ regex: '\\b(?:do|if|then|else)\\b' },
+ { token: 'constant.numeric.float.haskell',
+ regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b',
+ comment: 'Floats are always decimal' },
+ { token: 'constant.numeric.haskell',
+ regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' },
+ { token:
+ [ 'meta.preprocessor.c',
+ 'punctuation.definition.preprocessor.c',
+ 'meta.preprocessor.c' ],
+ regex: '^(\\s*)(#)(\\s*\\w+)',
+ comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' },
+ { include: '#pragma' },
+ { token: 'punctuation.definition.string.begin.haskell',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.haskell',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.haskell',
+ regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' },
+ { token: 'constant.character.escape.octal.haskell',
+ regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' },
+ { token: 'constant.character.escape.control.haskell',
+ regex: '\\^[A-Z@\\[\\]\\\\\\^_]' },
+ { defaultToken: 'string.quoted.double.haskell' } ] },
+ { token:
+ [ 'punctuation.definition.string.begin.haskell',
+ 'string.quoted.single.haskell',
+ 'constant.character.escape.haskell',
+ 'constant.character.escape.octal.haskell',
+ 'constant.character.escape.hexadecimal.haskell',
+ 'constant.character.escape.control.haskell',
+ 'punctuation.definition.string.end.haskell' ],
+ regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' },
+ { token:
+ [ 'meta.function.type-declaration.haskell',
+ 'entity.name.function.haskell',
+ 'meta.function.type-declaration.haskell',
+ 'keyword.other.double-colon.haskell' ],
+ regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=</>]+\\))(\\s*)(::)',
+ push:
+ [ { token: 'meta.function.type-declaration.haskell',
+ regex: '$',
+ next: 'pop' },
+ { include: '#type_signature' },
+ { defaultToken: 'meta.function.type-declaration.haskell' } ] },
+ { token: 'support.constant.haskell',
+ regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' },
+ { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' },
+ { include: '#comments' },
+ { token: 'support.function.prelude.haskell',
+ regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' },
+ { include: '#infix_op' },
+ { token: 'keyword.operator.haskell',
+ regex: '[|!%$?~+:\\-.=</>\\\\]+',
+ comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' },
+ { token: 'punctuation.separator.comma.haskell', regex: ',' } ],
+ '#block_comment':
+ [ { token: 'punctuation.definition.comment.haskell',
+ regex: '\\{-(?!#)',
+ push:
+ [ { include: '#block_comment' },
+ { token: 'punctuation.definition.comment.haskell',
+ regex: '-\\}',
+ next: 'pop' },
+ { defaultToken: 'comment.block.haskell' } ] } ],
+ '#comments':
+ [ { token: 'punctuation.definition.comment.haskell',
+ regex: '--.*',
+ push_:
+ [ { token: 'comment.line.double-dash.haskell',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-dash.haskell' } ] },
+ { include: '#block_comment' } ],
+ '#infix_op':
+ [ { token: 'entity.name.function.infix.haskell',
+ regex: '\\([|!%$+:\\-.=</>]+\\)|\\(,+\\)' } ],
+ '#module_exports':
+ [ { token: 'meta.declaration.exports.haskell',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.declaration.exports.haskell',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'entity.name.function.haskell',
+ regex: '\\b[a-z][a-zA-Z_\']*' },
+ { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' },
+ { token: 'punctuation.separator.comma.haskell', regex: ',' },
+ { include: '#infix_op' },
+ { token: 'meta.other.unknown.haskell',
+ regex: '\\(.*?\\)',
+ comment: 'So named because I don\'t know what to call this.' },
+ { defaultToken: 'meta.declaration.exports.haskell' } ] } ],
+ '#module_name':
+ [ { token: 'support.other.module.haskell',
+ regex: '[A-Z][A-Za-z._\']*' } ],
+ '#pragma':
+ [ { token: 'meta.preprocessor.haskell',
+ regex: '\\{-#',
+ push:
+ [ { token: 'meta.preprocessor.haskell',
+ regex: '#-\\}',
+ next: 'pop' },
+ { token: 'keyword.other.preprocessor.haskell',
+ regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' },
+ { defaultToken: 'meta.preprocessor.haskell' } ] } ],
+ '#type_signature':
+ [ { token:
+ [ 'meta.class-constraint.haskell',
+ 'entity.other.inherited-class.haskell',
+ 'meta.class-constraint.haskell',
+ 'variable.other.generic-type.haskell',
+ 'meta.class-constraint.haskell',
+ 'keyword.other.big-arrow.haskell' ],
+ regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' },
+ { include: '#pragma' },
+ { token: 'keyword.other.arrow.haskell', regex: '->' },
+ { token: 'keyword.other.big-arrow.haskell', regex: '=>' },
+ { token: 'support.type.prelude.haskell',
+ regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' },
+ { token: 'variable.other.generic-type.haskell',
+ regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
+ { token: 'storage.type.haskell',
+ regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' },
+ { token: 'support.constant.unit.haskell', regex: '\\(\\)' },
+ { include: '#comments' } ] }
+
+ this.normalizeRules();
+};
+
+HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ],
+ keyEquivalent: '^~H',
+ name: 'Haskell',
+ scopeName: 'source.haskell' }
+
+
+oop.inherits(HaskellHighlightRules, TextHighlightRules);
+
+exports.HaskellHighlightRules = HaskellHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/haxe.js b/src/fauxton/assets/js/libs/ace/mode/haxe.js
new file mode 100644
index 000000000..138df4201
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haxe.js
@@ -0,0 +1,56 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HaxeHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/haxe_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/haxe_highlight_rules.js
new file mode 100644
index 000000000..e9956136e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/haxe_highlight_rules.js
@@ -0,0 +1,98 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var HaxeHighlightRules = function() {
+
+ var keywords = (
+ "break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std"
+ );
+
+ var buildinConstants = (
+ "null|true|false"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({<]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}>]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(HaxeHighlightRules, TextHighlightRules);
+
+exports.HaxeHighlightRules = HaxeHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/html.js b/src/fauxton/assets/js/libs/ace/mode/html.js
new file mode 100644
index 000000000..908540020
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html.js
@@ -0,0 +1,77 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+
+var Mode = function() {
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new HtmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/html_completions.js b/src/fauxton/assets/js/libs/ace/mode/html_completions.js
new file mode 100644
index 000000000..283b71371
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html_completions.js
@@ -0,0 +1,313 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": ["manifest"],
+ "head": [],
+ "title": [],
+ "base": ["href", "target"],
+ "link": ["href", "hreflang", "rel", "media", "type", "sizes"],
+ "meta": ["http-equiv", "name", "content", "charset"],
+ "style": ["type", "media", "scoped"],
+ "script": ["charset", "type", "src", "defer", "async"],
+ "noscript": ["href"],
+ "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"],
+ "section": [],
+ "nav": [],
+ "article": ["pubdate"],
+ "aside": [],
+ "h1": [],
+ "h2": [],
+ "h3": [],
+ "h4": [],
+ "h5": [],
+ "h6": [],
+ "header": [],
+ "footer": [],
+ "address": [],
+ "main": [],
+ "p": [],
+ "hr": [],
+ "pre": [],
+ "blockquote": ["cite"],
+ "ol": ["start", "reversed"],
+ "ul": [],
+ "li": ["value"],
+ "dl": [],
+ "dt": [],
+ "dd": [],
+ "figure": [],
+ "figcaption": [],
+ "div": [],
+ "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"],
+ "em": [],
+ "strong": [],
+ "small": [],
+ "s": [],
+ "cite": [],
+ "q": ["cite"],
+ "dfn": [],
+ "abbr": [],
+ "data": [],
+ "time": ["datetime"],
+ "code": [],
+ "var": [],
+ "samp": [],
+ "kbd": [],
+ "sub": [],
+ "sup": [],
+ "i": [],
+ "b": [],
+ "u": [],
+ "mark": [],
+ "ruby": [],
+ "rt": [],
+ "rp": [],
+ "bdi": [],
+ "bdo": [],
+ "span": [],
+ "br": [],
+ "wbr": [],
+ "ins": ["cite", "datetime"],
+ "del": ["cite", "datetime"],
+ "img": ["alt", "src", "height", "width", "usemap", "ismap"],
+ "iframe": ["name", "src", "height", "width", "sandbox", "seamless"],
+ "embed": ["src", "height", "width", "type"],
+ "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"],
+ "param": ["name", "value"],
+ "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"],
+ "audio": ["src", "autobuffer", "autoplay", "loop", "controls"],
+ "source": ["src", "type", "media"],
+ "track": ["kind", "src", "srclang", "label", "default"],
+ "canvas": ["width", "height"],
+ "map": ["name"],
+ "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"],
+ "svg": [],
+ "math": [],
+ "table": ["summary"],
+ "caption": [],
+ "colgroup": ["span"],
+ "col": ["span"],
+ "tbody": [],
+ "thead": [],
+ "tfoot": [],
+ "tr": [],
+ "td": ["headers", "rowspan", "colspan"],
+ "th": ["headers", "rowspan", "colspan", "scope"],
+ "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"],
+ "fieldset": ["disabled", "form", "name"],
+ "legend": [],
+ "label": ["form", "for"],
+ "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"],
+ "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"],
+ "select": ["autofocus", "disabled", "form", "multiple", "name", "size"],
+ "datalist": [],
+ "optgroup": ["disabled", "label"],
+ "option": ["disabled", "selected", "label", "value"],
+ "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"],
+ "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"],
+ "output": ["for", "form", "name"],
+ "progress": ["value", "max"],
+ "meter": ["value", "min", "max", "low", "high", "optimum"],
+ "details": ["open"],
+ "summary": [],
+ "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"],
+ "menu": ["type", "label"],
+ "dialog": ["open"]
+};
+
+var allElements = Object.keys(attributeMap);
+
+function hasType(token, type) {
+ var tokenTypes = token.type.split('.');
+ return type.split('.').every(function(type){
+ return (tokenTypes.indexOf(type) !== -1);
+ });
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){
+ do {
+ token = iterator.stepBackward();
+ } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text')));
+ }
+ if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/'))
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+
+ // tag name
+ if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text")))
+ return this.getTagCompletions(state, session, pos, prefix);
+
+ // tag attribute
+ if (hasType(token, 'text') || hasType(token, 'attribute-name'))
+ return this.getAttributeCompetions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ var elements = allElements;
+ if (prefix) {
+ elements = elements.filter(function(element){
+ return element.indexOf(prefix) === 0;
+ });
+ }
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag"
+ };
+ });
+ };
+
+ this.getAttributeCompetions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(attributeMap[tagName]);
+ }
+ if (prefix) {
+ attributes = attributes.filter(function(attribute){
+ return attribute.indexOf(prefix) === 0;
+ });
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute"
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/html_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/html_highlight_rules.js
new file mode 100644
index 000000000..ec6318731
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html_highlight_rules.js
@@ -0,0 +1,123 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "space"
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "keyword.operator.separator",
+ regex : "=",
+ push : [{
+ include: "space"
+ }, {
+ token : "string",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "string"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation.begin",
+ "meta.tag.name" + (group ? "." + group : "")];
+ },
+ regex : "(<)([-_a-zA-Z0-9:]+)",
+ next: "start_tag_stuff"
+ }, {
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation.begin",
+ "meta.tag.name" + (group ? "." + group : "")];
+ },
+ regex : "(</)([-_a-zA-Z0-9:]+)",
+ next: "end_tag_stuff"
+ }],
+ start_tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
+ ],
+ end_tag_stuff: [
+ {include : "space"},
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/html_ruby.js b/src/fauxton/assets/js/libs/ace/mode/html_ruby.js
new file mode 100644
index 000000000..876f36714
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html_ruby.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules;
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HtmlRubyHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ruby-": RubyMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/html_ruby_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/html_ruby_highlight_rules.js
new file mode 100644
index 000000000..47f113cfc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html_ruby_highlight_rules.js
@@ -0,0 +1,84 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+
+ var HtmlRubyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ regex: "<%%|%%>",
+ token: "constant.language.escape"
+ }, {
+ token : "comment.start.erb",
+ regex : "<%#",
+ push : [{
+ token : "comment.end.erb",
+ regex: "%>",
+ next: "pop",
+ defaultToken:"comment"
+ }]
+ }, {
+ token : "support.ruby_tag",
+ regex : "<%+(?!>)[-=]?",
+ push : "ruby-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "support.ruby_tag",
+ regex : "%>",
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "#(?:[^%]|%[^>])*"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]);
+
+ this.normalizeRules();
+ };
+
+
+ oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules);
+
+ exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/html_test.js b/src/fauxton/assets/js/libs/ace/mode/html_test.js
new file mode 100644
index 000000000..1649d014d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/html_test.js
@@ -0,0 +1,67 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Range = require("../range").Range;
+var HtmlMode = require("./html").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new HtmlMode();
+ },
+
+ "test: toggle comment lines" : function() {
+ var session = new EditSession([" abc", "", "fg"]);
+
+ var range = new Range(0, 3, 1, 1);
+ var comment = this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" <!--abc-->", "", "fg"].join("\n"), session.toString());
+ },
+
+ "test: next line indent should be the same as the current line indent" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc"));
+ assert.equal("", this.mode.getNextLineIndent("start", "abc"));
+ assert.equal("\t", this.mode.getNextLineIndent("start", "\tabc"));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/ini.js b/src/fauxton/assets/js/libs/ace/mode/ini.js
new file mode 100644
index 000000000..f5eae3a32
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ini.js
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/ini").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = IniHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/ini_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/ini_highlight_rules.js
new file mode 100644
index 000000000..8ce3d949f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ini_highlight_rules.js
@@ -0,0 +1,112 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from tool\tm bundles\ini.tmbundle\Syntaxes\Ini.plist (uuid: ) */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})";
+
+var IniHighlightRules = function() {
+ this.$rules = {
+ start: [{
+ token: 'punctuation.definition.comment.ini',
+ regex: '#.*',
+ push_: [{
+ token: 'comment.line.number-sign.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.number-sign.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.comment.ini',
+ regex: ';.*',
+ push_: [{
+ token: 'comment.line.semicolon.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.semicolon.ini'
+ }]
+ }, {
+ token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'],
+ regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)'
+ }, {
+ token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'],
+ regex: '^(\\[)(.*?)(\\])'
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: "'",
+ push: [{
+ token: 'punctuation.definition.string.end.ini',
+ regex: "'",
+ next: 'pop'
+ }, {
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ defaultToken: 'string.quoted.single.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: '"',
+ push: [{
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ token: 'punctuation.definition.string.end.ini',
+ regex: '"',
+ next: 'pop'
+ }, {
+ defaultToken: 'string.quoted.double.ini'
+ }]
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+IniHighlightRules.metaData = {
+ fileTypes: ['ini', 'conf'],
+ keyEquivalent: '^~I',
+ name: 'Ini',
+ scopeName: 'source.ini'
+};
+
+
+oop.inherits(IniHighlightRules, TextHighlightRules);
+
+exports.IniHighlightRules = IniHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/jack.js b/src/fauxton/assets/js/libs/ace/mode/jack.js
new file mode 100644
index 000000000..1ea02c249
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jack.js
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./jack_highlight_rules").JackHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jack_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/jack_highlight_rules.js
new file mode 100644
index 000000000..edf7c856a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jack_highlight_rules.js
@@ -0,0 +1,142 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JackHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+ this.$rules = {
+ "start" : [
+ {
+ token : "string",
+ regex : '"',
+ next : "string2"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "string1"
+ }, {
+ token : "constant.numeric", // hex
+ regex: "-?0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "(?:0|[-+]?[1-9][0-9]*)\\b"
+ }, {
+ token : "constant.binary",
+ regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "constant.language.null",
+ regex : "null\\b"
+ }, {
+ token : "storage.type",
+ regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b"
+ }, {
+ token : "keyword",
+ regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b"
+ }, {
+ token : "language.builtin",
+ regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b"
+ }, {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "storage.form",
+ regex : "@[a-z]+"
+ }, {
+ token : "constant.other.symbol",
+ regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "variable",
+ regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "keyword.operator",
+ regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string1" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : "[^'\\\\]+"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ],
+ "string2" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JackHighlightRules, TextHighlightRules);
+
+exports.JackHighlightRules = JackHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jade.js b/src/fauxton/assets/js/libs/ace/mode/jade.js
new file mode 100644
index 000000000..740256330
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jade.js
@@ -0,0 +1,57 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian <gjtorikian @ gmail DOT com>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JadeHighlightRules;
+
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/jade_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/jade_highlight_rules.js
new file mode 100644
index 000000000..c46c0be79
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jade_highlight_rules.js
@@ -0,0 +1,341 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian <gjtorikian @ gmail DOT com>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: C5B73B98-5F2A-42E3-9F0E-028A74A9FE4B)
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+function mixin_embed(tag, prefix) {
+ return {
+ token : "entity.name.function.jade",
+ regex : "^\\s*\\:" + tag,
+ next : prefix + "start"
+ };
+}
+
+var JadeHighlightRules = function() {
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token: "keyword.control.import.include.jade",
+ regex: "\\s*\\binclude\\b"
+ },
+ {
+ token: "keyword.other.doctype.jade",
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ {
+ token : "punctuation.section.comment",
+ regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
+ },
+ {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\s*\/\//,
+ next: "comment_block"
+ },
+ mixin_embed("markdown", "markdown-"),
+ mixin_embed("sass", "sass-"),
+ mixin_embed("less", "less-"),
+ mixin_embed("coffee", "coffee-"),
+ /*
+ {
+ token: {
+ "2": {
+ "name": "entity.name.function.jade"
+ }
+ },
+ regex: "^(\\s*)(\\:cdata)",
+ next: "state_9"
+ },*/
+ // match stuff like: mixin dialog-title-desc(title, desc)
+ {
+ token: [ "storage.type.function.jade",
+ "entity.name.function.jade",
+ "punctuation.definition.parameters.begin.jade",
+ "variable.parameter.function.jade",
+ "punctuation.definition.parameters.end.jade"
+ ],
+ regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
+ },
+ // match stuff like: mixin dialog-title-desc
+ {
+ token: [ "storage.type.function.jade", "entity.name.function.jade"],
+ regex: "^(\\s*mixin)( [\\w\\-]+)"
+ },
+ {
+ token: "source.js.embedded.jade",
+ regex: "^\\s*(?:-|=|!=)",
+ next: "js-start"
+ },
+ /*{
+ token: "entity.name.tag.script.jade",
+ regex: "^\\s*script",
+ next: "js_code_tag"
+ },*/
+ {
+ token: "string.interpolated.jade",
+ regex: "[#!]\\{[^\\}]+\\}"
+ },
+ // Match any tag, id or class. skip AST filters
+ {
+ token: "meta.tag.any.jade",
+ regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,
+ next: "tag_single"
+ },
+ {
+ token: "suport.type.attribute.id.jade",
+ regex: "#\\w+"
+ },
+ {
+ token: "suport.type.attribute.class.jade",
+ regex: "\\.\\w+"
+ },
+ {
+ token: "punctuation",
+ regex: "\\s*(?:\\()",
+ next: "tag_attributes"
+ }
+ ],
+ "comment_block": [
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
+ if (value.length <= stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ],
+ /*
+
+ "state_9": [
+ {
+ token: "TODO",
+ regex: "^(?!\\1\\s+)",
+ next: "start"
+ },
+ {
+ token: "TODO",
+ regex: ".+",
+ next: "state_9"
+ }
+ ],*/
+ /*"js_code": [
+ {
+ token: "keyword.control.js",
+ regex: "\\beach\\b"
+ },
+ {
+ token: "text",
+ regex: "$",
+ next: "start"
+ }
+ ],*/
+ /*"js_code_tag": [
+ {
+ "include": "source.js"
+ },
+ {
+ token: "TODO",
+ regex: "^((?=(\\1)([\\w#\\.]|$\\n?))|^$\\n?)",
+ next: "start"
+ }
+ ],*/
+ "tag_single": [
+ {
+ token: "entity.other.attribute-name.class.jade",
+ regex: "\\.[\\w-]+"
+ },
+ {
+ token: "entity.other.attribute-name.id.jade",
+ regex: "#[\\w-]+"
+ },
+ {
+ token: ["text", "punctuation"],
+ regex: "($)|((?!\\.|#|=|-))",
+ next: "start"
+ }
+ ],
+ "tag_attributes": [
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token: "entity.other.attribute-name.jade",
+ regex: "\\b[a-zA-Z\\-:]+"
+ },
+ {
+ token: ["entity.other.attribute-name.jade", "punctuation"],
+ regex: "\\b([a-zA-Z:\\.-]+)(=)",
+ next: "attribute_strings"
+ },
+ {
+ token: "punctuation",
+ regex: "\\)",
+ next: "start"
+ }
+ ],
+ "attribute_strings": [
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "tag_attributes"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "[^'\\\\]+"
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "tag_attributes"
+ }
+ ]
+};
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token: "text",
+ regex: ".$",
+ next: "start"
+ }]);
+/*
+ this.embedRules(MarkdownHighlightRules, "markdown-", [{
+ token : "support.function",
+ regex : "^\\1\\s+",
+ captures: "1",
+ next : "start"
+ }]);
+
+ this.embedRules(SassHighlightRules, "sass-", [{
+ token : "support.function",
+ regex : "^(?!\\1\\s+)",
+ captures: "1",
+ next : "start"
+ }]);
+
+ this.embedRules(LessHighlightRules, "less-", [{
+ token : "support.function",
+ regex : "^(?!\\1\\s+)",
+ captures: "1",
+ next : "start"
+ }]);
+
+ this.embedRules(CoffeeHighlightRules, "coffee-", [{
+ token : "support.function",
+ regex : "^(?!\\1\\s+)",
+ captures: "1",
+ next : "start"
+ }]);
+
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
+ token : "support.function",
+ regex : "$",
+ captures: "1",
+ next : "start"
+ }]); */
+};
+
+oop.inherits(JadeHighlightRules, TextHighlightRules);
+
+exports.JadeHighlightRules = JadeHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/java.js b/src/fauxton/assets/js/libs/ace/mode/java.js
new file mode 100644
index 000000000..8d37e00ea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/java.js
@@ -0,0 +1,24 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = JavaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/java_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/java_highlight_rules.js
new file mode 100644
index 000000000..8cba835c2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/java_highlight_rules.js
@@ -0,0 +1,131 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaHighlightRules = function() {
+
+ // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
+ var keywords = (
+ "abstract|continue|for|new|switch|" +
+ "assert|default|goto|package|synchronized|" +
+ "boolean|do|if|private|this|" +
+ "break|double|implements|protected|throw|" +
+ "byte|else|import|public|throws|" +
+ "case|enum|instanceof|return|transient|" +
+ "catch|extends|int|short|try|" +
+ "char|final|interface|static|void|" +
+ "class|finally|long|strictfp|volatile|" +
+ "const|float|native|super|while"
+ );
+
+ var buildinConstants = ("null|Infinity|NaN|undefined");
+
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": langClasses
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript.js b/src/fauxton/assets/js/libs/ace/mode/javascript.js
new file mode 100644
index 000000000..7bfce4434
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript.js
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start" || state == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("jslint", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript/jshint.js b/src/fauxton/assets/js/libs/ace/mode/javascript/jshint.js
new file mode 100644
index 000000000..1faef4cef
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript/jshint.js
@@ -0,0 +1,9072 @@
+define(function(require, exports, module) {
+// 2.1.9
+require = null;
+require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+9:[function (req,module,exports){
+ ["log", "info", "warn", "error",
+ "time","timeEnd", "trace", "dir", "assert"
+ ].forEach(function(x) {exports[x] = nop;});
+ function nop() {}
+ },{}],
+1:[function(req,module,exports){
+// Underscore.js 1.4.4
+// http://underscorejs.org
+// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore may be freely distributed under the MIT license.
+
+(function() {
+
+ // Baseline setup
+ // --------------
+
+ // Establish the root object, `window` in the browser, or `global` on the server.
+ var root = this;
+
+ // Save the previous value of the `_` variable.
+ var previousUnderscore = root._;
+
+ // Establish the object that gets returned to break out of a loop iteration.
+ var breaker = {};
+
+ // Save bytes in the minified (but not gzipped) version:
+ var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
+
+ // Create quick reference variables for speed access to core prototypes.
+ var push = ArrayProto.push,
+ slice = ArrayProto.slice,
+ concat = ArrayProto.concat,
+ toString = ObjProto.toString,
+ hasOwnProperty = ObjProto.hasOwnProperty;
+
+ // All **ECMAScript 5** native function implementations that we hope to use
+ // are declared here.
+ var
+ nativeForEach = ArrayProto.forEach,
+ nativeMap = ArrayProto.map,
+ nativeReduce = ArrayProto.reduce,
+ nativeReduceRight = ArrayProto.reduceRight,
+ nativeFilter = ArrayProto.filter,
+ nativeEvery = ArrayProto.every,
+ nativeSome = ArrayProto.some,
+ nativeIndexOf = ArrayProto.indexOf,
+ nativeLastIndexOf = ArrayProto.lastIndexOf,
+ nativeIsArray = Array.isArray,
+ nativeKeys = Object.keys,
+ nativeBind = FuncProto.bind;
+
+ // Create a safe reference to the Underscore object for use below.
+ var _ = function(obj) {
+ if (obj instanceof _) return obj;
+ if (!(this instanceof _)) return new _(obj);
+ this._wrapped = obj;
+ };
+
+ // Export the Underscore object for **Node.js**, with
+ // backwards-compatibility for the old `require()` API. If we're in
+ // the browser, add `_` as a global object via a string identifier,
+ // for Closure Compiler "advanced" mode.
+ if (typeof exports !== 'undefined') {
+ if (typeof module !== 'undefined' && module.exports) {
+ exports = module.exports = _;
+ }
+ exports._ = _;
+ } else {
+ root._ = _;
+ }
+
+ // Current version.
+ _.VERSION = '1.4.4';
+
+ // Collection Functions
+ // --------------------
+
+ // The cornerstone, an `each` implementation, aka `forEach`.
+ // Handles objects with the built-in `forEach`, arrays, and raw objects.
+ // Delegates to **ECMAScript 5**'s native `forEach` if available.
+ var each = _.each = _.forEach = function(obj, iterator, context) {
+ if (obj == null) return;
+ if (nativeForEach && obj.forEach === nativeForEach) {
+ obj.forEach(iterator, context);
+ } else if (obj.length === +obj.length) {
+ for (var i = 0, l = obj.length; i < l; i++) {
+ if (iterator.call(context, obj[i], i, obj) === breaker) return;
+ }
+ } else {
+ for (var key in obj) {
+ if (_.has(obj, key)) {
+ if (iterator.call(context, obj[key], key, obj) === breaker) return;
+ }
+ }
+ }
+ };
+
+ // Return the results of applying the iterator to each element.
+ // Delegates to **ECMAScript 5**'s native `map` if available.
+ _.map = _.collect = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+ each(obj, function(value, index, list) {
+ results[results.length] = iterator.call(context, value, index, list);
+ });
+ return results;
+ };
+
+ var reduceError = 'Reduce of empty array with no initial value';
+
+ // **Reduce** builds up a single result from a list of values, aka `inject`,
+ // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
+ _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduce && obj.reduce === nativeReduce) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
+ }
+ each(obj, function(value, index, list) {
+ if (!initial) {
+ memo = value;
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, value, index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // The right-associative version of reduce, also known as `foldr`.
+ // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
+ _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
+ var initial = arguments.length > 2;
+ if (obj == null) obj = [];
+ if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
+ if (context) iterator = _.bind(iterator, context);
+ return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
+ }
+ var length = obj.length;
+ if (length !== +length) {
+ var keys = _.keys(obj);
+ length = keys.length;
+ }
+ each(obj, function(value, index, list) {
+ index = keys ? keys[--length] : --length;
+ if (!initial) {
+ memo = obj[index];
+ initial = true;
+ } else {
+ memo = iterator.call(context, memo, obj[index], index, list);
+ }
+ });
+ if (!initial) throw new TypeError(reduceError);
+ return memo;
+ };
+
+ // Return the first value which passes a truth test. Aliased as `detect`.
+ _.find = _.detect = function(obj, iterator, context) {
+ var result;
+ any(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) {
+ result = value;
+ return true;
+ }
+ });
+ return result;
+ };
+
+ // Return all the elements that pass a truth test.
+ // Delegates to **ECMAScript 5**'s native `filter` if available.
+ // Aliased as `select`.
+ _.filter = _.select = function(obj, iterator, context) {
+ var results = [];
+ if (obj == null) return results;
+ if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
+ each(obj, function(value, index, list) {
+ if (iterator.call(context, value, index, list)) results[results.length] = value;
+ });
+ return results;
+ };
+
+ // Return all the elements for which a truth test fails.
+ _.reject = function(obj, iterator, context) {
+ return _.filter(obj, function(value, index, list) {
+ return !iterator.call(context, value, index, list);
+ }, context);
+ };
+
+ // Determine whether all of the elements match a truth test.
+ // Delegates to **ECMAScript 5**'s native `every` if available.
+ // Aliased as `all`.
+ _.every = _.all = function(obj, iterator, context) {
+ iterator || (iterator = _.identity);
+ var result = true;
+ if (obj == null) return result;
+ if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
+ each(obj, function(value, index, list) {
+ if (!(result = result && iterator.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if at least one element in the object matches a truth test.
+ // Delegates to **ECMAScript 5**'s native `some` if available.
+ // Aliased as `any`.
+ var any = _.some = _.any = function(obj, iterator, context) {
+ iterator || (iterator = _.identity);
+ var result = false;
+ if (obj == null) return result;
+ if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
+ each(obj, function(value, index, list) {
+ if (result || (result = iterator.call(context, value, index, list))) return breaker;
+ });
+ return !!result;
+ };
+
+ // Determine if the array or object contains a given value (using `===`).
+ // Aliased as `include`.
+ _.contains = _.include = function(obj, target) {
+ if (obj == null) return false;
+ if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
+ return any(obj, function(value) {
+ return value === target;
+ });
+ };
+
+ // Invoke a method (with arguments) on every item in a collection.
+ _.invoke = function(obj, method) {
+ var args = slice.call(arguments, 2);
+ var isFunc = _.isFunction(method);
+ return _.map(obj, function(value) {
+ return (isFunc ? method : value[method]).apply(value, args);
+ });
+ };
+
+ // Convenience version of a common use case of `map`: fetching a property.
+ _.pluck = function(obj, key) {
+ return _.map(obj, function(value){ return value[key]; });
+ };
+
+ // Convenience version of a common use case of `filter`: selecting only objects
+ // containing specific `key:value` pairs.
+ _.where = function(obj, attrs, first) {
+ if (_.isEmpty(attrs)) return first ? null : [];
+ return _[first ? 'find' : 'filter'](obj, function(value) {
+ for (var key in attrs) {
+ if (attrs[key] !== value[key]) return false;
+ }
+ return true;
+ });
+ };
+
+ // Convenience version of a common use case of `find`: getting the first object
+ // containing specific `key:value` pairs.
+ _.findWhere = function(obj, attrs) {
+ return _.where(obj, attrs, true);
+ };
+
+ // Return the maximum element or (element-based computation).
+ // Can't optimize arrays of integers longer than 65,535 elements.
+ // See: https://bugs.webkit.org/show_bug.cgi?id=80797
+ _.max = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.max.apply(Math, obj);
+ }
+ if (!iterator && _.isEmpty(obj)) return -Infinity;
+ var result = {computed : -Infinity, value: -Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed >= result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Return the minimum element (or element-based computation).
+ _.min = function(obj, iterator, context) {
+ if (!iterator && _.isArray(obj) && obj[0] === +obj[0] && obj.length < 65535) {
+ return Math.min.apply(Math, obj);
+ }
+ if (!iterator && _.isEmpty(obj)) return Infinity;
+ var result = {computed : Infinity, value: Infinity};
+ each(obj, function(value, index, list) {
+ var computed = iterator ? iterator.call(context, value, index, list) : value;
+ computed < result.computed && (result = {value : value, computed : computed});
+ });
+ return result.value;
+ };
+
+ // Shuffle an array.
+ _.shuffle = function(obj) {
+ var rand;
+ var index = 0;
+ var shuffled = [];
+ each(obj, function(value) {
+ rand = _.random(index++);
+ shuffled[index - 1] = shuffled[rand];
+ shuffled[rand] = value;
+ });
+ return shuffled;
+ };
+
+ // An internal function to generate lookup iterators.
+ var lookupIterator = function(value) {
+ return _.isFunction(value) ? value : function(obj){ return obj[value]; };
+ };
+
+ // Sort the object's values by a criterion produced by an iterator.
+ _.sortBy = function(obj, value, context) {
+ var iterator = lookupIterator(value);
+ return _.pluck(_.map(obj, function(value, index, list) {
+ return {
+ value : value,
+ index : index,
+ criteria : iterator.call(context, value, index, list)
+ };
+ }).sort(function(left, right) {
+ var a = left.criteria;
+ var b = right.criteria;
+ if (a !== b) {
+ if (a > b || a === void 0) return 1;
+ if (a < b || b === void 0) return -1;
+ }
+ return left.index < right.index ? -1 : 1;
+ }), 'value');
+ };
+
+ // An internal function used for aggregate "group by" operations.
+ var group = function(obj, value, context, behavior) {
+ var result = {};
+ var iterator = lookupIterator(value || _.identity);
+ each(obj, function(value, index) {
+ var key = iterator.call(context, value, index, obj);
+ behavior(result, key, value);
+ });
+ return result;
+ };
+
+ // Groups the object's values by a criterion. Pass either a string attribute
+ // to group by, or a function that returns the criterion.
+ _.groupBy = function(obj, value, context) {
+ return group(obj, value, context, function(result, key, value) {
+ (_.has(result, key) ? result[key] : (result[key] = [])).push(value);
+ });
+ };
+
+ // Counts instances of an object that group by a certain criterion. Pass
+ // either a string attribute to count by, or a function that returns the
+ // criterion.
+ _.countBy = function(obj, value, context) {
+ return group(obj, value, context, function(result, key) {
+ if (!_.has(result, key)) result[key] = 0;
+ result[key]++;
+ });
+ };
+
+ // Use a comparator function to figure out the smallest index at which
+ // an object should be inserted so as to maintain order. Uses binary search.
+ _.sortedIndex = function(array, obj, iterator, context) {
+ iterator = iterator == null ? _.identity : lookupIterator(iterator);
+ var value = iterator.call(context, obj);
+ var low = 0, high = array.length;
+ while (low < high) {
+ var mid = (low + high) >>> 1;
+ iterator.call(context, array[mid]) < value ? low = mid + 1 : high = mid;
+ }
+ return low;
+ };
+
+ // Safely convert anything iterable into a real, live array.
+ _.toArray = function(obj) {
+ if (!obj) return [];
+ if (_.isArray(obj)) return slice.call(obj);
+ if (obj.length === +obj.length) return _.map(obj, _.identity);
+ return _.values(obj);
+ };
+
+ // Return the number of elements in an object.
+ _.size = function(obj) {
+ if (obj == null) return 0;
+ return (obj.length === +obj.length) ? obj.length : _.keys(obj).length;
+ };
+
+ // Array Functions
+ // ---------------
+
+ // Get the first element of an array. Passing **n** will return the first N
+ // values in the array. Aliased as `head` and `take`. The **guard** check
+ // allows it to work with `_.map`.
+ _.first = _.head = _.take = function(array, n, guard) {
+ if (array == null) return void 0;
+ return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
+ };
+
+ // Returns everything but the last entry of the array. Especially useful on
+ // the arguments object. Passing **n** will return all the values in
+ // the array, excluding the last N. The **guard** check allows it to work with
+ // `_.map`.
+ _.initial = function(array, n, guard) {
+ return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
+ };
+
+ // Get the last element of an array. Passing **n** will return the last N
+ // values in the array. The **guard** check allows it to work with `_.map`.
+ _.last = function(array, n, guard) {
+ if (array == null) return void 0;
+ if ((n != null) && !guard) {
+ return slice.call(array, Math.max(array.length - n, 0));
+ } else {
+ return array[array.length - 1];
+ }
+ };
+
+ // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.
+ // Especially useful on the arguments object. Passing an **n** will return
+ // the rest N values in the array. The **guard**
+ // check allows it to work with `_.map`.
+ _.rest = _.tail = _.drop = function(array, n, guard) {
+ return slice.call(array, (n == null) || guard ? 1 : n);
+ };
+
+ // Trim out all falsy values from an array.
+ _.compact = function(array) {
+ return _.filter(array, _.identity);
+ };
+
+ // Internal implementation of a recursive `flatten` function.
+ var flatten = function(input, shallow, output) {
+ each(input, function(value) {
+ if (_.isArray(value)) {
+ shallow ? push.apply(output, value) : flatten(value, shallow, output);
+ } else {
+ output.push(value);
+ }
+ });
+ return output;
+ };
+
+ // Return a completely flattened version of an array.
+ _.flatten = function(array, shallow) {
+ return flatten(array, shallow, []);
+ };
+
+ // Return a version of the array that does not contain the specified value(s).
+ _.without = function(array) {
+ return _.difference(array, slice.call(arguments, 1));
+ };
+
+ // Produce a duplicate-free version of the array. If the array has already
+ // been sorted, you have the option of using a faster algorithm.
+ // Aliased as `unique`.
+ _.uniq = _.unique = function(array, isSorted, iterator, context) {
+ if (_.isFunction(isSorted)) {
+ context = iterator;
+ iterator = isSorted;
+ isSorted = false;
+ }
+ var initial = iterator ? _.map(array, iterator, context) : array;
+ var results = [];
+ var seen = [];
+ each(initial, function(value, index) {
+ if (isSorted ? (!index || seen[seen.length - 1] !== value) : !_.contains(seen, value)) {
+ seen.push(value);
+ results.push(array[index]);
+ }
+ });
+ return results;
+ };
+
+ // Produce an array that contains the union: each distinct element from all of
+ // the passed-in arrays.
+ _.union = function() {
+ return _.uniq(concat.apply(ArrayProto, arguments));
+ };
+
+ // Produce an array that contains every item shared between all the
+ // passed-in arrays.
+ _.intersection = function(array) {
+ var rest = slice.call(arguments, 1);
+ return _.filter(_.uniq(array), function(item) {
+ return _.every(rest, function(other) {
+ return _.indexOf(other, item) >= 0;
+ });
+ });
+ };
+
+ // Take the difference between one array and a number of other arrays.
+ // Only the elements present in just the first array will remain.
+ _.difference = function(array) {
+ var rest = concat.apply(ArrayProto, slice.call(arguments, 1));
+ return _.filter(array, function(value){ return !_.contains(rest, value); });
+ };
+
+ // Zip together multiple lists into a single array -- elements that share
+ // an index go together.
+ _.zip = function() {
+ var args = slice.call(arguments);
+ var length = _.max(_.pluck(args, 'length'));
+ var results = new Array(length);
+ for (var i = 0; i < length; i++) {
+ results[i] = _.pluck(args, "" + i);
+ }
+ return results;
+ };
+
+ // Converts lists into objects. Pass either a single array of `[key, value]`
+ // pairs, or two parallel arrays of the same length -- one of keys, and one of
+ // the corresponding values.
+ _.object = function(list, values) {
+ if (list == null) return {};
+ var result = {};
+ for (var i = 0, l = list.length; i < l; i++) {
+ if (values) {
+ result[list[i]] = values[i];
+ } else {
+ result[list[i][0]] = list[i][1];
+ }
+ }
+ return result;
+ };
+
+ // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
+ // we need this function. Return the position of the first occurrence of an
+ // item in an array, or -1 if the item is not included in the array.
+ // Delegates to **ECMAScript 5**'s native `indexOf` if available.
+ // If the array is large and already in sort order, pass `true`
+ // for **isSorted** to use binary search.
+ _.indexOf = function(array, item, isSorted) {
+ if (array == null) return -1;
+ var i = 0, l = array.length;
+ if (isSorted) {
+ if (typeof isSorted == 'number') {
+ i = (isSorted < 0 ? Math.max(0, l + isSorted) : isSorted);
+ } else {
+ i = _.sortedIndex(array, item);
+ return array[i] === item ? i : -1;
+ }
+ }
+ if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item, isSorted);
+ for (; i < l; i++) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
+ _.lastIndexOf = function(array, item, from) {
+ if (array == null) return -1;
+ var hasIndex = from != null;
+ if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) {
+ return hasIndex ? array.lastIndexOf(item, from) : array.lastIndexOf(item);
+ }
+ var i = (hasIndex ? from : array.length);
+ while (i--) if (array[i] === item) return i;
+ return -1;
+ };
+
+ // Generate an integer Array containing an arithmetic progression. A port of
+ // the native Python `range()` function. See
+ // [the Python documentation](http://docs.python.org/library/functions.html#range).
+ _.range = function(start, stop, step) {
+ if (arguments.length <= 1) {
+ stop = start || 0;
+ start = 0;
+ }
+ step = arguments[2] || 1;
+
+ var len = Math.max(Math.ceil((stop - start) / step), 0);
+ var idx = 0;
+ var range = new Array(len);
+
+ while(idx < len) {
+ range[idx++] = start;
+ start += step;
+ }
+
+ return range;
+ };
+
+ // Function (ahem) Functions
+ // ------------------
+
+ // Create a function bound to a given object (assigning `this`, and arguments,
+ // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if
+ // available.
+ _.bind = function(func, context) {
+ if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
+ var args = slice.call(arguments, 2);
+ return function() {
+ return func.apply(context, args.concat(slice.call(arguments)));
+ };
+ };
+
+ // Partially apply a function by creating a version that has had some of its
+ // arguments pre-filled, without changing its dynamic `this` context.
+ _.partial = function(func) {
+ var args = slice.call(arguments, 1);
+ return function() {
+ return func.apply(this, args.concat(slice.call(arguments)));
+ };
+ };
+
+ // Bind all of an object's methods to that object. Useful for ensuring that
+ // all callbacks defined on an object belong to it.
+ _.bindAll = function(obj) {
+ var funcs = slice.call(arguments, 1);
+ if (funcs.length === 0) funcs = _.functions(obj);
+ each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
+ return obj;
+ };
+
+ // Memoize an expensive function by storing its results.
+ _.memoize = function(func, hasher) {
+ var memo = {};
+ hasher || (hasher = _.identity);
+ return function() {
+ var key = hasher.apply(this, arguments);
+ return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
+ };
+ };
+
+ // Delays a function for the given number of milliseconds, and then calls
+ // it with the arguments supplied.
+ _.delay = function(func, wait) {
+ var args = slice.call(arguments, 2);
+ return setTimeout(function(){ return func.apply(null, args); }, wait);
+ };
+
+ // Defers a function, scheduling it to run after the current call stack has
+ // cleared.
+ _.defer = function(func) {
+ return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
+ };
+
+ // Returns a function, that, when invoked, will only be triggered at most once
+ // during a given window of time.
+ _.throttle = function(func, wait) {
+ var context, args, timeout, result;
+ var previous = 0;
+ var later = function() {
+ previous = new Date;
+ timeout = null;
+ result = func.apply(context, args);
+ };
+ return function() {
+ var now = new Date;
+ var remaining = wait - (now - previous);
+ context = this;
+ args = arguments;
+ if (remaining <= 0) {
+ clearTimeout(timeout);
+ timeout = null;
+ previous = now;
+ result = func.apply(context, args);
+ } else if (!timeout) {
+ timeout = setTimeout(later, remaining);
+ }
+ return result;
+ };
+ };
+
+ // Returns a function, that, as long as it continues to be invoked, will not
+ // be triggered. The function will be called after it stops being called for
+ // N milliseconds. If `immediate` is passed, trigger the function on the
+ // leading edge, instead of the trailing.
+ _.debounce = function(func, wait, immediate) {
+ var timeout, result;
+ return function() {
+ var context = this, args = arguments;
+ var later = function() {
+ timeout = null;
+ if (!immediate) result = func.apply(context, args);
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+ if (callNow) result = func.apply(context, args);
+ return result;
+ };
+ };
+
+ // Returns a function that will be executed at most one time, no matter how
+ // often you call it. Useful for lazy initialization.
+ _.once = function(func) {
+ var ran = false, memo;
+ return function() {
+ if (ran) return memo;
+ ran = true;
+ memo = func.apply(this, arguments);
+ func = null;
+ return memo;
+ };
+ };
+
+ // Returns the first function passed as an argument to the second,
+ // allowing you to adjust arguments, run code before and after, and
+ // conditionally execute the original function.
+ _.wrap = function(func, wrapper) {
+ return function() {
+ var args = [func];
+ push.apply(args, arguments);
+ return wrapper.apply(this, args);
+ };
+ };
+
+ // Returns a function that is the composition of a list of functions, each
+ // consuming the return value of the function that follows.
+ _.compose = function() {
+ var funcs = arguments;
+ return function() {
+ var args = arguments;
+ for (var i = funcs.length - 1; i >= 0; i--) {
+ args = [funcs[i].apply(this, args)];
+ }
+ return args[0];
+ };
+ };
+
+ // Returns a function that will only be executed after being called N times.
+ _.after = function(times, func) {
+ if (times <= 0) return func();
+ return function() {
+ if (--times < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ };
+
+ // Object Functions
+ // ----------------
+
+ // Retrieve the names of an object's properties.
+ // Delegates to **ECMAScript 5**'s native `Object.keys`
+ _.keys = nativeKeys || function(obj) {
+ if (obj !== Object(obj)) throw new TypeError('Invalid object');
+ var keys = [];
+ for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
+ return keys;
+ };
+
+ // Retrieve the values of an object's properties.
+ _.values = function(obj) {
+ var values = [];
+ for (var key in obj) if (_.has(obj, key)) values.push(obj[key]);
+ return values;
+ };
+
+ // Convert an object into a list of `[key, value]` pairs.
+ _.pairs = function(obj) {
+ var pairs = [];
+ for (var key in obj) if (_.has(obj, key)) pairs.push([key, obj[key]]);
+ return pairs;
+ };
+
+ // Invert the keys and values of an object. The values must be serializable.
+ _.invert = function(obj) {
+ var result = {};
+ for (var key in obj) if (_.has(obj, key)) result[obj[key]] = key;
+ return result;
+ };
+
+ // Return a sorted list of the function names available on the object.
+ // Aliased as `methods`
+ _.functions = _.methods = function(obj) {
+ var names = [];
+ for (var key in obj) {
+ if (_.isFunction(obj[key])) names.push(key);
+ }
+ return names.sort();
+ };
+
+ // Extend a given object with all the properties in passed-in object(s).
+ _.extend = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Return a copy of the object only containing the whitelisted properties.
+ _.pick = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ each(keys, function(key) {
+ if (key in obj) copy[key] = obj[key];
+ });
+ return copy;
+ };
+
+ // Return a copy of the object without the blacklisted properties.
+ _.omit = function(obj) {
+ var copy = {};
+ var keys = concat.apply(ArrayProto, slice.call(arguments, 1));
+ for (var key in obj) {
+ if (!_.contains(keys, key)) copy[key] = obj[key];
+ }
+ return copy;
+ };
+
+ // Fill in a given object with default properties.
+ _.defaults = function(obj) {
+ each(slice.call(arguments, 1), function(source) {
+ if (source) {
+ for (var prop in source) {
+ if (obj[prop] == null) obj[prop] = source[prop];
+ }
+ }
+ });
+ return obj;
+ };
+
+ // Create a (shallow-cloned) duplicate of an object.
+ _.clone = function(obj) {
+ if (!_.isObject(obj)) return obj;
+ return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
+ };
+
+ // Invokes interceptor with the obj, and then returns obj.
+ // The primary purpose of this method is to "tap into" a method chain, in
+ // order to perform operations on intermediate results within the chain.
+ _.tap = function(obj, interceptor) {
+ interceptor(obj);
+ return obj;
+ };
+
+ // Internal recursive comparison function for `isEqual`.
+ var eq = function(a, b, aStack, bStack) {
+ // Identical objects are equal. `0 === -0`, but they aren't identical.
+ // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
+ if (a === b) return a !== 0 || 1 / a == 1 / b;
+ // A strict comparison is necessary because `null == undefined`.
+ if (a == null || b == null) return a === b;
+ // Unwrap any wrapped objects.
+ if (a instanceof _) a = a._wrapped;
+ if (b instanceof _) b = b._wrapped;
+ // Compare `[[Class]]` names.
+ var className = toString.call(a);
+ if (className != toString.call(b)) return false;
+ switch (className) {
+ // Strings, numbers, dates, and booleans are compared by value.
+ case '[object String]':
+ // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
+ // equivalent to `new String("5")`.
+ return a == String(b);
+ case '[object Number]':
+ // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
+ // other numeric values.
+ return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
+ case '[object Date]':
+ case '[object Boolean]':
+ // Coerce dates and booleans to numeric primitive values. Dates are compared by their
+ // millisecond representations. Note that invalid dates with millisecond representations
+ // of `NaN` are not equivalent.
+ return +a == +b;
+ // RegExps are compared by their source patterns and flags.
+ case '[object RegExp]':
+ return a.source == b.source &&
+ a.global == b.global &&
+ a.multiline == b.multiline &&
+ a.ignoreCase == b.ignoreCase;
+ }
+ if (typeof a != 'object' || typeof b != 'object') return false;
+ // Assume equality for cyclic structures. The algorithm for detecting cyclic
+ // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
+ var length = aStack.length;
+ while (length--) {
+ // Linear search. Performance is inversely proportional to the number of
+ // unique nested structures.
+ if (aStack[length] == a) return bStack[length] == b;
+ }
+ // Add the first object to the stack of traversed objects.
+ aStack.push(a);
+ bStack.push(b);
+ var size = 0, result = true;
+ // Recursively compare objects and arrays.
+ if (className == '[object Array]') {
+ // Compare array lengths to determine if a deep comparison is necessary.
+ size = a.length;
+ result = size == b.length;
+ if (result) {
+ // Deep compare the contents, ignoring non-numeric properties.
+ while (size--) {
+ if (!(result = eq(a[size], b[size], aStack, bStack))) break;
+ }
+ }
+ } else {
+ // Objects with different constructors are not equivalent, but `Object`s
+ // from different frames are.
+ var aCtor = a.constructor, bCtor = b.constructor;
+ if (aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) &&
+ _.isFunction(bCtor) && (bCtor instanceof bCtor))) {
+ return false;
+ }
+ // Deep compare objects.
+ for (var key in a) {
+ if (_.has(a, key)) {
+ // Count the expected number of properties.
+ size++;
+ // Deep compare each member.
+ if (!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))) break;
+ }
+ }
+ // Ensure that both objects contain the same number of properties.
+ if (result) {
+ for (key in b) {
+ if (_.has(b, key) && !(size--)) break;
+ }
+ result = !size;
+ }
+ }
+ // Remove the first object from the stack of traversed objects.
+ aStack.pop();
+ bStack.pop();
+ return result;
+ };
+
+ // Perform a deep comparison to check if two objects are equal.
+ _.isEqual = function(a, b) {
+ return eq(a, b, [], []);
+ };
+
+ // Is a given array, string, or object empty?
+ // An "empty" object has no enumerable own-properties.
+ _.isEmpty = function(obj) {
+ if (obj == null) return true;
+ if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
+ for (var key in obj) if (_.has(obj, key)) return false;
+ return true;
+ };
+
+ // Is a given value a DOM element?
+ _.isElement = function(obj) {
+ return !!(obj && obj.nodeType === 1);
+ };
+
+ // Is a given value an array?
+ // Delegates to ECMA5's native Array.isArray
+ _.isArray = nativeIsArray || function(obj) {
+ return toString.call(obj) == '[object Array]';
+ };
+
+ // Is a given variable an object?
+ _.isObject = function(obj) {
+ return obj === Object(obj);
+ };
+
+ // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp.
+ each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp'], function(name) {
+ _['is' + name] = function(obj) {
+ return toString.call(obj) == '[object ' + name + ']';
+ };
+ });
+
+ // Define a fallback version of the method in browsers (ahem, IE), where
+ // there isn't any inspectable "Arguments" type.
+ if (!_.isArguments(arguments)) {
+ _.isArguments = function(obj) {
+ return !!(obj && _.has(obj, 'callee'));
+ };
+ }
+
+ // Optimize `isFunction` if appropriate.
+ if (typeof (/./) !== 'function') {
+ _.isFunction = function(obj) {
+ return typeof obj === 'function';
+ };
+ }
+
+ // Is a given object a finite number?
+ _.isFinite = function(obj) {
+ return isFinite(obj) && !isNaN(parseFloat(obj));
+ };
+
+ // Is the given value `NaN`? (NaN is the only number which does not equal itself).
+ _.isNaN = function(obj) {
+ return _.isNumber(obj) && obj != +obj;
+ };
+
+ // Is a given value a boolean?
+ _.isBoolean = function(obj) {
+ return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
+ };
+
+ // Is a given value equal to null?
+ _.isNull = function(obj) {
+ return obj === null;
+ };
+
+ // Is a given variable undefined?
+ _.isUndefined = function(obj) {
+ return obj === void 0;
+ };
+
+ // Shortcut function for checking if an object has a given property directly
+ // on itself (in other words, not on a prototype).
+ _.has = function(obj, key) {
+ return hasOwnProperty.call(obj, key);
+ };
+
+ // Utility Functions
+ // -----------------
+
+ // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
+ // previous owner. Returns a reference to the Underscore object.
+ _.noConflict = function() {
+ root._ = previousUnderscore;
+ return this;
+ };
+
+ // Keep the identity function around for default iterators.
+ _.identity = function(value) {
+ return value;
+ };
+
+ // Run a function **n** times.
+ _.times = function(n, iterator, context) {
+ var accum = Array(n);
+ for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
+ return accum;
+ };
+
+ // Return a random integer between min and max (inclusive).
+ _.random = function(min, max) {
+ if (max == null) {
+ max = min;
+ min = 0;
+ }
+ return min + Math.floor(Math.random() * (max - min + 1));
+ };
+
+ // List of HTML entities for escaping.
+ var entityMap = {
+ escape: {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#x27;',
+ '/': '&#x2F;'
+ }
+ };
+ entityMap.unescape = _.invert(entityMap.escape);
+
+ // Regexes containing the keys and values listed immediately above.
+ var entityRegexes = {
+ escape: new RegExp('[' + _.keys(entityMap.escape).join('') + ']', 'g'),
+ unescape: new RegExp('(' + _.keys(entityMap.unescape).join('|') + ')', 'g')
+ };
+
+ // Functions for escaping and unescaping strings to/from HTML interpolation.
+ _.each(['escape', 'unescape'], function(method) {
+ _[method] = function(string) {
+ if (string == null) return '';
+ return ('' + string).replace(entityRegexes[method], function(match) {
+ return entityMap[method][match];
+ });
+ };
+ });
+
+ // If the value of the named property is a function then invoke it;
+ // otherwise, return it.
+ _.result = function(object, property) {
+ if (object == null) return null;
+ var value = object[property];
+ return _.isFunction(value) ? value.call(object) : value;
+ };
+
+ // Add your own custom functions to the Underscore object.
+ _.mixin = function(obj) {
+ each(_.functions(obj), function(name){
+ var func = _[name] = obj[name];
+ _.prototype[name] = function() {
+ var args = [this._wrapped];
+ push.apply(args, arguments);
+ return result.call(this, func.apply(_, args));
+ };
+ });
+ };
+
+ // Generate a unique integer id (unique within the entire client session).
+ // Useful for temporary DOM ids.
+ var idCounter = 0;
+ _.uniqueId = function(prefix) {
+ var id = ++idCounter + '';
+ return prefix ? prefix + id : id;
+ };
+
+ // By default, Underscore uses ERB-style template delimiters, change the
+ // following template settings to use alternative delimiters.
+ _.templateSettings = {
+ evaluate : /<%([\s\S]+?)%>/g,
+ interpolate : /<%=([\s\S]+?)%>/g,
+ escape : /<%-([\s\S]+?)%>/g
+ };
+
+ // When customizing `templateSettings`, if you don't want to define an
+ // interpolation, evaluation or escaping regex, we need one that is
+ // guaranteed not to match.
+ var noMatch = /(.)^/;
+
+ // Certain characters need to be escaped so that they can be put into a
+ // string literal.
+ var escapes = {
+ "'": "'",
+ '\\': '\\',
+ '\r': 'r',
+ '\n': 'n',
+ '\t': 't',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+
+ var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
+
+ // JavaScript micro-templating, similar to John Resig's implementation.
+ // Underscore templating handles arbitrary delimiters, preserves whitespace,
+ // and correctly escapes quotes within interpolated code.
+ _.template = function(text, data, settings) {
+ var render;
+ settings = _.defaults({}, settings, _.templateSettings);
+
+ // Combine delimiters into one regular expression via alternation.
+ var matcher = new RegExp([
+ (settings.escape || noMatch).source,
+ (settings.interpolate || noMatch).source,
+ (settings.evaluate || noMatch).source
+ ].join('|') + '|$', 'g');
+
+ // Compile the template source, escaping string literals appropriately.
+ var index = 0;
+ var source = "__p+='";
+ text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
+ source += text.slice(index, offset)
+ .replace(escaper, function(match) { return '\\' + escapes[match]; });
+
+ if (escape) {
+ source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
+ }
+ if (interpolate) {
+ source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
+ }
+ if (evaluate) {
+ source += "';\n" + evaluate + "\n__p+='";
+ }
+ index = offset + match.length;
+ return match;
+ });
+ source += "';\n";
+
+ // If a variable is not specified, place data values in local scope.
+ if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
+
+ source = "var __t,__p='',__j=Array.prototype.join," +
+ "print=function(){__p+=__j.call(arguments,'');};\n" +
+ source + "return __p;\n";
+
+ try {
+ render = new Function(settings.variable || 'obj', '_', source);
+ } catch (e) {
+ e.source = source;
+ throw e;
+ }
+
+ if (data) return render(data, _);
+ var template = function(data) {
+ return render.call(this, data, _);
+ };
+
+ // Provide the compiled function source as a convenience for precompilation.
+ template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}';
+
+ return template;
+ };
+
+ // Add a "chain" function, which will delegate to the wrapper.
+ _.chain = function(obj) {
+ return _(obj).chain();
+ };
+
+ // OOP
+ // ---------------
+ // If Underscore is called as a function, it returns a wrapped object that
+ // can be used OO-style. This wrapper holds altered versions of all the
+ // underscore functions. Wrapped objects may be chained.
+
+ // Helper function to continue chaining intermediate results.
+ var result = function(obj) {
+ return this._chain ? _(obj).chain() : obj;
+ };
+
+ // Add all of the Underscore functions to the wrapper object.
+ _.mixin(_);
+
+ // Add all mutator Array functions to the wrapper.
+ each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ var obj = this._wrapped;
+ method.apply(obj, arguments);
+ if ((name == 'shift' || name == 'splice') && obj.length === 0) delete obj[0];
+ return result.call(this, obj);
+ };
+ });
+
+ // Add all accessor Array functions to the wrapper.
+ each(['concat', 'join', 'slice'], function(name) {
+ var method = ArrayProto[name];
+ _.prototype[name] = function() {
+ return result.call(this, method.apply(this._wrapped, arguments));
+ };
+ });
+
+ _.extend(_.prototype, {
+
+ // Start chaining a wrapped Underscore object.
+ chain: function() {
+ this._chain = true;
+ return this;
+ },
+
+ // Extracts the result from a wrapped and chained object.
+ value: function() {
+ return this._wrapped;
+ }
+
+ });
+
+}).call(this);
+
+},
+{}],
+2:[function(req,module,exports){
+"use strict";
+
+var _ = req("underscore");
+
+var errors = {
+ // JSHint options
+ E001: "Bad option: '{a}'.",
+ E002: "Bad option value.",
+
+ // JSHint input
+ E003: "Expected a JSON value.",
+ E004: "Input is neither a string nor an array of strings.",
+ E005: "Input is empty.",
+ E006: "Unexpected early end of program.",
+
+ // Strict mode
+ E007: "Missing \"use strict\" statement.",
+ E008: "Strict violation.",
+ E009: "Option 'validthis' can't be used in a global scope.",
+ E010: "'with' is not allowed in strict mode.",
+
+ // Constants
+ E011: "const '{a}' has already been declared.",
+ E012: "const '{a}' is initialized to 'undefined'.",
+ E013: "Attempting to override '{a}' which is a constant.",
+
+ // Regular expressions
+ E014: "A regular expression literal can be confused with '/='.",
+ E015: "Unclosed regular expression.",
+ E016: "Invalid regular expression.",
+
+ // Tokens
+ E017: "Unclosed comment.",
+ E018: "Unbegun comment.",
+ E019: "Unmatched '{a}'.",
+ E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
+ E021: "Expected '{a}' and instead saw '{b}'.",
+ E022: "Line breaking error '{a}'.",
+ E023: "Missing '{a}'.",
+ E024: "Unexpected '{a}'.",
+ E025: "Missing ':' on a case clause.",
+ E026: "Missing '}' to match '{' from line {a}.",
+ E027: "Missing ']' to match '[' form line {a}.",
+ E028: "Illegal comma.",
+ E029: "Unclosed string.",
+
+ // Everything else
+ E030: "Expected an identifier and instead saw '{a}'.",
+ E031: "Bad assignment.", // FIXME: Rephrase
+ E032: "Expected a small integer or 'false' and instead saw '{a}'.",
+ E033: "Expected an operator and instead saw '{a}'.",
+ E034: "get/set are ES5 features.",
+ E035: "Missing property name.",
+ E036: "Expected to see a statement and instead saw a block.",
+ E037: null, // Vacant
+ E038: null, // Vacant
+ E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
+ E040: "Each value should have its own case label.",
+ E041: "Unrecoverable syntax error.",
+ E042: "Stopping.",
+ E043: "Too many errors.",
+ E044: "'{a}' is already defined and can't be redefined.",
+ E045: "Invalid for each loop.",
+ E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
+ E047: "A generator function shall contain a yield statement.",
+ E048: "Let declaration not directly within block.",
+ E049: "A {a} cannot be named '{b}'.",
+ E050: "Mozilla requires the yield expression to be parenthesized here.",
+ E051: "Regular parameters cannot come after default parameters."
+};
+
+var warnings = {
+ W001: "'hasOwnProperty' is a really bad name.",
+ W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
+ W003: "'{a}' was used before it was defined.",
+ W004: "'{a}' is already defined.",
+ W005: "A dot following a number can be confused with a decimal point.",
+ W006: "Confusing minuses.",
+ W007: "Confusing pluses.",
+ W008: "A leading decimal point can be confused with a dot: '{a}'.",
+ W009: "The array literal notation [] is preferrable.",
+ W010: "The object literal notation {} is preferrable.",
+ W011: "Unexpected space after '{a}'.",
+ W012: "Unexpected space before '{a}'.",
+ W013: "Missing space after '{a}'.",
+ W014: "Bad line breaking before '{a}'.",
+ W015: "Expected '{a}' to have an indentation at {b} instead at {c}.",
+ W016: "Unexpected use of '{a}'.",
+ W017: "Bad operand.",
+ W018: "Confusing use of '{a}'.",
+ W019: "Use the isNaN function to compare with NaN.",
+ W020: "Read only.",
+ W021: "'{a}' is a function.",
+ W022: "Do not assign to the exception parameter.",
+ W023: "Expected an identifier in an assignment and instead saw a function invocation.",
+ W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
+ W025: "Missing name in function declaration.",
+ W026: "Inner functions should be listed at the top of the outer function.",
+ W027: "Unreachable '{a}' after '{b}'.",
+ W028: "Label '{a}' on {b} statement.",
+ W030: "Expected an assignment or function call and instead saw an expression.",
+ W031: "Do not use 'new' for side effects.",
+ W032: "Unnecessary semicolon.",
+ W033: "Missing semicolon.",
+ W034: "Unnecessary directive \"{a}\".",
+ W035: "Empty block.",
+ W036: "Unexpected /*member '{a}'.",
+ W037: "'{a}' is a statement label.",
+ W038: "'{a}' used out of scope.",
+ W039: "'{a}' is not allowed.",
+ W040: "Possible strict violation.",
+ W041: "Use '{a}' to compare with '{b}'.",
+ W042: "Avoid EOL escaping.",
+ W043: "Bad escaping of EOL. Use option multistr if needed.",
+ W044: "Bad or unnecessary escaping.",
+ W045: "Bad number '{a}'.",
+ W046: "Don't use extra leading zeros '{a}'.",
+ W047: "A trailing decimal point can be confused with a dot: '{a}'.",
+ W048: "Unexpected control character in regular expression.",
+ W049: "Unexpected escaped character '{a}' in regular expression.",
+ W050: "JavaScript URL.",
+ W051: "Variables should not be deleted.",
+ W052: "Unexpected '{a}'.",
+ W053: "Do not use {a} as a constructor.",
+ W054: "The Function constructor is a form of eval.",
+ W055: "A constructor name should start with an uppercase letter.",
+ W056: "Bad constructor.",
+ W057: "Weird construction. Is 'new' unnecessary?",
+ W058: "Missing '()' invoking a constructor.",
+ W059: "Avoid arguments.{a}.",
+ W060: "document.write can be a form of eval.",
+ W061: "eval can be harmful.",
+ W062: "Wrap an immediate function invocation in parens " +
+ "to assist the reader in understanding that the expression " +
+ "is the result of a function, and not the function itself.",
+ W063: "Math is not a function.",
+ W064: "Missing 'new' prefix when invoking a constructor.",
+ W065: "Missing radix parameter.",
+ W066: "Implied eval. Consider passing a function instead of a string.",
+ W067: "Bad invocation.",
+ W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
+ W069: "['{a}'] is better written in dot notation.",
+ W070: "Extra comma. (it breaks older versions of IE)",
+ W071: "This function has too many statements. ({a})",
+ W072: "This function has too many parameters. ({a})",
+ W073: "Blocks are nested too deeply. ({a})",
+ W074: "This function's cyclomatic complexity is too high. ({a})",
+ W075: "Duplicate key '{a}'.",
+ W076: "Unexpected parameter '{a}' in get {b} function.",
+ W077: "Expected a single parameter in set {a} function.",
+ W078: "Setter is defined without getter.",
+ W079: "Redefinition of '{a}'.",
+ W080: "It's not necessary to initialize '{a}' to 'undefined'.",
+ W081: "Too many var statements.",
+ W082: "Function declarations should not be placed in blocks. " +
+ "Use a function expression or move the statement to the top of " +
+ "the outer function.",
+ W083: "Don't make functions within a loop.",
+ W084: "Assignment in conditional expression",
+ W085: "Don't use 'with'.",
+ W086: "Expected a 'break' statement before '{a}'.",
+ W087: "Forgotten 'debugger' statement?",
+ W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
+ W089: "The body of a for in should be wrapped in an if statement to filter " +
+ "unwanted properties from the prototype.",
+ W090: "'{a}' is not a statement label.",
+ W091: "'{a}' is out of scope.",
+ W092: "Wrap the /regexp/ literal in parens to disambiguate the slash operator.",
+ W093: "Did you mean to return a conditional instead of an assignment?",
+ W094: "Unexpected comma.",
+ W095: "Expected a string and instead saw {a}.",
+ W096: "The '{a}' key may produce unexpected results.",
+ W097: "Use the function form of \"use strict\".",
+ W098: "'{a}' is defined but never used.",
+ W099: "Mixed spaces and tabs.",
+ W100: "This character may get silently deleted by one or more browsers.",
+ W101: "Line is too long.",
+ W102: "Trailing whitespace.",
+ W103: "The '{a}' property is deprecated.",
+ W104: "'{a}' is only available in JavaScript 1.7.",
+ W105: "Unexpected {a} in '{b}'.",
+ W106: "Identifier '{a}' is not in camel case.",
+ W107: "Script URL.",
+ W108: "Strings must use doublequote.",
+ W109: "Strings must use singlequote.",
+ W110: "Mixed double and single quotes.",
+ W112: "Unclosed string.",
+ W113: "Control character in string: {a}.",
+ W114: "Avoid {a}.",
+ W115: "Octal literals are not allowed in strict mode.",
+ W116: "Expected '{a}' and instead saw '{b}'.",
+ W117: "'{a}' is not defined.",
+ W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
+ W119: "'{a}' is only available in ES6 (use esnext option).",
+ W120: "You might be leaking a variable ({a}) here."
+};
+
+var info = {
+ I001: "Comma warnings can be turned off with 'laxcomma'.",
+ I002: "Reserved words as properties can be used under the 'es5' option.",
+ I003: "ES5 option is now set per default"
+};
+
+exports.errors = {};
+exports.warnings = {};
+exports.info = {};
+
+_.each(errors, function (desc, code) {
+ exports.errors[code] = { code: code, desc: desc };
+});
+
+_.each(warnings, function (desc, code) {
+ exports.warnings[code] = { code: code, desc: desc };
+});
+
+_.each(info, function (desc, code) {
+ exports.info[code] = { code: code, desc: desc };
+});
+
+},
+{"underscore":1}],
+3:[function(req,module,exports){
+// jshint -W001
+
+"use strict";
+
+// Identifiers provided by the ECMAScript standard.
+
+exports.reservedVars = {
+ arguments : false,
+ NaN : false
+};
+
+exports.ecmaIdentifiers = {
+ Array : false,
+ Boolean : false,
+ Date : false,
+ decodeURI : false,
+ decodeURIComponent : false,
+ encodeURI : false,
+ encodeURIComponent : false,
+ Error : false,
+ "eval" : false,
+ EvalError : false,
+ Function : false,
+ hasOwnProperty : false,
+ isFinite : false,
+ isNaN : false,
+ JSON : false,
+ Math : false,
+ Map : false,
+ Number : false,
+ Object : false,
+ parseInt : false,
+ parseFloat : false,
+ RangeError : false,
+ ReferenceError : false,
+ RegExp : false,
+ Set : false,
+ String : false,
+ SyntaxError : false,
+ TypeError : false,
+ URIError : false,
+ WeakMap : false
+};
+
+// Global variables commonly provided by a web browser environment.
+
+exports.browser = {
+ ArrayBuffer : false,
+ ArrayBufferView : false,
+ Audio : false,
+ Blob : false,
+ addEventListener : false,
+ applicationCache : false,
+ atob : false,
+ blur : false,
+ btoa : false,
+ clearInterval : false,
+ clearTimeout : false,
+ close : false,
+ closed : false,
+ CustomEvent : false,
+ DataView : false,
+ DOMParser : false,
+ defaultStatus : false,
+ document : false,
+ Element : false,
+ ElementTimeControl : false,
+ event : false,
+ FileReader : false,
+ Float32Array : false,
+ Float64Array : false,
+ FormData : false,
+ focus : false,
+ frames : false,
+ getComputedStyle : false,
+ HTMLElement : false,
+ HTMLAnchorElement : false,
+ HTMLBaseElement : false,
+ HTMLBlockquoteElement: false,
+ HTMLBodyElement : false,
+ HTMLBRElement : false,
+ HTMLButtonElement : false,
+ HTMLCanvasElement : false,
+ HTMLDirectoryElement : false,
+ HTMLDivElement : false,
+ HTMLDListElement : false,
+ HTMLFieldSetElement : false,
+ HTMLFontElement : false,
+ HTMLFormElement : false,
+ HTMLFrameElement : false,
+ HTMLFrameSetElement : false,
+ HTMLHeadElement : false,
+ HTMLHeadingElement : false,
+ HTMLHRElement : false,
+ HTMLHtmlElement : false,
+ HTMLIFrameElement : false,
+ HTMLImageElement : false,
+ HTMLInputElement : false,
+ HTMLIsIndexElement : false,
+ HTMLLabelElement : false,
+ HTMLLayerElement : false,
+ HTMLLegendElement : false,
+ HTMLLIElement : false,
+ HTMLLinkElement : false,
+ HTMLMapElement : false,
+ HTMLMenuElement : false,
+ HTMLMetaElement : false,
+ HTMLModElement : false,
+ HTMLObjectElement : false,
+ HTMLOListElement : false,
+ HTMLOptGroupElement : false,
+ HTMLOptionElement : false,
+ HTMLParagraphElement : false,
+ HTMLParamElement : false,
+ HTMLPreElement : false,
+ HTMLQuoteElement : false,
+ HTMLScriptElement : false,
+ HTMLSelectElement : false,
+ HTMLStyleElement : false,
+ HTMLTableCaptionElement: false,
+ HTMLTableCellElement : false,
+ HTMLTableColElement : false,
+ HTMLTableElement : false,
+ HTMLTableRowElement : false,
+ HTMLTableSectionElement: false,
+ HTMLTextAreaElement : false,
+ HTMLTitleElement : false,
+ HTMLUListElement : false,
+ HTMLVideoElement : false,
+ history : false,
+ Int16Array : false,
+ Int32Array : false,
+ Int8Array : false,
+ Image : false,
+ length : false,
+ localStorage : false,
+ location : false,
+ MessageChannel : false,
+ MessageEvent : false,
+ MessagePort : false,
+ MouseEvent : false,
+ moveBy : false,
+ moveTo : false,
+ MutationObserver : false,
+ name : false,
+ Node : false,
+ NodeFilter : false,
+ navigator : false,
+ onbeforeunload : true,
+ onblur : true,
+ onerror : true,
+ onfocus : true,
+ onload : true,
+ onresize : true,
+ onunload : true,
+ open : false,
+ openDatabase : false,
+ opener : false,
+ Option : false,
+ parent : false,
+ print : false,
+ removeEventListener : false,
+ resizeBy : false,
+ resizeTo : false,
+ screen : false,
+ scroll : false,
+ scrollBy : false,
+ scrollTo : false,
+ sessionStorage : false,
+ setInterval : false,
+ setTimeout : false,
+ SharedWorker : false,
+ status : false,
+ SVGAElement : false,
+ SVGAltGlyphDefElement: false,
+ SVGAltGlyphElement : false,
+ SVGAltGlyphItemElement: false,
+ SVGAngle : false,
+ SVGAnimateColorElement: false,
+ SVGAnimateElement : false,
+ SVGAnimateMotionElement: false,
+ SVGAnimateTransformElement: false,
+ SVGAnimatedAngle : false,
+ SVGAnimatedBoolean : false,
+ SVGAnimatedEnumeration: false,
+ SVGAnimatedInteger : false,
+ SVGAnimatedLength : false,
+ SVGAnimatedLengthList: false,
+ SVGAnimatedNumber : false,
+ SVGAnimatedNumberList: false,
+ SVGAnimatedPathData : false,
+ SVGAnimatedPoints : false,
+ SVGAnimatedPreserveAspectRatio: false,
+ SVGAnimatedRect : false,
+ SVGAnimatedString : false,
+ SVGAnimatedTransformList: false,
+ SVGAnimationElement : false,
+ SVGCSSRule : false,
+ SVGCircleElement : false,
+ SVGClipPathElement : false,
+ SVGColor : false,
+ SVGColorProfileElement: false,
+ SVGColorProfileRule : false,
+ SVGComponentTransferFunctionElement: false,
+ SVGCursorElement : false,
+ SVGDefsElement : false,
+ SVGDescElement : false,
+ SVGDocument : false,
+ SVGElement : false,
+ SVGElementInstance : false,
+ SVGElementInstanceList: false,
+ SVGEllipseElement : false,
+ SVGExternalResourcesRequired: false,
+ SVGFEBlendElement : false,
+ SVGFEColorMatrixElement: false,
+ SVGFEComponentTransferElement: false,
+ SVGFECompositeElement: false,
+ SVGFEConvolveMatrixElement: false,
+ SVGFEDiffuseLightingElement: false,
+ SVGFEDisplacementMapElement: false,
+ SVGFEDistantLightElement: false,
+ SVGFEFloodElement : false,
+ SVGFEFuncAElement : false,
+ SVGFEFuncBElement : false,
+ SVGFEFuncGElement : false,
+ SVGFEFuncRElement : false,
+ SVGFEGaussianBlurElement: false,
+ SVGFEImageElement : false,
+ SVGFEMergeElement : false,
+ SVGFEMergeNodeElement: false,
+ SVGFEMorphologyElement: false,
+ SVGFEOffsetElement : false,
+ SVGFEPointLightElement: false,
+ SVGFESpecularLightingElement: false,
+ SVGFESpotLightElement: false,
+ SVGFETileElement : false,
+ SVGFETurbulenceElement: false,
+ SVGFilterElement : false,
+ SVGFilterPrimitiveStandardAttributes: false,
+ SVGFitToViewBox : false,
+ SVGFontElement : false,
+ SVGFontFaceElement : false,
+ SVGFontFaceFormatElement: false,
+ SVGFontFaceNameElement: false,
+ SVGFontFaceSrcElement: false,
+ SVGFontFaceUriElement: false,
+ SVGForeignObjectElement: false,
+ SVGGElement : false,
+ SVGGlyphElement : false,
+ SVGGlyphRefElement : false,
+ SVGGradientElement : false,
+ SVGHKernElement : false,
+ SVGICCColor : false,
+ SVGImageElement : false,
+ SVGLangSpace : false,
+ SVGLength : false,
+ SVGLengthList : false,
+ SVGLineElement : false,
+ SVGLinearGradientElement: false,
+ SVGLocatable : false,
+ SVGMPathElement : false,
+ SVGMarkerElement : false,
+ SVGMaskElement : false,
+ SVGMatrix : false,
+ SVGMetadataElement : false,
+ SVGMissingGlyphElement: false,
+ SVGNumber : false,
+ SVGNumberList : false,
+ SVGPaint : false,
+ SVGPathElement : false,
+ SVGPathSeg : false,
+ SVGPathSegArcAbs : false,
+ SVGPathSegArcRel : false,
+ SVGPathSegClosePath : false,
+ SVGPathSegCurvetoCubicAbs: false,
+ SVGPathSegCurvetoCubicRel: false,
+ SVGPathSegCurvetoCubicSmoothAbs: false,
+ SVGPathSegCurvetoCubicSmoothRel: false,
+ SVGPathSegCurvetoQuadraticAbs: false,
+ SVGPathSegCurvetoQuadraticRel: false,
+ SVGPathSegCurvetoQuadraticSmoothAbs: false,
+ SVGPathSegCurvetoQuadraticSmoothRel: false,
+ SVGPathSegLinetoAbs : false,
+ SVGPathSegLinetoHorizontalAbs: false,
+ SVGPathSegLinetoHorizontalRel: false,
+ SVGPathSegLinetoRel : false,
+ SVGPathSegLinetoVerticalAbs: false,
+ SVGPathSegLinetoVerticalRel: false,
+ SVGPathSegList : false,
+ SVGPathSegMovetoAbs : false,
+ SVGPathSegMovetoRel : false,
+ SVGPatternElement : false,
+ SVGPoint : false,
+ SVGPointList : false,
+ SVGPolygonElement : false,
+ SVGPolylineElement : false,
+ SVGPreserveAspectRatio: false,
+ SVGRadialGradientElement: false,
+ SVGRect : false,
+ SVGRectElement : false,
+ SVGRenderingIntent : false,
+ SVGSVGElement : false,
+ SVGScriptElement : false,
+ SVGSetElement : false,
+ SVGStopElement : false,
+ SVGStringList : false,
+ SVGStylable : false,
+ SVGStyleElement : false,
+ SVGSwitchElement : false,
+ SVGSymbolElement : false,
+ SVGTRefElement : false,
+ SVGTSpanElement : false,
+ SVGTests : false,
+ SVGTextContentElement: false,
+ SVGTextElement : false,
+ SVGTextPathElement : false,
+ SVGTextPositioningElement: false,
+ SVGTitleElement : false,
+ SVGTransform : false,
+ SVGTransformList : false,
+ SVGTransformable : false,
+ SVGURIReference : false,
+ SVGUnitTypes : false,
+ SVGUseElement : false,
+ SVGVKernElement : false,
+ SVGViewElement : false,
+ SVGViewSpec : false,
+ SVGZoomAndPan : false,
+ TimeEvent : false,
+ top : false,
+ Uint16Array : false,
+ Uint32Array : false,
+ Uint8Array : false,
+ Uint8ClampedArray : false,
+ WebSocket : false,
+ window : false,
+ Worker : false,
+ XMLHttpRequest : false,
+ XMLSerializer : false,
+ XPathEvaluator : false,
+ XPathException : false,
+ XPathExpression : false,
+ XPathNamespace : false,
+ XPathNSResolver : false,
+ XPathResult : false
+};
+
+exports.devel = {
+ alert : false,
+ confirm: false,
+ console: false,
+ Debug : false,
+ opera : false,
+ prompt : false
+};
+
+exports.worker = {
+ importScripts: true,
+ postMessage : true,
+ self : true
+};
+
+// Widely adopted global names that are not part of ECMAScript standard
+exports.nonstandard = {
+ escape : false,
+ unescape: false
+};
+
+// Globals provided by popular JavaScript environments.
+
+exports.couch = {
+ "require" : false,
+ respond : false,
+ getRow : false,
+ emit : false,
+ send : false,
+ start : false,
+ sum : false,
+ log : false,
+ exports : false,
+ module : false,
+ provides : false
+};
+
+exports.node = {
+ __filename : false,
+ __dirname : false,
+ Buffer : false,
+ DataView : false,
+ console : false,
+ exports : true, // In Node it is ok to exports = module.exports = foo();
+ GLOBAL : false,
+ global : false,
+ module : false,
+ process : false,
+ require : false,
+ setTimeout : false,
+ clearTimeout : false,
+ setInterval : false,
+ clearInterval : false,
+ setImmediate : false, // v0.9.1+
+ clearImmediate: false // v0.9.1+
+};
+
+exports.phantom = {
+ phantom : true,
+ require : true,
+ WebPage : true
+};
+
+exports.rhino = {
+ defineClass : false,
+ deserialize : false,
+ gc : false,
+ help : false,
+ importPackage: false,
+ "java" : false,
+ load : false,
+ loadClass : false,
+ print : false,
+ quit : false,
+ readFile : false,
+ readUrl : false,
+ runCommand : false,
+ seal : false,
+ serialize : false,
+ spawn : false,
+ sync : false,
+ toint32 : false,
+ version : false
+};
+
+exports.shelljs = {
+ target : false,
+ echo : false,
+ exit : false,
+ cd : false,
+ pwd : false,
+ ls : false,
+ find : false,
+ cp : false,
+ rm : false,
+ mv : false,
+ mkdir : false,
+ test : false,
+ cat : false,
+ sed : false,
+ grep : false,
+ which : false,
+ dirs : false,
+ pushd : false,
+ popd : false,
+ env : false,
+ exec : false,
+ chmod : false,
+ config : false,
+ error : false,
+ tempdir : false
+};
+
+exports.wsh = {
+ ActiveXObject : true,
+ Enumerator : true,
+ GetObject : true,
+ ScriptEngine : true,
+ ScriptEngineBuildVersion : true,
+ ScriptEngineMajorVersion : true,
+ ScriptEngineMinorVersion : true,
+ VBArray : true,
+ WSH : true,
+ WScript : true,
+ XDomainRequest : true
+};
+
+// Globals provided by popular JavaScript libraries.
+
+exports.dojo = {
+ dojo : false,
+ dijit : false,
+ dojox : false,
+ define : false,
+ "require": false
+};
+
+exports.jquery = {
+ "$" : false,
+ jQuery : false
+};
+
+exports.mootools = {
+ "$" : false,
+ "$$" : false,
+ Asset : false,
+ Browser : false,
+ Chain : false,
+ Class : false,
+ Color : false,
+ Cookie : false,
+ Core : false,
+ Document : false,
+ DomReady : false,
+ DOMEvent : false,
+ DOMReady : false,
+ Drag : false,
+ Element : false,
+ Elements : false,
+ Event : false,
+ Events : false,
+ Fx : false,
+ Group : false,
+ Hash : false,
+ HtmlTable : false,
+ Iframe : false,
+ IframeShim : false,
+ InputValidator: false,
+ instanceOf : false,
+ Keyboard : false,
+ Locale : false,
+ Mask : false,
+ MooTools : false,
+ Native : false,
+ Options : false,
+ OverText : false,
+ Request : false,
+ Scroller : false,
+ Slick : false,
+ Slider : false,
+ Sortables : false,
+ Spinner : false,
+ Swiff : false,
+ Tips : false,
+ Type : false,
+ typeOf : false,
+ URI : false,
+ Window : false
+};
+
+exports.prototypejs = {
+ "$" : false,
+ "$$" : false,
+ "$A" : false,
+ "$F" : false,
+ "$H" : false,
+ "$R" : false,
+ "$break" : false,
+ "$continue" : false,
+ "$w" : false,
+ Abstract : false,
+ Ajax : false,
+ Class : false,
+ Enumerable : false,
+ Element : false,
+ Event : false,
+ Field : false,
+ Form : false,
+ Hash : false,
+ Insertion : false,
+ ObjectRange : false,
+ PeriodicalExecuter: false,
+ Position : false,
+ Prototype : false,
+ Selector : false,
+ Template : false,
+ Toggle : false,
+ Try : false,
+ Autocompleter : false,
+ Builder : false,
+ Control : false,
+ Draggable : false,
+ Draggables : false,
+ Droppables : false,
+ Effect : false,
+ Sortable : false,
+ SortableObserver : false,
+ Sound : false,
+ Scriptaculous : false
+};
+
+exports.yui = {
+ YUI : false,
+ Y : false,
+ YUI_config: false
+};
+
+
+},
+{}],
+"n4bKNg":[function(req,module,exports){
+/*!
+ * JSHint, by JSHint Community.
+ *
+ * This file (and this file only) is licensed under the same slightly modified
+ * MIT license that JSLint is. It stops evil-doers everywhere:
+ *
+ * Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
+ *
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * The Software shall be used for Good, not Evil.
+ *
+ * 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.
+ *
+ */
+
+/*jshint quotmark:double */
+/*global console:true */
+/*exported console */
+
+var _ = req("underscore");
+var events = req("events");
+var vars = req("../shared/vars.js");
+var messages = req("../shared/messages.js");
+var Lexer = req("./lex.js").Lexer;
+var reg = req("./reg.js");
+var state = req("./state.js").state;
+var style = req("./style.js");
+
+// We need this module here because environments such as IE and Rhino
+// don't necessarilly expose the 'console' API and browserify uses
+// it to log things. It's a sad state of affair, really.
+var console = req("console-browserify");
+
+// We build the application inside a function so that we produce only a singleton
+// variable. That function will be invoked immediately, and its return value is
+// the JSHINT function itself.
+
+var JSHINT = (function () {
+ "use strict";
+
+ var anonname, // The guessed name for anonymous functions.
+ api, // Extension API
+
+ // These are operators that should not be used with the ! operator.
+ bang = {
+ "<" : true,
+ "<=" : true,
+ "==" : true,
+ "===": true,
+ "!==": true,
+ "!=" : true,
+ ">" : true,
+ ">=" : true,
+ "+" : true,
+ "-" : true,
+ "*" : true,
+ "/" : true,
+ "%" : true
+ },
+
+ // These are the JSHint boolean options.
+ boolOptions = {
+ asi : true, // if automatic semicolon insertion should be tolerated
+ bitwise : true, // if bitwise operators should not be allowed
+ boss : true, // if advanced usage of assignments should be allowed
+ browser : true, // if the standard browser globals should be predefined
+ camelcase : true, // if identifiers should be required in camel case
+ couch : true, // if CouchDB globals should be predefined
+ curly : true, // if curly braces around all blocks should be required
+ debug : true, // if debugger statements should be allowed
+ devel : true, // if logging globals should be predefined (console, alert, etc.)
+ dojo : true, // if Dojo Toolkit globals should be predefined
+ eqeqeq : true, // if === should be required
+ eqnull : true, // if == null comparisons should be tolerated
+ es3 : true, // if ES3 syntax should be allowed
+ es5 : true, // if ES5 syntax should be allowed (is now set per default)
+ esnext : true, // if es.next specific syntax should be allowed
+ moz : true, // if mozilla specific syntax should be allowed
+ evil : true, // if eval should be allowed
+ expr : true, // if ExpressionStatement should be allowed as Programs
+ forin : true, // if for in statements must filter
+ funcscope : true, // if only function scope should be used for scope tests
+ gcl : true, // if JSHint should be compatible with Google Closure Linter
+ globalstrict: true, // if global "use strict"; should be allowed (also enables 'strict')
+ immed : true, // if immediate invocations must be wrapped in parens
+ iterator : true, // if the `__iterator__` property should be allowed
+ jquery : true, // if jQuery globals should be predefined
+ lastsemic : true, // if semicolons may be ommitted for the trailing
+ // statements inside of a one-line blocks.
+ laxbreak : true, // if line breaks should not be checked
+ laxcomma : true, // if line breaks should not be checked around commas
+ loopfunc : true, // if functions should be allowed to be defined within
+ // loops
+ mootools : true, // if MooTools globals should be predefined
+ multistr : true, // allow multiline strings
+ newcap : true, // if constructor names must be capitalized
+ noarg : true, // if arguments.caller and arguments.callee should be
+ // disallowed
+ node : true, // if the Node.js environment globals should be
+ // predefined
+ noempty : true, // if empty blocks should be disallowed
+ nonew : true, // if using `new` for side-effects should be disallowed
+ nonstandard : true, // if non-standard (but widely adopted) globals should
+ // be predefined
+ nomen : true, // if names should be checked
+ onevar : true, // if only one var statement per function should be
+ // allowed
+ passfail : true, // if the scan should stop on first error
+ phantom : true, // if PhantomJS symbols should be allowed
+ plusplus : true, // if increment/decrement should not be allowed
+ proto : true, // if the `__proto__` property should be allowed
+ prototypejs : true, // if Prototype and Scriptaculous globals should be
+ // predefined
+ rhino : true, // if the Rhino environment globals should be predefined
+ shelljs : true, // if ShellJS globals should be predefined
+ undef : true, // if variables should be declared before used
+ scripturl : true, // if script-targeted URLs should be tolerated
+ shadow : true, // if variable shadowing should be tolerated
+ smarttabs : true, // if smarttabs should be tolerated
+ // (http://www.emacswiki.org/emacs/SmartTabs)
+ strict : true, // require the "use strict"; pragma
+ sub : true, // if all forms of subscript notation are tolerated
+ supernew : true, // if `new function () { ... };` and `new Object;`
+ // should be tolerated
+ trailing : true, // if trailing whitespace rules apply
+ validthis : true, // if 'this' inside a non-constructor function is valid.
+ // This is a function scoped option only.
+ withstmt : true, // if with statements should be allowed
+ white : true, // if strict whitespace rules apply
+ worker : true, // if Web Worker script symbols should be allowed
+ wsh : true, // if the Windows Scripting Host environment globals
+ // should be predefined
+ yui : true, // YUI variables should be predefined
+
+ // Obsolete options
+ onecase : true, // if one case switch statements should be allowed
+ regexp : true, // if the . should not be allowed in regexp literals
+ regexdash : true // if unescaped first/last dash (-) inside brackets
+ // should be tolerated
+ },
+
+ // These are the JSHint options that can take any value
+ // (we use this object to detect invalid options)
+ valOptions = {
+ maxlen : false,
+ indent : false,
+ maxerr : false,
+ predef : false,
+ quotmark : false, //'single'|'double'|true
+ scope : false,
+ maxstatements: false, // {int} max statements per function
+ maxdepth : false, // {int} max nested block depth per function
+ maxparams : false, // {int} max params per function
+ maxcomplexity: false, // {int} max cyclomatic complexity per function
+ unused : true, // warn if variables are unused. Available options:
+ // false - don't check for unused variables
+ // true - "vars" + check last function param
+ // "vars" - skip checking unused function params
+ // "strict" - "vars" + check all function params
+ latedef : false // warn if the variable is used before its definition
+ // false - don't emit any warnings
+ // true - warn if any variable is used before its definition
+ // "nofunc" - warn for any variable but function declarations
+ },
+
+ // These are JSHint boolean options which are shared with JSLint
+ // where the definition in JSHint is opposite JSLint
+ invertedOptions = {
+ bitwise : true,
+ forin : true,
+ newcap : true,
+ nomen : true,
+ plusplus: true,
+ regexp : true,
+ undef : true,
+ white : true,
+
+ // Inverted and renamed, use JSHint name here
+ eqeqeq : true,
+ onevar : true,
+ strict : true
+ },
+
+ // These are JSHint boolean options which are shared with JSLint
+ // where the name has been changed but the effect is unchanged
+ renamedOptions = {
+ eqeq : "eqeqeq",
+ vars : "onevar",
+ windows: "wsh",
+ sloppy : "strict"
+ },
+
+ declared, // Globals that were declared using /*global ... */ syntax.
+ exported, // Variables that are used outside of the current file.
+
+ functionicity = [
+ "closure", "exception", "global", "label",
+ "outer", "unused", "var"
+ ],
+
+ funct, // The current function
+ functions, // All of the functions
+
+ global, // The global scope
+ implied, // Implied globals
+ inblock,
+ indent,
+ lookahead,
+ lex,
+ member,
+ membersOnly,
+ noreach,
+ predefined, // Global variables defined by option
+
+ scope, // The current scope
+ stack,
+ unuseds,
+ urls,
+ warnings,
+
+ extraModules = [],
+ emitter = new events.EventEmitter();
+
+ function checkOption(name, t) {
+ name = name.trim();
+
+ if (/^[+-]W\d{3}$/g.test(name)) {
+ return true;
+ }
+
+ if (valOptions[name] === undefined && boolOptions[name] === undefined) {
+ if (t.type !== "jslint") {
+ error("E001", t, name);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function isString(obj) {
+ return Object.prototype.toString.call(obj) === "[object String]";
+ }
+
+ function isIdentifier(tkn, value) {
+ if (!tkn)
+ return false;
+
+ if (!tkn.identifier || tkn.value !== value)
+ return false;
+
+ return true;
+ }
+
+ function isReserved(token) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+ // ES3 FutureReservedWord in an ES5 environment.
+ if (!meta.es5) {
+ return false;
+ }
+
+ // Some ES5 FutureReservedWord identifiers are active only
+ // within a strict mode environment.
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.directive["use strict"]) {
+ return false;
+ }
+ }
+
+ if (token.isProperty) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function supplant(str, data) {
+ return str.replace(/\{([^{}]*)\}/g, function (a, b) {
+ var r = data[b];
+ return typeof r === "string" || typeof r === "number" ? r : a;
+ });
+ }
+
+ function combine(t, o) {
+ var n;
+ for (n in o) {
+ if (_.has(o, n) && !_.has(JSHINT.blacklist, n)) {
+ t[n] = o[n];
+ }
+ }
+ }
+
+ function updatePredefined() {
+ Object.keys(JSHINT.blacklist).forEach(function (key) {
+ delete predefined[key];
+ });
+ }
+
+ function assume() {
+ if (state.option.couch) {
+ combine(predefined, vars.couch);
+ }
+
+ if (state.option.rhino) {
+ combine(predefined, vars.rhino);
+ }
+
+ if (state.option.shelljs) {
+ combine(predefined, vars.shelljs);
+ combine(predefined, vars.node);
+ }
+
+ if (state.option.phantom) {
+ combine(predefined, vars.phantom);
+ }
+
+ if (state.option.prototypejs) {
+ combine(predefined, vars.prototypejs);
+ }
+
+ if (state.option.node) {
+ combine(predefined, vars.node);
+ }
+
+ if (state.option.devel) {
+ combine(predefined, vars.devel);
+ }
+
+ if (state.option.dojo) {
+ combine(predefined, vars.dojo);
+ }
+
+ if (state.option.browser) {
+ combine(predefined, vars.browser);
+ }
+
+ if (state.option.nonstandard) {
+ combine(predefined, vars.nonstandard);
+ }
+
+ if (state.option.jquery) {
+ combine(predefined, vars.jquery);
+ }
+
+ if (state.option.mootools) {
+ combine(predefined, vars.mootools);
+ }
+
+ if (state.option.worker) {
+ combine(predefined, vars.worker);
+ }
+
+ if (state.option.wsh) {
+ combine(predefined, vars.wsh);
+ }
+
+ if (state.option.globalstrict && state.option.strict !== false) {
+ state.option.strict = true;
+ }
+
+ if (state.option.yui) {
+ combine(predefined, vars.yui);
+ }
+
+ // Let's assume that chronologically ES3 < ES5 < ES6/ESNext < Moz
+
+ state.option.inMoz = function (strict) {
+ return state.option.moz;
+ };
+
+ state.option.inESNext = function (strict) {
+ return state.option.moz || state.option.esnext;
+ };
+
+ state.option.inES5 = function (/* strict */) {
+ return !state.option.es3;
+ };
+
+ state.option.inES3 = function (strict) {
+ if (strict) {
+ return !state.option.moz && !state.option.esnext && state.option.es3;
+ }
+ return state.option.es3;
+ };
+ }
+
+ // Produce an error warning.
+ function quit(code, line, chr) {
+ var percentage = Math.floor((line / state.lines.length) * 100);
+ var message = messages.errors[code].desc;
+
+ throw {
+ name: "JSHintError",
+ line: line,
+ character: chr,
+ message: message + " (" + percentage + "% scanned).",
+ raw: message,
+ code: code
+ };
+ }
+
+ function isundef(scope, code, token, a) {
+ return JSHINT.undefs.push([scope, code, token, a]);
+ }
+
+ function warning(code, t, a, b, c, d) {
+ var ch, l, w, msg;
+
+ if (/^W\d{3}$/.test(code)) {
+ if (state.ignored[code])
+ return;
+
+ msg = messages.warnings[code];
+ } else if (/E\d{3}/.test(code)) {
+ msg = messages.errors[code];
+ } else if (/I\d{3}/.test(code)) {
+ msg = messages.info[code];
+ }
+
+ t = t || state.tokens.next;
+ if (t.id === "(end)") { // `~
+ t = state.tokens.curr;
+ }
+
+ l = t.line || 0;
+ ch = t.from || 0;
+
+ w = {
+ id: "(error)",
+ raw: msg.desc,
+ code: msg.code,
+ evidence: state.lines[l - 1] || "",
+ line: l,
+ character: ch,
+ scope: JSHINT.scope,
+ a: a,
+ b: b,
+ c: c,
+ d: d
+ };
+
+ w.reason = supplant(msg.desc, w);
+ JSHINT.errors.push(w);
+
+ if (state.option.passfail) {
+ quit("E042", l, ch);
+ }
+
+ warnings += 1;
+ if (warnings >= state.option.maxerr) {
+ quit("E043", l, ch);
+ }
+
+ return w;
+ }
+
+ function warningAt(m, l, ch, a, b, c, d) {
+ return warning(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+
+ function error(m, t, a, b, c, d) {
+ warning(m, t, a, b, c, d);
+ }
+
+ function errorAt(m, l, ch, a, b, c, d) {
+ return error(m, {
+ line: l,
+ from: ch
+ }, a, b, c, d);
+ }
+
+ // Tracking of "internal" scripts, like eval containing a static string
+ function addInternalSrc(elem, src) {
+ var i;
+ i = {
+ id: "(internal)",
+ elem: elem,
+ value: src
+ };
+ JSHINT.internals.push(i);
+ return i;
+ }
+
+ function addlabel(t, type, tkn, islet) {
+ // Define t in the current function in the current scope.
+ if (type === "exception") {
+ if (_.has(funct["(context)"], t)) {
+ if (funct[t] !== true && !state.option.node) {
+ warning("W002", state.tokens.next, t);
+ }
+ }
+ }
+
+ if (_.has(funct, t) && !funct["(global)"]) {
+ if (funct[t] === true) {
+ if (state.option.latedef) {
+ if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
+ !_.contains([funct[t], type], "unction")) {
+ warning("W003", state.tokens.next, t);
+ }
+ }
+ } else {
+ if (!state.option.shadow && type !== "exception" ||
+ (funct["(blockscope)"].getlabel(t))) {
+ warning("W004", state.tokens.next, t);
+ }
+ }
+ }
+
+ // a double definition of a let variable in same block throws a TypeError
+ if (funct["(blockscope)"] && funct["(blockscope)"].current.has(t)) {
+ error("E044", state.tokens.next, t);
+ }
+
+ // if the identifier is from a let, adds it only to the current blockscope
+ if (islet) {
+ funct["(blockscope)"].current.add(t, type, state.tokens.curr);
+ } else {
+
+ funct[t] = type;
+
+ if (tkn) {
+ funct["(tokens)"][t] = tkn;
+ }
+
+ if (funct["(global)"]) {
+ global[t] = funct;
+ if (_.has(implied, t)) {
+ if (state.option.latedef) {
+ if ((state.option.latedef === true && _.contains([funct[t], type], "unction")) ||
+ !_.contains([funct[t], type], "unction")) {
+ warning("W003", state.tokens.next, t);
+ }
+ }
+
+ delete implied[t];
+ }
+ } else {
+ scope[t] = funct;
+ }
+ }
+ }
+
+ function doOption() {
+ var nt = state.tokens.next;
+ var body = nt.body.match(/(-\s+)?[^\s,]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g);
+ var predef = {};
+
+ if (nt.type === "globals") {
+ body.forEach(function (g) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (key.charAt(0) === "-") {
+ key = key.slice(1);
+ val = false;
+
+ JSHINT.blacklist[key] = key;
+ updatePredefined();
+ } else {
+ predef[key] = (val === "true");
+ }
+ });
+
+ combine(predefined, predef);
+
+ for (var key in predef) {
+ if (_.has(predef, key)) {
+ declared[key] = nt;
+ }
+ }
+ }
+
+ if (nt.type === "exported") {
+ body.forEach(function (e) {
+ exported[e] = true;
+ });
+ }
+
+ if (nt.type === "members") {
+ membersOnly = membersOnly || {};
+
+ body.forEach(function (m) {
+ var ch1 = m.charAt(0);
+ var ch2 = m.charAt(m.length - 1);
+
+ if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
+ m = m
+ .substr(1, m.length - 2)
+ .replace("\\b", "\b")
+ .replace("\\t", "\t")
+ .replace("\\n", "\n")
+ .replace("\\v", "\v")
+ .replace("\\f", "\f")
+ .replace("\\r", "\r")
+ .replace("\\\\", "\\")
+ .replace("\\\"", "\"");
+ }
+
+ membersOnly[m] = false;
+ });
+ }
+
+ var numvals = [
+ "maxstatements",
+ "maxparams",
+ "maxdepth",
+ "maxcomplexity",
+ "maxerr",
+ "maxlen",
+ "indent"
+ ];
+
+ if (nt.type === "jshint" || nt.type === "jslint") {
+ body.forEach(function (g) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (!checkOption(key, nt)) {
+ return;
+ }
+
+ if (numvals.indexOf(key) >= 0) {
+
+ // GH988 - numeric options can be disabled by setting them to `false`
+ if (val !== "false") {
+ val = +val;
+
+ if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
+ error("E032", nt, g[1].trim());
+ return;
+ }
+
+ if (key === "indent") {
+ state.option["(explicitIndent)"] = true;
+ }
+ state.option[key] = val;
+ } else {
+ if (key === "indent") {
+ state.option["(explicitIndent)"] = false;
+ } else {
+ state.option[key] = false;
+ }
+ }
+
+ return;
+ }
+
+ if (key === "validthis") {
+ // `validthis` is valid only within a function scope.
+ if (funct["(global)"]) {
+ error("E009");
+ } else {
+ if (val === "true" || val === "false") {
+ state.option.validthis = (val === "true");
+ } else {
+ error("E002", nt);
+ }
+ }
+ return;
+ }
+
+ if (key === "quotmark") {
+ switch (val) {
+ case "true":
+ case "false":
+ state.option.quotmark = (val === "true");
+ break;
+ case "double":
+ case "single":
+ state.option.quotmark = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "unused") {
+ switch (val) {
+ case "true":
+ state.option.unused = true;
+ break;
+ case "false":
+ state.option.unused = false;
+ break;
+ case "vars":
+ case "strict":
+ state.option.unused = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "latedef") {
+ switch (val) {
+ case "true":
+ state.option.latedef = true;
+ break;
+ case "false":
+ state.option.latedef = false;
+ break;
+ case "nofunc":
+ state.option.latedef = "nofunc";
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ var match = /^([+-])(W\d{3})$/g.exec(key);
+ if (match) {
+ // ignore for -W..., unignore for +W...
+ state.ignored[match[2]] = (match[1] === "-");
+ return;
+ }
+
+ var tn;
+ if (val === "true" || val === "false") {
+ if (nt.type === "jslint") {
+ tn = renamedOptions[key] || key;
+ state.option[tn] = (val === "true");
+
+ if (invertedOptions[tn] !== undefined) {
+ state.option[tn] = !state.option[tn];
+ }
+ } else {
+ state.option[key] = (val === "true");
+ }
+
+ if (key === "newcap") {
+ state.option["(explicitNewcap)"] = true;
+ }
+ return;
+ }
+
+ error("E002", nt);
+ });
+
+ assume();
+ }
+ }
+
+ // We need a peek function. If it has an argument, it peeks that much farther
+ // ahead. It is used to distinguish
+ // for ( var i in ...
+ // from
+ // for ( var i = ...
+
+ function peek(p) {
+ var i = p || 0, j = 0, t;
+
+ while (j <= i) {
+ t = lookahead[j];
+ if (!t) {
+ t = lookahead[j] = lex.token();
+ }
+ j += 1;
+ }
+ return t;
+ }
+
+ // Produce the next token. It looks for programming errors.
+
+ function advance(id, t) {
+ switch (state.tokens.curr.id) {
+ case "(number)":
+ if (state.tokens.next.id === ".") {
+ warning("W005", state.tokens.curr);
+ }
+ break;
+ case "-":
+ if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
+ warning("W006");
+ }
+ break;
+ case "+":
+ if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
+ warning("W007");
+ }
+ break;
+ }
+
+ if (state.tokens.curr.type === "(string)" || state.tokens.curr.identifier) {
+ anonname = state.tokens.curr.value;
+ }
+
+ if (id && state.tokens.next.id !== id) {
+ if (t) {
+ if (state.tokens.next.id === "(end)") {
+ error("E019", t, t.id);
+ } else {
+ error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
+ }
+ } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
+ warning("W116", state.tokens.next, id, state.tokens.next.value);
+ }
+ }
+
+ state.tokens.prev = state.tokens.curr;
+ state.tokens.curr = state.tokens.next;
+ for (;;) {
+ state.tokens.next = lookahead.shift() || lex.token();
+
+ if (!state.tokens.next) { // No more tokens left, give up
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
+ return;
+ }
+
+ if (state.tokens.next.check) {
+ state.tokens.next.check();
+ }
+
+ if (state.tokens.next.isSpecial) {
+ doOption();
+ } else {
+ if (state.tokens.next.id !== "(endline)") {
+ break;
+ }
+ }
+ }
+ }
+
+ function isInfix(token) {
+ return token.infix || (!token.identifier && !!token.led);
+ }
+
+ function isEndOfExpr() {
+ var curr = state.tokens.curr;
+ var next = state.tokens.next;
+ if (next.id === ";" || next.id === "}" || next.id === ":") {
+ return true;
+ }
+ if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.option.inMoz(true))) {
+ return curr.line !== next.line;
+ }
+ return false;
+ }
+
+ // This is the heart of JSHINT, the Pratt parser. In addition to parsing, it
+ // is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is
+ // like .nud except that it is only used on the first token of a statement.
+ // Having .fud makes it much easier to define statement-oriented languages like
+ // JavaScript. I retained Pratt's nomenclature.
+
+ // .nud Null denotation
+ // .fud First null denotation
+ // .led Left denotation
+ // lbp Left binding power
+ // rbp Right binding power
+
+ // They are elements of the parsing method called Top Down Operator Precedence.
+
+ function expression(rbp, initial) {
+ var left, isArray = false, isObject = false, isLetExpr = false;
+
+ // if current expression is a let expression
+ if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.next, "let expressions");
+ }
+ isLetExpr = true;
+ // create a new block scope we use only for the current expression
+ funct["(blockscope)"].stack();
+ advance("let");
+ advance("(");
+ state.syntax["let"].fud.call(state.syntax["let"].fud, false);
+ advance(")");
+ }
+
+ if (state.tokens.next.id === "(end)")
+ error("E006", state.tokens.curr);
+
+ advance();
+
+ if (initial) {
+ anonname = "anonymous";
+ funct["(verb)"] = state.tokens.curr.value;
+ }
+
+ if (initial === true && state.tokens.curr.fud) {
+ left = state.tokens.curr.fud();
+ } else {
+ if (state.tokens.curr.nud) {
+ left = state.tokens.curr.nud();
+ } else {
+ error("E030", state.tokens.curr, state.tokens.curr.id);
+ }
+
+ while (rbp < state.tokens.next.lbp && !isEndOfExpr()) {
+ isArray = state.tokens.curr.value === "Array";
+ isObject = state.tokens.curr.value === "Object";
+
+ // #527, new Foo.Array(), Foo.Array(), new Foo.Object(), Foo.Object()
+ // Line breaks in IfStatement heads exist to satisfy the checkJSHint
+ // "Line too long." error.
+ if (left && (left.value || (left.first && left.first.value))) {
+ // If the left.value is not "new", or the left.first.value is a "."
+ // then safely assume that this is not "new Array()" and possibly
+ // not "new Object()"...
+ if (left.value !== "new" ||
+ (left.first && left.first.value && left.first.value === ".")) {
+ isArray = false;
+ // ...In the case of Object, if the left.value and state.tokens.curr.value
+ // are not equal, then safely assume that this not "new Object()"
+ if (left.value !== state.tokens.curr.value) {
+ isObject = false;
+ }
+ }
+ }
+
+ advance();
+
+ if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W009", state.tokens.curr);
+ }
+
+ if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W010", state.tokens.curr);
+ }
+
+ if (left && state.tokens.curr.led) {
+ left = state.tokens.curr.led(left);
+ } else {
+ error("E033", state.tokens.curr, state.tokens.curr.id);
+ }
+ }
+ }
+ if (isLetExpr) {
+ funct["(blockscope)"].unstack();
+ }
+ return left;
+ }
+
+
+// Functions for conformance of style.
+
+ function adjacent(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (state.option.white) {
+ if (left.character !== right.from && left.line === right.line) {
+ left.from += (left.character - left.from);
+ warning("W011", left, left.value);
+ }
+ }
+ }
+
+ function nobreak(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (state.option.white && (left.character !== right.from || left.line !== right.line)) {
+ warning("W012", right, right.value);
+ }
+ }
+
+ function nospace(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (state.option.white && !left.comment) {
+ if (left.line === right.line) {
+ adjacent(left, right);
+ }
+ }
+ }
+
+ function nonadjacent(left, right) {
+ if (state.option.white) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+
+ if (left.value === ";" && right.value === ";") {
+ return;
+ }
+
+ if (left.line === right.line && left.character === right.from) {
+ left.from += (left.character - left.from);
+ warning("W013", left, left.value);
+ }
+ }
+ }
+
+ function nobreaknonadjacent(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (!state.option.laxbreak && left.line !== right.line) {
+ warning("W014", right, right.value);
+ } else if (state.option.white) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (left.character === right.from) {
+ left.from += (left.character - left.from);
+ warning("W013", left, left.value);
+ }
+ }
+ }
+
+ function indentation(bias) {
+ if (!state.option.white && !state.option["(explicitIndent)"]) {
+ return;
+ }
+
+ if (state.tokens.next.id === "(end)") {
+ return;
+ }
+
+ var i = indent + (bias || 0);
+ if (state.tokens.next.from !== i) {
+ warning("W015", state.tokens.next, state.tokens.next.value, i, state.tokens.next.from);
+ }
+ }
+
+ function nolinebreak(t) {
+ t = t || state.tokens.curr;
+ if (t.line !== state.tokens.next.line) {
+ warning("E022", t, t.value);
+ }
+ }
+
+ function nobreakcomma(left, right) {
+ if (left.line !== right.line) {
+ if (!state.option.laxcomma) {
+ if (comma.first) {
+ warning("I001");
+ comma.first = false;
+ }
+ warning("W014", left, right.value);
+ }
+ } else if (!left.comment && left.character !== right.from && state.option.white) {
+ left.from += (left.character - left.from);
+ warning("W011", left, left.value);
+ }
+ }
+
+ function comma(opts) {
+ opts = opts || {};
+
+ if (!opts.peek) {
+ nobreakcomma(state.tokens.curr, state.tokens.next);
+ advance(",");
+ } else {
+ nobreakcomma(state.tokens.prev, state.tokens.curr);
+ }
+
+ // TODO: This is a temporary solution to fight against false-positives in
+ // arrays and objects with trailing commas (see GH-363). The best solution
+ // would be to extract all whitespace rules out of parser.
+
+ if (state.tokens.next.value !== "]" && state.tokens.next.value !== "}") {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ }
+
+ if (state.tokens.next.identifier && !(opts.property && state.option.inES5())) {
+ // Keywords that cannot follow a comma operator.
+ switch (state.tokens.next.value) {
+ case "break":
+ case "case":
+ case "catch":
+ case "continue":
+ case "default":
+ case "do":
+ case "else":
+ case "finally":
+ case "for":
+ case "if":
+ case "in":
+ case "instanceof":
+ case "return":
+ case "switch":
+ case "throw":
+ case "try":
+ case "var":
+ case "let":
+ case "while":
+ case "with":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+
+ if (state.tokens.next.type === "(punctuator)") {
+ switch (state.tokens.next.value) {
+ case "}":
+ case "]":
+ case ",":
+ if (opts.allowTrailing) {
+ return true;
+ }
+
+ /* falls through */
+ case ")":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ // Functional constructors for making the symbols that will be inherited by
+ // tokens.
+
+ function symbol(s, p) {
+ var x = state.syntax[s];
+ if (!x || typeof x !== "object") {
+ state.syntax[s] = x = {
+ id: s,
+ lbp: p,
+ value: s
+ };
+ }
+ return x;
+ }
+
+ function delim(s) {
+ return symbol(s, 0);
+ }
+
+ function stmt(s, f) {
+ var x = delim(s);
+ x.identifier = x.reserved = true;
+ x.fud = f;
+ return x;
+ }
+
+ function blockstmt(s, f) {
+ var x = stmt(s, f);
+ x.block = true;
+ return x;
+ }
+
+ function reserveName(x) {
+ var c = x.id.charAt(0);
+ if ((c >= "a" && c <= "z") || (c >= "A" && c <= "Z")) {
+ x.identifier = x.reserved = true;
+ }
+ return x;
+ }
+
+ function prefix(s, f) {
+ var x = symbol(s, 150);
+ reserveName(x);
+ x.nud = (typeof f === "function") ? f : function () {
+ this.right = expression(150);
+ this.arity = "unary";
+ if (this.id === "++" || this.id === "--") {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if ((!this.right.identifier || isReserved(this.right)) &&
+ this.right.id !== "." && this.right.id !== "[") {
+ warning("W017", this);
+ }
+ }
+ return this;
+ };
+ return x;
+ }
+
+ function type(s, f) {
+ var x = delim(s);
+ x.type = s;
+ x.nud = f;
+ return x;
+ }
+
+ function reserve(name, func) {
+ var x = type(name, func);
+ x.identifier = true;
+ x.reserved = true;
+ return x;
+ }
+
+ function FutureReservedWord(name, meta) {
+ var x = type(name, (meta && meta.nud) || function () {
+ return this;
+ });
+
+ meta = meta || {};
+ meta.isFutureReservedWord = true;
+
+ x.value = name;
+ x.identifier = true;
+ x.reserved = true;
+ x.meta = meta;
+
+ return x;
+ }
+
+ function reservevar(s, v) {
+ return reserve(s, function () {
+ if (typeof v === "function") {
+ v(this);
+ }
+ return this;
+ });
+ }
+
+ function infix(s, f, p, w) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.infix = true;
+ x.led = function (left) {
+ if (!w) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ }
+ if (s === "in" && left.id === "!") {
+ warning("W018", left, "!");
+ }
+ if (typeof f === "function") {
+ return f(left, this);
+ } else {
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ }
+ };
+ return x;
+ }
+
+
+ function application(s) {
+ var x = symbol(s, 42);
+
+ x.led = function (left) {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "arrow function syntax (=>)");
+ }
+
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+
+ this.left = left;
+ this.right = doFunction(undefined, undefined, false, left);
+ return this;
+ };
+ return x;
+ }
+
+ function relation(s, f) {
+ var x = symbol(s, 100);
+
+ x.led = function (left) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ var right = expression(100);
+
+ if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
+ warning("W019", this);
+ } else if (f) {
+ f.apply(this, [left, right]);
+ }
+
+ if (!left || !right) {
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (left.id === "!") {
+ warning("W018", left, "!");
+ }
+
+ if (right.id === "!") {
+ warning("W018", right, "!");
+ }
+
+ this.left = left;
+ this.right = right;
+ return this;
+ };
+ return x;
+ }
+
+ function isPoorRelation(node) {
+ return node &&
+ ((node.type === "(number)" && +node.value === 0) ||
+ (node.type === "(string)" && node.value === "") ||
+ (node.type === "null" && !state.option.eqnull) ||
+ node.type === "true" ||
+ node.type === "false" ||
+ node.type === "undefined");
+ }
+
+ function assignop(s, f, p) {
+ var x = infix(s, typeof f === "function" ? f : function (left, that) {
+ that.left = left;
+
+ if (left) {
+ if (predefined[left.value] === false &&
+ scope[left.value]["(global)"] === true) {
+ warning("W020", left);
+ } else if (left["function"]) {
+ warning("W021", left, left.value);
+ }
+
+ if (funct[left.value] === "const") {
+ error("E013", left, left.value);
+ }
+
+ if (left.id === ".") {
+ if (!left.left) {
+ warning("E031", that);
+ } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+ warning("E031", that);
+ }
+
+ that.right = expression(10);
+ return that;
+ } else if (left.id === "[") {
+ if (state.tokens.curr.left.first) {
+ state.tokens.curr.left.first.forEach(function (t) {
+ if (funct[t.value] === "const") {
+ error("E013", t, t.value);
+ }
+ });
+ } else if (!left.left) {
+ warning("E031", that);
+ } else if (left.left.value === "arguments" && !state.directive["use strict"]) {
+ warning("E031", that);
+ }
+ that.right = expression(10);
+ return that;
+ } else if (left.identifier && !isReserved(left)) {
+ if (funct[left.value] === "exception") {
+ warning("W022", left);
+ }
+ that.right = expression(10);
+ return that;
+ }
+
+ if (left === state.syntax["function"]) {
+ warning("W023", state.tokens.curr);
+ }
+ }
+
+ error("E031", that);
+ }, p);
+
+ x.exps = true;
+ x.assign = true;
+ return x;
+ }
+
+
+ function bitwise(s, f, p) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.led = (typeof f === "function") ? f : function (left) {
+ if (state.option.bitwise) {
+ warning("W016", this, this.id);
+ }
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ };
+ return x;
+ }
+
+
+ function bitwiseassignop(s) {
+ return assignop(s, function (left, that) {
+ if (state.option.bitwise) {
+ warning("W016", that, that.id);
+ }
+ nonadjacent(state.tokens.prev, state.tokens.curr);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (left) {
+ if (left.id === "." || left.id === "[" ||
+ (left.identifier && !isReserved(left))) {
+ expression(10);
+ return that;
+ }
+ if (left === state.syntax["function"]) {
+ warning("W023", state.tokens.curr);
+ }
+ return that;
+ }
+ error("E031", that);
+ }, 20);
+ }
+
+
+ function suffix(s) {
+ var x = symbol(s, 150);
+
+ x.led = function (left) {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
+ warning("W017", this);
+ }
+
+ this.left = left;
+ return this;
+ };
+ return x;
+ }
+
+ // fnparam means that this identifier is being defined as a function
+ // argument (see identifier())
+ // prop means that this identifier is that of an object property
+
+ function optionalidentifier(fnparam, prop) {
+ if (!state.tokens.next.identifier) {
+ return;
+ }
+
+ advance();
+
+ var curr = state.tokens.curr;
+ var val = state.tokens.curr.value;
+
+ if (!isReserved(curr)) {
+ return val;
+ }
+
+ if (prop) {
+ if (state.option.inES5()) {
+ return val;
+ }
+ }
+
+ if (fnparam && val === "undefined") {
+ return val;
+ }
+
+ // Display an info message about reserved words as properties
+ // and ES5 but do it only once.
+ if (prop && !api.getCache("displayed:I002")) {
+ api.setCache("displayed:I002", true);
+ warning("I002");
+ }
+
+ warning("W024", state.tokens.curr, state.tokens.curr.id);
+ return val;
+ }
+
+ // fnparam means that this identifier is being defined as a function
+ // argument
+ // prop means that this identifier is that of an object property
+ function identifier(fnparam, prop) {
+ var i = optionalidentifier(fnparam, prop);
+ if (i) {
+ return i;
+ }
+ if (state.tokens.curr.id === "function" && state.tokens.next.id === "(") {
+ warning("W025");
+ } else {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ }
+
+
+ function reachable(s) {
+ var i = 0, t;
+ if (state.tokens.next.id !== ";" || noreach) {
+ return;
+ }
+ for (;;) {
+ t = peek(i);
+ if (t.reach) {
+ return;
+ }
+ if (t.id !== "(endline)") {
+ if (t.id === "function") {
+ if (!state.option.latedef) {
+ break;
+ }
+
+ warning("W026", t);
+ break;
+ }
+
+ warning("W027", t, t.value, s);
+ break;
+ }
+ i += 1;
+ }
+ }
+
+
+ function statement(noindent) {
+ var values;
+ var i = indent, r, s = scope, t = state.tokens.next;
+
+ if (t.id === ";") {
+ advance(";");
+ return;
+ }
+
+ // Is this a labelled statement?
+ var res = isReserved(t);
+
+ // We're being more tolerant here: if someone uses
+ // a FutureReservedWord as a label, we warn but proceed
+ // anyway.
+
+ if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
+ warning("W024", t, t.id);
+ res = false;
+ }
+
+ // detect a destructuring assignment
+ if (_.has(["[", "{"], t.value)) {
+ if (lookupBlockType().isDestAssign) {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "destructuring expression");
+ }
+ values = destructuringExpression();
+ values.forEach(function (tok) {
+ isundef(funct, "W117", tok.token, tok.id);
+ });
+ advance("=");
+ destructuringExpressionMatch(values, expression(10, true));
+ advance(";");
+ return;
+ }
+ }
+ if (t.identifier && !res && peek().id === ":") {
+ advance();
+ advance(":");
+ scope = Object.create(s);
+ addlabel(t.value, "label");
+
+ if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
+ warning("W028", state.tokens.next, t.value, state.tokens.next.value);
+ }
+
+ state.tokens.next.label = t.value;
+ t = state.tokens.next;
+ }
+
+ // Is it a lonely block?
+
+ if (t.id === "{") {
+ block(true, true);
+ return;
+ }
+
+ // Parse the statement.
+
+ if (!noindent) {
+ indentation();
+ }
+ r = expression(0, true);
+
+ // Look for the final semicolon.
+
+ if (!t.block) {
+ if (!state.option.expr && (!r || !r.exps)) {
+ warning("W030", state.tokens.curr);
+ } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
+ warning("W031", t);
+ }
+
+ if (state.tokens.next.id !== ";") {
+ if (!state.option.asi) {
+ // If this is the last statement in a block that ends on
+ // the same line *and* option lastsemic is on, ignore the warning.
+ // Otherwise, complain about missing semicolon.
+ if (!state.option.lastsemic || state.tokens.next.id !== "}" ||
+ state.tokens.next.line !== state.tokens.curr.line) {
+ warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
+ }
+ }
+ } else {
+ adjacent(state.tokens.curr, state.tokens.next);
+ advance(";");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ }
+ }
+
+ // Restore the indentation.
+
+ indent = i;
+ scope = s;
+ return r;
+ }
+
+
+ function statements(startLine) {
+ var a = [], p;
+
+ while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
+ if (state.tokens.next.id === ";") {
+ p = peek();
+
+ if (!p || (p.id !== "(" && p.id !== "[")) {
+ warning("W032");
+ }
+
+ advance(";");
+ } else {
+ a.push(statement(startLine === state.tokens.next.line));
+ }
+ }
+ return a;
+ }
+
+
+ /*
+ * read all directives
+ * recognizes a simple form of asi, but always
+ * warns, if it is used
+ */
+ function directives() {
+ var i, p, pn;
+
+ for (;;) {
+ if (state.tokens.next.id === "(string)") {
+ p = peek(0);
+ if (p.id === "(endline)") {
+ i = 1;
+ do {
+ pn = peek(i);
+ i = i + 1;
+ } while (pn.id === "(endline)");
+
+ if (pn.id !== ";") {
+ if (pn.id !== "(string)" && pn.id !== "(number)" &&
+ pn.id !== "(regexp)" && pn.identifier !== true &&
+ pn.id !== "}") {
+ break;
+ }
+ warning("W033", state.tokens.next);
+ } else {
+ p = pn;
+ }
+ } else if (p.id === "}") {
+ // Directive with no other statements, warn about missing semicolon
+ warning("W033", p);
+ } else if (p.id !== ";") {
+ break;
+ }
+
+ indentation();
+ advance();
+ if (state.directive[state.tokens.curr.value]) {
+ warning("W034", state.tokens.curr, state.tokens.curr.value);
+ }
+
+ if (state.tokens.curr.value === "use strict") {
+ if (!state.option["(explicitNewcap)"])
+ state.option.newcap = true;
+ state.option.undef = true;
+ }
+
+ // there's no directive negation, so always set to true
+ state.directive[state.tokens.curr.value] = true;
+
+ if (p.id === ";") {
+ advance(";");
+ }
+ continue;
+ }
+ break;
+ }
+ }
+
+
+ /*
+ * Parses a single block. A block is a sequence of statements wrapped in
+ * braces.
+ *
+ * ordinary - true for everything but function bodies and try blocks.
+ * stmt - true if block can be a single statement (e.g. in if/for/while).
+ * isfunc - true if block is a function body
+ */
+ function block(ordinary, stmt, isfunc, isfatarrow) {
+ var a,
+ b = inblock,
+ old_indent = indent,
+ m,
+ s = scope,
+ t,
+ line,
+ d;
+
+ inblock = ordinary;
+
+ if (!ordinary || !state.option.funcscope)
+ scope = Object.create(scope);
+
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ t = state.tokens.next;
+
+ var metrics = funct["(metrics)"];
+ metrics.nestedBlockDepth += 1;
+ metrics.verifyMaxNestedBlockDepthPerFunction();
+
+ if (state.tokens.next.id === "{") {
+ advance("{");
+
+ // create a new block scope
+ funct["(blockscope)"].stack();
+
+ line = state.tokens.curr.line;
+ if (state.tokens.next.id !== "}") {
+ indent += state.option.indent;
+ while (!ordinary && state.tokens.next.from > indent) {
+ indent += state.option.indent;
+ }
+
+ if (isfunc) {
+ m = {};
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ directives();
+
+ if (state.option.strict && funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.directive["use strict"]) {
+ warning("E007");
+ }
+ }
+ }
+
+ a = statements(line);
+
+ metrics.statementCount += a.length;
+
+ if (isfunc) {
+ state.directive = m;
+ }
+
+ indent -= state.option.indent;
+ if (line !== state.tokens.next.line) {
+ indentation();
+ }
+ } else if (line !== state.tokens.next.line) {
+ indentation();
+ }
+ advance("}", t);
+
+ funct["(blockscope)"].unstack();
+
+ indent = old_indent;
+ } else if (!ordinary) {
+ if (isfunc) {
+ m = {};
+ if (stmt && !isfatarrow && !state.option.inMoz(true)) {
+ error("W118", state.tokens.curr, "function closure expressions");
+ }
+
+ if (!stmt) {
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ }
+ expression(10);
+
+ if (state.option.strict && funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.directive["use strict"]) {
+ warning("E007");
+ }
+ }
+ } else {
+ error("E021", state.tokens.next, "{", state.tokens.next.value);
+ }
+ } else {
+
+ // check to avoid let declaration not within a block
+ funct["(nolet)"] = true;
+
+ if (!stmt || state.option.curly) {
+ warning("W116", state.tokens.next, "{", state.tokens.next.value);
+ }
+
+ noreach = true;
+ indent += state.option.indent;
+ // test indentation only if statement is in new line
+ a = [statement(state.tokens.next.line === state.tokens.curr.line)];
+ indent -= state.option.indent;
+ noreach = false;
+
+ delete funct["(nolet)"];
+ }
+ funct["(verb)"] = null;
+ if (!ordinary || !state.option.funcscope) scope = s;
+ inblock = b;
+ if (ordinary && state.option.noempty && (!a || a.length === 0)) {
+ warning("W035");
+ }
+ metrics.nestedBlockDepth -= 1;
+ return a;
+ }
+
+
+ function countMember(m) {
+ if (membersOnly && typeof membersOnly[m] !== "boolean") {
+ warning("W036", state.tokens.curr, m);
+ }
+ if (typeof member[m] === "number") {
+ member[m] += 1;
+ } else {
+ member[m] = 1;
+ }
+ }
+
+
+ function note_implied(tkn) {
+ var name = tkn.value, line = tkn.line, a = implied[name];
+ if (typeof a === "function") {
+ a = false;
+ }
+
+ if (!a) {
+ a = [line];
+ implied[name] = a;
+ } else if (a[a.length - 1] !== line) {
+ a.push(line);
+ }
+ }
+
+
+ // Build the syntax table by declaring the syntactic elements of the language.
+
+ type("(number)", function () {
+ return this;
+ });
+
+ type("(string)", function () {
+ return this;
+ });
+
+ state.syntax["(identifier)"] = {
+ type: "(identifier)",
+ lbp: 0,
+ identifier: true,
+ nud: function () {
+ var v = this.value,
+ s = scope[v],
+ f;
+
+ if (typeof s === "function") {
+ // Protection against accidental inheritance.
+ s = undefined;
+ } else if (typeof s === "boolean") {
+ f = funct;
+ funct = functions[0];
+ addlabel(v, "var");
+ s = funct;
+ funct = f;
+ }
+ var block;
+ if (_.has(funct, "(blockscope)")) {
+ block = funct["(blockscope)"].getlabel(v);
+ }
+
+ // The name is in scope and defined in the current function.
+ if (funct === s || block) {
+ // Change 'unused' to 'var', and reject labels.
+ // the name is in a block scope
+ switch (block ? block[v]["(type)"] : funct[v]) {
+ case "unused":
+ if (block) block[v]["(type)"] = "var";
+ else funct[v] = "var";
+ break;
+ case "unction":
+ if (block) block[v]["(type)"] = "function";
+ else funct[v] = "function";
+ this["function"] = true;
+ break;
+ case "function":
+ this["function"] = true;
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ break;
+ }
+ } else if (funct["(global)"]) {
+ // The name is not defined in the function. If we are in the global
+ // scope, then we have an undefined variable.
+ //
+ // Operators typeof and delete do not raise runtime errors even if
+ // the base object of a reference is null so no need to display warning
+ // if we're inside of typeof or delete.
+
+ if (typeof predefined[v] !== "boolean") {
+ // Attempting to subscript a null reference will throw an
+ // error, even within the typeof and delete operators
+ if (!(anonname === "typeof" || anonname === "delete") ||
+ (state.tokens.next && (state.tokens.next.value === "." ||
+ state.tokens.next.value === "["))) {
+
+ // if we're in a list comprehension, variables are declared
+ // locally and used before being defined. So we check
+ // the presence of the given variable in the comp array
+ // before declaring it undefined.
+
+ if (!funct["(comparray)"].check(v)) {
+ isundef(funct, "W117", state.tokens.curr, v);
+ }
+ }
+ }
+
+ note_implied(state.tokens.curr);
+ } else {
+ // If the name is already defined in the current
+ // function, but not as outer, then there is a scope error.
+
+ switch (funct[v]) {
+ case "closure":
+ case "function":
+ case "var":
+ case "unused":
+ warning("W038", state.tokens.curr, v);
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ break;
+ case "outer":
+ case "global":
+ break;
+ default:
+ // If the name is defined in an outer function, make an outer entry,
+ // and if it was unused, make it var.
+ if (s === true) {
+ funct[v] = true;
+ } else if (s === null) {
+ warning("W039", state.tokens.curr, v);
+ note_implied(state.tokens.curr);
+ } else if (typeof s !== "object") {
+ // Operators typeof and delete do not raise runtime errors even
+ // if the base object of a reference is null so no need to
+ //
+ // display warning if we're inside of typeof or delete.
+ // Attempting to subscript a null reference will throw an
+ // error, even within the typeof and delete operators
+ if (!(anonname === "typeof" || anonname === "delete") ||
+ (state.tokens.next &&
+ (state.tokens.next.value === "." || state.tokens.next.value === "["))) {
+
+ isundef(funct, "W117", state.tokens.curr, v);
+ }
+ funct[v] = true;
+ note_implied(state.tokens.curr);
+ } else {
+ switch (s[v]) {
+ case "function":
+ case "unction":
+ this["function"] = true;
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "var":
+ case "unused":
+ s[v] = "closure";
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "closure":
+ funct[v] = s["(global)"] ? "global" : "outer";
+ break;
+ case "label":
+ warning("W037", state.tokens.curr, v);
+ }
+ }
+ }
+ }
+ return this;
+ },
+ led: function () {
+ error("E033", state.tokens.next, state.tokens.next.value);
+ }
+ };
+
+ type("(regexp)", function () {
+ return this;
+ });
+
+ // ECMAScript parser
+
+ delim("(endline)");
+ delim("(begin)");
+ delim("(end)").reach = true;
+ delim("(error)").reach = true;
+ delim("}").reach = true;
+ delim(")");
+ delim("]");
+ delim("\"").reach = true;
+ delim("'").reach = true;
+ delim(";");
+ delim(":").reach = true;
+ delim("#");
+
+ reserve("else");
+ reserve("case").reach = true;
+ reserve("catch");
+ reserve("default").reach = true;
+ reserve("finally");
+ reservevar("arguments", function (x) {
+ if (state.directive["use strict"] && funct["(global)"]) {
+ warning("E008", x);
+ }
+ });
+ reservevar("eval");
+ reservevar("false");
+ reservevar("Infinity");
+ reservevar("null");
+ reservevar("this", function (x) {
+ if (state.directive["use strict"] && !state.option.validthis && ((funct["(statement)"] &&
+ funct["(name)"].charAt(0) > "Z") || funct["(global)"])) {
+ warning("W040", x);
+ }
+ });
+ reservevar("true");
+ reservevar("undefined");
+
+ assignop("=", "assign", 20);
+ assignop("+=", "assignadd", 20);
+ assignop("-=", "assignsub", 20);
+ assignop("*=", "assignmult", 20);
+ assignop("/=", "assigndiv", 20).nud = function () {
+ error("E014");
+ };
+ assignop("%=", "assignmod", 20);
+
+ bitwiseassignop("&=", "assignbitand", 20);
+ bitwiseassignop("|=", "assignbitor", 20);
+ bitwiseassignop("^=", "assignbitxor", 20);
+ bitwiseassignop("<<=", "assignshiftleft", 20);
+ bitwiseassignop(">>=", "assignshiftright", 20);
+ bitwiseassignop(">>>=", "assignshiftrightunsigned", 20);
+ infix(",", function (left, that) {
+ var expr;
+ that.exprs = [left];
+ if (!comma({peek: true})) {
+ return that;
+ }
+ while (true) {
+ if (!(expr = expression(10))) {
+ break;
+ }
+ that.exprs.push(expr);
+ if (state.tokens.next.value !== "," || !comma()) {
+ break;
+ }
+ }
+ return that;
+ }, 10, true);
+
+ infix("?", function (left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(10);
+ advance(":");
+ that["else"] = expression(10);
+ return that;
+ }, 30);
+
+ var orPrecendence = 40;
+ infix("||", function (left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(orPrecendence);
+ return that;
+ }, orPrecendence);
+ infix("&&", "and", 50);
+ bitwise("|", "bitor", 70);
+ bitwise("^", "bitxor", 80);
+ bitwise("&", "bitand", 90);
+ relation("==", function (left, right) {
+ var eqnull = state.option.eqnull && (left.value === "null" || right.value === "null");
+
+ if (!eqnull && state.option.eqeqeq)
+ warning("W116", this, "===", "==");
+ else if (isPoorRelation(left))
+ warning("W041", this, "===", left.value);
+ else if (isPoorRelation(right))
+ warning("W041", this, "===", right.value);
+
+ return this;
+ });
+ relation("===");
+ relation("!=", function (left, right) {
+ var eqnull = state.option.eqnull &&
+ (left.value === "null" || right.value === "null");
+
+ if (!eqnull && state.option.eqeqeq) {
+ warning("W116", this, "!==", "!=");
+ } else if (isPoorRelation(left)) {
+ warning("W041", this, "!==", left.value);
+ } else if (isPoorRelation(right)) {
+ warning("W041", this, "!==", right.value);
+ }
+ return this;
+ });
+ relation("!==");
+ relation("<");
+ relation(">");
+ relation("<=");
+ relation(">=");
+ bitwise("<<", "shiftleft", 120);
+ bitwise(">>", "shiftright", 120);
+ bitwise(">>>", "shiftrightunsigned", 120);
+ infix("in", "in", 120);
+ infix("instanceof", "instanceof", 120);
+ infix("+", function (left, that) {
+ var right = expression(130);
+ if (left && right && left.id === "(string)" && right.id === "(string)") {
+ left.value += right.value;
+ left.character = right.character;
+ if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
+ warning("W050", left);
+ }
+ return left;
+ }
+ that.left = left;
+ that.right = right;
+ return that;
+ }, 130);
+ prefix("+", "num");
+ prefix("+++", function () {
+ warning("W007");
+ this.right = expression(150);
+ this.arity = "unary";
+ return this;
+ });
+ infix("+++", function (left) {
+ warning("W007");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("-", "sub", 130);
+ prefix("-", "neg");
+ prefix("---", function () {
+ warning("W006");
+ this.right = expression(150);
+ this.arity = "unary";
+ return this;
+ });
+ infix("---", function (left) {
+ warning("W006");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("*", "mult", 140);
+ infix("/", "div", 140);
+ infix("%", "mod", 140);
+
+ suffix("++", "postinc");
+ prefix("++", "preinc");
+ state.syntax["++"].exps = true;
+
+ suffix("--", "postdec");
+ prefix("--", "predec");
+ state.syntax["--"].exps = true;
+ prefix("delete", function () {
+ var p = expression(10);
+ if (!p || (p.id !== "." && p.id !== "[")) {
+ warning("W051");
+ }
+ this.first = p;
+ return this;
+ }).exps = true;
+
+ prefix("~", function () {
+ if (state.option.bitwise) {
+ warning("W052", this, "~");
+ }
+ expression(150);
+ return this;
+ });
+
+ prefix("...", function () {
+ if (!state.option.inESNext()) {
+ warning("W104", this, "spread/rest operator");
+ }
+ if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ expression(150);
+ return this;
+ });
+
+ prefix("!", function () {
+ this.right = expression(150);
+ this.arity = "unary";
+
+ if (!this.right) { // '!' followed by nothing? Give up.
+ quit("E041", this.line || 0);
+ }
+
+ if (bang[this.right.id] === true) {
+ warning("W018", this, "!");
+ }
+ return this;
+ });
+
+ prefix("typeof", "typeof");
+ prefix("new", function () {
+ var c = expression(155), i;
+ if (c && c.id !== "function") {
+ if (c.identifier) {
+ c["new"] = true;
+ switch (c.value) {
+ case "Number":
+ case "String":
+ case "Boolean":
+ case "Math":
+ case "JSON":
+ warning("W053", state.tokens.prev, c.value);
+ break;
+ case "Function":
+ if (!state.option.evil) {
+ warning("W054");
+ }
+ break;
+ case "Date":
+ case "RegExp":
+ break;
+ default:
+ if (c.id !== "function") {
+ i = c.value.substr(0, 1);
+ if (state.option.newcap && (i < "A" || i > "Z") && !_.has(global, c.value)) {
+ warning("W055", state.tokens.curr);
+ }
+ }
+ }
+ } else {
+ if (c.id !== "." && c.id !== "[" && c.id !== "(") {
+ warning("W056", state.tokens.curr);
+ }
+ }
+ } else {
+ if (!state.option.supernew)
+ warning("W057", this);
+ }
+ adjacent(state.tokens.curr, state.tokens.next);
+ if (state.tokens.next.id !== "(" && !state.option.supernew) {
+ warning("W058", state.tokens.curr, state.tokens.curr.value);
+ }
+ this.first = c;
+ return this;
+ });
+ state.syntax["new"].exps = true;
+
+ prefix("void").exps = true;
+
+ infix(".", function (left, that) {
+ adjacent(state.tokens.prev, state.tokens.curr);
+ nobreak();
+ var m = identifier(false, true);
+
+ if (typeof m === "string") {
+ countMember(m);
+ }
+
+ that.left = left;
+ that.right = m;
+
+ if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
+ if (state.option.noarg)
+ warning("W059", left, m);
+ else if (state.directive["use strict"])
+ error("E008");
+ } else if (!state.option.evil && left && left.value === "document" &&
+ (m === "write" || m === "writeln")) {
+ warning("W060", left);
+ }
+
+ if (!state.option.evil && (m === "eval" || m === "execScript")) {
+ warning("W061");
+ }
+
+ return that;
+ }, 160, true);
+
+ infix("(", function (left, that) {
+ if (state.tokens.prev.id !== "}" && state.tokens.prev.id !== ")") {
+ nobreak(state.tokens.prev, state.tokens.curr);
+ }
+
+ nospace();
+ if (state.option.immed && left && !left.immed && left.id === "function") {
+ warning("W062");
+ }
+
+ var n = 0;
+ var p = [];
+
+ if (left) {
+ if (left.type === "(identifier)") {
+ if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
+ if ("Number String Boolean Date Object".indexOf(left.value) === -1) {
+ if (left.value === "Math") {
+ warning("W063", left);
+ } else if (state.option.newcap) {
+ warning("W064", left);
+ }
+ }
+ }
+ }
+ }
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ p[p.length] = expression(10);
+ n += 1;
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+
+ advance(")");
+ nospace(state.tokens.prev, state.tokens.curr);
+
+ if (typeof left === "object") {
+ if (left.value === "parseInt" && n === 1) {
+ warning("W065", state.tokens.curr);
+ }
+ if (!state.option.evil) {
+ if (left.value === "eval" || left.value === "Function" ||
+ left.value === "execScript") {
+ warning("W061", left);
+
+ if (p[0] && [0].id === "(string)") {
+ addInternalSrc(left, p[0].value);
+ }
+ } else if (p[0] && p[0].id === "(string)" &&
+ (left.value === "setTimeout" ||
+ left.value === "setInterval")) {
+ warning("W066", left);
+ addInternalSrc(left, p[0].value);
+
+ // window.setTimeout/setInterval
+ } else if (p[0] && p[0].id === "(string)" &&
+ left.value === "." &&
+ left.left.value === "window" &&
+ (left.right === "setTimeout" ||
+ left.right === "setInterval")) {
+ warning("W066", left);
+ addInternalSrc(left, p[0].value);
+ }
+ }
+ if (!left.identifier && left.id !== "." && left.id !== "[" &&
+ left.id !== "(" && left.id !== "&&" && left.id !== "||" &&
+ left.id !== "?") {
+ warning("W067", left);
+ }
+ }
+
+ that.left = left;
+ return that;
+ }, 155, true).exps = true;
+
+ prefix("(", function () {
+ nospace();
+ var bracket, brackets = [];
+ var pn, pn1, i = 0;
+ var ret;
+
+ do {
+ pn = peek(i);
+ i += 1;
+ pn1 = peek(i);
+ i += 1;
+ } while (pn.value !== ")" && pn1.value !== "=>" && pn1.value !== ";" && pn1.type !== "(end)");
+
+ if (state.tokens.next.id === "function") {
+ state.tokens.next.immed = true;
+ }
+
+ var exprs = [];
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ if (pn1.value === "=>" && state.tokens.next.value === "{") {
+ bracket = state.tokens.next;
+ bracket.left = destructuringExpression();
+ brackets.push(bracket);
+ for (var t in bracket.left) {
+ exprs.push(bracket.left[t].token);
+ }
+ } else {
+ exprs.push(expression(10));
+ }
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+
+ advance(")", this);
+ nospace(state.tokens.prev, state.tokens.curr);
+ if (state.option.immed && exprs[0] && exprs[0].id === "function") {
+ if (state.tokens.next.id !== "(" &&
+ (state.tokens.next.id !== "." || (peek().value !== "call" && peek().value !== "apply"))) {
+ warning("W068", this);
+ }
+ }
+
+ if (state.tokens.next.value === "=>") {
+ return exprs;
+ }
+ if (!exprs.length) {
+ return;
+ }
+ if (exprs.length > 1) {
+ ret = Object.create(state.syntax[","]);
+ ret.exprs = exprs;
+ } else {
+ ret = exprs[0];
+ }
+ if (ret) {
+ ret.paren = true;
+ }
+ return ret;
+ });
+
+ application("=>");
+
+ infix("[", function (left, that) {
+ nobreak(state.tokens.prev, state.tokens.curr);
+ nospace();
+ var e = expression(10), s;
+ if (e && e.type === "(string)") {
+ if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
+ warning("W061", that);
+ }
+
+ countMember(e.value);
+ if (!state.option.sub && reg.identifier.test(e.value)) {
+ s = state.syntax[e.value];
+ if (!s || !isReserved(s)) {
+ warning("W069", state.tokens.prev, e.value);
+ }
+ }
+ }
+ advance("]", that);
+
+ if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ nospace(state.tokens.prev, state.tokens.curr);
+ that.left = left;
+ that.right = e;
+ return that;
+ }, 160, true);
+
+ function comprehensiveArrayExpression() {
+ var res = {};
+ res.exps = true;
+ funct["(comparray)"].stack();
+
+ res.right = expression(10);
+ advance("for");
+ if (state.tokens.next.value === "each") {
+ advance("each");
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+ advance("(");
+ funct["(comparray)"].setState("define");
+ res.left = expression(10);
+ advance(")");
+ if (state.tokens.next.value === "if") {
+ advance("if");
+ advance("(");
+ funct["(comparray)"].setState("filter");
+ res.filter = expression(10);
+ advance(")");
+ }
+ advance("]");
+ funct["(comparray)"].unstack();
+ return res;
+ }
+
+ prefix("[", function () {
+ var blocktype = lookupBlockType(true);
+ if (blocktype.isCompArray) {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "array comprehension");
+ }
+ return comprehensiveArrayExpression();
+ } else if (blocktype.isDestAssign && !state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "destructuring assignment");
+ }
+ var b = state.tokens.curr.line !== state.tokens.next.line;
+ this.first = [];
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+ while (state.tokens.next.id !== "(end)") {
+ while (state.tokens.next.id === ",") {
+ if (!state.option.inES5())
+ warning("W070");
+ advance(",");
+ }
+ if (state.tokens.next.id === "]") {
+ break;
+ }
+ if (b && state.tokens.curr.line !== state.tokens.next.line) {
+ indentation();
+ }
+ this.first.push(expression(10));
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true });
+ if (state.tokens.next.id === "]" && !state.option.inES5(true)) {
+ warning("W070", state.tokens.curr);
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ indentation();
+ }
+ advance("]", this);
+ return this;
+ }, 160);
+
+
+ function property_name() {
+ var id = optionalidentifier(false, true);
+
+ if (!id) {
+ if (state.tokens.next.id === "(string)") {
+ id = state.tokens.next.value;
+ advance();
+ } else if (state.tokens.next.id === "(number)") {
+ id = state.tokens.next.value.toString();
+ advance();
+ }
+ }
+
+ if (id === "hasOwnProperty") {
+ warning("W001");
+ }
+
+ return id;
+ }
+
+
+ function functionparams(parsed) {
+ var curr, next;
+ var params = [];
+ var ident;
+ var tokens = [];
+ var t;
+ var pastDefault = false;
+
+ if (parsed) {
+ if (parsed instanceof Array) {
+ for (var i in parsed) {
+ curr = parsed[i];
+ if (_.contains(["{", "["], curr.id)) {
+ for (t in curr.left) {
+ t = tokens[t];
+ if (t.id) {
+ params.push(t.id);
+ addlabel(t.id, "unused", t.token);
+ }
+ }
+ } else if (curr.value === "...") {
+ if (!state.option.inESNext()) {
+ warning("W104", curr, "spread/rest operator");
+ }
+ continue;
+ } else {
+ addlabel(curr.value, "unused", curr);
+ }
+ }
+ return params;
+ } else {
+ if (parsed.identifier === true) {
+ addlabel(parsed.value, "unused", parsed);
+ return [parsed];
+ }
+ }
+ }
+
+ next = state.tokens.next;
+
+ advance("(");
+ nospace();
+
+ if (state.tokens.next.id === ")") {
+ advance(")");
+ return;
+ }
+
+ for (;;) {
+ if (_.contains(["{", "["], state.tokens.next.id)) {
+ tokens = destructuringExpression();
+ for (t in tokens) {
+ t = tokens[t];
+ if (t.id) {
+ params.push(t.id);
+ addlabel(t.id, "unused", t.token);
+ }
+ }
+ } else if (state.tokens.next.value === "...") {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.next, "spread/rest operator");
+ }
+ advance("...");
+ nospace();
+ ident = identifier(true);
+ params.push(ident);
+ addlabel(ident, "unused", state.tokens.curr);
+ } else {
+ ident = identifier(true);
+ params.push(ident);
+ addlabel(ident, "unused", state.tokens.curr);
+ }
+
+ // it is a syntax error to have a regular argument after a default argument
+ if (pastDefault) {
+ if (state.tokens.next.id !== "=") {
+ error("E051", state.tokens.current);
+ }
+ }
+ if (state.tokens.next.id === "=") {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.next, "default parameters");
+ }
+ advance("=");
+ pastDefault = true;
+ expression(10);
+ }
+ if (state.tokens.next.id === ",") {
+ comma();
+ } else {
+ advance(")", next);
+ nospace(state.tokens.prev, state.tokens.curr);
+ return params;
+ }
+ }
+ }
+
+
+ function doFunction(name, statement, generator, fatarrowparams) {
+ var f;
+ var oldOption = state.option;
+ var oldIgnored = state.ignored;
+ var oldScope = scope;
+
+ state.option = Object.create(state.option);
+ state.ignored = Object.create(state.ignored);
+ scope = Object.create(scope);
+
+ funct = {
+ "(name)" : name || "\"" + anonname + "\"",
+ "(line)" : state.tokens.next.line,
+ "(character)" : state.tokens.next.character,
+ "(context)" : funct,
+ "(breakage)" : 0,
+ "(loopage)" : 0,
+ "(metrics)" : createMetrics(state.tokens.next),
+ "(scope)" : scope,
+ "(statement)" : statement,
+ "(tokens)" : {},
+ "(blockscope)": funct["(blockscope)"],
+ "(comparray)" : funct["(comparray)"]
+ };
+
+ if (generator) {
+ funct["(generator)"] = true;
+ }
+
+ f = funct;
+ state.tokens.curr.funct = funct;
+
+ functions.push(funct);
+
+ if (name) {
+ addlabel(name, "function");
+ }
+
+ funct["(params)"] = functionparams(fatarrowparams);
+
+ funct["(metrics)"].verifyMaxParametersPerFunction(funct["(params)"]);
+
+ block(false, true, true, fatarrowparams ? true:false);
+
+ if (generator && funct["(generator)"] !== "yielded") {
+ error("E047", state.tokens.curr);
+ }
+
+ funct["(metrics)"].verifyMaxStatementsPerFunction();
+ funct["(metrics)"].verifyMaxComplexityPerFunction();
+ funct["(unusedOption)"] = state.option.unused;
+
+ scope = oldScope;
+ state.option = oldOption;
+ state.ignored = oldIgnored;
+ funct["(last)"] = state.tokens.curr.line;
+ funct["(lastcharacter)"] = state.tokens.curr.character;
+ funct = funct["(context)"];
+
+ return f;
+ }
+
+ function createMetrics(functionStartToken) {
+ return {
+ statementCount: 0,
+ nestedBlockDepth: -1,
+ ComplexityCount: 1,
+ verifyMaxStatementsPerFunction: function () {
+ if (state.option.maxstatements &&
+ this.statementCount > state.option.maxstatements) {
+ warning("W071", functionStartToken, this.statementCount);
+ }
+ },
+
+ verifyMaxParametersPerFunction: function (params) {
+ params = params || [];
+
+ if (state.option.maxparams && params.length > state.option.maxparams) {
+ warning("W072", functionStartToken, params.length);
+ }
+ },
+
+ verifyMaxNestedBlockDepthPerFunction: function () {
+ if (state.option.maxdepth &&
+ this.nestedBlockDepth > 0 &&
+ this.nestedBlockDepth === state.option.maxdepth + 1) {
+ warning("W073", null, this.nestedBlockDepth);
+ }
+ },
+
+ verifyMaxComplexityPerFunction: function () {
+ var max = state.option.maxcomplexity;
+ var cc = this.ComplexityCount;
+ if (max && cc > max) {
+ warning("W074", functionStartToken, cc);
+ }
+ }
+ };
+ }
+
+ function increaseComplexityCount() {
+ funct["(metrics)"].ComplexityCount += 1;
+ }
+
+ // Parse assignments that were found instead of conditionals.
+ // For example: if (a = 1) { ... }
+
+ function checkCondAssignment(expr) {
+ var id, paren;
+ if (expr) {
+ id = expr.id;
+ paren = expr.paren;
+ if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
+ id = expr.id;
+ paren = paren || expr.paren;
+ }
+ }
+ switch (id) {
+ case "=":
+ case "+=":
+ case "-=":
+ case "*=":
+ case "%=":
+ case "&=":
+ case "|=":
+ case "^=":
+ case "/=":
+ if (!paren && !state.option.boss) {
+ warning("W084");
+ }
+ }
+ }
+
+
+ (function (x) {
+ x.nud = function (isclassdef) {
+ var b, f, i, p, t, g;
+ var props = {}; // All properties, including accessors
+ var tag = "";
+
+ function saveProperty(name, tkn) {
+ if (props[name] && _.has(props, name))
+ warning("W075", state.tokens.next, i);
+ else
+ props[name] = {};
+
+ props[name].basic = true;
+ props[name].basictkn = tkn;
+ }
+
+ function saveSetter(name, tkn) {
+ if (props[name] && _.has(props, name)) {
+ if (props[name].basic || props[name].setter)
+ warning("W075", state.tokens.next, i);
+ } else {
+ props[name] = {};
+ }
+
+ props[name].setter = true;
+ props[name].setterToken = tkn;
+ }
+
+ function saveGetter(name) {
+ if (props[name] && _.has(props, name)) {
+ if (props[name].basic || props[name].getter)
+ warning("W075", state.tokens.next, i);
+ } else {
+ props[name] = {};
+ }
+
+ props[name].getter = true;
+ props[name].getterToken = state.tokens.curr;
+ }
+
+ b = state.tokens.curr.line !== state.tokens.next.line;
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+
+ for (;;) {
+ if (state.tokens.next.id === "}") {
+ break;
+ }
+
+ if (b) {
+ indentation();
+ }
+
+ if (isclassdef && state.tokens.next.value === "static") {
+ advance("static");
+ tag = "static ";
+ }
+
+ if (state.tokens.next.value === "get" && peek().id !== ":") {
+ advance("get");
+
+ if (!state.option.inES5(!isclassdef)) {
+ error("E034");
+ }
+
+ i = property_name();
+ if (!i) {
+ error("E035");
+ }
+
+ // It is a Syntax Error if PropName of MethodDefinition is
+ // "constructor" and SpecialMethod of MethodDefinition is true.
+ if (isclassdef && i === "constructor") {
+ error("E049", state.tokens.next, "class getter method", i);
+ }
+
+ saveGetter(tag + i);
+ t = state.tokens.next;
+ adjacent(state.tokens.curr, state.tokens.next);
+ f = doFunction();
+ p = f["(params)"];
+
+ if (p) {
+ warning("W076", t, p[0], i);
+ }
+
+ adjacent(state.tokens.curr, state.tokens.next);
+ } else if (state.tokens.next.value === "set" && peek().id !== ":") {
+ advance("set");
+
+ if (!state.option.inES5(!isclassdef)) {
+ error("E034");
+ }
+
+ i = property_name();
+ if (!i) {
+ error("E035");
+ }
+
+ // It is a Syntax Error if PropName of MethodDefinition is
+ // "constructor" and SpecialMethod of MethodDefinition is true.
+ if (isclassdef && i === "constructor") {
+ error("E049", state.tokens.next, "class setter method", i);
+ }
+
+ saveSetter(tag + i, state.tokens.next);
+ t = state.tokens.next;
+ adjacent(state.tokens.curr, state.tokens.next);
+ f = doFunction();
+ p = f["(params)"];
+
+ if (!p || p.length !== 1) {
+ warning("W077", t, i);
+ }
+ } else {
+ g = false;
+ if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.next, "generator functions");
+ }
+ advance("*");
+ g = true;
+ }
+ i = property_name();
+ saveProperty(tag + i, state.tokens.next);
+
+ if (typeof i !== "string") {
+ break;
+ }
+
+ if (state.tokens.next.value === "(") {
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "concise methods");
+ }
+ doFunction(i, undefined, g);
+ } else if (!isclassdef) {
+ advance(":");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ expression(10);
+ }
+ }
+ // It is a Syntax Error if PropName of MethodDefinition is "prototype".
+ if (isclassdef && i === "prototype") {
+ error("E049", state.tokens.next, "class method", i);
+ }
+
+ countMember(i);
+ if (isclassdef) {
+ tag = "";
+ continue;
+ }
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true, property: true });
+ if (state.tokens.next.id === ",") {
+ warning("W070", state.tokens.curr);
+ } else if (state.tokens.next.id === "}" && !state.option.inES5(true)) {
+ warning("W070", state.tokens.curr);
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ indentation();
+ }
+ advance("}", this);
+
+ // Check for lonely setters if in the ES5 mode.
+ if (state.option.inES5()) {
+ for (var name in props) {
+ if (_.has(props, name) && props[name].setter && !props[name].getter) {
+ warning("W078", props[name].setterToken);
+ }
+ }
+ }
+ return this;
+ };
+ x.fud = function () {
+ error("E036", state.tokens.curr);
+ };
+ }(delim("{")));
+
+ function destructuringExpression() {
+ var id, ids;
+ var identifiers = [];
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "destructuring expression");
+ }
+ var nextInnerDE = function () {
+ var ident;
+ if (_.contains(["[", "{"], state.tokens.next.value)) {
+ ids = destructuringExpression();
+ for (var id in ids) {
+ id = ids[id];
+ identifiers.push({ id: id.id, token: id.token });
+ }
+ } else if (state.tokens.next.value === ",") {
+ identifiers.push({ id: null, token: state.tokens.curr });
+ } else {
+ ident = identifier();
+ if (ident)
+ identifiers.push({ id: ident, token: state.tokens.curr });
+ }
+ };
+ if (state.tokens.next.value === "[") {
+ advance("[");
+ nextInnerDE();
+ while (state.tokens.next.value !== "]") {
+ advance(",");
+ nextInnerDE();
+ }
+ advance("]");
+ } else if (state.tokens.next.value === "{") {
+ advance("{");
+ id = identifier();
+ if (state.tokens.next.value === ":") {
+ advance(":");
+ nextInnerDE();
+ } else {
+ identifiers.push({ id: id, token: state.tokens.curr });
+ }
+ while (state.tokens.next.value !== "}") {
+ advance(",");
+ id = identifier();
+ if (state.tokens.next.value === ":") {
+ advance(":");
+ nextInnerDE();
+ } else {
+ identifiers.push({ id: id, token: state.tokens.curr });
+ }
+ }
+ advance("}");
+ }
+ return identifiers;
+ }
+ function destructuringExpressionMatch(tokens, value) {
+ if (value.first) {
+ _.zip(tokens, value.first).forEach(function (val) {
+ var token = val[0];
+ var value = val[1];
+ if (token && value) {
+ token.first = value;
+ } else if (token && token.first && !value) {
+ warning("W080", token.first, token.first.value);
+ } /* else {
+ XXX value is discarded: wouldn't it need a warning ?
+ } */
+ });
+ }
+ }
+
+ var conststatement = stmt("const", function (prefix) {
+ var tokens, value;
+ // state variable to know if it is a lone identifier, or a destructuring statement.
+ var lone;
+
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "const");
+ }
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ }
+ for (var t in tokens) {
+ t = tokens[t];
+ if (funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"] && predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ if (t.id) {
+ addlabel(t.id, "const");
+ names.push(t.token);
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id !== "=") {
+ warning("E012", state.tokens.curr, state.tokens.curr.value);
+ }
+
+ if (state.tokens.next.id === "=") {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ advance("=");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+ conststatement.exps = true;
+ var varstatement = stmt("var", function (prefix) {
+ // JavaScript does not have block scope. It only has function scope. So,
+ // declaring a variable in a block can have unexpected consequences.
+ var tokens, lone, value;
+
+ if (funct["(onevar)"] && state.option.onevar) {
+ warning("W081");
+ } else if (!funct["(global)"]) {
+ funct["(onevar)"] = true;
+ }
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ }
+ for (var t in tokens) {
+ t = tokens[t];
+ if (state.option.inESNext() && funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"] && predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ if (t.id) {
+ addlabel(t.id, "unused", t.token);
+ names.push(t.token);
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id === "=") {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ advance("=");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ return this;
+ });
+ varstatement.exps = true;
+ var letstatement = stmt("let", function (prefix) {
+ var tokens, lone, value, letblock;
+
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "let");
+ }
+
+ if (state.tokens.next.value === "(") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.next, "let block");
+ }
+ advance("(");
+ funct["(blockscope)"].stack();
+ letblock = true;
+ } else if (funct["(nolet)"]) {
+ error("E048", state.tokens.curr);
+ }
+
+ if (funct["(onevar)"] && state.option.onevar) {
+ warning("W081");
+ } else if (!funct["(global)"]) {
+ funct["(onevar)"] = true;
+ }
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringExpression();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr.value } ];
+ lone = true;
+ }
+ for (var t in tokens) {
+ t = tokens[t];
+ if (state.option.inESNext() && funct[t.id] === "const") {
+ warning("E011", null, t.id);
+ }
+ if (funct["(global)"] && predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ if (t.id && !funct["(nolet)"]) {
+ addlabel(t.id, "unused", t.token, true);
+ names.push(t.token);
+ }
+ }
+ if (prefix) {
+ break;
+ }
+
+ this.first = this.first.concat(names);
+
+ if (state.tokens.next.id === "=") {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ advance("=");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringExpressionMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ if (letblock) {
+ advance(")");
+ block(true, true);
+ this.block = true;
+ funct["(blockscope)"].unstack();
+ }
+
+ return this;
+ });
+ letstatement.exps = true;
+
+ blockstmt("class", function () {
+ return classdef.call(this, true);
+ });
+
+ function classdef(stmt) {
+ /*jshint validthis:true */
+ if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "class");
+ }
+ if (stmt) {
+ // BindingIdentifier
+ this.name = identifier();
+ addlabel(this.name, "unused", state.tokens.curr);
+ } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
+ // BindingIdentifier(opt)
+ this.name = identifier();
+ }
+ classtail(this);
+ return this;
+ }
+
+ function classtail(c) {
+ var strictness = state.directive["use strict"];
+
+ // ClassHeritage(opt)
+ if (state.tokens.next.value === "extends") {
+ advance("extends");
+ c.heritage = expression(10);
+ }
+
+ // A ClassBody is always strict code.
+ state.directive["use strict"] = true;
+ advance("{");
+ // ClassBody(opt)
+ c.body = state.syntax["{"].nud(true);
+ state.directive["use strict"] = strictness;
+ }
+
+ blockstmt("function", function () {
+ var generator = false;
+ if (state.tokens.next.value === "*") {
+ advance("*");
+ if (state.option.inESNext(true)) {
+ generator = true;
+ } else {
+ warning("W119", state.tokens.curr, "function*");
+ }
+ }
+ if (inblock) {
+ warning("W082", state.tokens.curr);
+
+ }
+ var i = identifier();
+ if (funct[i] === "const") {
+ warning("E011", null, i);
+ }
+ adjacent(state.tokens.curr, state.tokens.next);
+ addlabel(i, "unction", state.tokens.curr);
+
+ doFunction(i, { statement: true }, generator);
+ if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
+ error("E039");
+ }
+ return this;
+ });
+
+ prefix("function", function () {
+ var generator = false;
+ if (state.tokens.next.value === "*") {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "function*");
+ }
+ advance("*");
+ generator = true;
+ }
+ var i = optionalidentifier();
+ if (i || state.option.gcl) {
+ adjacent(state.tokens.curr, state.tokens.next);
+ } else {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ }
+ doFunction(i, undefined, generator);
+ if (!state.option.loopfunc && funct["(loopage)"]) {
+ warning("W083");
+ }
+ return this;
+ });
+
+ blockstmt("if", function () {
+ var t = state.tokens.next;
+ increaseComplexityCount();
+ state.condition = true;
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ state.condition = false;
+ nospace(state.tokens.prev, state.tokens.curr);
+ block(true, true);
+ if (state.tokens.next.id === "else") {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ advance("else");
+ if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
+ statement(true);
+ } else {
+ block(true, true);
+ }
+ }
+ return this;
+ });
+
+ blockstmt("try", function () {
+ var b;
+
+ function doCatch() {
+ var oldScope = scope;
+ var e;
+
+ advance("catch");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ advance("(");
+
+ scope = Object.create(oldScope);
+
+ e = state.tokens.next.value;
+ if (state.tokens.next.type !== "(identifier)") {
+ e = null;
+ warning("E030", state.tokens.next, e);
+ }
+
+ advance();
+
+ funct = {
+ "(name)" : "(catch)",
+ "(line)" : state.tokens.next.line,
+ "(character)": state.tokens.next.character,
+ "(context)" : funct,
+ "(breakage)" : funct["(breakage)"],
+ "(loopage)" : funct["(loopage)"],
+ "(scope)" : scope,
+ "(statement)": false,
+ "(metrics)" : createMetrics(state.tokens.next),
+ "(catch)" : true,
+ "(tokens)" : {},
+ "(blockscope)": funct["(blockscope)"],
+ "(comparray)": funct["(comparray)"]
+ };
+
+ if (e) {
+ addlabel(e, "exception");
+ }
+
+ if (state.tokens.next.value === "if") {
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "catch filter");
+ }
+ advance("if");
+ expression(0);
+ }
+
+ advance(")");
+
+ state.tokens.curr.funct = funct;
+ functions.push(funct);
+
+ block(false);
+
+ scope = oldScope;
+
+ funct["(last)"] = state.tokens.curr.line;
+ funct["(lastcharacter)"] = state.tokens.curr.character;
+ funct = funct["(context)"];
+ }
+
+ block(false);
+
+ while (state.tokens.next.id === "catch") {
+ increaseComplexityCount();
+ if (b && (!state.option.inMoz(true))) {
+ warning("W118", state.tokens.next, "multiple catch blocks");
+ }
+ doCatch();
+ b = true;
+ }
+
+ if (state.tokens.next.id === "finally") {
+ advance("finally");
+ block(false);
+ return;
+ }
+
+ if (!b) {
+ error("E021", state.tokens.next, "catch", state.tokens.next.value);
+ }
+
+ return this;
+ });
+
+ blockstmt("while", function () {
+ var t = state.tokens.next;
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ nospace(state.tokens.prev, state.tokens.curr);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ }).labelled = true;
+
+ blockstmt("with", function () {
+ var t = state.tokens.next;
+ if (state.directive["use strict"]) {
+ error("E010", state.tokens.curr);
+ } else if (!state.option.withstmt) {
+ warning("W085", state.tokens.curr);
+ }
+
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ expression(0);
+ advance(")", t);
+ nospace(state.tokens.prev, state.tokens.curr);
+ block(true, true);
+
+ return this;
+ });
+
+ blockstmt("switch", function () {
+ var t = state.tokens.next,
+ g = false;
+ funct["(breakage)"] += 1;
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ nospace(state.tokens.prev, state.tokens.curr);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ t = state.tokens.next;
+ advance("{");
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ indent += state.option.indent;
+ this.cases = [];
+
+ for (;;) {
+ switch (state.tokens.next.id) {
+ case "case":
+ switch (funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "case":
+ case "continue":
+ case "return":
+ case "switch":
+ case "throw":
+ break;
+ default:
+ // You can tell JSHint that you don't use break intentionally by
+ // adding a comment /* falls through */ on a line just before
+ // the next `case`.
+ if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+ warning("W086", state.tokens.curr, "case");
+ }
+ }
+ indentation(-state.option.indent);
+ advance("case");
+ this.cases.push(expression(20));
+ increaseComplexityCount();
+ g = true;
+ advance(":");
+ funct["(verb)"] = "case";
+ break;
+ case "default":
+ switch (funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ break;
+ default:
+ // Do not display a warning if 'default' is the first statement or if
+ // there is a special /* falls through */ comment.
+ if (this.cases.length) {
+ if (!reg.fallsThrough.test(state.lines[state.tokens.next.line - 2])) {
+ warning("W086", state.tokens.curr, "default");
+ }
+ }
+ }
+ indentation(-state.option.indent);
+ advance("default");
+ g = true;
+ advance(":");
+ break;
+ case "}":
+ indent -= state.option.indent;
+ indentation();
+ advance("}", t);
+ funct["(breakage)"] -= 1;
+ funct["(verb)"] = undefined;
+ return;
+ case "(end)":
+ error("E023", state.tokens.next, "}");
+ return;
+ default:
+ if (g) {
+ switch (state.tokens.curr.id) {
+ case ",":
+ error("E040");
+ return;
+ case ":":
+ g = false;
+ statements();
+ break;
+ default:
+ error("E025", state.tokens.curr);
+ return;
+ }
+ } else {
+ if (state.tokens.curr.id === ":") {
+ advance(":");
+ error("E024", state.tokens.curr, ":");
+ statements();
+ } else {
+ error("E021", state.tokens.next, "case", state.tokens.next.value);
+ return;
+ }
+ }
+ }
+ }
+ }).labelled = true;
+
+ stmt("debugger", function () {
+ if (!state.option.debug) {
+ warning("W087");
+ }
+ return this;
+ }).exps = true;
+
+ (function () {
+ var x = stmt("do", function () {
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+
+ this.first = block(true, true);
+ advance("while");
+ var t = state.tokens.next;
+ nonadjacent(state.tokens.curr, t);
+ advance("(");
+ nospace();
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ nospace(state.tokens.prev, state.tokens.curr);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ return this;
+ });
+ x.labelled = true;
+ x.exps = true;
+ }());
+
+ blockstmt("for", function () {
+ var s, t = state.tokens.next;
+ var letscope = false;
+ var foreachtok = null;
+
+ if (t.value === "each") {
+ foreachtok = t;
+ advance("each");
+ if (!state.option.inMoz(true)) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+
+ funct["(breakage)"] += 1;
+ funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ nonadjacent(this, t);
+ nospace();
+
+ // what kind of for(…) statement it is? for(…of…)? for(…in…)? for(…;…;…)?
+ var nextop; // contains the token of the "in" or "of" operator
+ var i = 0;
+ var inof = ["in", "of"];
+ do {
+ nextop = peek(i);
+ ++i;
+ } while (!_.contains(inof, nextop.value) && nextop.value !== ";" &&
+ nextop.type !== "(end)");
+
+ // if we're in a for (… in|of …) statement
+ if (_.contains(inof, nextop.value)) {
+ if (!state.option.inESNext() && nextop.value === "of") {
+ error("W104", nextop, "for of");
+ }
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.syntax["var"].fud.call(state.syntax["var"].fud, true);
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ // create a new block scope
+ letscope = true;
+ funct["(blockscope)"].stack();
+ state.syntax["let"].fud.call(state.syntax["let"].fud, true);
+ } else {
+ switch (funct[state.tokens.next.value]) {
+ case "unused":
+ funct[state.tokens.next.value] = "var";
+ break;
+ case "var":
+ break;
+ default:
+ if (!funct["(blockscope)"].getlabel(state.tokens.next.value))
+ warning("W088", state.tokens.next, state.tokens.next.value);
+ }
+ advance();
+ }
+ advance(nextop.value);
+ expression(20);
+ advance(")", t);
+ s = block(true, true);
+ if (state.option.forin && s && (s.length > 1 || typeof s[0] !== "object" ||
+ s[0].value !== "if")) {
+ warning("W089", this);
+ }
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+ } else {
+ if (foreachtok) {
+ error("E045", foreachtok);
+ }
+ if (state.tokens.next.id !== ";") {
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.syntax["var"].fud.call(state.syntax["var"].fud);
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ // create a new block scope
+ letscope = true;
+ funct["(blockscope)"].stack();
+ state.syntax["let"].fud.call(state.syntax["let"].fud);
+ } else {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ if (state.tokens.next.id !== ";") {
+ checkCondAssignment(expression(0));
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ if (state.tokens.next.id === ";") {
+ error("E021", state.tokens.next, ")", ";");
+ }
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ advance(")", t);
+ nospace(state.tokens.prev, state.tokens.curr);
+ block(true, true);
+ funct["(breakage)"] -= 1;
+ funct["(loopage)"] -= 1;
+
+ }
+ // unstack loop blockscope
+ if (letscope) {
+ funct["(blockscope)"].unstack();
+ }
+ return this;
+ }).labelled = true;
+
+
+ stmt("break", function () {
+ var v = state.tokens.next.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ if (state.tokens.curr.line === state.tokens.next.line) {
+ if (funct[v] !== "label") {
+ warning("W090", state.tokens.next, v);
+ } else if (scope[v] !== funct) {
+ warning("W091", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ }
+ }
+ reachable("break");
+ return this;
+ }).exps = true;
+
+
+ stmt("continue", function () {
+ var v = state.tokens.next.value;
+
+ if (funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ if (state.tokens.curr.line === state.tokens.next.line) {
+ if (funct[v] !== "label") {
+ warning("W090", state.tokens.next, v);
+ } else if (scope[v] !== funct) {
+ warning("W091", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ }
+ } else if (!funct["(loopage)"]) {
+ warning("W052", state.tokens.next, this.value);
+ }
+ reachable("continue");
+ return this;
+ }).exps = true;
+
+
+ stmt("return", function () {
+ if (this.line === state.tokens.next.line) {
+ if (state.tokens.next.id === "(regexp)")
+ warning("W092");
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ this.first = expression(0);
+
+ if (this.first &&
+ this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+ } else {
+ if (state.tokens.next.type === "(punctuator)" &&
+ ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ }
+ reachable("return");
+ return this;
+ }).exps = true;
+
+ (function (x) {
+ x.exps = true;
+ x.lbp = 25;
+ }(prefix("yield", function () {
+ var prev = state.tokens.prev;
+ if (state.option.inESNext(true) && !funct["(generator)"]) {
+ error("E046", state.tokens.curr, "yield");
+ } else if (!state.option.inESNext()) {
+ warning("W104", state.tokens.curr, "yield");
+ }
+ funct["(generator)"] = "yielded";
+ if (this.line === state.tokens.next.line || !state.option.inMoz(true)) {
+ if (state.tokens.next.id === "(regexp)")
+ warning("W092");
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach && state.tokens.next.nud) {
+ nobreaknonadjacent(state.tokens.curr, state.tokens.next);
+ this.first = expression(10);
+
+ if (this.first.type === "(punctuator)" && this.first.value === "=" && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+
+ if (state.option.inMoz(true) && state.tokens.next.id !== ")" &&
+ (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) {
+ error("E050", this);
+ }
+ } else if (!state.option.asi) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ return this;
+ })));
+
+
+ stmt("throw", function () {
+ nolinebreak(this);
+ nonadjacent(state.tokens.curr, state.tokens.next);
+ this.first = expression(20);
+ reachable("throw");
+ return this;
+ }).exps = true;
+
+ stmt("import", function () {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "import");
+ }
+
+ if (state.tokens.next.identifier) {
+ this.name = identifier();
+ addlabel(this.name, "unused", state.tokens.curr);
+ } else {
+ advance("{");
+ for (;;) {
+ var importName;
+ if (state.tokens.next.type === "default") {
+ importName = "default";
+ advance("default");
+ } else {
+ importName = identifier();
+ }
+ if (state.tokens.next.value === "as") {
+ advance("as");
+ importName = identifier();
+ }
+ addlabel(importName, "unused", state.tokens.curr);
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ }
+
+ advance("from");
+ advance("(string)");
+ return this;
+ }).exps = true;
+
+ stmt("export", function () {
+ if (!state.option.inESNext()) {
+ warning("W119", state.tokens.curr, "export");
+ }
+
+ if (state.tokens.next.type === "default") {
+ advance("default");
+ if (state.tokens.next.id === "function" || state.tokens.next.id === "class") {
+ this.block = true;
+ }
+ this.exportee = expression(10);
+
+ return this;
+ }
+
+ if (state.tokens.next.value === "{") {
+ advance("{");
+ for (;;) {
+ identifier();
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ return this;
+ }
+
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.syntax["var"].fud.call(state.syntax["var"].fud);
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ state.syntax["let"].fud.call(state.syntax["let"].fud);
+ } else if (state.tokens.next.id === "const") {
+ advance("const");
+ state.syntax["const"].fud.call(state.syntax["const"].fud);
+ } else if (state.tokens.next.id === "function") {
+ this.block = true;
+ advance("function");
+ state.syntax["function"].fud();
+ } else if (state.tokens.next.id === "class") {
+ this.block = true;
+ advance("class");
+ state.syntax["class"].fud();
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ }
+
+ return this;
+ }).exps = true;
+
+ // Future Reserved Words
+
+ FutureReservedWord("abstract");
+ FutureReservedWord("boolean");
+ FutureReservedWord("byte");
+ FutureReservedWord("char");
+ FutureReservedWord("class", { es5: true, nud: classdef });
+ FutureReservedWord("double");
+ FutureReservedWord("enum", { es5: true });
+ FutureReservedWord("export", { es5: true });
+ FutureReservedWord("extends", { es5: true });
+ FutureReservedWord("final");
+ FutureReservedWord("float");
+ FutureReservedWord("goto");
+ FutureReservedWord("implements", { es5: true, strictOnly: true });
+ FutureReservedWord("import", { es5: true });
+ FutureReservedWord("int");
+ FutureReservedWord("interface", { es5: true, strictOnly: true });
+ FutureReservedWord("long");
+ FutureReservedWord("native");
+ FutureReservedWord("package", { es5: true, strictOnly: true });
+ FutureReservedWord("private", { es5: true, strictOnly: true });
+ FutureReservedWord("protected", { es5: true, strictOnly: true });
+ FutureReservedWord("public", { es5: true, strictOnly: true });
+ FutureReservedWord("short");
+ FutureReservedWord("static", { es5: true, strictOnly: true });
+ FutureReservedWord("super", { es5: true });
+ FutureReservedWord("synchronized");
+ FutureReservedWord("throws");
+ FutureReservedWord("transient");
+ FutureReservedWord("volatile");
+
+ // this function is used to determine wether a squarebracket or a curlybracket
+ // expression is a comprehension array, destructuring assignment or a json value.
+
+ var lookupBlockType = function () {
+ var pn, pn1;
+ var i = 0;
+ var bracketStack = 0;
+ var ret = {};
+ if (_.contains(["[", "{"], state.tokens.curr.value))
+ bracketStack += 1;
+ if (_.contains(["[", "{"], state.tokens.next.value))
+ bracketStack += 1;
+ if (_.contains(["]", "}"], state.tokens.next.value))
+ bracketStack -= 1;
+ do {
+ pn = peek(i);
+ pn1 = peek(i + 1);
+ i = i + 1;
+ if (_.contains(["[", "{"], pn.value)) {
+ bracketStack += 1;
+ } else if (_.contains(["]", "}"], pn.value)) {
+ bracketStack -= 1;
+ }
+ if (pn.identifier && pn.value === "for" && bracketStack === 1) {
+ ret.isCompArray = true;
+ ret.notJson = true;
+ break;
+ }
+ if (_.contains(["}", "]"], pn.value) && pn1.value === "=") {
+ ret.isDestAssign = true;
+ ret.notJson = true;
+ break;
+ }
+ if (pn.value === ";") {
+ ret.isBlock = true;
+ ret.notJson = true;
+ }
+ } while (bracketStack > 0 && pn.id !== "(end)" && i < 15);
+ return ret;
+ };
+
+ // Check whether this function has been reached for a destructuring assign with undeclared values
+ function destructuringAssignOrJsonValue() {
+ // lookup for the assignment (esnext only)
+ // if it has semicolons, it is a block, so go parse it as a block
+ // or it's not a block, but there are assignments, check for undeclared variables
+
+ var block = lookupBlockType();
+ if (block.notJson) {
+ if (!state.option.inESNext() && block.isDestAssign) {
+ warning("W104", state.tokens.curr, "destructuring assignment");
+ }
+ statements();
+ // otherwise parse json value
+ } else {
+ state.option.laxbreak = true;
+ state.jsonMode = true;
+ jsonValue();
+ }
+ }
+
+ // array comprehension parsing function
+ // parses and defines the three states of the list comprehension in order
+ // to avoid defining global variables, but keeping them to the list comprehension scope
+ // only. The order of the states are as follows:
+ // * "use" which will be the returned iterative part of the list comprehension
+ // * "define" which will define the variables local to the list comprehension
+ // * "filter" which will help filter out values
+
+ var arrayComprehension = function () {
+ var CompArray = function () {
+ this.mode = "use";
+ this.variables = [];
+ };
+ var _carrays = [];
+ var _current;
+ function declare(v) {
+ var l = _current.variables.filter(function (elt) {
+ // if it has, change its undef state
+ if (elt.value === v) {
+ elt.undef = false;
+ return v;
+ }
+ }).length;
+ return l !== 0;
+ }
+ function use(v) {
+ var l = _current.variables.filter(function (elt) {
+ // and if it has been defined
+ if (elt.value === v && !elt.undef) {
+ if (elt.unused === true) {
+ elt.unused = false;
+ }
+ return v;
+ }
+ }).length;
+ // otherwise we warn about it
+ return (l === 0);
+ }
+ return {stack: function () {
+ _current = new CompArray();
+ _carrays.push(_current);
+ },
+ unstack: function () {
+ _current.variables.filter(function (v) {
+ if (v.unused)
+ warning("W098", v.token, v.value);
+ if (v.undef)
+ isundef(v.funct, "W117", v.token, v.value);
+ });
+ _carrays.splice(_carrays[_carrays.length - 1], 1);
+ _current = _carrays[_carrays.length - 1];
+ },
+ setState: function (s) {
+ if (_.contains(["use", "define", "filter"], s))
+ _current.mode = s;
+ },
+ check: function (v) {
+ // When we are in "use" state of the list comp, we enqueue that var
+ if (_current && _current.mode === "use") {
+ _current.variables.push({funct: funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: true,
+ unused: false});
+ return true;
+ // When we are in "define" state of the list comp,
+ } else if (_current && _current.mode === "define") {
+ // check if the variable has been used previously
+ if (!declare(v)) {
+ _current.variables.push({funct: funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: false,
+ unused: true});
+ }
+ return true;
+ // When we are in "filter" state,
+ } else if (_current && _current.mode === "filter") {
+ // we check whether current variable has been declared
+ if (use(v)) {
+ // if not we warn about it
+ isundef(funct, "W117", state.tokens.curr, v);
+ }
+ return true;
+ }
+ return false;
+ }
+ };
+ };
+
+
+ // Parse JSON
+
+ function jsonValue() {
+
+ function jsonObject() {
+ var o = {}, t = state.tokens.next;
+ advance("{");
+ if (state.tokens.next.id !== "}") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E026", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "}") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ } else if (state.tokens.next.id !== "(string)") {
+ warning("W095", state.tokens.next, state.tokens.next.value);
+ }
+ if (o[state.tokens.next.value] === true) {
+ warning("W075", state.tokens.next, state.tokens.next.value);
+ } else if ((state.tokens.next.value === "__proto__" &&
+ !state.option.proto) || (state.tokens.next.value === "__iterator__" &&
+ !state.option.iterator)) {
+ warning("W096", state.tokens.next, state.tokens.next.value);
+ } else {
+ o[state.tokens.next.value] = true;
+ }
+ advance();
+ advance(":");
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("}");
+ }
+
+ function jsonArray() {
+ var t = state.tokens.next;
+ advance("[");
+ if (state.tokens.next.id !== "]") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E027", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "]") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ }
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("]");
+ }
+
+ switch (state.tokens.next.id) {
+ case "{":
+ jsonObject();
+ break;
+ case "[":
+ jsonArray();
+ break;
+ case "true":
+ case "false":
+ case "null":
+ case "(number)":
+ case "(string)":
+ advance();
+ break;
+ case "-":
+ advance("-");
+ if (state.tokens.curr.character !== state.tokens.next.from) {
+ warning("W011", state.tokens.curr);
+ }
+ adjacent(state.tokens.curr, state.tokens.next);
+ advance("(number)");
+ break;
+ default:
+ error("E003", state.tokens.next);
+ }
+ }
+
+ var blockScope = function () {
+ var _current = {};
+ var _variables = [_current];
+
+ function _checkBlockLabels() {
+ for (var t in _current) {
+ if (_current[t]["(type)"] === "unused") {
+ if (state.option.unused) {
+ var tkn = _current[t]["(token)"];
+ var line = tkn.line;
+ var chr = tkn.character;
+ warningAt("W098", line, chr, t);
+ }
+ }
+ }
+ }
+
+ return {
+ stack: function () {
+ _current = {};
+ _variables.push(_current);
+ },
+
+ unstack: function () {
+ _checkBlockLabels();
+ _variables.splice(_variables.length - 1, 1);
+ _current = _.last(_variables);
+ },
+
+ getlabel: function (l) {
+ for (var i = _variables.length - 1 ; i >= 0; --i) {
+ if (_.has(_variables[i], l)) {
+ return _variables[i];
+ }
+ }
+ },
+
+ current: {
+ has: function (t) {
+ return _.has(_current, t);
+ },
+ add: function (t, type, tok) {
+ _current[t] = { "(type)" : type,
+ "(token)": tok };
+ }
+ }
+ };
+ };
+
+ // The actual JSHINT function itself.
+ var itself = function (s, o, g) {
+ var i, k, x;
+ var optionKeys;
+ var newOptionObj = {};
+ var newIgnoredObj = {};
+
+ state.reset();
+
+ if (o && o.scope) {
+ JSHINT.scope = o.scope;
+ } else {
+ JSHINT.errors = [];
+ JSHINT.undefs = [];
+ JSHINT.internals = [];
+ JSHINT.blacklist = {};
+ JSHINT.scope = "(main)";
+ }
+
+ predefined = Object.create(null);
+ combine(predefined, vars.ecmaIdentifiers);
+ combine(predefined, vars.reservedVars);
+
+ combine(predefined, g || {});
+
+ declared = Object.create(null);
+ exported = Object.create(null);
+
+ function each(obj, cb) {
+ if (!obj)
+ return;
+
+ if (!Array.isArray(obj) && typeof obj === "object")
+ obj = Object.keys(obj);
+
+ obj.forEach(cb);
+ }
+
+ if (o) {
+ each(o.predef || null, function (item) {
+ var slice, prop;
+
+ if (item[0] === "-") {
+ slice = item.slice(1);
+ JSHINT.blacklist[slice] = slice;
+ } else {
+ prop = Object.getOwnPropertyDescriptor(o.predef, item);
+ predefined[item] = prop ? prop.value : false;
+ }
+ });
+
+ each(o.exported || null, function (item) {
+ exported[item] = true;
+ });
+
+ delete o.predef;
+ delete o.exported;
+
+ optionKeys = Object.keys(o);
+ for (x = 0; x < optionKeys.length; x++) {
+ if (/^-W\d{3}$/g.test(optionKeys[x])) {
+ newIgnoredObj[optionKeys[x].slice(1)] = true;
+ } else {
+ newOptionObj[optionKeys[x]] = o[optionKeys[x]];
+
+ if (optionKeys[x] === "newcap" && o[optionKeys[x]] === false)
+ newOptionObj["(explicitNewcap)"] = true;
+
+ if (optionKeys[x] === "indent")
+ newOptionObj["(explicitIndent)"] = o[optionKeys[x]] === false ? false : true;
+ }
+ }
+ }
+
+ state.option = newOptionObj;
+ state.ignored = newIgnoredObj;
+
+ state.option.indent = state.option.indent || 4;
+ state.option.maxerr = state.option.maxerr || 50;
+
+ indent = 1;
+ global = Object.create(predefined);
+ scope = global;
+ funct = {
+ "(global)": true,
+ "(name)": "(global)",
+ "(scope)": scope,
+ "(breakage)": 0,
+ "(loopage)": 0,
+ "(tokens)": {},
+ "(metrics)": createMetrics(state.tokens.next),
+ "(blockscope)": blockScope(),
+ "(comparray)": arrayComprehension()
+ };
+ functions = [funct];
+ urls = [];
+ stack = null;
+ member = {};
+ membersOnly = null;
+ implied = {};
+ inblock = false;
+ lookahead = [];
+ warnings = 0;
+ unuseds = [];
+
+ if (!isString(s) && !Array.isArray(s)) {
+ errorAt("E004", 0);
+ return false;
+ }
+
+ api = {
+ get isJSON() {
+ return state.jsonMode;
+ },
+
+ getOption: function (name) {
+ return state.option[name] || null;
+ },
+
+ getCache: function (name) {
+ return state.cache[name];
+ },
+
+ setCache: function (name, value) {
+ state.cache[name] = value;
+ },
+
+ warn: function (code, data) {
+ warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
+ },
+
+ on: function (names, listener) {
+ names.split(" ").forEach(function (name) {
+ emitter.on(name, listener);
+ }.bind(this));
+ }
+ };
+
+ emitter.removeAllListeners();
+ (extraModules || []).forEach(function (func) {
+ func(api);
+ });
+
+ state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
+
+ lex = new Lexer(s);
+
+ lex.on("warning", function (ev) {
+ warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
+ });
+
+ lex.on("error", function (ev) {
+ errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
+ });
+
+ lex.on("fatal", function (ev) {
+ quit("E041", ev.line, ev.from);
+ });
+
+ lex.on("Identifier", function (ev) {
+ emitter.emit("Identifier", ev);
+ });
+
+ lex.on("String", function (ev) {
+ emitter.emit("String", ev);
+ });
+
+ lex.on("Number", function (ev) {
+ emitter.emit("Number", ev);
+ });
+
+ lex.start();
+
+ // Check options
+ for (var name in o) {
+ if (_.has(o, name)) {
+ checkOption(name, state.tokens.curr);
+ }
+ }
+
+ assume();
+
+ // combine the passed globals after we've assumed all our options
+ combine(predefined, g || {});
+
+ //reset values
+ comma.first = true;
+
+ try {
+ advance();
+ switch (state.tokens.next.id) {
+ case "{":
+ case "[":
+ destructuringAssignOrJsonValue();
+ break;
+ default:
+ directives();
+
+ if (state.directive["use strict"]) {
+ if (!state.option.globalstrict && !state.option.node) {
+ warning("W097", state.tokens.prev);
+ }
+ }
+
+ statements();
+ }
+ advance((state.tokens.next && state.tokens.next.value !== ".") ? "(end)" : undefined);
+ funct["(blockscope)"].unstack();
+
+ var markDefined = function (name, context) {
+ do {
+ if (typeof context[name] === "string") {
+ // JSHINT marks unused variables as 'unused' and
+ // unused function declaration as 'unction'. This
+ // code changes such instances back 'var' and
+ // 'closure' so that the code in JSHINT.data()
+ // doesn't think they're unused.
+
+ if (context[name] === "unused")
+ context[name] = "var";
+ else if (context[name] === "unction")
+ context[name] = "closure";
+
+ return true;
+ }
+
+ context = context["(context)"];
+ } while (context);
+
+ return false;
+ };
+
+ var clearImplied = function (name, line) {
+ if (!implied[name])
+ return;
+
+ var newImplied = [];
+ for (var i = 0; i < implied[name].length; i += 1) {
+ if (implied[name][i] !== line)
+ newImplied.push(implied[name][i]);
+ }
+
+ if (newImplied.length === 0)
+ delete implied[name];
+ else
+ implied[name] = newImplied;
+ };
+
+ var warnUnused = function (name, tkn, type, unused_opt) {
+ var line = tkn.line;
+ var chr = tkn.character;
+
+ if (unused_opt === undefined) {
+ unused_opt = state.option.unused;
+ }
+
+ if (unused_opt === true) {
+ unused_opt = "last-param";
+ }
+
+ var warnable_types = {
+ "vars": ["var"],
+ "last-param": ["var", "param"],
+ "strict": ["var", "param", "last-param"]
+ };
+
+ if (unused_opt) {
+ if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
+ warningAt("W098", line, chr, name);
+ }
+ }
+
+ unuseds.push({
+ name: name,
+ line: line,
+ character: chr
+ });
+ };
+
+ var checkUnused = function (func, key) {
+ var type = func[key];
+ var tkn = func["(tokens)"][key];
+
+ if (key.charAt(0) === "(")
+ return;
+
+ if (type !== "unused" && type !== "unction")
+ return;
+
+ // Params are checked separately from other variables.
+ if (func["(params)"] && func["(params)"].indexOf(key) !== -1)
+ return;
+
+ // Variable is in global scope and defined as exported.
+ if (func["(global)"] && _.has(exported, key)) {
+ return;
+ }
+
+ warnUnused(key, tkn, "var");
+ };
+
+ // Check queued 'x is not defined' instances to see if they're still undefined.
+ for (i = 0; i < JSHINT.undefs.length; i += 1) {
+ k = JSHINT.undefs[i].slice(0);
+
+ if (markDefined(k[2].value, k[0])) {
+ clearImplied(k[2].value, k[2].line);
+ } else if (state.option.undef) {
+ warning.apply(warning, k.slice(1));
+ }
+ }
+
+ functions.forEach(function (func) {
+ if (func["(unusedOption)"] === false) {
+ return;
+ }
+
+ for (var key in func) {
+ if (_.has(func, key)) {
+ checkUnused(func, key);
+ }
+ }
+
+ if (!func["(params)"])
+ return;
+
+ var params = func["(params)"].slice();
+ var param = params.pop();
+ var type, unused_opt;
+
+ while (param) {
+ type = func[param];
+ unused_opt = func["(unusedOption)"] || state.option.unused;
+ unused_opt = unused_opt === true ? "last-param" : unused_opt;
+
+ // 'undefined' is a special case for (function (window, undefined) { ... })();
+ // patterns.
+
+ if (param === "undefined")
+ return;
+
+ if (type === "unused" || type === "unction") {
+ warnUnused(param, func["(tokens)"][param], "param", func["(unusedOption)"]);
+ } else if (unused_opt === "last-param") {
+ return;
+ }
+
+ param = params.pop();
+ }
+ });
+
+ for (var key in declared) {
+ if (_.has(declared, key) && !_.has(global, key)) {
+ warnUnused(key, declared[key], "var");
+ }
+ }
+
+ } catch (err) {
+ if (err && err.name === "JSHintError") {
+ var nt = state.tokens.next || {};
+ JSHINT.errors.push({
+ scope : "(main)",
+ raw : err.raw,
+ code : err.code,
+ reason : err.message,
+ line : err.line || nt.line,
+ character : err.character || nt.from
+ }, null);
+ } else {
+ throw err;
+ }
+ }
+
+ // Loop over the listed "internals", and check them as well.
+
+ if (JSHINT.scope === "(main)") {
+ o = o || {};
+
+ for (i = 0; i < JSHINT.internals.length; i += 1) {
+ k = JSHINT.internals[i];
+ o.scope = k.elem;
+ itself(k.value, o, g);
+ }
+ }
+
+ return JSHINT.errors.length === 0;
+ };
+
+ // Modules.
+ itself.addModule = function (func) {
+ extraModules.push(func);
+ };
+
+ itself.addModule(style.register);
+
+ // Data summary.
+ itself.data = function () {
+ var data = {
+ functions: [],
+ options: state.option
+ };
+ var implieds = [];
+ var members = [];
+ var fu, f, i, j, n, globals;
+
+ if (itself.errors.length) {
+ data.errors = itself.errors;
+ }
+
+ if (state.jsonMode) {
+ data.json = true;
+ }
+
+ for (n in implied) {
+ if (_.has(implied, n)) {
+ implieds.push({
+ name: n,
+ line: implied[n]
+ });
+ }
+ }
+
+ if (implieds.length > 0) {
+ data.implieds = implieds;
+ }
+
+ if (urls.length > 0) {
+ data.urls = urls;
+ }
+
+ globals = Object.keys(scope);
+ if (globals.length > 0) {
+ data.globals = globals;
+ }
+
+ for (i = 1; i < functions.length; i += 1) {
+ f = functions[i];
+ fu = {};
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ fu[functionicity[j]] = [];
+ }
+
+ for (j = 0; j < functionicity.length; j += 1) {
+ if (fu[functionicity[j]].length === 0) {
+ delete fu[functionicity[j]];
+ }
+ }
+
+ fu.name = f["(name)"];
+ fu.param = f["(params)"];
+ fu.line = f["(line)"];
+ fu.character = f["(character)"];
+ fu.last = f["(last)"];
+ fu.lastcharacter = f["(lastcharacter)"];
+ data.functions.push(fu);
+ }
+
+ if (unuseds.length > 0) {
+ data.unused = unuseds;
+ }
+
+ members = [];
+ for (n in member) {
+ if (typeof member[n] === "number") {
+ data.member = member;
+ break;
+ }
+ }
+
+ return data;
+ };
+
+ itself.jshint = itself;
+
+ return itself;
+}());
+
+// Make JSHINT a Node module, if possible.
+if (typeof exports === "object" && exports) {
+ exports.JSHINT = JSHINT;
+}
+
+},
+{"../shared/messages.js":2,"../shared/vars.js":3,"./lex.js":5,"./reg.js":6,"./state.js":7,"./style.js":8,"console-browserify":9,"events":10,"underscore":1}],
+5:[function(req,module,exports){
+/*
+ * Lexical analysis and token construction.
+ */
+
+"use strict";
+
+var _ = req("underscore");
+var events = req("events");
+var reg = req("./reg.js");
+var state = req("./state.js").state;
+
+// Some of these token types are from JavaScript Parser API
+// while others are specific to JSHint parser.
+// JS Parser API: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+
+var Token = {
+ Identifier: 1,
+ Punctuator: 2,
+ NumericLiteral: 3,
+ StringLiteral: 4,
+ Comment: 5,
+ Keyword: 6,
+ NullLiteral: 7,
+ BooleanLiteral: 8,
+ RegExp: 9
+};
+
+// This is auto generated from the unicode tables.
+// The tables are at:
+// http://www.fileformat.info/info/unicode/category/Lu/list.htm
+// http://www.fileformat.info/info/unicode/category/Ll/list.htm
+// http://www.fileformat.info/info/unicode/category/Lt/list.htm
+// http://www.fileformat.info/info/unicode/category/Lm/list.htm
+// http://www.fileformat.info/info/unicode/category/Lo/list.htm
+// http://www.fileformat.info/info/unicode/category/Nl/list.htm
+
+var unicodeLetterTable = [
+ 170, 170, 181, 181, 186, 186, 192, 214,
+ 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750,
+ 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908,
+ 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366,
+ 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610,
+ 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775,
+ 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957,
+ 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069,
+ 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2308, 2361,
+ 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431,
+ 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482,
+ 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529,
+ 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608,
+ 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654,
+ 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736,
+ 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785,
+ 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867,
+ 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929,
+ 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970,
+ 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001,
+ 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123,
+ 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212,
+ 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261,
+ 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344,
+ 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455,
+ 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526,
+ 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716,
+ 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743,
+ 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760,
+ 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805,
+ 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138,
+ 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198,
+ 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4304, 4346,
+ 4348, 4348, 4352, 4680, 4682, 4685, 4688, 4694, 4696, 4696,
+ 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789,
+ 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880,
+ 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740,
+ 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900,
+ 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000,
+ 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312,
+ 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516,
+ 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823,
+ 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7104, 7141,
+ 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409,
+ 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013,
+ 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061,
+ 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140,
+ 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188,
+ 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455,
+ 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486,
+ 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521,
+ 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358,
+ 11360, 11492, 11499, 11502, 11520, 11557, 11568, 11621,
+ 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694,
+ 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726,
+ 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295,
+ 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438,
+ 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589,
+ 12593, 12686, 12704, 12730, 12784, 12799, 13312, 13312,
+ 19893, 19893, 19968, 19968, 40907, 40907, 40960, 42124,
+ 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539,
+ 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783,
+ 42786, 42888, 42891, 42894, 42896, 42897, 42912, 42921,
+ 43002, 43009, 43011, 43013, 43015, 43018, 43020, 43042,
+ 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259,
+ 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442,
+ 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595,
+ 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697,
+ 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714,
+ 43739, 43741, 43777, 43782, 43785, 43790, 43793, 43798,
+ 43808, 43814, 43816, 43822, 43968, 44002, 44032, 44032,
+ 55203, 55203, 55216, 55238, 55243, 55291, 63744, 64045,
+ 64048, 64109, 64112, 64217, 64256, 64262, 64275, 64279,
+ 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316,
+ 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433,
+ 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019,
+ 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370,
+ 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495,
+ 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594,
+ 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786,
+ 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66334,
+ 66352, 66378, 66432, 66461, 66464, 66499, 66504, 66511,
+ 66513, 66517, 66560, 66717, 67584, 67589, 67592, 67592,
+ 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669,
+ 67840, 67861, 67872, 67897, 68096, 68096, 68112, 68115,
+ 68117, 68119, 68121, 68147, 68192, 68220, 68352, 68405,
+ 68416, 68437, 68448, 68466, 68608, 68680, 69635, 69687,
+ 69763, 69807, 73728, 74606, 74752, 74850, 77824, 78894,
+ 92160, 92728, 110592, 110593, 119808, 119892, 119894, 119964,
+ 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980,
+ 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069,
+ 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121,
+ 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144,
+ 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570,
+ 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686,
+ 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779,
+ 131072, 131072, 173782, 173782, 173824, 173824, 177972, 177972,
+ 177984, 177984, 178205, 178205, 194560, 195101
+];
+
+var identifierStartTable = [];
+
+for (var i = 0; i < 128; i++) {
+ identifierStartTable[i] =
+ i === 36 || // $
+ i >= 65 && i <= 90 || // A-Z
+ i === 95 || // _
+ i >= 97 && i <= 122; // a-z
+}
+
+var identifierPartTable = [];
+
+for (var i = 0; i < 128; i++) {
+ identifierPartTable[i] =
+ identifierStartTable[i] || // $, _, A-Z, a-z
+ i >= 48 && i <= 57; // 0-9
+}
+
+// Object that handles postponed lexing verifications that checks the parsed
+// environment state.
+
+function asyncTrigger() {
+ var _checks = [];
+
+ return {
+ push: function (fn) {
+ _checks.push(fn);
+ },
+
+ check: function () {
+ for (var check = 0; check < _checks.length; ++check) {
+ _checks[check]();
+ }
+
+ _checks.splice(0, _checks.length);
+ }
+ };
+}
+
+/*
+ * Lexer for JSHint.
+ *
+ * This object does a char-by-char scan of the provided source code
+ * and produces a sequence of tokens.
+ *
+ * var lex = new Lexer("var i = 0;");
+ * lex.start();
+ * lex.token(); // returns the next token
+ *
+ * You have to use the token() method to move the lexer forward
+ * but you don't have to use its return value to get tokens. In addition
+ * to token() method returning the next token, the Lexer object also
+ * emits events.
+ *
+ * lex.on("Identifier", function (data) {
+ * if (data.name.indexOf("_") >= 0) {
+ * // Produce a warning.
+ * }
+ * });
+ *
+ * Note that the token() method returns tokens in a JSLint-compatible
+ * format while the event emitter uses a slightly modified version of
+ * Mozilla's JavaScript Parser API. Eventually, we will move away from
+ * JSLint format.
+ */
+function Lexer(source) {
+ var lines = source;
+
+ if (typeof lines === "string") {
+ lines = lines
+ .replace(/\r\n/g, "\n")
+ .replace(/\r/g, "\n")
+ .split("\n");
+ }
+
+ // If the first line is a shebang (#!), make it a blank and move on.
+ // Shebangs are used by Node scripts.
+
+ if (lines[0] && lines[0].substr(0, 2) === "#!") {
+ lines[0] = "";
+ }
+
+ this.emitter = new events.EventEmitter();
+ this.source = source;
+ this.setLines(lines);
+ this.prereg = true;
+
+ this.line = 0;
+ this.char = 1;
+ this.from = 1;
+ this.input = "";
+
+ for (var i = 0; i < state.option.indent; i += 1) {
+ state.tab += " ";
+ }
+}
+
+Lexer.prototype = {
+ _lines: [],
+
+ getLines: function () {
+ this._lines = state.lines;
+ return this._lines;
+ },
+
+ setLines: function (val) {
+ this._lines = val;
+ state.lines = this._lines;
+ },
+
+ /*
+ * Return the next i character without actually moving the
+ * char pointer.
+ */
+ peek: function (i) {
+ return this.input.charAt(i || 0);
+ },
+
+ /*
+ * Move the char pointer forward i times.
+ */
+ skip: function (i) {
+ i = i || 1;
+ this.char += i;
+ this.input = this.input.slice(i);
+ },
+
+ /*
+ * Subscribe to a token event. The API for this method is similar
+ * Underscore.js i.e. you can subscribe to multiple events with
+ * one call:
+ *
+ * lex.on("Identifier Number", function (data) {
+ * // ...
+ * });
+ */
+ on: function (names, listener) {
+ names.split(" ").forEach(function (name) {
+ this.emitter.on(name, listener);
+ }.bind(this));
+ },
+
+ /*
+ * Trigger a token event. All arguments will be passed to each
+ * listener.
+ */
+ trigger: function () {
+ this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
+ },
+
+ /*
+ * Postpone a token event. the checking condition is set as
+ * last parameter, and the trigger function is called in a
+ * stored callback. To be later called using the check() function
+ * by the parser. This avoids parser's peek() to give the lexer
+ * a false context.
+ */
+ triggerAsync: function (type, args, checks, fn) {
+ checks.push(function () {
+ if (fn()) {
+ this.trigger(type, args);
+ }
+ }.bind(this));
+ },
+
+ /*
+ * Extract a punctuator out of the next sequence of characters
+ * or return 'null' if its not possible.
+ *
+ * This method's implementation was heavily influenced by the
+ * scanPunctuator function in the Esprima parser's source code.
+ */
+ scanPunctuator: function () {
+ var ch1 = this.peek();
+ var ch2, ch3, ch4;
+
+ switch (ch1) {
+ // Most common single-character punctuators
+ case ".":
+ if ((/^[0-9]$/).test(this.peek(1))) {
+ return null;
+ }
+ if (this.peek(1) === "." && this.peek(2) === ".") {
+ return {
+ type: Token.Punctuator,
+ value: "..."
+ };
+ }
+ /* falls through */
+ case "(":
+ case ")":
+ case ";":
+ case ",":
+ case "{":
+ case "}":
+ case "[":
+ case "]":
+ case ":":
+ case "~":
+ case "?":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+
+ // A pound sign (for Node shebangs)
+ case "#":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+
+ // We're at the end of input
+ case "":
+ return null;
+ }
+
+ // Peek more characters
+
+ ch2 = this.peek(1);
+ ch3 = this.peek(2);
+ ch4 = this.peek(3);
+
+ // 4-character punctuator: >>>=
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>="
+ };
+ }
+
+ // 3-character punctuators: === !== >>> <<= >>=
+
+ if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "==="
+ };
+ }
+
+ if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "!=="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>"
+ };
+ }
+
+ if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "<<="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>="
+ };
+ }
+
+ // Fat arrow punctuator
+ if (ch1 === "=" && ch2 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ // 2-character punctuators: <= >= == != ++ -- << >> && ||
+ // += -= *= %= &= |= ^= (but not /=, see below)
+ if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
+ if (ch2 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ }
+
+ // Special case: /=. We need to make sure that this is an
+ // operator and not a regular expression.
+
+ if (ch1 === "/") {
+ if (ch2 === "=" && /\/=(?!(\S*\/[gim]?))/.test(this.input)) {
+ // /= is not a part of a regular expression, return it as a
+ // punctuator.
+ return {
+ type: Token.Punctuator,
+ value: "/="
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: "/"
+ };
+ }
+
+ return null;
+ },
+
+ /*
+ * Extract a comment out of the next sequence of characters and/or
+ * lines or return 'null' if its not possible. Since comments can
+ * span across multiple lines this method has to move the char
+ * pointer.
+ *
+ * In addition to normal JavaScript comments (// and /*) this method
+ * also recognizes JSHint- and JSLint-specific comments such as
+ * /*jshint, /*jslint, /*globals and so on.
+ */
+ scanComments: function () {
+ var ch1 = this.peek();
+ var ch2 = this.peek(1);
+ var rest = this.input.substr(2);
+ var startLine = this.line;
+ var startChar = this.char;
+
+ // Create a comment token object and make sure it
+ // has all the data JSHint needs to work with special
+ // comments.
+
+ function commentToken(label, body, opt) {
+ var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
+ var isSpecial = false;
+ var value = label + body;
+ var commentType = "plain";
+ opt = opt || {};
+
+ if (opt.isMultiline) {
+ value += "*/";
+ }
+
+ special.forEach(function (str) {
+ if (isSpecial) {
+ return;
+ }
+
+ // Don't recognize any special comments other than jshint for single-line
+ // comments. This introduced many problems with legit comments.
+ if (label === "//" && str !== "jshint") {
+ return;
+ }
+
+ if (body.substr(0, str.length) === str) {
+ isSpecial = true;
+ label = label + str;
+ body = body.substr(str.length);
+ }
+
+ if (!isSpecial && body.charAt(0) === " " && body.substr(1, str.length) === str) {
+ isSpecial = true;
+ label = label + " " + str;
+ body = body.substr(str.length + 1);
+ }
+
+ if (!isSpecial) {
+ return;
+ }
+
+ switch (str) {
+ case "member":
+ commentType = "members";
+ break;
+ case "global":
+ commentType = "globals";
+ break;
+ default:
+ commentType = str;
+ }
+ });
+
+ return {
+ type: Token.Comment,
+ commentType: commentType,
+ value: value,
+ body: body,
+ isSpecial: isSpecial,
+ isMultiline: opt.isMultiline || false,
+ isMalformed: opt.isMalformed || false
+ };
+ }
+
+ // End of unbegun comment. Raise an error and skip that input.
+ if (ch1 === "*" && ch2 === "/") {
+ this.trigger("error", {
+ code: "E018",
+ line: startLine,
+ character: startChar
+ });
+
+ this.skip(2);
+ return null;
+ }
+
+ // Comments must start either with // or /*
+ if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
+ return null;
+ }
+
+ // One-line comment
+ if (ch2 === "/") {
+ this.skip(this.input.length); // Skip to the EOL.
+ return commentToken("//", rest);
+ }
+
+ var body = "";
+
+ /* Multi-line comment */
+ if (ch2 === "*") {
+ this.skip(2);
+
+ while (this.peek() !== "*" || this.peek(1) !== "/") {
+ if (this.peek() === "") { // End of Line
+ body += "\n";
+
+ // If we hit EOF and our comment is still unclosed,
+ // trigger an error and end the comment implicitly.
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E017",
+ line: startLine,
+ character: startChar
+ });
+
+ return commentToken("/*", body, {
+ isMultiline: true,
+ isMalformed: true
+ });
+ }
+ } else {
+ body += this.peek();
+ this.skip();
+ }
+ }
+
+ this.skip(2);
+ return commentToken("/*", body, { isMultiline: true });
+ }
+ },
+
+ /*
+ * Extract a keyword out of the next sequence of characters or
+ * return 'null' if its not possible.
+ */
+ scanKeyword: function () {
+ var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
+ var keywords = [
+ "if", "in", "do", "var", "for", "new",
+ "try", "let", "this", "else", "case",
+ "void", "with", "enum", "while", "break",
+ "catch", "throw", "const", "yield", "class",
+ "super", "return", "typeof", "delete",
+ "switch", "export", "import", "default",
+ "finally", "extends", "function", "continue",
+ "debugger", "instanceof"
+ ];
+
+ if (result && keywords.indexOf(result[0]) >= 0) {
+ return {
+ type: Token.Keyword,
+ value: result[0]
+ };
+ }
+
+ return null;
+ },
+
+ /*
+ * Extract a JavaScript identifier out of the next sequence of
+ * characters or return 'null' if its not possible. In addition,
+ * to Identifier this method can also produce BooleanLiteral
+ * (true/false) and NullLiteral (null).
+ */
+ scanIdentifier: function () {
+ var id = "";
+ var index = 0;
+ var type, char;
+
+ // Detects any character in the Unicode categories "Uppercase
+ // letter (Lu)", "Lowercase letter (Ll)", "Titlecase letter
+ // (Lt)", "Modifier letter (Lm)", "Other letter (Lo)", or
+ // "Letter number (Nl)".
+ //
+ // Both approach and unicodeLetterTable were borrowed from
+ // Google's Traceur.
+
+ function isUnicodeLetter(code) {
+ for (var i = 0; i < unicodeLetterTable.length;) {
+ if (code < unicodeLetterTable[i++]) {
+ return false;
+ }
+
+ if (code <= unicodeLetterTable[i++]) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ var readUnicodeEscapeSequence = function () {
+ /*jshint validthis:true */
+ index += 1;
+
+ if (this.peek(index) !== "u") {
+ return null;
+ }
+
+ var ch1 = this.peek(index + 1);
+ var ch2 = this.peek(index + 2);
+ var ch3 = this.peek(index + 3);
+ var ch4 = this.peek(index + 4);
+ var code;
+
+ if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
+ code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
+
+ if (isUnicodeLetter(code)) {
+ index += 5;
+ return "\\u" + ch1 + ch2 + ch3 + ch4;
+ }
+
+ return null;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierStart = function () {
+ /*jshint validthis:true */
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (identifierStartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isUnicodeLetter(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierPart = function () {
+ /*jshint validthis:true */
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (identifierPartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isUnicodeLetter(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ char = getIdentifierStart();
+ if (char === null) {
+ return null;
+ }
+
+ id = char;
+ for (;;) {
+ char = getIdentifierPart();
+
+ if (char === null) {
+ break;
+ }
+
+ id += char;
+ }
+
+ switch (id) {
+ case "true":
+ case "false":
+ type = Token.BooleanLiteral;
+ break;
+ case "null":
+ type = Token.NullLiteral;
+ break;
+ default:
+ type = Token.Identifier;
+ }
+
+ return {
+ type: type,
+ value: id
+ };
+ },
+
+ /*
+ * Extract a numeric literal out of the next sequence of
+ * characters or return 'null' if its not possible. This method
+ * supports all numeric literals described in section 7.8.3
+ * of the EcmaScript 5 specification.
+ *
+ * This method's implementation was heavily influenced by the
+ * scanNumericLiteral function in the Esprima parser's source code.
+ */
+ scanNumericLiteral: function () {
+ var index = 0;
+ var value = "";
+ var length = this.input.length;
+ var char = this.peek(index);
+ var bad;
+
+ function isDecimalDigit(str) {
+ return (/^[0-9]$/).test(str);
+ }
+
+ function isOctalDigit(str) {
+ return (/^[0-7]$/).test(str);
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ function isIdentifierStart(ch) {
+ return (ch === "$") || (ch === "_") || (ch === "\\") ||
+ (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
+ }
+
+ // Numbers must start either with a decimal digit or a point.
+
+ if (char !== "." && !isDecimalDigit(char)) {
+ return null;
+ }
+
+ if (char !== ".") {
+ value = this.peek(index);
+ index += 1;
+ char = this.peek(index);
+
+ if (value === "0") {
+ // Base-16 numbers.
+ if (char === "x" || char === "X") {
+ index += 1;
+ value += char;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isHexDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+
+ if (value.length <= 2) { // 0x
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ isMalformed: true
+ };
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: 16,
+ isMalformed: false
+ };
+ }
+
+ // Base-8 numbers.
+ if (isOctalDigit(char)) {
+ index += 1;
+ value += char;
+ bad = false;
+
+ while (index < length) {
+ char = this.peek(index);
+
+ // Numbers like '019' (note the 9) are not valid octals
+ // but we still parse them and mark as malformed.
+
+ if (isDecimalDigit(char)) {
+ bad = true;
+ } else if (!isOctalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: 8,
+ isMalformed: false
+ };
+ }
+
+ // Decimal numbers that start with '0' such as '09' are illegal
+ // but we still parse them and return as malformed.
+
+ if (isDecimalDigit(char)) {
+ index += 1;
+ value += char;
+ }
+ }
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ }
+
+ // Decimal digits.
+
+ if (char === ".") {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ }
+
+ // Exponent part.
+
+ if (char === "e" || char === "E") {
+ value += char;
+ index += 1;
+ char = this.peek(index);
+
+ if (char === "+" || char === "-") {
+ value += this.peek(index);
+ index += 1;
+ }
+
+ char = this.peek(index);
+ if (isDecimalDigit(char)) {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: 10,
+ isMalformed: !isFinite(value)
+ };
+ },
+
+ /*
+ * Extract a string out of the next sequence of characters and/or
+ * lines or return 'null' if its not possible. Since strings can
+ * span across multiple lines this method has to move the char
+ * pointer.
+ *
+ * This method recognizes pseudo-multiline JavaScript strings:
+ *
+ * var str = "hello\
+ * world";
+ */
+ scanStringLiteral: function (checks) {
+ /*jshint loopfunc:true */
+ var quote = this.peek();
+
+ // String must start with a quote.
+ if (quote !== "\"" && quote !== "'") {
+ return null;
+ }
+
+ // In JSON strings must always use double quotes.
+ this.triggerAsync("warning", {
+ code: "W108",
+ line: this.line,
+ character: this.char // +1?
+ }, checks, function () { return state.jsonMode && quote !== "\""; });
+
+ var value = "";
+ var startLine = this.line;
+ var startChar = this.char;
+ var allowNewLine = false;
+
+ this.skip();
+
+ while (this.peek() !== quote) {
+ while (this.peek() === "") { // End Of Line
+
+ // If an EOL is not preceded by a backslash, show a warning
+ // and proceed like it was a legit multi-line string where
+ // author simply forgot to escape the newline symbol.
+ //
+ // Another approach is to implicitly close a string on EOL
+ // but it generates too many false positives.
+
+ if (!allowNewLine) {
+ this.trigger("warning", {
+ code: "W112",
+ line: this.line,
+ character: this.char
+ });
+ } else {
+ allowNewLine = false;
+
+ // Otherwise show a warning if multistr option was not set.
+ // For JSON, show warning no matter what.
+
+ this.triggerAsync("warning", {
+ code: "W043",
+ line: this.line,
+ character: this.char
+ }, checks, function () { return !state.option.multistr; });
+
+ this.triggerAsync("warning", {
+ code: "W042",
+ line: this.line,
+ character: this.char
+ }, checks, function () { return state.jsonMode && state.option.multistr; });
+ }
+
+ // If we get an EOF inside of an unclosed string, show an
+ // error and implicitly close it at the EOF point.
+
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E029",
+ line: startLine,
+ character: startChar
+ });
+
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ isUnclosed: true,
+ quote: quote
+ };
+ }
+ }
+
+ allowNewLine = false;
+ var char = this.peek();
+ var jump = 1; // A length of a jump, after we're done
+ // parsing this character.
+
+ if (char < " ") {
+ // Warn about a control character in a string.
+ this.trigger("warning", {
+ code: "W113",
+ line: this.line,
+ character: this.char,
+ data: [ "<non-printable>" ]
+ });
+ }
+
+ // Special treatment for some escaped characters.
+
+ if (char === "\\") {
+ this.skip();
+ char = this.peek();
+
+ switch (char) {
+ case "'":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\'" ]
+ }, checks, function () {return state.jsonMode; });
+ break;
+ case "b":
+ char = "\b";
+ break;
+ case "f":
+ char = "\f";
+ break;
+ case "n":
+ char = "\n";
+ break;
+ case "r":
+ char = "\r";
+ break;
+ case "t":
+ char = "\t";
+ break;
+ case "0":
+ char = "\0";
+
+ // Octal literals fail in strict mode.
+ // Check if the number is between 00 and 07.
+ var n = parseInt(this.peek(1), 10);
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks,
+ function () { return n >= 0 && n <= 7 && state.directive["use strict"]; });
+ break;
+ case "u":
+ char = String.fromCharCode(parseInt(this.input.substr(1, 4), 16));
+ jump = 5;
+ break;
+ case "v":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\v" ]
+ }, checks, function () { return state.jsonMode; });
+
+ char = "\v";
+ break;
+ case "x":
+ var x = parseInt(this.input.substr(1, 2), 16);
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\x-" ]
+ }, checks, function () { return state.jsonMode; });
+
+ char = String.fromCharCode(x);
+ jump = 3;
+ break;
+ case "\\":
+ case "\"":
+ case "/":
+ break;
+ case "":
+ allowNewLine = true;
+ char = "";
+ break;
+ case "!":
+ if (value.slice(value.length - 2) === "<") {
+ break;
+ }
+
+ /*falls through */
+ default:
+ // Weird escaping.
+ this.trigger("warning", {
+ code: "W044",
+ line: this.line,
+ character: this.char
+ });
+ }
+ }
+
+ value += char;
+ this.skip(jump);
+ }
+
+ this.skip();
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ isUnclosed: false,
+ quote: quote
+ };
+ },
+
+ /*
+ * Extract a regular expression out of the next sequence of
+ * characters and/or lines or return 'null' if its not possible.
+ *
+ * This method is platform dependent: it accepts almost any
+ * regular expression values but then tries to compile and run
+ * them using system's RegExp object. This means that there are
+ * rare edge cases where one JavaScript engine complains about
+ * your regular expression while others don't.
+ */
+ scanRegExp: function () {
+ var index = 0;
+ var length = this.input.length;
+ var char = this.peek();
+ var value = char;
+ var body = "";
+ var flags = [];
+ var malformed = false;
+ var isCharSet = false;
+ var terminated;
+
+ var scanUnexpectedChars = function () {
+ // Unexpected control character
+ if (char < " ") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W048",
+ line: this.line,
+ character: this.char
+ });
+ }
+
+ // Unexpected escaped character
+ if (char === "<") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W049",
+ line: this.line,
+ character: this.char,
+ data: [ char ]
+ });
+ }
+ }.bind(this);
+
+ // Regular expressions must start with '/'
+ if (!this.prereg || char !== "/") {
+ return null;
+ }
+
+ index += 1;
+ terminated = false;
+
+ // Try to get everything in between slashes. A couple of
+ // cases aside (see scanUnexpectedChars) we don't really
+ // care whether the resulting expression is valid or not.
+ // We will check that later using the RegExp object.
+
+ while (index < length) {
+ char = this.peek(index);
+ value += char;
+ body += char;
+
+ if (isCharSet) {
+ if (char === "]") {
+ if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
+ isCharSet = false;
+ }
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+ }
+
+ index += 1;
+ continue;
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+
+ if (char === "/") {
+ index += 1;
+ continue;
+ }
+
+ if (char === "[") {
+ index += 1;
+ continue;
+ }
+ }
+
+ if (char === "[") {
+ isCharSet = true;
+ index += 1;
+ continue;
+ }
+
+ if (char === "/") {
+ body = body.substr(0, body.length - 1);
+ terminated = true;
+ index += 1;
+ break;
+ }
+
+ index += 1;
+ }
+
+ // A regular expression that was never closed is an
+ // error from which we cannot recover.
+
+ if (!terminated) {
+ this.trigger("error", {
+ code: "E015",
+ line: this.line,
+ character: this.from
+ });
+
+ return void this.trigger("fatal", {
+ line: this.line,
+ from: this.from
+ });
+ }
+
+ // Parse flags (if any).
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!/[gim]/.test(char)) {
+ break;
+ }
+ flags.push(char);
+ value += char;
+ index += 1;
+ }
+
+ // Check regular expression for correctness.
+
+ try {
+ new RegExp(body, flags.join(""));
+ } catch (err) {
+ malformed = true;
+ this.trigger("error", {
+ code: "E016",
+ line: this.line,
+ character: this.char,
+ data: [ err.message ] // Platform dependent!
+ });
+ }
+
+ return {
+ type: Token.RegExp,
+ value: value,
+ flags: flags,
+ isMalformed: malformed
+ };
+ },
+
+ /*
+ * Scan for any occurence of mixed tabs and spaces. If smarttabs option
+ * is on, ignore tabs followed by spaces.
+ *
+ * Tabs followed by one space followed by a block comment are allowed.
+ */
+ scanMixedSpacesAndTabs: function () {
+ var at, match;
+
+ if (state.option.smarttabs) {
+ // Negative look-behind for "//"
+ match = this.input.match(/(\/\/|^\s?\*)? \t/);
+ at = match && !match[1] ? 0 : -1;
+ } else {
+ at = this.input.search(/ \t|\t [^\*]/);
+ }
+
+ return at;
+ },
+
+ /*
+ * Scan for characters that get silently deleted by one or more browsers.
+ */
+ scanUnsafeChars: function () {
+ return this.input.search(reg.unsafeChars);
+ },
+
+ /*
+ * Produce the next raw token or return 'null' if no tokens can be matched.
+ * This method skips over all space characters.
+ */
+ next: function (checks) {
+ this.from = this.char;
+
+ // Move to the next non-space character.
+ var start;
+ if (/\s/.test(this.peek())) {
+ start = this.char;
+
+ while (/\s/.test(this.peek())) {
+ this.from += 1;
+ this.skip();
+ }
+
+ if (this.peek() === "") { // EOL
+ if (!/^\s*$/.test(this.getLines()[this.line - 1]) && state.option.trailing) {
+ this.trigger("warning", { code: "W102", line: this.line, character: start });
+ }
+ }
+ }
+
+ // Methods that work with multi-line structures and move the
+ // character pointer.
+
+ var match = this.scanComments() ||
+ this.scanStringLiteral(checks);
+
+ if (match) {
+ return match;
+ }
+
+ // Methods that don't move the character pointer.
+
+ match =
+ this.scanRegExp() ||
+ this.scanPunctuator() ||
+ this.scanKeyword() ||
+ this.scanIdentifier() ||
+ this.scanNumericLiteral();
+
+ if (match) {
+ this.skip(match.value.length);
+ return match;
+ }
+
+ // No token could be matched, give up.
+
+ return null;
+ },
+
+ /*
+ * Switch to the next line and reset all char pointers. Once
+ * switched, this method also checks for mixed spaces and tabs
+ * and other minor warnings.
+ */
+ nextLine: function () {
+ var char;
+
+ if (this.line >= this.getLines().length) {
+ return false;
+ }
+
+ this.input = this.getLines()[this.line];
+ this.line += 1;
+ this.char = 1;
+ this.from = 1;
+
+ char = this.scanMixedSpacesAndTabs();
+ if (char >= 0) {
+ this.trigger("warning", { code: "W099", line: this.line, character: char + 1 });
+ }
+
+ this.input = this.input.replace(/\t/g, state.tab);
+ char = this.scanUnsafeChars();
+
+ if (char >= 0) {
+ this.trigger("warning", { code: "W100", line: this.line, character: char });
+ }
+
+ // If there is a limit on line length, warn when lines get too
+ // long.
+
+ if (state.option.maxlen && state.option.maxlen < this.input.length) {
+ this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
+ }
+
+ return true;
+ },
+
+ /*
+ * This is simply a synonym for nextLine() method with a friendlier
+ * public name.
+ */
+ start: function () {
+ this.nextLine();
+ },
+
+ /*
+ * Produce the next token. This function is called by advance() to get
+ * the next token. It retuns a token in a JSLint-compatible format.
+ */
+ token: function () {
+ /*jshint loopfunc:true */
+ var checks = asyncTrigger();
+ var token;
+
+
+ function isReserved(token, isProperty) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.option.inES5()) {
+ // ES3 FutureReservedWord in an ES5 environment.
+ if (!meta.es5) {
+ return false;
+ }
+
+ // Some ES5 FutureReservedWord identifiers are active only
+ // within a strict mode environment.
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.directive["use strict"]) {
+ return false;
+ }
+ }
+
+ if (isProperty) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ // Produce a token object.
+ var create = function (type, value, isProperty) {
+ /*jshint validthis:true */
+ var obj;
+
+ if (type !== "(endline)" && type !== "(end)") {
+ this.prereg = false;
+ }
+
+ if (type === "(punctuator)") {
+ switch (value) {
+ case ".":
+ case ")":
+ case "~":
+ case "#":
+ case "]":
+ this.prereg = false;
+ break;
+ default:
+ this.prereg = true;
+ }
+
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+ }
+
+ if (type === "(identifier)") {
+ if (value === "return" || value === "case" || value === "typeof") {
+ this.prereg = true;
+ }
+
+ if (_.has(state.syntax, value)) {
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+
+ // If this can't be a reserved keyword, reset the object.
+ if (!isReserved(obj, isProperty && type === "(identifier)")) {
+ obj = null;
+ }
+ }
+ }
+
+ if (!obj) {
+ obj = Object.create(state.syntax[type]);
+ }
+
+ obj.identifier = (type === "(identifier)");
+ obj.type = obj.type || type;
+ obj.value = value;
+ obj.line = this.line;
+ obj.character = this.char;
+ obj.from = this.from;
+
+ if (isProperty && obj.identifier) {
+ obj.isProperty = isProperty;
+ }
+
+ obj.check = checks.check;
+
+ return obj;
+ }.bind(this);
+
+ for (;;) {
+ if (!this.input.length) {
+ return create(this.nextLine() ? "(endline)" : "(end)", "");
+ }
+
+ token = this.next(checks);
+
+ if (!token) {
+ if (this.input.length) {
+ // Unexpected character.
+ this.trigger("error", {
+ code: "E024",
+ line: this.line,
+ character: this.char,
+ data: [ this.peek() ]
+ });
+
+ this.input = "";
+ }
+
+ continue;
+ }
+
+ switch (token.type) {
+ case Token.StringLiteral:
+ this.triggerAsync("String", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ value: token.value,
+ quote: token.quote
+ }, checks, function () { return true; });
+
+ return create("(string)", token.value);
+ case Token.Identifier:
+ this.trigger("Identifier", {
+ line: this.line,
+ char: this.char,
+ from: this.form,
+ name: token.value,
+ isProperty: state.tokens.curr.id === "."
+ });
+
+ /* falls through */
+ case Token.Keyword:
+ case Token.NullLiteral:
+ case Token.BooleanLiteral:
+ return create("(identifier)", token.value, state.tokens.curr.id === ".");
+
+ case Token.NumericLiteral:
+ if (token.isMalformed) {
+ this.trigger("warning", {
+ code: "W045",
+ line: this.line,
+ character: this.char,
+ data: [ token.value ]
+ });
+ }
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "0x-" ]
+ }, checks, function () { return token.base === 16 && state.jsonMode; });
+
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks, function () {
+ return state.directive["use strict"] && token.base === 8;
+ });
+
+ this.trigger("Number", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ value: token.value,
+ base: token.base,
+ isMalformed: token.malformed
+ });
+
+ return create("(number)", token.value);
+
+ case Token.RegExp:
+ return create("(regexp)", token.value);
+
+ case Token.Comment:
+ state.tokens.curr.comment = true;
+
+ if (token.isSpecial) {
+ return {
+ value: token.value,
+ body: token.body,
+ type: token.commentType,
+ isSpecial: token.isSpecial,
+ line: this.line,
+ character: this.char,
+ from: this.from
+ };
+ }
+
+ break;
+
+ case "":
+ break;
+
+ default:
+ return create("(punctuator)", token.value);
+ }
+ }
+ }
+};
+
+exports.Lexer = Lexer;
+
+},
+{"./reg.js":6,"./state.js":7,"events":10,"underscore":1}],
+6:[function(req,module,exports){
+/*
+ * Regular expressions. Some of these are stupidly long.
+ */
+
+/*jshint maxlen:1000 */
+
+"use string";
+
+// Unsafe comment or string (ax)
+exports.unsafeString =
+ /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
+
+// Unsafe characters that are silently deleted by one or more browsers (cx)
+exports.unsafeChars =
+ /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+
+// Characters in strings that need escaping (nx and nxg)
+exports.needEsc =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+
+exports.needEscGlobal =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+
+// Star slash (lx)
+exports.starSlash = /\*\//;
+
+// Identifier (ix)
+exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
+
+// JavaScript URL (jx)
+exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
+
+// Catches /* falls through */ comments (ft)
+exports.fallsThrough = /^\s*\/\*\s*falls?\sthrough\s*\*\/\s*$/;
+
+},
+{}],
+7:[function(req,module,exports){
+"use strict";
+
+var state = {
+ syntax: {},
+
+ reset: function () {
+ this.tokens = {
+ prev: null,
+ next: null,
+ curr: null
+ };
+
+ this.option = {};
+ this.ignored = {};
+ this.directive = {};
+ this.jsonMode = false;
+ this.jsonWarnings = [];
+ this.lines = [];
+ this.tab = "";
+ this.cache = {}; // Node.JS doesn't have Map. Sniff.
+ }
+};
+
+exports.state = state;
+
+},
+{}],
+8:[function(req,module,exports){
+"use strict";
+
+exports.register = function (linter) {
+ // Check for properties named __proto__. This special property was
+ // deprecated and then re-introduced for ES6.
+
+ linter.on("Identifier", function style_scanProto(data) {
+ if (linter.getOption("proto")) {
+ return;
+ }
+
+ if (data.name === "__proto__") {
+ linter.warn("W103", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ // Check for properties named __iterator__. This is a special property
+ // available only in browsers with JavaScript 1.7 implementation.
+
+ linter.on("Identifier", function style_scanIterator(data) {
+ if (linter.getOption("iterator")) {
+ return;
+ }
+
+ if (data.name === "__iterator__") {
+ linter.warn("W104", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ // Check for dangling underscores.
+
+ linter.on("Identifier", function style_scanDangling(data) {
+ if (!linter.getOption("nomen")) {
+ return;
+ }
+
+ // Underscore.js
+ if (data.name === "_") {
+ return;
+ }
+
+ // In Node, __dirname and __filename should be ignored.
+ if (linter.getOption("node")) {
+ if (/^(__dirname|__filename)$/.test(data.name) && !data.isProperty) {
+ return;
+ }
+ }
+
+ if (/^(_+.*|.*_+)$/.test(data.name)) {
+ linter.warn("W105", {
+ line: data.line,
+ char: data.from,
+ data: [ "dangling '_'", data.name ]
+ });
+ }
+ });
+
+ // Check that all identifiers are using camelCase notation.
+ // Exceptions: names like MY_VAR and _myVar.
+
+ linter.on("Identifier", function style_scanCamelCase(data) {
+ if (!linter.getOption("camelcase")) {
+ return;
+ }
+
+ if (data.name.replace(/^_+/, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
+ linter.warn("W106", {
+ line: data.line,
+ char: data.from,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ // Enforce consistency in style of quoting.
+
+ linter.on("String", function style_scanQuotes(data) {
+ var quotmark = linter.getOption("quotmark");
+ var code;
+
+ if (!quotmark) {
+ return;
+ }
+
+ // If quotmark is set to 'single' warn about all double-quotes.
+
+ if (quotmark === "single" && data.quote !== "'") {
+ code = "W109";
+ }
+
+ // If quotmark is set to 'double' warn about all single-quotes.
+
+ if (quotmark === "double" && data.quote !== "\"") {
+ code = "W108";
+ }
+
+ // If quotmark is set to true, remember the first quotation style
+ // and then warn about all others.
+
+ if (quotmark === true) {
+ if (!linter.getCache("quotmark")) {
+ linter.setCache("quotmark", data.quote);
+ }
+
+ if (linter.getCache("quotmark") !== data.quote) {
+ code = "W110";
+ }
+ }
+
+ if (code) {
+ linter.warn(code, {
+ line: data.line,
+ char: data.char,
+ });
+ }
+ });
+
+ linter.on("Number", function style_scanNumbers(data) {
+ if (data.value.charAt(0) === ".") {
+ // Warn about a leading decimal point.
+ linter.warn("W008", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (data.value.substr(data.value.length - 1) === ".") {
+ // Warn about a trailing decimal point.
+ linter.warn("W047", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (/^00+/.test(data.value)) {
+ // Multiple leading zeroes.
+ linter.warn("W046", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+ });
+
+ // Warn about script URLs.
+
+ linter.on("String", function style_scanJavaScriptURLs(data) {
+ var re = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i;
+
+ if (linter.getOption("scripturl")) {
+ return;
+ }
+
+ if (re.test(data.value)) {
+ linter.warn("W107", {
+ line: data.line,
+ char: data.char
+ });
+ }
+ });
+};
+},
+{}],
+9:[function(req,module,exports){
+
+},
+{}],
+10:[function(req,module,exports){
+var process=req("__browserify_process");if (!process.EventEmitter) process.EventEmitter = function () {};
+
+var EventEmitter = exports.EventEmitter = process.EventEmitter;
+var isArray = typeof Array.isArray === 'function'
+ ? Array.isArray
+ : function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]'
+ }
+;
+function indexOf (xs, x) {
+ if (xs.indexOf) return xs.indexOf(x);
+ for (var i = 0; i < xs.length; i++) {
+ if (x === xs[i]) return i;
+ }
+ return -1;
+}
+
+// By default EventEmitters will print a warning if more than
+// 10 listeners are added to it. This is a useful default which
+// helps finding memory leaks.
+//
+// Obviously not all Emitters should be limited to 10. This function allows
+// that to be increased. Set to zero for unlimited.
+var defaultMaxListeners = 200;
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!this._events) this._events = {};
+ this._events.maxListeners = n;
+};
+
+
+EventEmitter.prototype.emit = function(type) {
+ // If there is no 'error' event listener then throw.
+ if (type === 'error') {
+ if (!this._events || !this._events.error ||
+ (isArray(this._events.error) && !this._events.error.length))
+ {
+ if (arguments[1] instanceof Error) {
+ throw arguments[1]; // Unhandled 'error' event
+ } else {
+ throw new Error("Uncaught, unspecified 'error' event.");
+ }
+ return false;
+ }
+ }
+
+ if (!this._events) return false;
+ var handler = this._events[type];
+ if (!handler) return false;
+
+ if (typeof handler == 'function') {
+ switch (arguments.length) {
+ // fast cases
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ // slower
+ default:
+ var args = Array.prototype.slice.call(arguments, 1);
+ handler.apply(this, args);
+ }
+ return true;
+
+ } else if (isArray(handler)) {
+ var args = Array.prototype.slice.call(arguments, 1);
+
+ var listeners = handler.slice();
+ for (var i = 0, l = listeners.length; i < l; i++) {
+ listeners[i].apply(this, args);
+ }
+ return true;
+
+ } else {
+ return false;
+ }
+};
+
+// EventEmitter is defined in src/node_events.cc
+// EventEmitter.prototype.emit() is also defined there.
+EventEmitter.prototype.addListener = function(type, listener) {
+ if ('function' !== typeof listener) {
+ throw new Error('addListener only takes instances of Function');
+ }
+
+ if (!this._events) this._events = {};
+
+ // To avoid recursion in the case that type == "newListeners"! Before
+ // adding it to the listeners, first emit "newListeners".
+ this.emit('newListener', type, listener);
+
+ if (!this._events[type]) {
+ // Optimize the case of one listener. Don't need the extra array object.
+ this._events[type] = listener;
+ } else if (isArray(this._events[type])) {
+
+ // Check for listener leak
+ if (!this._events[type].warned) {
+ var m;
+ if (this._events.maxListeners !== undefined) {
+ m = this._events.maxListeners;
+ } else {
+ m = defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ console.trace();
+ }
+ }
+
+ // If we've already got an array, just append.
+ this._events[type].push(listener);
+ } else {
+ // Adding the second element, need to change to array.
+ this._events[type] = [this._events[type], listener];
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ var self = this;
+ self.on(type, function g() {
+ self.removeListener(type, g);
+ listener.apply(this, arguments);
+ });
+
+ return this;
+};
+
+EventEmitter.prototype.removeListener = function(type, listener) {
+ if ('function' !== typeof listener) {
+ throw new Error('removeListener only takes instances of Function');
+ }
+
+ // does not use listeners(), so no side effect of creating _events[type]
+ if (!this._events || !this._events[type]) return this;
+
+ var list = this._events[type];
+
+ if (isArray(list)) {
+ var i = indexOf(list, listener);
+ if (i < 0) return this;
+ list.splice(i, 1);
+ if (list.length == 0)
+ delete this._events[type];
+ } else if (this._events[type] === listener) {
+ delete this._events[type];
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ if (arguments.length === 0) {
+ this._events = {};
+ return this;
+ }
+
+ // does not use listeners(), so no side effect of creating _events[type]
+ if (type && this._events && this._events[type]) this._events[type] = null;
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ if (!this._events) this._events = {};
+ if (!this._events[type]) this._events[type] = [];
+ if (!isArray(this._events[type])) {
+ this._events[type] = [this._events[type]];
+ }
+ return this._events[type];
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (typeof emitter._events[type] === 'function')
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+},
+{"__browserify_process":11}],
+11:[function(req,module,exports){
+// shim for using process in browser
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+ var canSetImmediate = typeof window !== 'undefined'
+ && window.setImmediate;
+ var canPost = typeof window !== 'undefined'
+ && window.postMessage && window.addEventListener
+ ;
+
+ if (canSetImmediate) {
+ return function (f) { return window.setImmediate(f) };
+ }
+
+ if (canPost) {
+ var queue = [];
+ window.addEventListener('message', function (ev) {
+ if (ev.source === window && ev.data === 'process-tick') {
+ ev.stopPropagation();
+ if (queue.length > 0) {
+ var fn = queue.shift();
+ fn();
+ }
+ }
+ }, true);
+
+ return function nextTick(fn) {
+ queue.push(fn);
+ window.postMessage('process-tick', '*');
+ };
+ }
+
+ return function nextTick(fn) {
+ setTimeout(fn, 0);
+ };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+}
+
+// TODO(shtylman)
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+
+},
+{}],
+"jshint":[function(req,module,exports){
+module.exports=req('n4bKNg');
+},
+{}]},{},["n4bKNg"])
+;
+
+function req() {return require.apply(this, arguments)}
+module.exports = req("jshint");
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/javascript_highlight_rules.js
new file mode 100644
index 000000000..f950da89f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript_highlight_rules.js
@@ -0,0 +1,362 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JavaScriptHighlightRules = function() {
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language":
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
+ "Namespace|QName|XML|XMLList|" + // E4X
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
+ "SyntaxError|TypeError|URIError|" +
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
+ "isNaN|parseFloat|parseInt|" +
+ "JSON|Math|" + // Other
+ "this|arguments|prototype|window|document" , // Pseudo
+ "keyword":
+ "const|yield|import|get|set|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
+ // invalid or reserved
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
+ "storage.type":
+ "const|let|var|function",
+ "constant.language":
+ "null|Infinity|NaN|undefined",
+ "support.function":
+ "alert",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+
+ // keywords which can be followed by regular expressions
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ // TODO: Unicode escape sequences
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "no_regex" : [
+ {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ // Sound.prototype.play =
+ token : [
+ "storage.type", "punctuation.operator", "support.function",
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
+ next: "function_arguments"
+ }, {
+ // Sound.play = function() { }
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ // play = function() { }
+ token : [
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
+ "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ // Sound.play = function play() { }
+ token : [
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
+ "keyword.operator", "text",
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ // function myFunc(arg) { }
+ token : [
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ // foobar: function() { }
+ token : [
+ "entity.name.function", "text", "punctuation.operator",
+ "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ // : function() { } (this is for issues with 'foo': function() { })
+ token : [
+ "text", "text", "storage.type", "text", "paren.lparen"
+ ],
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
+ next: "function_arguments"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["punctuation.operator", "support.function"],
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.function.dom"],
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : ["punctuation.operator", "support.constant"],
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "keyword.operator",
+ regex : /\/=?/,
+ next : "start"
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ // regular expressions are only allowed after certain tokens. This
+ // makes sure we don't mix up regexps with the divison operator
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment_regex_allowed"
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next : "line_comment_regex_allowed"
+ }, {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ // immediately return to the start mode without matching
+ // anything
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ // escapes
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ // flag
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "no_regex"
+ }, {
+ // invalid operators
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ // operators
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "regex"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "comment_regex_allowed" : [
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment"}
+ ],
+ "comment" : [
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
+ {defaultToken : "comment"}
+ ],
+ "line_comment_regex_allowed" : [
+ {token : "comment", regex : "$|^", next : "start"},
+ {defaultToken : "comment"}
+ ],
+ "line_comment" : [
+ {token : "comment", regex : "$|^", next : "no_regex"},
+ {defaultToken : "comment"}
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript_test.js b/src/fauxton/assets/js/libs/ace/mode/javascript_test.js
new file mode 100644
index 000000000..b413765a3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript_test.js
@@ -0,0 +1,213 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JavaScriptMode = require("./javascript").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new JavaScriptMode();
+ },
+
+ "test: getTokenizer() (smoke test)" : function() {
+ var tokenizer = this.mode.getTokenizer();
+
+ assert.ok(tokenizer instanceof Tokenizer);
+
+ var tokens = tokenizer.getLineTokens("'juhu'", "start").tokens;
+ assert.equal("string", tokens[0].type);
+ },
+
+ "test: toggle comment lines should prepend '//' to each line" : function() {
+ var session = new EditSession([" abc", "cde", "fg"]);
+ session.setTabSize(1);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal(["// abc", "// cde", "fg"].join("\n"), session.toString());
+ },
+
+ "test: toggle comment on commented lines should remove leading '//' chars" : function() {
+ var session = new EditSession(["// abc", "//cde", "fg"]);
+ session.setTabSize(1);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
+ },
+
+ "test: toggle comment on all empty lines" : function() {
+ var session = new EditSession([" ", " ", " "]);
+ session.setTabSize(1);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" // ", " // ", " "].join("\n"), session.toString());
+ },
+
+ "test: toggle comment with empty lines" : function() {
+ var session = new EditSession([
+ " abc",
+ "",
+ " cde",
+ " fg"]);
+
+ var initial = session.toString();
+ this.mode.toggleCommentLines("start", session, 0, 3);
+ assert.equal([
+ " // abc",
+ "",
+ " // cde",
+ " // fg"].join("\n"),
+ session.toString()
+ );
+ this.mode.toggleCommentLines("start", session, 0, 3);
+ assert.equal(initial, session.toString());
+ },
+
+ "test: toggle comment lines twice should return the original text" : function() {
+ var session = new EditSession([" abc", "cde", "fg"]);
+
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
+ },
+
+ "test: toggle comment on multiple lines with one commented line prepend '//' to each line" : function() {
+ var session = new EditSession([" // abc", " //cde", " fg"]);
+ session.setTabSize(1);
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal([" // // abc", " // //cde", " // fg"].join("\n"), session.toString());
+ },
+
+ "test: toggle comment on a comment line with leading white space": function() {
+ var session = new EditSession(["//cde", " //fg"]);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal(["cde", " fg"].join("\n"), session.toString());
+ },
+
+ "test: toggle comment lines should take tabsize into account" : function() {
+ var session = new EditSession([" // abc", " // cde", "// fg"]);
+ session.setTabSize(2);
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal([" abc", " cde", " fg"].join("\n"), session.toString());
+ session.setTabSize(4);
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal(["// abc", "// cde", "// fg"].join("\n"), session.toString());
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal([" abc", " cde", " fg"].join("\n"), session.toString());
+
+ session.insert({row: 0, column: 0}, " ");
+ this.mode.toggleCommentLines("start", session, 0, 2);
+ assert.equal(["// abc", "// cde", "// fg"].join("\n"), session.toString());
+ },
+ //there doesn't seem to be any way to make this work
+ "!test: togglecomment on line with one space" : function() {
+ var session = new EditSession([" abc", " // cde", "// fg"]);
+ var initialValue = session + "";
+ session.setTabSize(4);
+ this.mode.toggleCommentLines("start", session, 0, 0);
+ this.mode.toggleCommentLines("start", session, 0, 0);
+ assert.equal(initialValue, session.toString());
+ },
+
+ "test: auto indent after opening brace" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", "if () {", " "));
+ },
+
+ "test: auto indent after case" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", "case 'juhu':", " "));
+ },
+
+ "test: no auto indent in object literal" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", "{ 'juhu':", " "));
+ },
+
+ "test: no auto indent after opening brace in multi line comment" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", "/*if () {", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("comment", " abcd", " "));
+ },
+
+ "test: no auto indent after opening brace in single line comment" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", "//if () {", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", " //if () {", " "));
+ },
+
+ "test: no auto indent should add to existing indent" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " if () {", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", " cde", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", "function foo(items) {", " "));
+ },
+
+ "test: special indent in doc comments" : function() {
+ assert.equal(" * ", this.mode.getNextLineIndent("doc-start", "/**", " "));
+ assert.equal(" * ", this.mode.getNextLineIndent("doc-start", " /**", " "));
+ assert.equal(" * ", this.mode.getNextLineIndent("doc-start", " *", " "));
+ assert.equal(" * ", this.mode.getNextLineIndent("doc-start", " *", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("doc-start", " abc", " "));
+ },
+
+ "test: no indent after doc comments" : function() {
+ assert.equal("", this.mode.getNextLineIndent("doc-start", " */", " "));
+ },
+
+ "test: trigger outdent if line is space and new text starts with closing brace" : function() {
+ assert.ok(this.mode.checkOutdent("start", " ", " }"));
+ assert.ok(!this.mode.checkOutdent("start", " a ", " }"));
+ assert.ok(!this.mode.checkOutdent("start", "", "}"));
+ assert.ok(!this.mode.checkOutdent("start", " ", "a }"));
+ assert.ok(!this.mode.checkOutdent("start", " }", "}"));
+ },
+
+ "test: auto outdent should indent the line with the same indent as the line with the matching opening brace" : function() {
+ var session = new EditSession([" function foo() {", " bla", " }"], new JavaScriptMode());
+ this.mode.autoOutdent("start", session, 2);
+ assert.equal(" }", session.getLine(2));
+ },
+
+ "test: no auto outdent if no matching brace is found" : function() {
+ var session = new EditSession([" function foo()", " bla", " }"]);
+ this.mode.autoOutdent("start", session, 2);
+ assert.equal(" }", session.getLine(2));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript_worker.js b/src/fauxton/assets/js/libs/ace/mode/javascript_worker.js
new file mode 100644
index 000000000..e6503efc4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript_worker.js
@@ -0,0 +1,187 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var lint = require("./javascript/jshint").JSHINT;
+
+function startRegex(arr) {
+ return RegExp("^(" + arr.join("|") + ")");
+}
+
+var disabledWarningsRe = startRegex([
+ "Bad for in variable '(.+)'.",
+ 'Missing "use strict"'
+]);
+var errorsRe = startRegex([
+ "Unexpected",
+ "Expected ",
+ "Confusing (plus|minus)",
+ "\\{a\\} unterminated regular expression",
+ "Unclosed ",
+ "Unmatched ",
+ "Unbegun comment",
+ "Bad invocation",
+ "Missing space after",
+ "Missing operator at"
+]);
+var infoRe = startRegex([
+ "Expected an assignment",
+ "Bad escapement of EOL",
+ "Unexpected comma",
+ "Unexpected space",
+ "Missing radix parameter.",
+ "A leading decimal point can",
+ "\\['{a}'\\] is better written in dot notation.",
+ "'{a}' used out of scope"
+]);
+
+var JavaScriptWorker = exports.JavaScriptWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+ this.setOptions();
+};
+
+oop.inherits(JavaScriptWorker, Mirror);
+
+(function() {
+ this.setOptions = function(options) {
+ this.options = options || {
+ // undef: true,
+ // unused: true,
+ esnext: true,
+ moz: true,
+ devel: true,
+ browser: true,
+ node: true,
+ laxcomma: true,
+ laxbreak: true,
+ lastsemic: true,
+ onevar: false,
+ passfail: false,
+ maxerr: 100,
+ expr: true,
+ multistr: true,
+ globalstrict: true
+ };
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.changeOptions = function(newOptions) {
+ oop.mixin(this.options, newOptions);
+ this.doc.getValue() && this.deferredUpdate.schedule(100);
+ };
+
+ this.isValidJS = function(str) {
+ try {
+ // evaluated code can only create variables in this function
+ eval("throw 0;" + str);
+ } catch(e) {
+ if (e === 0)
+ return true;
+ }
+ return false
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ value = value.replace(/^#!.*\n/, "\n");
+ if (!value) {
+ this.sender.emit("jslint", []);
+ return;
+ }
+ var errors = [];
+
+ // jshint reports many false errors
+ // report them as error only if code is actually invalid
+ var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
+
+ // var start = new Date();
+ lint(value, this.options);
+ var results = lint.errors;
+
+ var errorAdded = false
+ for (var i = 0; i < results.length; i++) {
+ var error = results[i];
+ if (!error)
+ continue;
+ var raw = error.raw;
+ var type = "warning";
+
+ if (raw == "Missing semicolon.") {
+ var str = error.evidence.substr(error.character);
+ str = str.charAt(str.search(/\S/));
+ if (maxErrorLevel == "error" && str && /[\w\d{(['"]/.test(str)) {
+ error.reason = 'Missing ";" before statement';
+ type = "error";
+ } else {
+ type = "info";
+ }
+ }
+ else if (disabledWarningsRe.test(raw)) {
+ continue;
+ }
+ else if (infoRe.test(raw)) {
+ type = "info"
+ }
+ else if (errorsRe.test(raw)) {
+ errorAdded = true;
+ type = maxErrorLevel;
+ }
+ else if (raw == "'{a}' is not defined.") {
+ type = "warning";
+ }
+ else if (raw == "'{a}' is defined but never used.") {
+ type = "info";
+ }
+
+ errors.push({
+ row: error.line-1,
+ column: error.character-1,
+ text: error.reason,
+ type: type,
+ raw: raw
+ });
+
+ if (errorAdded) {
+ // break;
+ }
+ }
+ // console.log("lint time: " + (new Date() - start));
+
+ this.sender.emit("jslint", errors);
+ };
+
+}).call(JavaScriptWorker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/javascript_worker_test.js b/src/fauxton/assets/js/libs/ace/mode/javascript_worker_test.js
new file mode 100644
index 000000000..5d61fc894
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/javascript_worker_test.js
@@ -0,0 +1,106 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+var JavaScriptWorker = require("./javascript_worker").JavaScriptWorker;
+
+
+module.exports = {
+ setUp : function() {
+ this.sender = {
+ on: function() {},
+ callback: function(data, id) {
+ this.data = data;
+ },
+ events: [],
+ emit: function(type, e) {
+ this.events.push([type, e]);
+ }
+ };
+ },
+
+ "test check for syntax error": function() {
+ var worker = new JavaScriptWorker(this.sender);
+ worker.setValue("Juhu Kinners");
+ worker.deferredUpdate.call();
+
+ var error = this.sender.events[0][1][0];
+ assert.equal(error.text, 'Missing ";" before statement');
+ assert.equal(error.type, "error");
+ assert.equal(error.row, 0);
+ assert.equal(error.column, 4);
+ },
+
+ "test invalid multi line string": function() {
+ var worker = new JavaScriptWorker(this.sender);
+ worker.setValue('"a\n\\nn"');
+ worker.deferredUpdate.call();
+
+ var error = this.sender.events[0][1][0];
+ assert.equal(error.text, "Unclosed string.");
+ assert.equal(error.type, "error");
+ assert.equal(error.row, 0);
+ assert.equal(error.column, 2);
+ },
+
+ "test another invalid string": function() {
+ var worker = new JavaScriptWorker(this.sender);
+ worker.setValue("if('");
+ worker.deferredUpdate.call();
+
+ var error = this.sender.events[0][1][0];
+ assert.equal(error.text, "Unclosed string.");
+ assert.equal(error.type, "error");
+ assert.equal(error.row, 0);
+ assert.equal(error.column, 4);
+ },
+
+ "test for each": function() {
+ var worker = new JavaScriptWorker(this.sender);
+ worker.setValue("for each(var i in x)");
+ worker.deferredUpdate.call();
+
+ var error = this.sender.events[0][1][0];
+ assert.equal(error.text, "Unexpected early end of program.");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/js_regex_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/js_regex_highlight_rules.js
new file mode 100644
index 000000000..d54e2ca3e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/js_regex_highlight_rules.js
@@ -0,0 +1,94 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var escape = "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)";
+var quantifier = "({\\d+\\b,?\\d*}|[+*?])(\\??)";
+
+var JsRegexHighlightRules = function() {
+ this.$rules = {
+ "start": [{
+ // operators
+ token : "keyword",
+ regex: "\\\\[bB]",
+ next: "no_quantifier"
+ }, {
+ token: "regexp.keyword.operator",
+ regex: escape
+ }, {
+ // flag
+ token: "string.regexp",
+ regex: "/\\w*",
+ next: "start"
+ }, {
+ token : ["string", "string.regex"],
+ regex: quantifier,
+ next: "no_quantifier"
+ }, {
+ // operators
+ token : "keyword",
+ regex: "[$^]|\\\\[bB]",
+ next: "no_quantifier"
+ }, {
+ // operators
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|[()$^+*?]/,
+ next: "no_quantifier"
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/,
+ next: "no_quantifier"
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "start"
+ }
+ ],
+
+
+ "character_class": [{
+ regex: /\\[dDwWsS]/
+ },{
+ token: "markup.list",
+ regex: "(?:" + escape + "|.)-(?:[^\\]\\\\]|" + escape + ")"
+ }, {
+ token: "keyword",
+ regex: escape
+ }, {
+ token: "constant.language.escape",
+ regex: "]",
+ next: "start"
+ }, {
+ token: "constant.language.escape",
+ regex: "-"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "start"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "no_quantifier":[{
+ token: "invalid",
+ regex: quantifier
+ }, {
+ token: "invalid",
+ regex: "",
+ next: "start"
+ }
+ ]
+
+ };
+};
+
+oop.inherits(JsRegexHighlightRules, TextHighlightRules);
+
+exports.JsRegexHighlightRules = JsRegexHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/json.js b/src/fauxton/assets/js/libs/ace/mode/json.js
new file mode 100644
index 000000000..1f92c56d2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/json.js
@@ -0,0 +1,93 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var HighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/json/json_parse.js b/src/fauxton/assets/js/libs/ace/mode/json/json_parse.js
new file mode 100644
index 000000000..7841ab706
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/json/json_parse.js
@@ -0,0 +1,346 @@
+/*
+ http://www.JSON.org/json_parse.js
+ 2008-09-18
+
+ Public Domain.
+
+ NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
+
+ This file creates a json_parse function.
+
+ json_parse(text, reviver)
+ This method parses a JSON text to produce an object or array.
+ It can throw a SyntaxError exception.
+
+ The optional reviver parameter is a function that can filter and
+ transform the results. It receives each of the keys and values,
+ and its return value is used instead of the original value.
+ If it returns what it received, then the structure is not modified.
+ If it returns undefined then the member is deleted.
+
+ Example:
+
+ // Parse the text. Values that look like ISO date strings will
+ // be converted to Date objects.
+
+ myData = json_parse(text, function (key, value) {
+ var a;
+ if (typeof value === 'string') {
+ a =
+/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
+ if (a) {
+ return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+ +a[5], +a[6]));
+ }
+ }
+ return value;
+ });
+
+ This is a reference implementation. You are free to copy, modify, or
+ redistribute.
+
+ This code should be minified before deployment.
+ See http://javascript.crockford.com/jsmin.html
+
+ USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
+ NOT CONTROL.
+*/
+
+/*members "", "\"", "\/", "\\", at, b, call, charAt, f, fromCharCode,
+ hasOwnProperty, message, n, name, push, r, t, text
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+// This is a function that can parse a JSON text, producing a JavaScript
+// data structure. It is a simple, recursive descent parser. It does not use
+// eval or regular expressions, so it can be used as a model for implementing
+// a JSON parser in other languages.
+
+// We are defining the function inside of another function to avoid creating
+// global variables.
+
+ var at, // The index of the current character
+ ch, // The current character
+ escapee = {
+ '"': '"',
+ '\\': '\\',
+ '/': '/',
+ b: '\b',
+ f: '\f',
+ n: '\n',
+ r: '\r',
+ t: '\t'
+ },
+ text,
+
+ error = function (m) {
+
+// Call error when something is wrong.
+
+ throw {
+ name: 'SyntaxError',
+ message: m,
+ at: at,
+ text: text
+ };
+ },
+
+ next = function (c) {
+
+// If a c parameter is provided, verify that it matches the current character.
+
+ if (c && c !== ch) {
+ error("Expected '" + c + "' instead of '" + ch + "'");
+ }
+
+// Get the next character. When there are no more characters,
+// return the empty string.
+
+ ch = text.charAt(at);
+ at += 1;
+ return ch;
+ },
+
+ number = function () {
+
+// Parse a number value.
+
+ var number,
+ string = '';
+
+ if (ch === '-') {
+ string = '-';
+ next('-');
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ if (ch === '.') {
+ string += '.';
+ while (next() && ch >= '0' && ch <= '9') {
+ string += ch;
+ }
+ }
+ if (ch === 'e' || ch === 'E') {
+ string += ch;
+ next();
+ if (ch === '-' || ch === '+') {
+ string += ch;
+ next();
+ }
+ while (ch >= '0' && ch <= '9') {
+ string += ch;
+ next();
+ }
+ }
+ number = +string;
+ if (isNaN(number)) {
+ error("Bad number");
+ } else {
+ return number;
+ }
+ },
+
+ string = function () {
+
+// Parse a string value.
+
+ var hex,
+ i,
+ string = '',
+ uffff;
+
+// When parsing for string values, we must look for " and \ characters.
+
+ if (ch === '"') {
+ while (next()) {
+ if (ch === '"') {
+ next();
+ return string;
+ } else if (ch === '\\') {
+ next();
+ if (ch === 'u') {
+ uffff = 0;
+ for (i = 0; i < 4; i += 1) {
+ hex = parseInt(next(), 16);
+ if (!isFinite(hex)) {
+ break;
+ }
+ uffff = uffff * 16 + hex;
+ }
+ string += String.fromCharCode(uffff);
+ } else if (typeof escapee[ch] === 'string') {
+ string += escapee[ch];
+ } else {
+ break;
+ }
+ } else {
+ string += ch;
+ }
+ }
+ }
+ error("Bad string");
+ },
+
+ white = function () {
+
+// Skip whitespace.
+
+ while (ch && ch <= ' ') {
+ next();
+ }
+ },
+
+ word = function () {
+
+// true, false, or null.
+
+ switch (ch) {
+ case 't':
+ next('t');
+ next('r');
+ next('u');
+ next('e');
+ return true;
+ case 'f':
+ next('f');
+ next('a');
+ next('l');
+ next('s');
+ next('e');
+ return false;
+ case 'n':
+ next('n');
+ next('u');
+ next('l');
+ next('l');
+ return null;
+ }
+ error("Unexpected '" + ch + "'");
+ },
+
+ value, // Place holder for the value function.
+
+ array = function () {
+
+// Parse an array value.
+
+ var array = [];
+
+ if (ch === '[') {
+ next('[');
+ white();
+ if (ch === ']') {
+ next(']');
+ return array; // empty array
+ }
+ while (ch) {
+ array.push(value());
+ white();
+ if (ch === ']') {
+ next(']');
+ return array;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad array");
+ },
+
+ object = function () {
+
+// Parse an object value.
+
+ var key,
+ object = {};
+
+ if (ch === '{') {
+ next('{');
+ white();
+ if (ch === '}') {
+ next('}');
+ return object; // empty object
+ }
+ while (ch) {
+ key = string();
+ white();
+ next(':');
+ if (Object.hasOwnProperty.call(object, key)) {
+ error('Duplicate key "' + key + '"');
+ }
+ object[key] = value();
+ white();
+ if (ch === '}') {
+ next('}');
+ return object;
+ }
+ next(',');
+ white();
+ }
+ }
+ error("Bad object");
+ };
+
+ value = function () {
+
+// Parse a JSON value. It could be an object, an array, a string, a number,
+// or a word.
+
+ white();
+ switch (ch) {
+ case '{':
+ return object();
+ case '[':
+ return array();
+ case '"':
+ return string();
+ case '-':
+ return number();
+ default:
+ return ch >= '0' && ch <= '9' ? number() : word();
+ }
+ };
+
+// Return the json_parse function. It will have access to all of the above
+// functions and variables.
+
+ return function (source, reviver) {
+ var result;
+
+ text = source;
+ at = 0;
+ ch = ' ';
+ result = value();
+ white();
+ if (ch) {
+ error("Syntax error");
+ }
+
+// If there is a reviver function, we recursively walk the new structure,
+// passing each name/value pair to the reviver function for possible
+// transformation, starting with a temporary root object that holds the result
+// in an empty key. If there is not a reviver function, we simply return the
+// result.
+
+ return typeof reviver === 'function' ? function walk(holder, key) {
+ var k, v, value = holder[key];
+ if (value && typeof value === 'object') {
+ for (k in value) {
+ if (Object.hasOwnProperty.call(value, k)) {
+ v = walk(value, k);
+ if (v !== undefined) {
+ value[k] = v;
+ } else {
+ delete value[k];
+ }
+ }
+ }
+ }
+ return reviver.call(holder, key, value);
+ }({'': result}, '') : result;
+ };
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/json_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/json_highlight_rules.js
new file mode 100644
index 000000000..4bccaf184
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/json_highlight_rules.js
@@ -0,0 +1,100 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JsonHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+ this.$rules = {
+ "start" : [
+ {
+ token : "variable", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'
+ }, {
+ token : "string", // single line
+ regex : '"',
+ next : "string"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "invalid.illegal", // single quoted strings are not allowed
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "invalid.illegal", // comments are not allowed
+ regex : "\\/\\/.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string" : [
+ {
+ token : "constant.language.escape",
+ regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : "",
+ next : "start"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/json_worker.js b/src/fauxton/assets/js/libs/ace/mode/json_worker.js
new file mode 100644
index 000000000..9c233d771
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/json_worker.js
@@ -0,0 +1,67 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var parse = require("./json/json_parse");
+
+var JsonWorker = exports.JsonWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+};
+
+oop.inherits(JsonWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+
+ try {
+ var result = parse(value);
+ } catch (e) {
+ var pos = this.doc.indexToPosition(e.at-1);
+ this.sender.emit("error", {
+ row: pos.row,
+ column: pos.column,
+ text: e.message,
+ type: "error"
+ });
+ return;
+ }
+ this.sender.emit("ok");
+ };
+
+}).call(JsonWorker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/json_worker_test.js b/src/fauxton/assets/js/libs/ace/mode/json_worker_test.js
new file mode 100644
index 000000000..b4a8610d5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/json_worker_test.js
@@ -0,0 +1,101 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+var Worker = require("./json_worker").JsonWorker;
+
+
+module.exports = {
+ setUp : function() {
+ this.sender = {
+ on: function() {},
+ callback: function(data, id) {
+ this.data = data;
+ },
+ events: [],
+ emit: function(type, e) {
+ this.events.push([type, e]);
+ }
+ };
+ },
+
+ "test check valid json": function() {
+ var worker = new Worker(this.sender);
+ worker.setValue("{}");
+ worker.deferredUpdate.call();
+
+ assert.equal(this.sender.events[0][0], "ok");
+ },
+
+ "test check for syntax error": function() {
+ var worker = new Worker(this.sender);
+ worker.setValue([
+ "{",
+ "juhu: 12",
+ "}"
+ ].join("\n"));
+ worker.deferredUpdate.call();
+
+ var event = this.sender.events[0];
+ assert.equal(event[0], "error");
+ assert.equal(event[1].type, "error");
+ assert.equal(event[1].text, "Bad string");
+ assert.equal(event[1].row, 1);
+ assert.equal(event[1].column, 0);
+
+ },
+
+ "test check for syntax error at first char": function() {
+ var worker = new Worker(this.sender);
+ worker.setValue("x");
+ worker.deferredUpdate.call();
+
+ var event = this.sender.events[0];
+ assert.equal(event[0], "error");
+ assert.equal(event[1].type, "error");
+ assert.equal(event[1].text, "Unexpected 'x'");
+ assert.equal(event[1].row, 0);
+ assert.equal(event[1].column, 0);
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/jsoniq.js b/src/fauxton/assets/js/libs/ace/mode/jsoniq.js
new file mode 100644
index 000000000..f269da1e7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jsoniq.js
@@ -0,0 +1,106 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JSONiqLexer = require("./xquery/JSONiqLexer").JSONiqLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+
+var Mode = function() {
+ this.$tokenizer = new JSONiqLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
+ if (match)
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\}\)]/.test(input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*[\}\)])/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(:(.*):\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jsp.js b/src/fauxton/assets/js/libs/ace/mode/jsp.js
new file mode 100644
index 000000000..03df8d3c1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jsp.js
@@ -0,0 +1,55 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JspHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jsp_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/jsp_highlight_rules.js
new file mode 100644
index 000000000..e6775f533
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jsp_highlight_rules.js
@@ -0,0 +1,91 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var JspHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var builtinVariables = 'request|response|out|session|' +
+ 'application|config|pageContext|page|Exception';
+
+ var keywords = 'page|include|taglib';
+
+ var startRules = [
+ {
+ token : "comment",
+ regex : "<%--",
+ push : "jsp-dcomment"
+ }, {
+ token : "meta.tag", // jsp open tag
+ regex : "<%@?|<%=?|<jsp:[^>]+>",
+ push : "jsp-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "meta.tag", // jsp close tag
+ regex : "%>|<\\/jsp:[^>]+>",
+ next : "pop"
+ }, {
+ token: "variable.language",
+ regex : builtinVariables
+ }, {
+ token: "keyword",
+ regex : keywords
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]);
+
+ this.addRules({
+ "jsp-dcomment" : [{
+ token : "comment",
+ regex : ".*?--%>",
+ next : "pop"
+ }]
+ });
+
+ this.normalizeRules();
+};
+
+oop.inherits(JspHighlightRules, HtmlHighlightRules);
+
+exports.JspHighlightRules = JspHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jsx.js b/src/fauxton/assets/js/libs/ace/mode/jsx.js
new file mode 100644
index 000000000..999a97779
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jsx.js
@@ -0,0 +1,56 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+function Mode() {
+ this.HighlightRules = JsxHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+}
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/jsx_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/jsx_highlight_rules.js
new file mode 100644
index 000000000..5dcfbd6c8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/jsx_highlight_rules.js
@@ -0,0 +1,120 @@
+define(function(require, exports, module) {
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JsxHighlightRules = function() {
+ var keywords = lang.arrayToMap(
+ ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" +
+ "if|throw|" +
+ "delete|in|try|" +
+ "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" +
+ "number|int|string|boolean|variant|" +
+ "log|assert").split("|")
+ );
+
+ var buildinConstants = lang.arrayToMap(
+ ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|")
+ );
+
+ var reserved = lang.arrayToMap(
+ ("debugger|with|" +
+ "const|export|" +
+ "let|private|public|yield|protected|" +
+ "extern|native|as|operator|__fake__|__readonly__").split("|")
+ );
+
+ var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : [
+ "storage.type",
+ "text",
+ "entity.name.function"
+ ],
+ regex : "(function)(\\s+)(" + identifierRe + ")"
+ }, {
+ token : function(value) {
+ if (value == "this")
+ return "variable.language";
+ else if (value == "function")
+ return "storage.type";
+ else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value))
+ return "keyword";
+ else if (buildinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value))
+ return "language.support.class";
+ else
+ return "identifier";
+ },
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : identifierRe
+ }, {
+ token : "keyword.operator",
+ regex : "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({<]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}>]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JsxHighlightRules, TextHighlightRules);
+
+exports.JsxHighlightRules = JsxHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/julia.js b/src/fauxton/assets/js/libs/ace/mode/julia.js
new file mode 100644
index 000000000..a85ba2f02
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/julia.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JuliaHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = "";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/julia_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/julia_highlight_rules.js
new file mode 100644
index 000000000..fabec1e3c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/julia_highlight_rules.js
@@ -0,0 +1,170 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from https://raw.github.com/JuliaLang/julia/master/contrib/Julia.tmbundle/Syntaxes/Julia.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var JuliaHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { include: '#function_decl' },
+ { include: '#function_call' },
+ { include: '#type_decl' },
+ { include: '#keyword' },
+ { include: '#operator' },
+ { include: '#number' },
+ { include: '#string' },
+ { include: '#comment' } ],
+ '#bracket':
+ [ { token: 'keyword.bracket.julia',
+ regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' } ],
+ '#comment':
+ [ { token:
+ [ 'punctuation.definition.comment.julia',
+ 'comment.line.number-sign.julia' ],
+ regex: '(#)(?!\\{)(.*$)'} ],
+ '#function_call':
+ [ { token: [ 'support.function.julia', 'text' ],
+ regex: '([a-zA-Z0-9_]+!?)(\\w*\\()'} ],
+ '#function_decl':
+ [ { token: [ 'keyword.other.julia', 'meta.function.julia',
+ 'entity.name.function.julia', 'meta.function.julia','text' ],
+ regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)(\\w*)([(\\\\{])'} ],
+ '#keyword':
+ [ { token: 'keyword.other.julia',
+ regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' },
+ { token: 'keyword.control.julia',
+ regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' },
+ { token: 'storage.modifier.variable.julia',
+ regex: '\\b(?:global|local|const|export|import|importall|using)\\b' },
+ { token: 'variable.macro.julia', regex: '@\\w+\\b' } ],
+ '#number':
+ [ { token: 'constant.numeric.julia',
+ regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ],
+ '#operator':
+ [ { token: 'keyword.operator.update.julia',
+ regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' },
+ { token: 'keyword.operator.ternary.julia', regex: '\\?|:' },
+ { token: 'keyword.operator.boolean.julia',
+ regex: '\\|\\||&&|!' },
+ { token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' },
+ { token: 'keyword.operator.relation.julia',
+ regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' },
+ { token: 'keyword.operator.range.julia', regex: ':' },
+ { token: 'keyword.operator.shift.julia', regex: '<<|>>' },
+ { token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' },
+ { token: 'keyword.operator.arithmetic.julia',
+ regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' },
+ { token: 'keyword.operator.isa.julia', regex: '::' },
+ { token: 'keyword.operator.dots.julia',
+ regex: '\\.(?=[a-zA-Z])|\\.\\.+' },
+ { token: 'keyword.operator.interpolation.julia',
+ regex: '\\$#?(?=.)' },
+ { token: [ 'variable', 'keyword.operator.transposed-variable.julia' ],
+ regex: '(\\w+)((?:\'|\\.\')*\\.?\')' },
+ { token: 'text',
+ regex: '\\[|\\('},
+ { token: [ 'text', 'keyword.operator.transposed-matrix.julia' ],
+ regex: "([\\]\\)])((?:'|\\.')*\\.?')"} ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.julia',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.single.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '"',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.double.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '\\b\\w+"',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '"\\w*',
+ next: 'pop' },
+ { include: '#string_custom_escaped_char' },
+ { defaultToken: 'string.quoted.custom-double.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '`',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '`',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.backtick.julia' } ] } ],
+ '#string_custom_escaped_char': [ { token: 'constant.character.escape.julia', regex: '\\\\"' } ],
+ '#string_escaped_char':
+ [ { token: 'constant.character.escape.julia',
+ regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' } ],
+ '#type_decl':
+ [ { token:
+ [ 'keyword.control.type.julia',
+ 'meta.type.julia',
+ 'entity.name.type.julia',
+ 'entity.other.inherited-class.julia',
+ 'punctuation.separator.inheritance.julia',
+ 'entity.other.inherited-class.julia' ],
+ regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' },
+ { token: [ 'other.typed-variable.julia', 'support.type.julia' ],
+ regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] }
+
+ this.normalizeRules();
+};
+
+JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ],
+ firstLineMatch: '^#!.*\\bjulia\\s*$',
+ foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$',
+ foldingStopMarker: '^\\s*(?:end)\\b.*$',
+ name: 'Julia',
+ scopeName: 'source.julia' }
+
+
+oop.inherits(JuliaHighlightRules, TextHighlightRules);
+
+exports.JuliaHighlightRules = JuliaHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/latex.js b/src/fauxton/assets/js/libs/ace/mode/latex.js
new file mode 100644
index 000000000..6d932a6a8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/latex.js
@@ -0,0 +1,24 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
+var LatexFoldMode = require("./folding/latex").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = LatexHighlightRules;
+ this.foldingRules = new LatexFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/latex_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/latex_highlight_rules.js
new file mode 100644
index 000000000..3057c0dec
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/latex_highlight_rules.js
@@ -0,0 +1,38 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LatexHighlightRules = function() {
+ this.$rules = {
+ "start" : [{
+ // A tex command e.g. \foo
+ token : "keyword",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ // Curly and square braces
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ // Curly and square braces
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ // Inline math between two $ symbols
+ token : "string",
+ regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
+ }, {
+ // A comment. Tex comments start with % and go to
+ // the end of the line
+ token : "comment",
+ regex : "%.*$"
+ }]
+ };
+};
+
+oop.inherits(LatexHighlightRules, TextHighlightRules);
+
+exports.LatexHighlightRules = LatexHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/less.js b/src/fauxton/assets/js/libs/ace/mode/less.js
new file mode 100644
index 000000000..ac40a0a6d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/less.js
@@ -0,0 +1,84 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = LessHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ // ignore braces in comments
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/less_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/less_highlight_rules.js
new file mode 100644
index 000000000..d39bdeaec
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/less_highlight_rules.js
@@ -0,0 +1,271 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LessHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|" +
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+
+ //The return array
+ var ret = [];
+
+ //All prefixProperties will get the browserPrefix in
+ //the begning by join the prefixProperties array with the value of browserPrefix
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+
+ //Add also prefixProperties and properties without any browser prefix
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|" +
+ "desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|" +
+ "alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|" +
+ "iskeyword|isurl|ispixel|ispercentage|isem").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|" +
+ "@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|" +
+ "def|end|declare|when|not|and").split("|")
+ );
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else
+ return "variable";
+ },
+ regex : "@[a-z0-9_\\-@]*\\b"
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ else if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+};
+
+oop.inherits(LessHighlightRules, TextHighlightRules);
+
+exports.LessHighlightRules = LessHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/liquid.js b/src/fauxton/assets/js/libs/ace/mode/liquid.js
new file mode 100644
index 000000000..490be8955
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/liquid.js
@@ -0,0 +1,82 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = LiquidHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/liquid_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/liquid_highlight_rules.js
new file mode 100644
index 000000000..50a9376c6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/liquid_highlight_rules.js
@@ -0,0 +1,131 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var LiquidHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ // see: https://developer.mozilla.org/en/Liquid/Reference/Global_Objects
+ var functions = (
+ // Standard Filters
+ "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" +
+ "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" +
+ "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split"
+ );
+
+ var keywords = (
+ // Standard Tags
+ "capture|endcapture|case|endcase|when|comment|endcomment|" +
+ "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" +
+ // Commonly used tags
+ "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow"
+ );
+
+ var builtinVariables = 'forloop|tablerowloop';
+ // "forloop\\.(length|index|index0|rindex|rindex0|first|last)|limit|offset|range" +
+ // "tablerowloop\\.(length|index|index0|rindex|rindex0|first|last|col|col0|"+
+ // "col_first|col_last)"
+
+ var definitions = ("assign");
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": builtinVariables,
+ "keyword": keywords,
+ "support.function": functions,
+ "keyword.definition": definitions
+ }, "identifier");
+
+ // add liquid start tags to the HTML start tags
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable",
+ regex : "{%",
+ push : "liquid-start"
+ }, {
+ token : "variable",
+ regex : "{{",
+ push : "liquid-start"
+ });
+ }
+
+ this.addRules({
+ "liquid-start" : [{
+ token: "variable",
+ regex: "}}",
+ next: "pop"
+ }, {
+ token: "variable",
+ regex: "%}",
+ next: "pop"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }]
+ });
+
+ this.normalizeRules();
+};
+oop.inherits(LiquidHighlightRules, TextHighlightRules);
+
+exports.LiquidHighlightRules = LiquidHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/lisp.js b/src/fauxton/assets/js/libs/ace/mode/lisp.js
new file mode 100644
index 000000000..3762c171c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lisp.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LispHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/lisp_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/lisp_highlight_rules.js
new file mode 100644
index 000000000..06f7344ea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lisp_highlight_rules.js
@@ -0,0 +1,124 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian <gjtorikian @ gmail DOT com>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ /*
+ THIS FILE WAS AUTOGENERATED BY Lisp.tmlanguage (UUID: 00D451C9-6B1D-11D9-8DFA-000D93589AF6) */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LispHighlightRules = function() {
+ var keywordControl = "case|do|let|loop|if|else|when";
+ var keywordOperator = "eq|neq|and|or";
+ var constantLanguage = "null|nil";
+ var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control": keywordControl,
+ "keyword.operator": keywordOperator,
+ "constant.language": constantLanguage,
+ "support.function": supportFunctions
+ }, "identifier", true);
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "comment",
+ regex : ";.*$"
+ },
+ {
+ token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"],
+ regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
+ },
+ {
+ token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"],
+ regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)"
+ },
+ {
+ token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"],
+ regex: "(\\*)(\\S*)(\\*)"
+ },
+ {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ },
+ {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }
+ ],
+ "qqstring": [
+ {
+ token: "constant.character.escape.lisp",
+ regex: "\\\\."
+ },
+ {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(LispHighlightRules, TextHighlightRules);
+
+exports.LispHighlightRules = LispHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/livescript.js b/src/fauxton/assets/js/libs/ace/mode/livescript.js
new file mode 100644
index 000000000..5f759d9ee
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/livescript.js
@@ -0,0 +1,248 @@
+define(function(require, exports, module){
+ var identifier, LiveScriptMode, keywordend, stringfill;
+ identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
+ exports.Mode = LiveScriptMode = (function(superclass){
+ var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode;
+ function LiveScriptMode(){
+ var that;
+ this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules);
+ if (that = require('../mode/matching_brace_outdent')) {
+ this.$outdent = new that.MatchingBraceOutdent;
+ }
+ }
+ indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
+ prototype.getNextLineIndent = function(state, line, tab){
+ var indent, tokens;
+ indent = this.$getIndent(line);
+ tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) {
+ if (state === 'start' && indenter.test(line)) {
+ indent += tab;
+ }
+ }
+ return indent;
+ };
+ prototype.toggleCommentLines = function(state, doc, startRow, endRow){
+ var comment, range, i$, i, out, line;
+ comment = /^(\s*)#/;
+ range = new (require('../range')).Range(0, 0, 0, 0);
+ for (i$ = startRow; i$ <= endRow; ++i$) {
+ i = i$;
+ if (out = comment.test(line = doc.getLine(i))) {
+ line = line.replace(comment, '$1');
+ } else {
+ line = line.replace(/^\s*/, '$&#');
+ }
+ range.end.row = range.start.row = i;
+ range.end.column = line.length + 1;
+ doc.replace(range, line);
+ }
+ return 1 - out * 2;
+ };
+ prototype.checkOutdent = function(state, line, input){
+ var ref$;
+ return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8;
+ };
+ prototype.autoOutdent = function(state, doc, row){
+ var ref$;
+ return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8;
+ };
+ return LiveScriptMode;
+ }(require('../mode/text').Mode));
+ keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
+ stringfill = {
+ token: 'string',
+ regex: '.+'
+ };
+ LiveScriptMode.Rules = {
+ start: [
+ {
+ token: 'keyword',
+ regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
+ }, {
+ token: 'constant.language',
+ regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
+ }, {
+ token: 'invalid.illegal',
+ regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
+ }, {
+ token: 'language.support.class',
+ regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
+ }, {
+ token: 'language.support.function',
+ regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
+ }, {
+ token: 'variable.language',
+ regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
+ }, {
+ token: 'identifier',
+ regex: identifier + '\\s*:(?![:=])'
+ }, {
+ token: 'variable',
+ regex: identifier
+ }, {
+ token: 'keyword.operator',
+ regex: '(?:\\.{3}|\\s+\\?)'
+ }, {
+ token: 'keyword.variable',
+ regex: '(?:@+|::|\\.\\.)',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '\\.\\s*',
+ next: 'key'
+ }, {
+ token: 'string',
+ regex: '\\\\\\S[^\\s,;)}\\]]*'
+ }, {
+ token: 'string.doc',
+ regex: '\'\'\'',
+ next: 'qdoc'
+ }, {
+ token: 'string.doc',
+ regex: '"""',
+ next: 'qqdoc'
+ }, {
+ token: 'string',
+ regex: '\'',
+ next: 'qstring'
+ }, {
+ token: 'string',
+ regex: '"',
+ next: 'qqstring'
+ }, {
+ token: 'string',
+ regex: '`',
+ next: 'js'
+ }, {
+ token: 'string',
+ regex: '<\\[',
+ next: 'words'
+ }, {
+ token: 'string.regex',
+ regex: '//',
+ next: 'heregex'
+ }, {
+ token: 'comment.doc',
+ regex: '/\\*',
+ next: 'comment'
+ }, {
+ token: 'comment',
+ regex: '#.*'
+ }, {
+ token: 'string.regex',
+ regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
+ next: 'key'
+ }, {
+ token: 'constant.numeric',
+ regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
+ }, {
+ token: 'lparen',
+ regex: '[({[]'
+ }, {
+ token: 'rparen',
+ regex: '[)}\\]]',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '\\S+'
+ }, {
+ token: 'text',
+ regex: '\\s+'
+ }
+ ],
+ heregex: [
+ {
+ token: 'string.regex',
+ regex: '.*?//[gimy$?]{0,4}',
+ next: 'start'
+ }, {
+ token: 'string.regex',
+ regex: '\\s*#{'
+ }, {
+ token: 'comment.regex',
+ regex: '\\s+(?:#.*)?'
+ }, {
+ token: 'string.regex',
+ regex: '\\S+'
+ }
+ ],
+ key: [
+ {
+ token: 'keyword.operator',
+ regex: '[.?@!]+'
+ }, {
+ token: 'identifier',
+ regex: identifier,
+ next: 'start'
+ }, {
+ token: 'text',
+ regex: '.',
+ next: 'start'
+ }
+ ],
+ comment: [
+ {
+ token: 'comment.doc',
+ regex: '.*?\\*/',
+ next: 'start'
+ }, {
+ token: 'comment.doc',
+ regex: '.+'
+ }
+ ],
+ qdoc: [
+ {
+ token: 'string',
+ regex: ".*?'''",
+ next: 'key'
+ }, stringfill
+ ],
+ qqdoc: [
+ {
+ token: 'string',
+ regex: '.*?"""',
+ next: 'key'
+ }, stringfill
+ ],
+ qstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
+ next: 'key'
+ }, stringfill
+ ],
+ qqstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next: 'key'
+ }, stringfill
+ ],
+ js: [
+ {
+ token: 'string',
+ regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
+ next: 'key'
+ }, stringfill
+ ],
+ words: [
+ {
+ token: 'string',
+ regex: '.*?\\]>',
+ next: 'key'
+ }, stringfill
+ ]
+ };
+function extend$(sub, sup){
+ function fun(){} fun.prototype = (sub.superclass = sup).prototype;
+ (sub.prototype = new fun).constructor = sub;
+ if (typeof sup.extended == 'function') sup.extended(sub);
+ return sub;
+}
+function import$(obj, src){
+ var own = {}.hasOwnProperty;
+ for (var key in src) if (own.call(src, key)) obj[key] = src[key];
+ return obj;
+}
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/logiql.js b/src/fauxton/assets/js/libs/ace/mode/logiql.js
new file mode 100644
index 000000000..5abf7c839
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/logiql.js
@@ -0,0 +1,139 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = LogiQLHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+ if (/comment|string/.test(endState))
+ return indent;
+ if (tokens.length && tokens[tokens.length - 1].type == "comment.single")
+ return indent;
+
+ var match = line.match();
+ if (/(-->|<--|<-|->|{)\s*$/.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (this.$outdent.checkOutdent(line, input))
+ return true;
+
+ if (input !== "\n" && input !== "\r\n")
+ return false;
+
+ if (!/^\s+/.test(line))
+ return false;
+
+ return true;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ if (this.$outdent.autoOutdent(doc, row))
+ return;
+ var prevLine = doc.getLine(row);
+ var match = prevLine.match(/^\s+/);
+ var column = prevLine.lastIndexOf(".") + 1;
+ if (!match || !row || !column) return 0;
+
+ var line = doc.getLine(row + 1);
+ var startRange = this.getMatching(doc, {row: row, column: column});
+ if (!startRange || startRange.start.row == row) return 0;
+
+ column = match[0].length;
+ var indent = this.$getIndent(doc.getLine(startRange.start.row));
+ doc.replace(new Range(row + 1, 0, row + 1, column), indent);
+ };
+
+ this.getMatching = function(session, row, column) {
+ if (row == undefined)
+ row = session.selection.lead
+ if (typeof row == "object") {
+ column = row.column;
+ row = row.row;
+ }
+
+ var startToken = session.getTokenAt(row, column);
+ var KW_START = "keyword.start", KW_END = "keyword.end";
+ var tok;
+ if (!startToken)
+ return;
+ if (startToken.type == KW_START) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepForward;
+ } else if (startToken.type == KW_END) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepBackward;
+ } else
+ return;
+
+ while (tok = it.step()) {
+ if (tok.type == KW_START || tok.type == KW_END)
+ break;
+ }
+ if (!tok || tok.type == startToken.type)
+ return;
+
+ var col = it.getCurrentTokenColumn();
+ var row = it.getCurrentTokenRow();
+ return new Range(row, col, row, col + tok.value.length);
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/logiql_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/logiql_highlight_rules.js
new file mode 100644
index 000000000..f4e505d8b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/logiql_highlight_rules.js
@@ -0,0 +1,119 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* THIS FILE WAS AUTOGENERATED FROM tool\LogicBlox.tmbundle\Syntaxes\LogicBlox.tmLanguage (UUID: 59bf5022-e261-453f-b1cb-9f9fa0712413) */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LogiQLHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'comment.block',
+ regex: '/\\*',
+ push:
+ [ { token: 'comment.block', regex: '\\*/', next: 'pop' },
+ { defaultToken: 'comment.block' } ],
+ //A block comment.
+ },
+ { token: 'comment.single',
+ regex: '//.*',
+ //A single line comment.
+ },
+ { token: 'constant.numeric',
+ regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?',
+ //An integer constant.
+ //Or a Real number.
+ },
+ { token: 'string',
+ regex: '"',
+ push:
+ [ { token: 'string', regex: '"', next: 'pop' },
+ { defaultToken: 'string' } ],
+ //Strings
+ },
+ { token: 'constant.language',
+ regex: '\\b(true|false)\\b',
+ //Boolean values.
+ },
+ { token: 'entity.name.type.logicblox',
+ regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b',
+ //LogicBlox Symbol
+ },
+ { token: 'keyword.start', regex: '->', comment: 'Constraint' },
+ { token: 'keyword.start', regex: '-->', comment: 'Level 1 Constraint'},
+ { token: 'keyword.start', regex: '<-', comment: 'Rule' },
+ { token: 'keyword.start', regex: '<--', comment: 'Level 1 Rule' },
+ { token: 'keyword.end', regex: '\\.', comment: 'Terminator' },
+ { token: 'keyword.other', regex: '!', comment: 'Negation' },
+ { token: 'keyword.other', regex: ',', comment: 'Conjunction' },
+ { token: 'keyword.other', regex: ';', comment: 'Disjunction' },
+ { token: 'keyword.operator', regex: '<=|>=|!=|<|>', comment: 'Equality'},
+ { token: 'keyword.other', regex: '@', comment: 'Equality' },
+ { token: 'keyword.operator', regex: '\\+|-|\\*|/', comment: 'Arithmetic operations'},
+ { token: 'keyword', regex: '::', comment: 'Colon colon' },
+ { token: 'support.function',
+ regex: '\\b(agg\\s*<<)',
+ push:
+ [ { include: '$self' },
+ { token: 'support.function',
+ regex: '>>',
+ next: 'pop' } ],
+ //Aggregations
+ },
+ { token: 'storage.modifier',
+ regex: '\\b(lang:[\\w:]*)',
+ //All the lang system predicates
+ },
+ { token: [ 'storage.type', 'text' ],
+ regex: '(export|sealed|clauses|block|alias)(\\s*\\()(?=`)',
+ //Module keywords
+ },
+ { token: 'entity.name',
+ regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))',
+ //A predicate name.
+ },
+ { token: 'variable.parameter',
+ regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))',
+ //A variable to a functional predicate.
+ } ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(LogiQLHighlightRules, TextHighlightRules);
+
+exports.LogiQLHighlightRules = LogiQLHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/logiql_test.js b/src/fauxton/assets/js/libs/ace/mode/logiql_test.js
new file mode 100644
index 000000000..3e661829b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/logiql_test.js
@@ -0,0 +1,99 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LogiQLMode = require("./logiql").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new LogiQLMode();
+ },
+
+ "test: toggle comment lines should prepend '//' to each line" : function() {
+ var session = new EditSession([" abc", "cde", "fg"]);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal(["// abc", "// cde", "fg"].join("\n"), session.toString());
+ },
+
+ "test: auto indent after ->" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", "parent(a, b) ->", " "));
+ },
+
+ "test: auto indent after <--" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", "foo <-- ", " "));
+ },
+
+ "test: no auto indent in multi line comment" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", "/* -->", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", " /* ->", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("comment.block", " abcd", " "));
+ },
+
+ "test: no auto indent after -> in single line comment" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", "//->", " "));
+ assert.equal(" ", this.mode.getNextLineIndent("start", " //->", " "));
+ },
+
+ "test: trigger outdent if line ends with ." : function() {
+ assert.ok(this.mode.checkOutdent("start", " ", "\n"));
+ assert.ok(this.mode.checkOutdent("start", " a ", "\r\n"));
+ assert.ok(!this.mode.checkOutdent("start", "", "}"));
+ assert.ok(!this.mode.checkOutdent("start", " ", "a }"));
+ assert.ok(!this.mode.checkOutdent("start", " }", "}"));
+ },
+
+ "test: auto outdent should indent the line with the same indent as the line with the matching ->" : function() {
+ var session = new EditSession([" bar (a, b) ->", " foo(a)[1.2]", " bla.", " "], new LogiQLMode());
+ this.mode.autoOutdent("start", session, 2);
+ assert.equal(" ", session.getLine(3));
+ },
+
+ "test: no auto outdent if no matching brace is found" : function() {
+ var session = new EditSession([" bar (a, b) ->", " foo(a)[1.2].", " bla.", " "], new LogiQLMode());
+ this.mode.autoOutdent("start", session, 2);
+ assert.equal(" ", session.getLine(3));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/lsl.js b/src/fauxton/assets/js/libs/ace/mode/lsl.js
new file mode 100644
index 000000000..49ecd5343
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lsl.js
@@ -0,0 +1,92 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Rules = require("./lsl_highlight_rules").LSLHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var oop = require("../lib/oop");
+
+var Mode = function() {
+ this.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//"];
+
+ this.blockComment = {
+ start: "/*",
+ end: "*/"
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") {
+ return indent;
+ }
+
+ if (state === "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/lsl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/lsl_highlight_rules.js
new file mode 100644
index 000000000..752abc213
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lsl_highlight_rules.js
@@ -0,0 +1,363 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+oop.inherits(LSLHighlightRules, TextHighlightRules);
+
+function LSLHighlightRules() {
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI",
+ "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|" +
+ "AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|" +
+ "AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|" +
+ "AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|" +
+ "AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|" +
+ "ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|" +
+ "ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|" +
+ "ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|" +
+ "ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|" +
+ "ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|" +
+ "ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|" +
+ "ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|" +
+ "ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|" +
+ "AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|" +
+ "CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|" +
+ "CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|" +
+ "CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|" +
+ "CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|" +
+ "CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|" +
+ "CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|" +
+ "CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|" +
+ "CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|" +
+ "CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|" +
+ "CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|" +
+ "CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|" +
+ "CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|" +
+ "CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|" +
+ "CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|" +
+ "CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|" +
+ "CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|" +
+ "CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|" +
+ "CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|" +
+ "DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|" +
+ "ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|" +
+ "ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|" +
+ "ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FORCE_DIRECT_PATH|" +
+ "FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|" +
+ "HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|" +
+ "HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|" +
+ "INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|" +
+ "INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|" +
+ "INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|" +
+ "KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|" +
+ "KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|" +
+ "LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|" +
+ "LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|" +
+ "LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|" +
+ "LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|" +
+ "LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|" +
+ "OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|" +
+ "OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|" +
+ "OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|" +
+ "OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|" +
+ "OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|" +
+ "OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|" +
+ "OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|" +
+ "OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|" +
+ "PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|" +
+ "PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|" +
+ "PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|" +
+ "PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|" +
+ "PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|" +
+ "PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|" +
+ "PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|" +
+ "PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|" +
+ "PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|" +
+ "PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|" +
+ "PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|" +
+ "PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|" +
+ "PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|" +
+ "PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|" +
+ "PAY_DEFAULT|PAY_HIDE|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PERM_ALL|" +
+ "PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|" +
+ "PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|" +
+ "PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|" +
+ "PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|" +
+ "PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|" +
+ "PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|" +
+ "PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|" +
+ "PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|" +
+ "PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|" +
+ "PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|" +
+ "PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|" +
+ "PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|" +
+ "PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|" +
+ "PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|" +
+ "PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|" +
+ "PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|" +
+ "PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|" +
+ "PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|" +
+ "PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|" +
+ "PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_WHITELIST|" +
+ "PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_OMEGA|" +
+ "PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|" +
+ "PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POS_LOCAL|" +
+ "PRIM_POSITION|PRIM_ROT_LOCAL|PRIM_ROTATION|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|" +
+ "PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|" +
+ "PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|" +
+ "PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_TEMP_ON_REZ|" +
+ "PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|" +
+ "PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|" +
+ "PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|" +
+ "PROFILE_SCRIPT_MEMORY|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|" +
+ "PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|" +
+ "PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|" +
+ "PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_START_ALPHA|" +
+ "PSYS_PART_START_COLOR|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|" +
+ "PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|" +
+ "PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|" +
+ "PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|" +
+ "PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|" +
+ "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|" +
+ "PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|" +
+ "PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|" +
+ "PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|" +
+ "PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|" +
+ "PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|" +
+ "PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|RC_DATA_FLAGS|" +
+ "RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|" +
+ "RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|" +
+ "RC_REJECT_TYPES|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|" +
+ "REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|" +
+ "REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|" +
+ "REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|" +
+ "REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|" +
+ "RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|" +
+ "SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|" +
+ "STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|" +
+ "STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|" +
+ "STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|" +
+ "STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|" +
+ "STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|" +
+ "TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TYPE_FLOAT|" +
+ "TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|" +
+ "VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|" +
+ "VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|" +
+ "VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|" +
+ "VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|" +
+ "VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|" +
+ "VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|" +
+ "VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|" +
+ "VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|" +
+ "VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|" +
+ "VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|" +
+ "VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|" +
+ "VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|" +
+ "VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|" +
+ "VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS",
+ "constant.language.integer.boolean.lsl" : "FALSE|TRUE",
+ "constant.language.quaternion.lsl" : "ZERO_ROTATION",
+ "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_FALSE|JSON_INVALID|" +
+ "JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|" +
+ "TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|" +
+ "TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
+ "constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR",
+ "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH",
+ "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|CHARACTER_MAX_ANGULAR_ACCEL|" +
+ "CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|DATA_RATING|" +
+ "PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
+ "PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llCloud|" +
+ "llGodLikeRezObject|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|" +
+ "llRemoteDataSetRegion|llSetInventoryPermMask|llSetObjectPermMask|llSound|" +
+ "llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
+ "invalid.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
+ "invalid.illegal.lsl" : "print",
+ "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|" +
+ "CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|" +
+ "PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" +
+ "PSYS_SRC_OBJ_REL_MASK|event|llCollisionSprite|llPointAt|llRefreshPrimURL|" +
+ "llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "keyword.control.lsl" : "do|else|for|if|jump|return|while",
+ "storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector",
+ "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|" +
+ "llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|" +
+ "llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|" +
+ "llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|" +
+ "llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCastRay|" +
+ "llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|" +
+ "llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateLink|" +
+ "llCSV2List|llDeleteCharacter|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|" +
+ "llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|" +
+ "llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|" +
+ "llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|" +
+ "llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|" +
+ "llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llExecCharacterCmd|" +
+ "llEvade|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|" +
+ "llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|" +
+ "llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|" +
+ "llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|" +
+ "llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|" +
+ "llGetEnergy|llGetEnv|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGeometricCenter|" +
+ "llGetGMTclock|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|" +
+ "llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|" +
+ "llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|" +
+ "llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|" +
+ "llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMemoryLimit|" +
+ "llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|" +
+ "llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|" +
+ "llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|" +
+ "llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|" +
+ "llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|" +
+ "llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimitiveParams|" +
+ "llGetPrimMediaParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFlags|" +
+ "llGetRegionFPS|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|" +
+ "llGetRootRotation|llGetRot|llGetScale|llGetScriptName|llGetScriptState|" +
+ "llGetSimStats|llGetSimulatorHostname|llGetSPMaxMemory|llGetStartParameter|" +
+ "llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|" +
+ "llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|" +
+ "llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|" +
+ "llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|" +
+ "llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|" +
+ "llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|" +
+ "llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|" +
+ "llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|" +
+ "llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|" +
+ "llList2String|llList2Vector|llListen|llListenControl|llListenRemove|" +
+ "llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|" +
+ "llListStatistics|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|" +
+ "llLoopSoundSlave|llManageEstateAccess|llMapDestination|llMD5String|llMessageLinked|" +
+ "llMinEventDelay|llModifyLand|llModPow|llMoveToTarget|llNavigateTo|llOffsetTexture|" +
+ "llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|" +
+ "llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|" +
+ "llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|" +
+ "llPow|llPreloadSound|llPursue|llPushObject|llRegionSay|llRegionSayTo|" +
+ "llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|" +
+ "llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|" +
+ "llRequestAgentData|llRequestDisplayName|llRequestInventoryData|llRequestPermissions|" +
+ "llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|" +
+ "llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|" +
+ "llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|" +
+ "llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|" +
+ "llRot2Fwd|llRot2Left|llRot2Up|llRotateTexture|llRotBetween|llRotLookAt|" +
+ "llRotTarget|llRotTargetRemove|llRound|llSameGroup|llSay|llScaleTexture|" +
+ "llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|" +
+ "llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|" +
+ "llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|" +
+ "llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|" +
+ "llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|" +
+ "llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|" +
+ "llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|" +
+ "llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimitiveParams|llSetPrimMediaParams|" +
+ "llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|" +
+ "llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|" +
+ "llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|" +
+ "llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|" +
+ "llSetVehicleVectorParam|llSetVelocity|llSHA1String|llShout|llSin|llSitTarget|" +
+ "llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|" +
+ "llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|" +
+ "llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|" +
+ "llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|" +
+ "llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|" +
+ "llUnescapeURL|llUnSit|llUpdateCharacter|llVecDist|llVecMag|llVecNorm|" +
+ "llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
+ "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|" +
+ "collision_end|collision_start|control|dataserver|email|http_request|" +
+ "http_response|land_collision|land_collision_end|land_collision_start|" +
+ "link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|" +
+ "not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|" +
+ "sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment.line.double-slash.lsl",
+ regex : "\\/\\/.*$"
+ }, {
+ token : "comment.block.lsl",
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.quoted.double.lsl",
+ start : '"',
+ end : '"',
+ next : [{
+ token : "constant.language.escape.lsl", regex : /\\[tn"\\]/
+ }]
+ }, {
+ token : "constant.numeric.lsl",
+ regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
+ }, {
+ token : "entity.name.state.lsl",
+ regex : "\\b((state)\\s+\\w+|default)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "support.function.user-defined.lsl",
+ regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/
+ }, {
+ token : "keyword.operator.lsl",
+ regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
+ }, {
+ token : "punctuation.operator.lsl",
+ regex : "\\,|\\;"
+ }, {
+ token : "paren.lparen.lsl",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen.lsl",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text.lsl",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.block.lsl",
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment.block.lsl",
+ regex : ".+"
+ }
+ ]
+ };
+ this.normalizeRules();
+}
+
+exports.LSLHighlightRules = LSLHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/lua.js b/src/fauxton/assets/js/libs/ace/mode/lua.js
new file mode 100644
index 000000000..924682428
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lua.js
@@ -0,0 +1,168 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = LuaHighlightRules;
+
+ this.foldingRules = new LuaFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "--[", end: "]--"};
+
+ var indentKeywords = {
+ "function": 1,
+ "then": 1,
+ "do": 1,
+ "else": 1,
+ "elseif": 1,
+ "repeat": 1,
+ "end": -1,
+ "until": -1
+ };
+ var outdentKeywords = [
+ "else",
+ "elseif",
+ "end",
+ "until"
+ ];
+
+ function getNetIndentLevel(tokens) {
+ var level = 0;
+ // Support single-line blocks by decrementing the indent level if
+ // an ending token is found
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token.type == "keyword") {
+ if (token.value in indentKeywords) {
+ level += indentKeywords[token.value];
+ }
+ } else if (token.type == "paren.lparen") {
+ level ++;
+ } else if (token.type == "paren.rparen") {
+ level --;
+ }
+ }
+ // Limit the level to +/- 1 since usually users only indent one level
+ // at a time regardless of the logical nesting level
+ if (level < 0) {
+ return -1;
+ } else if (level > 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var level = 0;
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (state == "start") {
+ level = getNetIndentLevel(tokens);
+ }
+ if (level > 0) {
+ return indent + tab;
+ } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) {
+ // Don't do a next-line outdent if we're going to do a real outdent of this line
+ if (!this.checkOutdent(state, line, "\n")) {
+ return indent.substr(0, indent.length - tab.length);
+ }
+ }
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input != "\n" && input != "\r" && input != "\r\n")
+ return false;
+
+ if (line.match(/^\s*[\)\}\]]$/))
+ return true;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens || !tokens.length)
+ return false;
+
+ return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine).length;
+ var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens;
+ var tabLength = session.getTabString().length;
+ var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens);
+ var curIndent = this.$getIndent(session.getLine(row)).length;
+ if (curIndent < expectedIndent) {
+ // User already outdented //
+ return;
+ }
+ session.outdentRows(new Range(row, 0, row + 2, 0));
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/lua/luaparse.js b/src/fauxton/assets/js/libs/ace/mode/lua/luaparse.js
new file mode 100644
index 000000000..75efb1536
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lua/luaparse.js
@@ -0,0 +1,1989 @@
+define(function(require, exports, module) {
+/*global exports:true module:true require:true define:true global:true */
+
+(function (root, name, factory) {
+ factory(exports)
+}(this, 'luaparse', function (exports) {
+ 'use strict';
+
+ exports.version = '0.1.4';
+
+ var input, options, length;
+
+ // Options can be set either globally on the parser object through
+ // defaultOptions, or during the parse call.
+ var defaultOptions = exports.defaultOptions = {
+ // Explicitly tell the parser when the input ends.
+ wait: false
+ // Store comments as an array in the chunk object.
+ , comments: true
+ // Track identifier scopes by adding an isLocal attribute to each
+ // identifier-node.
+ , scope: false
+ // Store location information on each syntax node as
+ // `loc: { start: { line, column }, end: { line, column } }`.
+ , locations: false
+ // Store the start and end character locations on each syntax node as
+ // `range: [start, end]`.
+ , ranges: false
+ };
+
+ // The available tokens expressed as enum flags so they can be checked with
+ // bitwise operations.
+
+ var EOF = 1, StringLiteral = 2, Keyword = 4, Identifier = 8
+ , NumericLiteral = 16, Punctuator = 32, BooleanLiteral = 64
+ , NilLiteral = 128, VarargLiteral = 256;
+
+ exports.tokenTypes = { EOF: EOF, StringLiteral: StringLiteral
+ , Keyword: Keyword, Identifier: Identifier, NumericLiteral: NumericLiteral
+ , Punctuator: Punctuator, BooleanLiteral: BooleanLiteral
+ , NilLiteral: NilLiteral, VarargLiteral: VarargLiteral
+ };
+
+ // As this parser is a bit different from luas own, the error messages
+ // will be different in some situations.
+
+ var errors = exports.errors = {
+ unexpected: 'Unexpected %1 \'%2\' near \'%3\''
+ , expected: '\'%1\' expected near \'%2\''
+ , expectedToken: '%1 expected near \'%2\''
+ , unfinishedString: 'unfinished string near \'%1\''
+ , malformedNumber: 'malformed number near \'%1\''
+ };
+
+ // ### Abstract Syntax Tree
+ //
+ // The default AST structure is inspired by the Mozilla Parser API but can
+ // easily be customized by overriding these functions.
+
+ var ast = exports.ast = {
+ labelStatement: function(label) {
+ return {
+ type: 'LabelStatement'
+ , label: label
+ };
+ }
+
+ , breakStatement: function() {
+ return {
+ type: 'BreakStatement'
+ };
+ }
+
+ , gotoStatement: function(label) {
+ return {
+ type: 'GotoStatement'
+ , label: label
+ };
+ }
+
+ , returnStatement: function(args) {
+ return {
+ type: 'ReturnStatement'
+ , 'arguments': args
+ };
+ }
+
+ , ifStatement: function(clauses) {
+ return {
+ type: 'IfStatement'
+ , clauses: clauses
+ };
+ }
+ , ifClause: function(condition, body) {
+ return {
+ type: 'IfClause'
+ , condition: condition
+ , body: body
+ };
+ }
+ , elseifClause: function(condition, body) {
+ return {
+ type: 'ElseifClause'
+ , condition: condition
+ , body: body
+ };
+ }
+ , elseClause: function(body) {
+ return {
+ type: 'ElseClause'
+ , body: body
+ };
+ }
+
+ , whileStatement: function(condition, body) {
+ return {
+ type: 'WhileStatement'
+ , condition: condition
+ , body: body
+ };
+ }
+
+ , doStatement: function(body) {
+ return {
+ type: 'DoStatement'
+ , body: body
+ };
+ }
+
+ , repeatStatement: function(condition, body) {
+ return {
+ type: 'RepeatStatement'
+ , condition: condition
+ , body: body
+ };
+ }
+
+ , localStatement: function(variables, init) {
+ return {
+ type: 'LocalStatement'
+ , variables: variables
+ , init: init
+ };
+ }
+
+ , assignmentStatement: function(variables, init) {
+ return {
+ type: 'AssignmentStatement'
+ , variables: variables
+ , init: init
+ };
+ }
+
+ , callStatement: function(expression) {
+ return {
+ type: 'CallStatement'
+ , expression: expression
+ };
+ }
+
+ , functionStatement: function(identifier, parameters, isLocal, body) {
+ return {
+ type: 'FunctionDeclaration'
+ , identifier: identifier
+ , isLocal: isLocal
+ , parameters: parameters
+ , body: body
+ };
+ }
+
+ , forNumericStatement: function(variable, start, end, step, body) {
+ return {
+ type: 'ForNumericStatement'
+ , variable: variable
+ , start: start
+ , end: end
+ , step: step
+ , body: body
+ };
+ }
+
+ , forGenericStatement: function(variables, iterators, body) {
+ return {
+ type: 'ForGenericStatement'
+ , variables: variables
+ , iterators: iterators
+ , body: body
+ };
+ }
+
+ , chunk: function(body) {
+ return {
+ type: 'Chunk'
+ , body: body
+ };
+ }
+
+ , identifier: function(name) {
+ return {
+ type: 'Identifier'
+ , name: name
+ };
+ }
+
+ , literal: function(type, value, raw) {
+ type = (type === StringLiteral) ? 'StringLiteral'
+ : (type === NumericLiteral) ? 'NumericLiteral'
+ : (type === BooleanLiteral) ? 'BooleanLiteral'
+ : (type === NilLiteral) ? 'NilLiteral'
+ : 'VarargLiteral';
+
+ return {
+ type: type
+ , value: value
+ , raw: raw
+ };
+ }
+
+ , tableKey: function(key, value) {
+ return {
+ type: 'TableKey'
+ , key: key
+ , value: value
+ };
+ }
+ , tableKeyString: function(key, value) {
+ return {
+ type: 'TableKeyString'
+ , key: key
+ , value: value
+ };
+ }
+ , tableValue: function(value) {
+ return {
+ type: 'TableValue'
+ , value: value
+ };
+ }
+
+
+ , tableConstructorExpression: function(fields) {
+ return {
+ type: 'TableConstructorExpression'
+ , fields: fields
+ };
+ }
+ , binaryExpression: function(operator, left, right) {
+ var type = ('and' === operator || 'or' === operator) ?
+ 'LogicalExpression' :
+ 'BinaryExpression';
+
+ return {
+ type: type
+ , operator: operator
+ , left: left
+ , right: right
+ };
+ }
+ , unaryExpression: function(operator, argument) {
+ return {
+ type: 'UnaryExpression'
+ , operator: operator
+ , argument: argument
+ };
+ }
+ , memberExpression: function(base, indexer, identifier) {
+ return {
+ type: 'MemberExpression'
+ , indexer: indexer
+ , identifier: identifier
+ , base: base
+ };
+ }
+
+ , indexExpression: function(base, index) {
+ return {
+ type: 'IndexExpression'
+ , base: base
+ , index: index
+ };
+ }
+
+ , callExpression: function(base, args) {
+ return {
+ type: 'CallExpression'
+ , base: base
+ , 'arguments': args
+ };
+ }
+
+ , tableCallExpression: function(base, args) {
+ return {
+ type: 'TableCallExpression'
+ , base: base
+ , 'arguments': args
+ };
+ }
+
+ , stringCallExpression: function(base, argument) {
+ return {
+ type: 'StringCallExpression'
+ , base: base
+ , argument: argument
+ };
+ }
+
+ , comment: function(value, raw) {
+ return {
+ type: 'Comment'
+ , value: value
+ , raw: raw
+ };
+ }
+ };
+
+ // Wrap up the node object.
+
+ function finishNode(node) {
+ // Pop a `Marker` off the location-array and attach its location data.
+ if (trackLocations) {
+ var location = locations.pop();
+ location.complete();
+ if (options.locations) node.loc = location.loc;
+ if (options.ranges) node.range = location.range;
+ }
+ return node;
+ }
+
+
+
+ // Helpers
+ // -------
+
+ var slice = Array.prototype.slice
+ , toString = Object.prototype.toString
+ , indexOf = function indexOf(array, element) {
+ for (var i = 0, length = array.length; i < length; i++) {
+ if (array[i] === element) return i;
+ }
+ return -1;
+ };
+
+ // Iterate through an array of objects and return the index of an object
+ // with a matching property.
+
+ function indexOfObject(array, property, element) {
+ for (var i = 0, length = array.length; i < length; i++) {
+ if (array[i][property] === element) return i;
+ }
+ return -1;
+ }
+
+ // A sprintf implementation using %index (beginning at 1) to input
+ // arguments in the format string.
+ //
+ // Example:
+ //
+ // // Unexpected function in token
+ // sprintf('Unexpected %2 in %1.', 'token', 'function');
+
+ function sprintf(format) {
+ var args = slice.call(arguments, 1);
+ format = format.replace(/%(\d)/g, function (match, index) {
+ return '' + args[index - 1] || '';
+ });
+ return format;
+ }
+
+ // Returns a new object with the properties from all objectes passed as
+ // arguments. Last argument takes precedence.
+ //
+ // Example:
+ //
+ // this.options = extend(options, { output: false });
+
+ function extend() {
+ var args = slice.call(arguments)
+ , dest = {}
+ , src, prop;
+
+ for (var i = 0, length = args.length; i < length; i++) {
+ src = args[i];
+ for (prop in src) if (src.hasOwnProperty(prop)) {
+ dest[prop] = src[prop];
+ }
+ }
+ return dest;
+ }
+
+ // ### Error functions
+
+ // #### Raise an exception.
+ //
+ // Raise an exception by passing a token, a string format and its paramters.
+ //
+ // The passed tokens location will automatically be added to the error
+ // message if it exists, if not it will default to the lexers current
+ // position.
+ //
+ // Example:
+ //
+ // // [1:0] expected [ near (
+ // raise(token, "expected %1 near %2", '[', token.value);
+
+ function raise(token) {
+ var message = sprintf.apply(null, slice.call(arguments, 1))
+ , error, col;
+
+ if ('undefined' !== typeof token.line) {
+ col = token.range[0] - token.lineStart;
+ error = new SyntaxError(sprintf('[%1:%2] %3', token.line, col, message));
+ error.line = token.line;
+ error.index = token.range[0];
+ error.column = col;
+ } else {
+ col = index - lineStart + 1;
+ error = new SyntaxError(sprintf('[%1:%2] %3', line, col, message));
+ error.index = index;
+ error.line = line;
+ error.column = col;
+ }
+ throw error;
+ }
+
+ // #### Raise an unexpected token error.
+ //
+ // Example:
+ //
+ // // expected <name> near '0'
+ // raiseUnexpectedToken('<name>', token);
+
+ function raiseUnexpectedToken(type, token) {
+ raise(token, errors.expectedToken, type, token.value);
+ }
+
+ // #### Raise a general unexpected error
+ //
+ // Usage should pass either a token object or a symbol string which was
+ // expected. We can also specify a nearby token such as <eof>, this will
+ // default to the currently active token.
+ //
+ // Example:
+ //
+ // // Unexpected symbol 'end' near '<eof>'
+ // unexpected(token);
+ //
+ // If there's no token in the buffer it means we have reached <eof>.
+
+ function unexpected(found, near) {
+ if ('undefined' === typeof near) near = lookahead.value;
+ if ('undefined' !== typeof found.type) {
+ var type;
+ switch (found.type) {
+ case StringLiteral: type = 'string'; break;
+ case Keyword: type = 'keyword'; break;
+ case Identifier: type = 'identifier'; break;
+ case NumericLiteral: type = 'number'; break;
+ case Punctuator: type = 'symbol'; break;
+ case BooleanLiteral: type = 'boolean'; break;
+ case NilLiteral:
+ return raise(found, errors.unexpected, 'symbol', 'nil', near);
+ }
+ return raise(found, errors.unexpected, type, found.value, near);
+ }
+ return raise(found, errors.unexpected, 'symbol', found, near);
+ }
+
+ // Lexer
+ // -----
+ //
+ // The lexer, or the tokenizer reads the input string character by character
+ // and derives a token left-right. To be as efficient as possible the lexer
+ // prioritizes the common cases such as identifiers. It also works with
+ // character codes instead of characters as string comparisons was the
+ // biggest bottleneck of the parser.
+ //
+ // If `options.comments` is enabled, all comments encountered will be stored
+ // in an array which later will be appended to the chunk object. If disabled,
+ // they will simply be disregarded.
+ //
+ // When the lexer has derived a valid token, it will be returned as an object
+ // containing its value and as well as its position in the input string (this
+ // is always enabled to provide proper debug messages).
+ //
+ // `lex()` starts lexing and returns the following token in the stream.
+
+ var index
+ , token
+ , previousToken
+ , lookahead
+ , comments
+ , tokenStart
+ , line
+ , lineStart;
+
+ exports.lex = lex;
+
+ function lex() {
+ skipWhiteSpace();
+
+ // Skip comments beginning with --
+ while (45 === input.charCodeAt(index) &&
+ 45 === input.charCodeAt(index + 1)) {
+ scanComment();
+ skipWhiteSpace();
+ }
+ if (index >= length) return {
+ type : EOF
+ , value: '<eof>'
+ , line: line
+ , lineStart: lineStart
+ , range: [index, index]
+ };
+
+ var charCode = input.charCodeAt(index)
+ , next = input.charCodeAt(index + 1);
+
+ // Memorize the range index where the token begins.
+ tokenStart = index;
+ if (isIdentifierStart(charCode)) return scanIdentifierOrKeyword();
+
+ switch (charCode) {
+ case 39: case 34: // '"
+ return scanStringLiteral();
+
+ // 0-9
+ case 48: case 49: case 50: case 51: case 52: case 53:
+ case 54: case 55: case 56: case 57:
+ return scanNumericLiteral();
+
+ case 46: // .
+ // If the dot is followed by a digit it's a float.
+ if (isDecDigit(next)) return scanNumericLiteral();
+ if (46 === next) {
+ if (46 === input.charCodeAt(index + 2)) return scanVarargLiteral();
+ return scanPunctuator('..');
+ }
+ return scanPunctuator('.');
+
+ case 61: // =
+ if (61 === next) return scanPunctuator('==');
+ return scanPunctuator('=');
+
+ case 62: // >
+ if (61 === next) return scanPunctuator('>=');
+ return scanPunctuator('>');
+
+ case 60: // <
+ if (61 === next) return scanPunctuator('<=');
+ return scanPunctuator('<');
+
+ case 126: // ~
+ if (61 === next) return scanPunctuator('~=');
+ return raise({}, errors.expected, '=', '~');
+
+ case 58: // :
+ if (58 === next) return scanPunctuator('::');
+ return scanPunctuator(':');
+
+ case 91: // [
+ // Check for a multiline string, they begin with [= or [[
+ if (91 === next || 61 === next) return scanLongStringLiteral();
+ return scanPunctuator('[');
+
+ // \* / ^ % , { } ] ( ) ; # - +
+ case 42: case 47: case 94: case 37: case 44: case 123: case 125:
+ case 93: case 40: case 41: case 59: case 35: case 45: case 43:
+ return scanPunctuator(input.charAt(index));
+ }
+
+ return unexpected(input.charAt(index));
+ }
+
+ // Whitespace has no semantic meaning in lua so simply skip ahead while
+ // tracking the encounted newlines. Newlines are also tracked in all
+ // token functions where multiline values are allowed.
+
+ function skipWhiteSpace() {
+ while (index < length) {
+ var charCode = input.charCodeAt(index);
+ if (isWhiteSpace(charCode)) {
+ index++;
+ } else if (isLineTerminator(charCode)) {
+ line++;
+ lineStart = ++index;
+ } else {
+ break;
+ }
+ }
+ }
+
+ // Identifiers, keywords, booleans and nil all look the same syntax wise. We
+ // simply go through them one by one and defaulting to an identifier if no
+ // previous case matched.
+
+ function scanIdentifierOrKeyword() {
+ var value, type;
+
+ // Slicing the input string is prefered before string concatenation in a
+ // loop for performance reasons.
+ while (isIdentifierPart(input.charCodeAt(++index)));
+ value = input.slice(tokenStart, index);
+
+ // Decide on the token type and possibly cast the value.
+ if (isKeyword(value)) {
+ type = Keyword;
+ } else if ('true' === value || 'false' === value) {
+ type = BooleanLiteral;
+ value = ('true' === value);
+ } else if ('nil' === value) {
+ type = NilLiteral;
+ value = null;
+ } else {
+ type = Identifier;
+ }
+
+ return {
+ type: type
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // Once a punctuator reaches this function it should already have been
+ // validated so we simply return it as a token.
+
+ function scanPunctuator(value) {
+ index += value.length;
+ return {
+ type: Punctuator
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // A vararg literal consists of three dots.
+
+ function scanVarargLiteral() {
+ index += 3;
+ return {
+ type: VarargLiteral
+ , value: '...'
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // Find the string literal by matching the delimiter marks used.
+
+ function scanStringLiteral() {
+ var delimiter = input.charCodeAt(index++)
+ , stringStart = index
+ , string = ''
+ , charCode;
+
+ while (index < length) {
+ charCode = input.charCodeAt(index++);
+ if (delimiter === charCode) break;
+ if (92 === charCode) { // \
+ string += input.slice(stringStart, index - 1) + readEscapeSequence();
+ stringStart = index;
+ }
+ // EOF or `\n` terminates a string literal. If we haven't found the
+ // ending delimiter by now, raise an exception.
+ else if (index >= length || isLineTerminator(charCode)) {
+ string += input.slice(stringStart, index - 1);
+ raise({}, errors.unfinishedString, string + String.fromCharCode(charCode));
+ }
+ }
+ string += input.slice(stringStart, index - 1);
+
+ return {
+ type: StringLiteral
+ , value: string
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // Expect a multiline string literal and return it as a regular string
+ // literal, if it doesn't validate into a valid multiline string, throw an
+ // exception.
+
+ function scanLongStringLiteral() {
+ var string = readLongString();
+ // Fail if it's not a multiline literal.
+ if (false === string) raise(token, errors.expected, '[', token.value);
+
+ return {
+ type: StringLiteral
+ , value: string
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // Numeric literals will be returned as floating-point numbers instead of
+ // strings. The raw value should be retrieved from slicing the input string
+ // later on in the process.
+ //
+ // If a hexadecimal number is encountered, it will be converted.
+
+ function scanNumericLiteral() {
+ var character = input.charAt(index)
+ , next = input.charAt(index + 1);
+
+ var value = ('0' === character && 'xX'.indexOf(next || null) >= 0) ?
+ readHexLiteral() : readDecLiteral();
+
+ return {
+ type: NumericLiteral
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ // Lua hexadecimals have an optional fraction part and an optional binary
+ // exoponent part. These are not included in JavaScript so we will compute
+ // all three parts separately and then sum them up at the end of the function
+ // with the following algorithm.
+ //
+ // Digit := toDec(digit)
+ // Fraction := toDec(fraction) / 16 ^ fractionCount
+ // BinaryExp := 2 ^ binaryExp
+ // Number := ( Digit + Fraction ) * BinaryExp
+
+ function readHexLiteral() {
+ var fraction = 0 // defaults to 0 as it gets summed
+ , binaryExponent = 1 // defaults to 1 as it gets multiplied
+ , binarySign = 1 // positive
+ , digit, fractionStart, exponentStart, digitStart;
+
+ digitStart = index += 2; // Skip 0x part
+
+ // A minimum of one hex digit is required.
+ if (!isHexDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isHexDigit(input.charCodeAt(index))) index++;
+ // Convert the hexadecimal digit to base 10.
+ digit = parseInt(input.slice(digitStart, index), 16);
+
+ // Fraction part i optional.
+ if ('.' === input.charAt(index)) {
+ fractionStart = ++index;
+
+ while (isHexDigit(input.charCodeAt(index))) index++;
+ fraction = input.slice(fractionStart, index);
+
+ // Empty fraction parts should default to 0, others should be converted
+ // 0.x form so we can use summation at the end.
+ fraction = (fractionStart === index) ? 0
+ : parseInt(fraction, 16) / Math.pow(16, index - fractionStart);
+ }
+
+ // Binary exponents are optional
+ if ('pP'.indexOf(input.charAt(index) || null) >= 0) {
+ index++;
+
+ // Sign part is optional and defaults to 1 (positive).
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0)
+ binarySign = ('+' === input.charAt(index++)) ? 1 : -1;
+
+ exponentStart = index;
+
+ // The binary exponent sign requires a decimal digit.
+ if (!isDecDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ binaryExponent = input.slice(exponentStart, index);
+
+ // Calculate the binary exponent of the number.
+ binaryExponent = Math.pow(2, binaryExponent * binarySign);
+ }
+
+ return (digit + fraction) * binaryExponent;
+ }
+
+ // Decimal numbers are exactly the same in Lua and in JavaScript, because of
+ // this we check where the token ends and then parse it with native
+ // functions.
+
+ function readDecLiteral() {
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ // Fraction part is optional
+ if ('.' === input.charAt(index)) {
+ index++;
+ // Fraction part defaults to 0
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ }
+ // Exponent part is optional.
+ if ('eE'.indexOf(input.charAt(index) || null) >= 0) {
+ index++;
+ // Sign part is optional.
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0) index++;
+ // An exponent is required to contain at least one decimal digit.
+ if (!isDecDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ }
+
+ return parseFloat(input.slice(tokenStart, index));
+ }
+
+
+ // Translate escape sequences to the actual characters.
+
+ function readEscapeSequence() {
+ var sequenceStart = index;
+ switch (input.charAt(index)) {
+ // Lua allow the following escape sequences.
+ // We don't escape the bell sequence.
+ case 'n': index++; return '\n';
+ case 'r': index++; return '\r';
+ case 't': index++; return '\t';
+ case 'v': index++; return '\x0B';
+ case 'b': index++; return '\b';
+ case 'f': index++; return '\f';
+ // Skips the following span of white-space.
+ case 'z': index++; skipWhiteSpace(); return '';
+ // Byte representation should for now be returned as is.
+ case 'x':
+ // \xXX, where XX is a sequence of exactly two hexadecimal digits
+ if (isHexDigit(input.charCodeAt(index + 1)) &&
+ isHexDigit(input.charCodeAt(index + 2))) {
+ index += 3;
+ // Return it as is, without translating the byte.
+ return '\\' + input.slice(sequenceStart, index);
+ }
+ return '\\' + input.charAt(index++);
+ default:
+ // \ddd, where ddd is a sequence of up to three decimal digits.
+ if (isDecDigit(input.charCodeAt(index))) {
+ while (isDecDigit(input.charCodeAt(++index)));
+ return '\\' + input.slice(sequenceStart, index);
+ }
+ // Simply return the \ as is, it's not escaping any sequence.
+ return input.charAt(index++);
+ }
+ }
+
+ // Comments begin with -- after which it will be decided if they are
+ // multiline comments or not.
+ //
+ // The multiline functionality works the exact same way as with string
+ // literals so we reuse the functionality.
+
+ function scanComment() {
+ tokenStart = index;
+ index += 2; // --
+
+ var character = input.charAt(index)
+ , content = ''
+ , isLong = false
+ , commentStart = index
+ , lineStartComment = lineStart
+ , lineComment = line;
+
+ if ('[' === character) {
+ content = readLongString();
+ // This wasn't a multiline comment after all.
+ if (false === content) content = character;
+ else isLong = true;
+ }
+ // Scan until next line as long as it's not a multiline comment.
+ if (!isLong) {
+ while (index < length) {
+ if (isLineTerminator(input.charCodeAt(index))) break;
+ index++;
+ }
+ if (options.comments) content = input.slice(commentStart, index);
+ }
+
+ if (options.comments) {
+ var node = ast.comment(content, input.slice(tokenStart, index));
+
+ // `Marker`s depend on tokens available in the parser and as comments are
+ // intercepted in the lexer all location data is set manually.
+ if (options.locations) {
+ node.loc = {
+ start: { line: lineComment, column: tokenStart - lineStartComment }
+ , end: { line: line, column: index - lineStart }
+ };
+ }
+ if (options.ranges) {
+ node.range = [tokenStart, index];
+ }
+ comments.push(node);
+ }
+ }
+
+ // Read a multiline string by calculating the depth of `=` characters and
+ // then appending until an equal depth is found.
+
+ function readLongString() {
+ var level = 0
+ , content = ''
+ , terminator = false
+ , character, stringStart;
+
+ index++; // [
+
+ // Calculate the depth of the comment.
+ while ('=' === input.charAt(index + level)) level++;
+ // Exit, this is not a long string afterall.
+ if ('[' !== input.charAt(index + level)) return false;
+
+ index += level + 1;
+
+ // If the first character is a newline, ignore it and begin on next line.
+ if (isLineTerminator(input.charCodeAt(index))) {
+ line++;
+ lineStart = index++;
+ }
+
+ stringStart = index;
+ while (index < length) {
+ character = input.charAt(index++);
+
+ // We have to keep track of newlines as `skipWhiteSpace()` does not get
+ // to scan this part.
+ if (isLineTerminator(character.charCodeAt(0))) {
+ line++;
+ lineStart = index;
+ }
+
+ // Once the delimiter is found, iterate through the depth count and see
+ // if it matches.
+ if (']' === character) {
+ terminator = true;
+ for (var i = 0; i < level; i++) {
+ if ('=' !== input.charAt(index + i)) terminator = false;
+ }
+ if (']' !== input.charAt(index + level)) terminator = false;
+ }
+
+ // We reached the end of the multiline string. Get out now.
+ if (terminator) break;
+ }
+ content += input.slice(stringStart, index - 1);
+ index += level + 1;
+
+ return content;
+ }
+
+ // ## Lex functions and helpers.
+
+ // Read the next token.
+ //
+ // This is actually done by setting the current token to the lookahead and
+ // reading in the new lookahead token.
+
+ function next() {
+ previousToken = token;
+ token = lookahead;
+ lookahead = lex();
+ }
+
+ // Consume a token if its value matches. Once consumed or not, return the
+ // success of the operation.
+
+ function consume(value) {
+ if (value === token.value) {
+ next();
+ return true;
+ }
+ return false;
+ }
+
+ // Expect the next token value to match. If not, throw an exception.
+
+ function expect(value) {
+ if (value === token.value) next();
+ else raise(token, errors.expected, value, token.value);
+ }
+
+ // ### Validation functions
+
+ function isWhiteSpace(charCode) {
+ return 9 === charCode || 32 === charCode || 0xB === charCode || 0xC === charCode;
+ }
+
+ function isLineTerminator(charCode) {
+ return 10 === charCode || 13 === charCode;
+ }
+
+ function isDecDigit(charCode) {
+ return charCode >= 48 && charCode <= 57;
+ }
+
+ function isHexDigit(charCode) {
+ return (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70);
+ }
+
+ // From [Lua 5.2](http://www.lua.org/manual/5.2/manual.html#8.1) onwards
+ // identifiers cannot use locale-dependet letters.
+
+ function isIdentifierStart(charCode) {
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode;
+ }
+
+ function isIdentifierPart(charCode) {
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57);
+ }
+
+ // [3.1 Lexical Conventions](http://www.lua.org/manual/5.2/manual.html#3.1)
+ //
+ // `true`, `false` and `nil` will not be considered keywords, but literals.
+
+ function isKeyword(id) {
+ switch (id.length) {
+ case 2:
+ return 'do' === id || 'if' === id || 'in' === id || 'or' === id;
+ case 3:
+ return 'and' === id || 'end' === id || 'for' === id || 'not' === id;
+ case 4:
+ return 'else' === id || 'goto' === id || 'then' === id;
+ case 5:
+ return 'break' === id || 'local' === id || 'until' === id || 'while' === id;
+ case 6:
+ return 'elseif' === id || 'repeat' === id || 'return' === id;
+ case 8:
+ return 'function' === id;
+ }
+ return false;
+ }
+
+ function isUnary(token) {
+ if (Punctuator === token.type) return '#-'.indexOf(token.value) >= 0;
+ if (Keyword === token.type) return 'not' === token.value;
+ return false;
+ }
+
+ // @TODO this needs to be rethought.
+ function isCallExpression(expression) {
+ switch (expression.type) {
+ case 'CallExpression':
+ case 'TableCallExpression':
+ case 'StringCallExpression':
+ return true;
+ }
+ return false;
+ }
+
+ // Check if the token syntactically closes a block.
+
+ function isBlockFollow(token) {
+ if (EOF === token.type) return true;
+ if (Keyword !== token.type) return false;
+ switch (token.value) {
+ case 'else': case 'elseif':
+ case 'end': case 'until':
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ // Scope
+ // -----
+
+ // Store each block scope as a an array of identifier names. Each scope is
+ // stored in an FILO-array.
+ var scopes
+ // The current scope index
+ , scopeDepth
+ // A list of all global identifier nodes.
+ , globals;
+
+ // Create a new scope inheriting all declarations from the previous scope.
+ function createScope() {
+ scopes.push(Array.apply(null, scopes[scopeDepth++]));
+ }
+
+ // Exit and remove the current scope.
+ function exitScope() {
+ scopes.pop();
+ scopeDepth--;
+ }
+
+ // Add identifier name to the current scope if it doesnt already exist.
+ function scopeIdentifierName(name) {
+ if (-1 !== indexOf(scopes[scopeDepth], name)) return;
+ scopes[scopeDepth].push(name);
+ }
+
+ // Add identifier to the current scope
+ function scopeIdentifier(node) {
+ scopeIdentifierName(node.name);
+ attachScope(node, true);
+ }
+
+ // Attach scope information to node. If the node is global, store it in the
+ // globals array so we can return the information to the user.
+ function attachScope(node, isLocal) {
+ if (!isLocal && -1 === indexOfObject(globals, 'name', node.name))
+ globals.push(node);
+
+ node.isLocal = isLocal;
+ }
+
+ // Is the identifier name available in this scope.
+ function scopeHasName(name) {
+ return (-1 !== indexOf(scopes[scopeDepth], name));
+ }
+
+ // Location tracking
+ // -----------------
+ //
+ // Locations are stored in FILO-array as a `Marker` object consisting of both
+ // `loc` and `range` data. Once a `Marker` is popped off the list an end
+ // location is added and the data is attached to a syntax node.
+
+ var locations = []
+ , trackLocations;
+
+ function createLocationMarker() {
+ return new Marker(token);
+ }
+
+ function Marker(token) {
+ if (options.locations) {
+ this.loc = {
+ start: {
+ line: token.line
+ , column: token.range[0] - token.lineStart
+ }
+ , end: {
+ line: 0
+ , column: 0
+ }
+ };
+ }
+ if (options.ranges) this.range = [token.range[0], 0];
+ }
+
+ // Complete the location data stored in the `Marker` by adding the location
+ // of the *previous token* as an end location.
+ Marker.prototype.complete = function() {
+ if (options.locations) {
+ this.loc.end.line = previousToken.line;
+ this.loc.end.column = previousToken.range[1] - previousToken.lineStart;
+ }
+ if (options.ranges) {
+ this.range[1] = previousToken.range[1];
+ }
+ };
+
+ // Create a new `Marker` and add it to the FILO-array.
+ function markLocation() {
+ if (trackLocations) locations.push(createLocationMarker());
+ }
+
+ // Push an arbitrary `Marker` object onto the FILO-array.
+ function pushLocation(marker) {
+ if (trackLocations) locations.push(marker);
+ }
+
+ // Parse functions
+ // ---------------
+
+ // Chunk is the main program object. Syntactically it's the same as a block.
+ //
+ // chunk ::= block
+
+ function parseChunk() {
+ next();
+ markLocation();
+ var body = parseBlock();
+ if (EOF !== token.type) unexpected(token);
+ // If the body is empty no previousToken exists when finishNode runs.
+ if (trackLocations && !body.length) previousToken = token;
+ return finishNode(ast.chunk(body));
+ }
+
+ // A block contains a list of statements with an optional return statement
+ // as its last statement.
+ //
+ // block ::= {stat} [retstat]
+
+ function parseBlock(terminator) {
+ var block = []
+ , statement;
+
+ // Each block creates a new scope.
+ if (options.scope) createScope();
+
+ while (!isBlockFollow(token)) {
+ // Return has to be the last statement in a block.
+ if ('return' === token.value) {
+ block.push(parseStatement());
+ break;
+ }
+ statement = parseStatement();
+ // Statements are only added if they are returned, this allows us to
+ // ignore some statements, such as EmptyStatement.
+ if (statement) block.push(statement);
+ }
+
+ if (options.scope) exitScope();
+ // Doesn't really need an ast node
+ return block;
+ }
+
+ // There are two types of statements, simple and compound.
+ //
+ // statement ::= break | goto | do | while | repeat | return
+ // | if | for | function | local | label | assignment
+ // | functioncall | ';'
+
+ function parseStatement() {
+ markLocation();
+ if (Keyword === token.type) {
+ switch (token.value) {
+ case 'local': next(); return parseLocalStatement();
+ case 'if': next(); return parseIfStatement();
+ case 'return': next(); return parseReturnStatement();
+ case 'function': next();
+ var name = parseFunctionName();
+ return parseFunctionDeclaration(name);
+ case 'while': next(); return parseWhileStatement();
+ case 'for': next(); return parseForStatement();
+ case 'repeat': next(); return parseRepeatStatement();
+ case 'break': next(); return parseBreakStatement();
+ case 'do': next(); return parseDoStatement();
+ case 'goto': next(); return parseGotoStatement();
+ }
+ }
+
+ if (Punctuator === token.type) {
+ if (consume('::')) return parseLabelStatement();
+ }
+ // Assignments memorizes the location and pushes it manually for wrapper
+ // nodes. Additionally empty `;` statements should not mark a location.
+ if (trackLocations) locations.pop();
+
+ // When a `;` is encounted, simply eat it without storing it.
+ if (consume(';')) return;
+
+ return parseAssignmentOrCallStatement();
+ }
+
+ // ## Statements
+
+ // label ::= '::' Name '::'
+
+ function parseLabelStatement() {
+ var name = token.value
+ , label = parseIdentifier();
+
+ if (options.scope) {
+ scopeIdentifierName('::' + name + '::');
+ attachScope(label, true);
+ }
+
+ expect('::');
+ return finishNode(ast.labelStatement(label));
+ }
+
+ // break ::= 'break'
+
+ function parseBreakStatement() {
+ return finishNode(ast.breakStatement());
+ }
+
+ // goto ::= 'goto' Name
+
+ function parseGotoStatement() {
+ var name = token.value
+ , label = parseIdentifier();
+
+ if (options.scope) label.isLabel = scopeHasName('::' + name + '::');
+ return finishNode(ast.gotoStatement(label));
+ }
+
+ // do ::= 'do' block 'end'
+
+ function parseDoStatement() {
+ var body = parseBlock();
+ expect('end');
+ return finishNode(ast.doStatement(body));
+ }
+
+ // while ::= 'while' exp 'do' block 'end'
+
+ function parseWhileStatement() {
+ var condition = parseExpectedExpression();
+ expect('do');
+ var body = parseBlock();
+ expect('end');
+ return finishNode(ast.whileStatement(condition, body));
+ }
+
+ // repeat ::= 'repeat' block 'until' exp
+
+ function parseRepeatStatement() {
+ var body = parseBlock();
+ expect('until');
+ var condition = parseExpectedExpression();
+ return finishNode(ast.repeatStatement(condition, body));
+ }
+
+ // retstat ::= 'return' [exp {',' exp}] [';']
+
+ function parseReturnStatement() {
+ var expressions = [];
+
+ if ('end' !== token.value) {
+ var expression = parseExpression();
+ if (null != expression) expressions.push(expression);
+ while (consume(',')) {
+ expression = parseExpectedExpression();
+ expressions.push(expression);
+ }
+ consume(';'); // grammar tells us ; is optional here.
+ }
+ return finishNode(ast.returnStatement(expressions));
+ }
+
+ // if ::= 'if' exp 'then' block {elif} ['else' block] 'end'
+ // elif ::= 'elseif' exp 'then' block
+
+ function parseIfStatement() {
+ var clauses = []
+ , condition
+ , body
+ , marker;
+
+ // IfClauses begin at the same location as the parent IfStatement.
+ // It ends at the start of `end`, `else`, or `elseif`.
+ if (trackLocations) {
+ marker = locations[locations.length - 1];
+ locations.push(marker);
+ }
+ condition = parseExpectedExpression();
+ expect('then');
+ body = parseBlock();
+ clauses.push(finishNode(ast.ifClause(condition, body)));
+
+ if (trackLocations) marker = createLocationMarker();
+ while (consume('elseif')) {
+ pushLocation(marker);
+ condition = parseExpectedExpression();
+ expect('then');
+ body = parseBlock();
+ clauses.push(finishNode(ast.elseifClause(condition, body)));
+ if (trackLocations) marker = createLocationMarker();
+ }
+
+ if (consume('else')) {
+ // Include the `else` in the location of ElseClause.
+ if (trackLocations) {
+ marker = new Marker(previousToken);
+ locations.push(marker);
+ }
+ body = parseBlock();
+ clauses.push(finishNode(ast.elseClause(body)));
+ }
+
+ expect('end');
+ return finishNode(ast.ifStatement(clauses));
+ }
+
+ // There are two types of for statements, generic and numeric.
+ //
+ // for ::= Name '=' exp ',' exp [',' exp] 'do' block 'end'
+ // for ::= namelist 'in' explist 'do' block 'end'
+ // namelist ::= Name {',' Name}
+ // explist ::= exp {',' exp}
+
+ function parseForStatement() {
+ var variable = parseIdentifier()
+ , body;
+
+ // The start-identifier is local.
+ if (options.scope) scopeIdentifier(variable);
+
+ // If the first expression is followed by a `=` punctuator, this is a
+ // Numeric For Statement.
+ if (consume('=')) {
+ // Start expression
+ var start = parseExpectedExpression();
+ expect(',');
+ // End expression
+ var end = parseExpectedExpression();
+ // Optional step expression
+ var step = consume(',') ? parseExpectedExpression() : null;
+
+ expect('do');
+ body = parseBlock();
+ expect('end');
+
+ return finishNode(ast.forNumericStatement(variable, start, end, step, body));
+ }
+ // If not, it's a Generic For Statement
+ else {
+ // The namelist can contain one or more identifiers.
+ var variables = [variable];
+ while (consume(',')) {
+ variable = parseIdentifier();
+ // Each variable in the namelist is locally scoped.
+ if (options.scope) scopeIdentifier(variable);
+ variables.push(variable);
+ }
+ expect('in');
+ var iterators = [];
+
+ // One or more expressions in the explist.
+ do {
+ var expression = parseExpectedExpression();
+ iterators.push(expression);
+ } while (consume(','));
+
+ expect('do');
+ body = parseBlock();
+ expect('end');
+
+ return finishNode(ast.forGenericStatement(variables, iterators, body));
+ }
+ }
+
+ // Local statements can either be variable assignments or function
+ // definitions. If a function definition is found, it will be delegated to
+ // `parseFunctionDeclaration()` with the isLocal flag.
+ //
+ // This AST structure might change into a local assignment with a function
+ // child.
+ //
+ // local ::= 'local' 'function' Name funcdecl
+ // | 'local' Name {',' Name} ['=' exp {',' exp}
+
+ function parseLocalStatement() {
+ var name;
+
+ if (Identifier === token.type) {
+ var variables = []
+ , init = [];
+
+ do {
+ name = parseIdentifier();
+
+ variables.push(name);
+ } while (consume(','));
+
+ if (consume('=')) {
+ do {
+ var expression = parseExpectedExpression();
+ init.push(expression);
+ } while (consume(','));
+ }
+
+ // Declarations doesn't exist before the statement has been evaluated.
+ // Therefore assignments can't use their declarator. And the identifiers
+ // shouldn't be added to the scope until the statement is complete.
+ if (options.scope) {
+ for (var i = 0, l = variables.length; i < l; i++) {
+ scopeIdentifier(variables[i]);
+ }
+ }
+
+ return finishNode(ast.localStatement(variables, init));
+ }
+ if (consume('function')) {
+ name = parseIdentifier();
+ if (options.scope) scopeIdentifier(name);
+
+ // MemberExpressions are not allowed in local function statements.
+ return parseFunctionDeclaration(name, true);
+ } else {
+ raiseUnexpectedToken('<name>', token);
+ }
+ }
+
+ // assignment ::= varlist '=' explist
+ // varlist ::= prefixexp {',' prefixexp}
+ // explist ::= exp {',' exp}
+ //
+ // call ::= callexp
+ // callexp ::= prefixexp args | prefixexp ':' Name args
+
+ function parseAssignmentOrCallStatement() {
+ // Keep a reference to the previous token for better error messages in case
+ // of invalid statement
+ var previous = token
+ , expression, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+ expression = parsePrefixExpression();
+
+ if (null == expression) return unexpected(token);
+ if (',='.indexOf(token.value) >= 0) {
+ var variables = [expression]
+ , init = []
+ , exp;
+
+ while (consume(',')) {
+ exp = parsePrefixExpression();
+ if (null == exp) raiseUnexpectedToken('<expression>', token);
+ variables.push(exp);
+ }
+ expect('=');
+ do {
+ exp = parseExpectedExpression();
+ init.push(exp);
+ } while (consume(','));
+
+ pushLocation(marker);
+ return finishNode(ast.assignmentStatement(variables, init));
+ }
+ if (isCallExpression(expression)) {
+ pushLocation(marker);
+ return finishNode(ast.callStatement(expression));
+ }
+ // The prefix expression was neither part of an assignment or a
+ // callstatement, however as it was valid it's been consumed, so raise
+ // the exception on the previous token to provide a helpful message.
+ return unexpected(previous);
+ }
+
+
+
+ // ### Non-statements
+
+ // Identifier ::= Name
+
+ function parseIdentifier() {
+ markLocation();
+ var identifier = token.value;
+ if (Identifier !== token.type) raiseUnexpectedToken('<name>', token);
+ next();
+ return finishNode(ast.identifier(identifier));
+ }
+
+ // Parse the functions parameters and body block. The name should already
+ // have been parsed and passed to this declaration function. By separating
+ // this we allow for anonymous functions in expressions.
+ //
+ // For local functions there's a boolean parameter which needs to be set
+ // when parsing the declaration.
+ //
+ // funcdecl ::= '(' [parlist] ')' block 'end'
+ // parlist ::= Name {',' Name} | [',' '...'] | '...'
+
+ function parseFunctionDeclaration(name, isLocal) {
+ var parameters = [];
+ expect('(');
+
+ // The declaration has arguments
+ if (!consume(')')) {
+ // Arguments are a comma separated list of identifiers, optionally ending
+ // with a vararg.
+ while (true) {
+ if (Identifier === token.type) {
+ var parameter = parseIdentifier();
+ // Function parameters are local.
+ if (options.scope) scopeIdentifier(parameter);
+
+ parameters.push(parameter);
+
+ if (consume(',')) continue;
+ else if (consume(')')) break;
+ }
+ // No arguments are allowed after a vararg.
+ else if (VarargLiteral === token.type) {
+ parameters.push(parsePrimaryExpression());
+ expect(')');
+ break;
+ } else {
+ raiseUnexpectedToken('<name> or \'...\'', token);
+ }
+ }
+ }
+
+ var body = parseBlock();
+ expect('end');
+
+ isLocal = isLocal || false;
+ return finishNode(ast.functionStatement(name, parameters, isLocal, body));
+ }
+
+ // Parse the function name as identifiers and member expressions.
+ //
+ // Name {'.' Name} [':' Name]
+
+ function parseFunctionName() {
+ var base, name, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+ base = parseIdentifier();
+
+ if (options.scope) attachScope(base, false);
+
+ while (consume('.')) {
+ pushLocation(marker);
+ name = parseIdentifier();
+ if (options.scope) attachScope(name, false);
+ base = finishNode(ast.memberExpression(base, '.', name));
+ }
+
+ if (consume(':')) {
+ pushLocation(marker);
+ name = parseIdentifier();
+ if (options.scope) attachScope(name, false);
+ base = finishNode(ast.memberExpression(base, ':', name));
+ }
+
+ return base;
+ }
+
+ // tableconstructor ::= '{' [fieldlist] '}'
+ // fieldlist ::= field {fieldsep field} fieldsep
+ // field ::= '[' exp ']' '=' exp | Name = 'exp' | exp
+ //
+ // fieldsep ::= ',' | ';'
+
+ function parseTableConstructor() {
+ var fields = []
+ , key, value;
+
+ while (true) {
+ markLocation();
+ if (Punctuator === token.type && consume('[')) {
+ key = parseExpectedExpression();
+ expect(']');
+ expect('=');
+ value = parseExpectedExpression();
+ fields.push(finishNode(ast.tableKey(key, value)));
+ } else if (Identifier === token.type) {
+ key = parseExpectedExpression();
+ if (consume('=')) {
+ value = parseExpectedExpression();
+ fields.push(finishNode(ast.tableKeyString(key, value)));
+ } else {
+ fields.push(finishNode(ast.tableValue(key)));
+ }
+ } else {
+ if (null == (value = parseExpression())) {
+ locations.pop();
+ break;
+ }
+ fields.push(finishNode(ast.tableValue(value)));
+ }
+ if (',;'.indexOf(token.value) >= 0) {
+ next();
+ continue;
+ }
+ if ('}' === token.value) break;
+ }
+ expect('}');
+ return finishNode(ast.tableConstructorExpression(fields));
+ }
+
+ // Expression parser
+ // -----------------
+ //
+ // Expressions are evaluated and always return a value. If nothing is
+ // matched null will be returned.
+ //
+ // exp ::= (unop exp | primary | prefixexp ) { binop exp }
+ //
+ // primary ::= nil | false | true | Number | String | '...'
+ // | functiondef | tableconstructor
+ //
+ // prefixexp ::= (Name | '(' exp ')' ) { '[' exp ']'
+ // | '.' Name | ':' Name args | args }
+ //
+
+ function parseExpression() {
+ var expression = parseSubExpression(0);
+ return expression;
+ }
+
+ // Parse an expression expecting it to be valid.
+
+ function parseExpectedExpression() {
+ var expression = parseExpression();
+ if (null == expression) raiseUnexpectedToken('<expression>', token);
+ else return expression;
+ }
+
+
+ // Return the precedence priority of the operator.
+ //
+ // As unary `-` can't be distinguished from binary `-`, unary precedence
+ // isn't described in this table but in `parseSubExpression()` itself.
+ //
+ // As this function gets hit on every expression it's been optimized due to
+ // the expensive CompareICStub which took ~8% of the parse time.
+
+ function binaryPrecedence(operator) {
+ var charCode = operator.charCodeAt(0)
+ , length = operator.length;
+
+ if (1 === length) {
+ switch (charCode) {
+ case 94: return 10; // ^
+ case 42: case 47: case 37: return 7; // * / %
+ case 43: case 45: return 6; // + -
+ case 60: case 62: return 3; // < >
+ }
+ } else if (2 === length) {
+ switch (charCode) {
+ case 46: return 5; // ..
+ case 60: case 62: case 61: case 126: return 3; // <= >= == ~=
+ case 111: return 1; // or
+ }
+ } else if (97 === charCode && 'and' === operator) return 2;
+ return 0;
+ }
+
+ // Implement an operator-precedence parser to handle binary operator
+ // precedence.
+ //
+ // We use this algorithm because it's compact, it's fast and Lua core uses
+ // the same so we can be sure our expressions are parsed in the same manner
+ // without excessive amounts of tests.
+ //
+ // exp ::= (unop exp | primary | prefixexp ) { binop exp }
+
+ function parseSubExpression(minPrecedence) {
+ var operator = token.value
+ // The left-hand side in binary operations.
+ , expression, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+
+ // UnaryExpression
+ if (isUnary(token)) {
+ markLocation();
+ next();
+ var argument = parseSubExpression(8);
+ if (argument == null) raiseUnexpectedToken('<expression>', token);
+ expression = finishNode(ast.unaryExpression(operator, argument));
+ }
+ if (null == expression) {
+ // PrimaryExpression
+ expression = parsePrimaryExpression();
+
+ // PrefixExpression
+ if (null == expression) {
+ expression = parsePrefixExpression();
+ }
+ }
+ // This is not a valid left hand expression.
+ if (null == expression) return null;
+
+ var precedence;
+ while (true) {
+ operator = token.value;
+
+ precedence = (Punctuator === token.type || Keyword === token.type) ?
+ binaryPrecedence(operator) : 0;
+
+ if (precedence === 0 || precedence <= minPrecedence) break;
+ // Right-hand precedence operators
+ if ('^' === operator || '..' === operator) precedence--;
+ next();
+ var right = parseSubExpression(precedence);
+ if (null == right) raiseUnexpectedToken('<expression>', token);
+ // Push in the marker created before the loop to wrap its entirety.
+ if (trackLocations) locations.push(marker);
+ expression = finishNode(ast.binaryExpression(operator, expression, right));
+
+ }
+ return expression;
+ }
+
+ // prefixexp ::= prefix {suffix}
+ // prefix ::= Name | '(' exp ')'
+ // suffix ::= '[' exp ']' | '.' Name | ':' Name args | args
+ //
+ // args ::= '(' [explist] ')' | tableconstructor | String
+
+ function parsePrefixExpression() {
+ var base, name, marker
+ // Keep track of the scope, if a parent is local so are the children.
+ , isLocal;
+
+ if (trackLocations) marker = createLocationMarker();
+
+ // The prefix
+ if (Identifier === token.type) {
+ name = token.value;
+ base = parseIdentifier();
+ // Set the parent scope.
+ if (options.scope) attachScope(base, isLocal = scopeHasName(name));
+ } else if (consume('(')) {
+ base = parseExpectedExpression();
+ expect(')');
+ if (options.scope) isLocal = base.isLocal;
+ } else {
+ return null;
+ }
+
+ // The suffix
+ var expression, identifier;
+ while (true) {
+ if (Punctuator === token.type) {
+ switch (token.value) {
+ case '[':
+ pushLocation(marker);
+ next();
+ expression = parseExpectedExpression();
+ base = finishNode(ast.indexExpression(base, expression));
+ expect(']');
+ break;
+ case '.':
+ pushLocation(marker);
+ next();
+ identifier = parseIdentifier();
+ // Inherit the scope
+ if (options.scope) attachScope(identifier, isLocal);
+ base = finishNode(ast.memberExpression(base, '.', identifier));
+ break;
+ case ':':
+ pushLocation(marker);
+ next();
+ identifier = parseIdentifier();
+ if (options.scope) attachScope(identifier, isLocal);
+ base = finishNode(ast.memberExpression(base, ':', identifier));
+ // Once a : is found, this has to be a CallExpression, otherwise
+ // throw an error.
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ break;
+ case '(': case '{': // args
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ break;
+ default:
+ return base;
+ }
+ } else if (StringLiteral === token.type) {
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ } else {
+ break;
+ }
+ }
+
+ return base;
+ }
+
+ // args ::= '(' [explist] ')' | tableconstructor | String
+
+ function parseCallExpression(base) {
+ if (Punctuator === token.type) {
+ switch (token.value) {
+ case '(':
+ next();
+
+ // List of expressions
+ var expressions = [];
+ var expression = parseExpression();
+ if (null != expression) expressions.push(expression);
+ while (consume(',')) {
+ expression = parseExpectedExpression();
+ expressions.push(expression);
+ }
+
+ expect(')');
+ return finishNode(ast.callExpression(base, expressions));
+
+ case '{':
+ markLocation();
+ next();
+ var table = parseTableConstructor();
+ return finishNode(ast.tableCallExpression(base, table));
+ }
+ } else if (StringLiteral === token.type) {
+ return finishNode(ast.stringCallExpression(base, parsePrimaryExpression()));
+ }
+
+ raiseUnexpectedToken('function arguments', token);
+ }
+
+ // primary ::= String | Numeric | nil | true | false
+ // | functiondef | tableconstructor | '...'
+
+ function parsePrimaryExpression() {
+ var literals = StringLiteral | NumericLiteral | BooleanLiteral | NilLiteral | VarargLiteral
+ , value = token.value
+ , type = token.type
+ , marker;
+
+ if (trackLocations) marker = createLocationMarker();
+
+ if (type & literals) {
+ pushLocation(marker);
+ var raw = input.slice(token.range[0], token.range[1]);
+ next();
+ return finishNode(ast.literal(type, value, raw));
+ } else if (Keyword === type && 'function' === value) {
+ pushLocation(marker);
+ next();
+ return parseFunctionDeclaration(null);
+ } else if (consume('{')) {
+ pushLocation(marker);
+ return parseTableConstructor();
+ }
+ }
+
+ // Parser
+ // ------
+
+ // Export the main parser.
+ //
+ // - `wait` Hold parsing until end() is called. Defaults to false
+ // - `comments` Store comments. Defaults to true.
+ // - `scope` Track identifier scope. Defaults to false.
+ //
+ // Example:
+ //
+ // var parser = require('luaparser');
+ // parser.parse('i = 0');
+
+ exports.parse = parse;
+
+ function parse(_input, _options) {
+ if ('undefined' === typeof _options && 'object' === typeof _input) {
+ _options = _input;
+ _input = undefined;
+ }
+ if (!_options) _options = {};
+
+ input = _input || '';
+ options = extend(defaultOptions, _options);
+
+ // Rewind the lexer
+ index = 0;
+ line = 1;
+ lineStart = 0;
+ length = input.length;
+ // When tracking identifier scope, initialize with an empty scope.
+ scopes = [[]];
+ scopeDepth = 0;
+ globals = [];
+ locations = [];
+
+ if (options.comments) comments = [];
+ if (!options.wait) return end();
+ return exports;
+ }
+
+ // Write to the source code buffer without beginning the parse.
+ exports.write = write;
+
+ function write(_input) {
+ input += String(_input);
+ length = input.length;
+ return exports;
+ }
+
+ // Send an EOF and begin parsing.
+ exports.end = end;
+
+ function end(_input) {
+ if ('undefined' !== typeof _input) write(_input);
+
+ length = input.length;
+ trackLocations = options.locations || options.ranges;
+ // Initialize with a lookahead token.
+ lookahead = lex();
+
+ var chunk = parseChunk();
+ if (options.comments) chunk.comments = comments;
+ if (options.scope) chunk.globals = globals;
+
+ if (locations.length > 0)
+ throw new Error('Location tracking failed. This is most likely a bug in luaparse');
+
+ return chunk;
+ }
+
+}));
+/* vim: set sw=2 ts=2 et tw=79 : */
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/lua_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/lua_highlight_rules.js
new file mode 100644
index 000000000..5eb969d3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lua_highlight_rules.js
@@ -0,0 +1,193 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LuaHighlightRules = function() {
+
+ var keywords = (
+ "break|do|else|elseif|end|for|function|if|in|local|repeat|"+
+ "return|then|until|while|or|and|not"
+ );
+
+ var builtinConstants = ("true|false|nil|_G|_VERSION");
+
+ var functions = (
+ // builtinFunctions
+ "string|xpcall|package|tostring|print|os|unpack|require|"+
+ "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
+ "collectgarbage|getmetatable|module|rawset|math|debug|"+
+ "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
+ "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
+ "load|error|loadfile|"+
+
+ "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
+ "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
+ "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
+ "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
+ "lines|write|close|flush|open|output|type|read|stderr|"+
+ "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
+ "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
+ "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
+ "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
+ "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
+ "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
+ "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
+ "status|wrap|create|running|"+
+ // metatableMethods
+ "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
+ "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
+ );
+
+ var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
+
+ var futureReserved = "";
+
+ var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "support.function": functions,
+ "invalid.deprecated": deprecatedIn5152,
+ "constant.library": stdLibaries,
+ "constant.language": builtinConstants,
+ "invalid.illegal": futureReserved,
+ "variable.language": "this"
+ }, "identifier");
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var floatNumber = "(?:" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [{
+ stateName: "bracketedComment",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex : /\-\-\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "comment";
+ },
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ },
+
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ stateName: "bracketedString",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length, currentState);
+ return "comment";
+ },
+ regex : /\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "comment";
+ },
+
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ },
+ {
+ token : "string", // " string
+ regex : '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'(?:[^\\\\]|\\\\.)*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+|\\w+"
+ } ]
+ };
+
+ this.normalizeRules();
+}
+
+oop.inherits(LuaHighlightRules, TextHighlightRules);
+
+exports.LuaHighlightRules = LuaHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/lua_worker.js b/src/fauxton/assets/js/libs/ace/mode/lua_worker.js
new file mode 100644
index 000000000..9c08f6147
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lua_worker.js
@@ -0,0 +1,71 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var luaparse = require("../mode/lua/luaparse");
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+
+ // var t=Date.now()
+ try {
+ luaparse.parse(value);
+ } catch(e) {
+ if (e instanceof SyntaxError) {
+ this.sender.emit("error", {
+ row: e.line - 1,
+ column: e.column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ // console.log( t-Date.now())
+ return;
+ }
+ // console.log( t-Date.now())
+ this.sender.emit("ok");
+ };
+
+}).call(Worker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/luapage.js b/src/fauxton/assets/js/libs/ace/mode/luapage.js
new file mode 100644
index 000000000..b6f654803
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/luapage.js
@@ -0,0 +1,21 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var LuaMode = require("./lua").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LuaPageHighlightRules;
+
+ this.HighlightRules = LuaPageHighlightRules;
+ this.createModeDelegates({
+ "lua-": LuaMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/luapage_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/luapage_highlight_rules.js
new file mode 100644
index 000000000..59878999a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/luapage_highlight_rules.js
@@ -0,0 +1,49 @@
+// LuaPage implements the LuaPage markup as described by the Kepler Project's CGILua
+// documentation: http://keplerproject.github.com/cgilua/manual.html#templates
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+
+var LuaPageHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ token: "keyword",
+ regex: "<\\%\\=?",
+ push: "lua-start"
+ }, {
+ token: "keyword",
+ regex: "<\\?lua\\=?",
+ push: "lua-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token: "keyword",
+ regex: "\\%>",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "\\?>",
+ next: "pop"
+ }
+ ];
+
+ this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]);
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.normalizeRules();
+};
+
+oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
+
+exports.LuaPageHighlightRules = LuaPageHighlightRules;
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/lucene.js b/src/fauxton/assets/js/libs/ace/mode/lucene.js
new file mode 100644
index 000000000..9beed95bc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lucene.js
@@ -0,0 +1,16 @@
+define(function(require, exports, module) {
+'use strict';
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
+
+var Mode = function() {
+ this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules());
+};
+
+oop.inherits(Mode, TextMode);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/lucene_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/lucene_highlight_rules.js
new file mode 100644
index 000000000..536aa1d30
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/lucene_highlight_rules.js
@@ -0,0 +1,49 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var LuceneHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "constant.character.negation",
+ regex : "[\\-]"
+ }, {
+ token : "constant.character.interro",
+ regex : "[\\?]"
+ }, {
+ token : "constant.character.asterisk",
+ regex : "[\\*]"
+ }, {
+ token: 'constant.character.proximity',
+ regex: '~[0-9]+\\b'
+ }, {
+ token : 'keyword.operator',
+ regex: '(?:AND|OR|NOT)\\b'
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "keyword",
+ regex : "[\\S]+:"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ]
+ };
+};
+
+oop.inherits(LuceneHighlightRules, TextHighlightRules);
+
+exports.LuceneHighlightRules = LuceneHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/makefile.js b/src/fauxton/assets/js/libs/ace/mode/makefile.js
new file mode 100644
index 000000000..bd53cc325
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/makefile.js
@@ -0,0 +1,63 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MakefileHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.$indentWithTabs = true;
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/makefile_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/makefile_highlight_rules.js
new file mode 100644
index 000000000..53ef1d059
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/makefile_highlight_rules.js
@@ -0,0 +1,75 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ShHighlightFile = require("./sh_highlight_rules");
+
+var MakefileHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": ShHighlightFile.reservedKeywords,
+ "support.function.builtin": ShHighlightFile.languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "string");
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token: "string.interpolated.backtick.makefile",
+ regex: "`",
+ next: "shell-start"
+ },
+ {
+ token: "punctuation.definition.comment.makefile",
+ regex: /#(?=.)/,
+ next: "comment"
+ },
+ {
+ token: [ "keyword.control.makefile"],
+ regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"
+ },
+ {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.*
+ token: ["entity.name.function.makefile", "text"],
+ regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"
+ }
+ ],
+ "comment": [
+ {
+ token : "punctuation.definition.comment.makefile",
+ regex : /.+\\/
+ },
+ {
+ token : "punctuation.definition.comment.makefile",
+ regex : ".+",
+ next : "start"
+ }
+ ],
+ "shell-start": [
+ {
+ token: keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token: "string",
+ regex : "\\w+"
+ },
+ {
+ token : "string.interpolated.backtick.makefile",
+ regex : "`",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(MakefileHighlightRules, TextHighlightRules);
+
+exports.MakefileHighlightRules = MakefileHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/markdown.js b/src/fauxton/assets/js/libs/ace/mode/markdown.js
new file mode 100644
index 000000000..f23712295
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/markdown.js
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var XmlMode = require("./xml").Mode;
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var MarkdownFoldMode = require("./folding/markdown").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MarkdownHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "xml-": XmlMode,
+ "html-": HtmlMode
+ });
+
+ this.foldingRules = new MarkdownFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.lineCommentStart = ">";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "listblock") {
+ var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
+ if (!match)
+ return "";
+ var marker = match[2];
+ if (!marker)
+ marker = parseInt(match[3], 10) + 1 + ".";
+ return match[1] + marker + match[4];
+ } else {
+ return this.$getIndent(line);
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/markdown_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/markdown_highlight_rules.js
new file mode 100644
index 000000000..4e07edffa
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/markdown_highlight_rules.js
@@ -0,0 +1,219 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ // regexp must not have capturing parentheses
+ // regexps are ordered -> the first match is used
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string",
+ regex : "^>[ ].+$",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+
+ // code block
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "list"
+ } ],
+
+ "blockquote" : [ { // BLockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ token : "string",
+ regex : ".+"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^```",
+ next : "start"
+ }, {
+ token : "support.function",
+ regex : ".+"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/matching_brace_outdent.js b/src/fauxton/assets/js/libs/ace/mode/matching_brace_outdent.js
new file mode 100644
index 000000000..07f4829e6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/matching_brace_outdent.js
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingBraceOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\}/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\})/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/matching_parens_outdent.js b/src/fauxton/assets/js/libs/ace/mode/matching_parens_outdent.js
new file mode 100644
index 000000000..0aadf6e8c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/matching_parens_outdent.js
@@ -0,0 +1,74 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+
+var MatchingParensOutdent = function() {};
+
+(function() {
+
+ this.checkOutdent = function(line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*\)/.test(input);
+ };
+
+ this.autoOutdent = function(doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*\))/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+}).call(MatchingParensOutdent.prototype);
+
+exports.MatchingParensOutdent = MatchingParensOutdent;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/matlab.js b/src/fauxton/assets/js/libs/ace/mode/matlab.js
new file mode 100644
index 000000000..ca56b44ac
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/matlab.js
@@ -0,0 +1,55 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MatlabHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "%{", end: "%}"};
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/matlab_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/matlab_highlight_rules.js
new file mode 100644
index 000000000..619429297
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/matlab_highlight_rules.js
@@ -0,0 +1,204 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MatlabHighlightRules = function() {
+
+var keywords = (
+ "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while"
+ );
+
+ var builtinConstants = (
+ "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout"
+ );
+
+ var builtinFunctions = (
+ "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+
+ "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" +
+ "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+
+ "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+
+ "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+
+ "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|"+
+ "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+
+ "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+
+ "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+
+ "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+
+ "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+
+ "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+
+ "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+
+ "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+
+ "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+
+ "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+
+ "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+
+ "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+
+ "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+
+ "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+
+ "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+
+ "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+
+ "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+
+ "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+
+ "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+
+ "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+
+ "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+
+ "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+
+ "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+
+ "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+
+ "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+
+ "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+
+ "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+
+ "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+
+ "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+
+ "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+
+ "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+
+ "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+
+ "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|"+
+ "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|"+
+ "MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+
+ "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+
+ "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+
+ "ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+
+ "NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+
+ "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+
+ "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+
+ "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+
+ "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+
+ "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+
+ "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+
+ "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+
+ "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|"+
+ "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+
+ "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+
+ "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+
+ "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+
+ "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+
+ "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+
+ "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+
+ "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+
+ "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+
+ "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+
+ "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+
+ "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+
+ "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+
+ "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|"+
+ "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+
+ "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+
+ "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+
+ "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+
+ "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|"+
+ "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+
+ "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+
+ "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+
+ "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|"+
+ "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+
+ "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+
+ "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+
+ "LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+
+ "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|"+
+ "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+
+ "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+
+ "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+
+ "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+
+ "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|"+
+ "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+
+ "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+
+ "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+
+ "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+
+ "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+
+ "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+
+ "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+
+ "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+
+ "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+
+ "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+
+ "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+
+ "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+
+ "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+
+ "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+
+ "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+
+ "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+
+ "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+
+ "reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+
+ "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+
+ "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+
+ "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog"
+ );
+ var storageType = (
+ "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "storage.type": storageType,
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "^%[^\r\n]*"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(MatlabHighlightRules, TextHighlightRules);
+
+exports.MatlabHighlightRules = MatlabHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/mushcode.js b/src/fauxton/assets/js/libs/ace/mode/mushcode.js
new file mode 100644
index 000000000..bdaeeb4ea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/mushcode.js
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MushCodeRules = require("./mushcode_high_rules").MushCodeRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MushCodeRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+
+ // ignore trailing comments
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ // outdenting in python is slightly different because it always applies
+ // to the next line and only of a new line is inserted
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/mushcode_high_rules.js b/src/fauxton/assets/js/libs/ace/mode/mushcode_high_rules.js
new file mode 100644
index 000000000..e3197beeb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/mushcode_high_rules.js
@@ -0,0 +1,569 @@
+/*
+ * MUSHCodeMode
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MushCodeRules = function() {
+
+
+ var keywords = (
+ "@if|"+
+ "@ifelse|"+
+ "@switch|"+
+ "@halt|"+
+ "@dolist|"+
+ "@create|"+
+ "@scent|"+
+ "@sound|"+
+ "@touch|"+
+ "@ataste|"+
+ "@osound|"+
+ "@ahear|"+
+ "@aahear|"+
+ "@amhear|"+
+ "@otouch|"+
+ "@otaste|"+
+ "@drop|"+
+ "@odrop|"+
+ "@adrop|"+
+ "@dropfail|"+
+ "@odropfail|"+
+ "@smell|"+
+ "@oemit|"+
+ "@emit|"+
+ "@pemit|"+
+ "@parent|"+
+ "@clone|"+
+ "@taste|"+
+ "whisper|"+
+ "page|"+
+ "say|"+
+ "pose|"+
+ "semipose|"+
+ "teach|"+
+ "touch|"+
+ "taste|"+
+ "smell|"+
+ "listen|"+
+ "look|"+
+ "move|"+
+ "go|"+
+ "home|"+
+ "follow|"+
+ "unfollow|"+
+ "desert|"+
+ "dismiss|"+
+ "@tel"
+ );
+
+ var builtinConstants = (
+ "=#0"
+ );
+
+ var builtinFunctions = (
+ "default|"+
+ "edefault|"+
+ "eval|"+
+ "get_eval|"+
+ "get|"+
+ "grep|"+
+ "grepi|"+
+ "hasattr|"+
+ "hasattrp|"+
+ "hasattrval|"+
+ "hasattrpval|"+
+ "lattr|"+
+ "nattr|"+
+ "poss|"+
+ "udefault|"+
+ "ufun|"+
+ "u|"+
+ "v|"+
+ "uldefault|"+
+ "xget|"+
+ "zfun|"+
+ "band|"+
+ "bnand|"+
+ "bnot|"+
+ "bor|"+
+ "bxor|"+
+ "shl|"+
+ "shr|"+
+ "and|"+
+ "cand|"+
+ "cor|"+
+ "eq|"+
+ "gt|"+
+ "gte|"+
+ "lt|"+
+ "lte|"+
+ "nand|"+
+ "neq|"+
+ "nor|"+
+ "not|"+
+ "or|"+
+ "t|"+
+ "xor|"+
+ "con|"+
+ "entrances|"+
+ "exit|"+
+ "followers|"+
+ "home|"+
+ "lcon|"+
+ "lexits|"+
+ "loc|"+
+ "locate|"+
+ "lparent|"+
+ "lsearch|"+
+ "next|"+
+ "num|"+
+ "owner|"+
+ "parent|"+
+ "pmatch|"+
+ "rloc|"+
+ "rnum|"+
+ "room|"+
+ "where|"+
+ "zone|"+
+ "worn|"+
+ "held|"+
+ "carried|"+
+ "acos|"+
+ "asin|"+
+ "atan|"+
+ "ceil|"+
+ "cos|"+
+ "e|"+
+ "exp|"+
+ "fdiv|"+
+ "fmod|"+
+ "floor|"+
+ "log|"+
+ "ln|"+
+ "pi|"+
+ "power|"+
+ "round|"+
+ "sin|"+
+ "sqrt|"+
+ "tan|"+
+ "aposs|"+
+ "andflags|"+
+ "conn|"+
+ "commandssent|"+
+ "controls|"+
+ "doing|"+
+ "elock|"+
+ "findable|"+
+ "flags|"+
+ "fullname|"+
+ "hasflag|"+
+ "haspower|"+
+ "hastype|"+
+ "hidden|"+
+ "idle|"+
+ "isbaker|"+
+ "lock|"+
+ "lstats|"+
+ "money|"+
+ "who|"+
+ "name|"+
+ "nearby|"+
+ "obj|"+
+ "objflags|"+
+ "photo|"+
+ "poll|"+
+ "powers|"+
+ "pendingtext|"+
+ "receivedtext|"+
+ "restarts|"+
+ "restarttime|"+
+ "subj|"+
+ "shortestpath|"+
+ "tmoney|"+
+ "type|"+
+ "visible|"+
+ "cat|"+
+ "element|"+
+ "elements|"+
+ "extract|"+
+ "filter|"+
+ "filterbool|"+
+ "first|"+
+ "foreach|"+
+ "fold|"+
+ "grab|"+
+ "graball|"+
+ "index|"+
+ "insert|"+
+ "itemize|"+
+ "items|"+
+ "iter|"+
+ "last|"+
+ "ldelete|"+
+ "map|"+
+ "match|"+
+ "matchall|"+
+ "member|"+
+ "mix|"+
+ "munge|"+
+ "pick|"+
+ "remove|"+
+ "replace|"+
+ "rest|"+
+ "revwords|"+
+ "setdiff|"+
+ "setinter|"+
+ "setunion|"+
+ "shuffle|"+
+ "sort|"+
+ "sortby|"+
+ "splice|"+
+ "step|"+
+ "wordpos|"+
+ "words|"+
+ "add|"+
+ "lmath|"+
+ "max|"+
+ "mean|"+
+ "median|"+
+ "min|"+
+ "mul|"+
+ "percent|"+
+ "sign|"+
+ "stddev|"+
+ "sub|"+
+ "val|"+
+ "bound|"+
+ "abs|"+
+ "inc|"+
+ "dec|"+
+ "dist2d|"+
+ "dist3d|"+
+ "div|"+
+ "floordiv|"+
+ "mod|"+
+ "modulo|"+
+ "remainder|"+
+ "vadd|"+
+ "vdim|"+
+ "vdot|"+
+ "vmag|"+
+ "vmax|"+
+ "vmin|"+
+ "vmul|"+
+ "vsub|"+
+ "vunit|"+
+ "regedit|"+
+ "regeditall|"+
+ "regeditalli|"+
+ "regediti|"+
+ "regmatch|"+
+ "regmatchi|"+
+ "regrab|"+
+ "regraball|"+
+ "regraballi|"+
+ "regrabi|"+
+ "regrep|"+
+ "regrepi|"+
+ "after|"+
+ "alphamin|"+
+ "alphamax|"+
+ "art|"+
+ "before|"+
+ "brackets|"+
+ "capstr|"+
+ "case|"+
+ "caseall|"+
+ "center|"+
+ "containsfansi|"+
+ "comp|"+
+ "decompose|"+
+ "decrypt|"+
+ "delete|"+
+ "edit|"+
+ "encrypt|"+
+ "escape|"+
+ "if|"+
+ "ifelse|"+
+ "lcstr|"+
+ "left|"+
+ "lit|"+
+ "ljust|"+
+ "merge|"+
+ "mid|"+
+ "ostrlen|"+
+ "pos|"+
+ "repeat|"+
+ "reverse|"+
+ "right|"+
+ "rjust|"+
+ "scramble|"+
+ "secure|"+
+ "space|"+
+ "spellnum|"+
+ "squish|"+
+ "strcat|"+
+ "strmatch|"+
+ "strinsert|"+
+ "stripansi|"+
+ "stripfansi|"+
+ "strlen|"+
+ "switch|"+
+ "switchall|"+
+ "table|"+
+ "tr|"+
+ "trim|"+
+ "ucstr|"+
+ "unsafe|"+
+ "wrap|"+
+ "ctitle|"+
+ "cwho|"+
+ "channels|"+
+ "clock|"+
+ "cflags|"+
+ "ilev|"+
+ "itext|"+
+ "inum|"+
+ "convsecs|"+
+ "convutcsecs|"+
+ "convtime|"+
+ "ctime|"+
+ "etimefmt|"+
+ "isdaylight|"+
+ "mtime|"+
+ "secs|"+
+ "msecs|"+
+ "starttime|"+
+ "time|"+
+ "timefmt|"+
+ "timestring|"+
+ "utctime|"+
+ "atrlock|"+
+ "clone|"+
+ "create|"+
+ "cook|"+
+ "dig|"+
+ "emit|"+
+ "lemit|"+
+ "link|"+
+ "oemit|"+
+ "open|"+
+ "pemit|"+
+ "remit|"+
+ "set|"+
+ "tel|"+
+ "wipe|"+
+ "zemit|"+
+ "fbcreate|"+
+ "fbdestroy|"+
+ "fbwrite|"+
+ "fbclear|"+
+ "fbcopy|"+
+ "fbcopyto|"+
+ "fbclip|"+
+ "fbdump|"+
+ "fbflush|"+
+ "fbhset|"+
+ "fblist|"+
+ "fbstats|"+
+ "qentries|"+
+ "qentry|"+
+ "play|"+
+ "ansi|"+
+ "break|"+
+ "c|"+
+ "asc|"+
+ "die|"+
+ "isdbref|"+
+ "isint|"+
+ "isnum|"+
+ "isletters|"+
+ "linecoords|"+
+ "localize|"+
+ "lnum|"+
+ "nameshort|"+
+ "null|"+
+ "objeval|"+
+ "r|"+
+ "rand|"+
+ "s|"+
+ "setq|"+
+ "setr|"+
+ "soundex|"+
+ "soundslike|"+
+ "valid|"+
+ "vchart|"+
+ "vchart2|"+
+ "vlabel|"+
+ "@@|"+
+ "bakerdays|"+
+ "bodybuild|"+
+ "box|"+
+ "capall|"+
+ "catalog|"+
+ "children|"+
+ "ctrailer|"+
+ "darttime|"+
+ "debt|"+
+ "detailbar|"+
+ "exploredroom|"+
+ "fansitoansi|"+
+ "fansitoxansi|"+
+ "fullbar|"+
+ "halfbar|"+
+ "isdarted|"+
+ "isnewbie|"+
+ "isword|"+
+ "lambda|"+
+ "lobjects|"+
+ "lplayers|"+
+ "lthings|"+
+ "lvexits|"+
+ "lvobjects|"+
+ "lvplayers|"+
+ "lvthings|"+
+ "newswrap|"+
+ "numsuffix|"+
+ "playerson|"+
+ "playersthisweek|"+
+ "randomad|"+
+ "randword|"+
+ "realrandword|"+
+ "replacechr|"+
+ "second|"+
+ "splitamount|"+
+ "strlenall|"+
+ "text|"+
+ "third|"+
+ "tofansi|"+
+ "totalac|"+
+ "unique|"+
+ "getaddressroom|"+
+ "listpropertycomm|"+
+ "listpropertyres|"+
+ "lotowner|"+
+ "lotrating|"+
+ "lotratingcount|"+
+ "lotvalue|"+
+ "boughtproduct|"+
+ "companyabb|"+
+ "companyicon|"+
+ "companylist|"+
+ "companyname|"+
+ "companyowners|"+
+ "companyvalue|"+
+ "employees|"+
+ "invested|"+
+ "productlist|"+
+ "productname|"+
+ "productowners|"+
+ "productrating|"+
+ "productratingcount|"+
+ "productsoldat|"+
+ "producttype|"+
+ "ratedproduct|"+
+ "soldproduct|"+
+ "topproducts|"+
+ "totalspentonproduct|"+
+ "totalstock|"+
+ "transfermoney|"+
+ "uniquebuyercount|"+
+ "uniqueproductsbought|"+
+ "validcompany|"+
+ "deletepicture|"+
+ "fbsave|"+
+ "getpicturesecurity|"+
+ "haspicture|"+
+ "listpictures|"+
+ "picturesize|"+
+ "replacecolor|"+
+ "rgbtocolor|"+
+ "savepicture|"+
+ "setpicturesecurity|"+
+ "showpicture|"+
+ "piechart|"+
+ "piechartlabel|"+
+ "createmaze|"+
+ "drawmaze|"+
+ "drawwireframe"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "invalid.deprecated": "debugger",
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "keyword": keywords
+ }, "identifier");
+
+ var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "variable", // mush substitution register
+ regex : "%[0-9]{1}"
+ },
+ {
+ token : "variable", // mush substitution register
+ regex : "%q[0-9A-Za-z]{1}"
+ },
+ {
+ token : "variable", // mush special character register
+ regex : "%[a-zA-Z]{1}"
+ },
+ {
+ token: "variable.language",
+ regex: "%[a-z0-9-_]+"
+ },
+ {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // long integer
+ regex : integer + "[lL]\\b"
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(MushCodeRules, TextHighlightRules);
+
+exports.MushCodeRules = MushCodeRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/mysql.js b/src/fauxton/assets/js/libs/ace/mode/mysql.js
new file mode 100644
index 000000000..2f9754a37
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/mysql.js
@@ -0,0 +1,51 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("../mode/text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MysqlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ["--", "#"]; // todo space
+ this.blockComment = {start: "/*", end: "*/"};
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/mysql_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/mysql_highlight_rules.js
new file mode 100644
index 000000000..7f428bc85
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/mysql_highlight_rules.js
@@ -0,0 +1,122 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var MysqlHighlightRules = function() {
+
+ var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where"
+ /*mysql*/ + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat";
+ var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric"
+ var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee"
+
+ //operatorChars: /^[*+\-%<>!=&|^]/,
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtins,
+ "keyword": mySqlKeywords,
+ "constant": "false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat",
+ "variable.language": variable
+ }, "identifier", true);
+
+
+ function string(rule) {
+ var start = rule.start;
+ var escapeSeq = rule.escape;
+ return {
+ token: "string.start",
+ regex: start,
+ next: [
+ {token: "constant.language.escape", regex: escapeSeq},
+ {token: "string.end", next: "start", regex: start},
+ {defaultToken: "string"}
+ ]
+ };
+ }
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment", regex : "(?:-- |#).*$"
+ },
+ string({start: '"', escape: /\\[0'"bnrtZ\\%_]?/}),
+ string({start: "'", escape: /\\[0'"bnrtZ\\%_]?/}),
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "constant.class",
+ regex : "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "constant.buildin",
+ regex : "`[^`]*`"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+ "comment" : [
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment"}
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(MysqlHighlightRules, TextHighlightRules);
+
+exports.MysqlHighlightRules = MysqlHighlightRules;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/nix.js b/src/fauxton/assets/js/libs/ace/mode/nix.js
new file mode 100644
index 000000000..a745aca39
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/nix.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Zef Hemel
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = NixHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/nix_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/nix_highlight_rules.js
new file mode 100644
index 000000000..986ccefd5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/nix_highlight_rules.js
@@ -0,0 +1,119 @@
+define(function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var NixHighlightRules = function() {
+
+ var constantLanguage = "true|false";
+ var keywordControl = "with|import|if|else|then|inherit";
+ var keywordDeclaration = "let|in|rec";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.nix": constantLanguage,
+ "keyword.control.nix": keywordControl,
+ "keyword.declaration.nix": keywordDeclaration
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /#.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "(==|!=|<=?|>=?)",
+ token: ["keyword.operator.comparison.nix"]
+ }, {
+ regex: "((?:[+*/%-]|\\~)=)",
+ token: ["keyword.operator.assignment.arithmetic.nix"]
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.nix"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "qqdoc"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "qstring"
+ }, {
+ token: "string",
+ regex: '"',
+ push: "qqstring"
+ }, {
+ token: "constant.numeric", // hex
+ regex: "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ regex: "}",
+ token: function(val, start, stack) {
+ return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text";
+ },
+ next: "pop"
+ }],
+ "comment": [{
+ token: "comment", // closing comment
+ regex: ".*?\\*\\/",
+ next: "start"
+ }, {
+ token: "comment", // comment spanning whole line
+ regex: ".+"
+ }],
+ "qqdoc": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qqstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(NixHighlightRules, TextHighlightRules);
+
+ exports.NixHighlightRules = NixHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/objectivec.js b/src/fauxton/assets/js/libs/ace/mode/objectivec.js
new file mode 100644
index 000000000..76fdf1433
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/objectivec.js
@@ -0,0 +1,61 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ObjectiveCHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/objectivec_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/objectivec_highlight_rules.js
new file mode 100644
index 000000000..7a581c28b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/objectivec_highlight_rules.js
@@ -0,0 +1,331 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var C_Highlight_File = require("./c_cpp_highlight_rules");
+var CHighlightRules = C_Highlight_File.c_cppHighlightRules;
+
+var ObjectiveCHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" +
+ "[0-3]\\d{1,2}|" +
+ "[4-7]\\d?|" +
+ "222|" +
+ "x[a-zA-Z0-9]+)";
+
+ var specialVariables = [{
+ regex: "\\b_cmd\\b",
+ token: "variable.other.selector.objc"
+ }, {
+ regex: "\\b(?:self|super)\\b",
+ token: "variable.language.objc"
+ }
+ ];
+
+ var cObj = new CHighlightRules();
+ var cRules = cObj.getRules();
+
+ this.$rules = {
+ "start": [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ },
+ {
+ token: [ "storage.type.objc", "punctuation.definition.storage.type.objc",
+ "entity.name.type.objc", "text", "entity.other.inherited-class.objc"
+ ],
+ regex: "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)"
+ },
+ {
+ token: [ "storage.type.objc" ],
+ regex: "(@end)"
+ },
+ {
+ token: [ "storage.type.objc", "entity.name.type.objc",
+ "entity.other.inherited-class.objc"
+ ],
+ regex: "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?"
+ },
+ {
+ token: "string.begin.objc",
+ regex: '@"',
+ next: "constant_NSString"
+ },
+ {
+ token: "storage.type.objc",
+ regex: "\\bid\\s*<",
+ next: "protocol_list"
+ },
+ {
+ token: "keyword.control.macro.objc",
+ regex: "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b"
+ },
+ {
+ token: ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"],
+ regex: "(@)(try|catch|finally|throw)\\b"
+ },
+ {
+ token: ["punctuation.definition.keyword.objc", "keyword.other.objc"],
+ regex: "(@)(defs|encode)\\b"
+ },
+ {
+ token: ["storage.type.id.objc", "text"],
+ regex: "(\\bid\\b)(\\s|\\n)?"
+ },
+ {
+ token: "storage.type.objc",
+ regex: "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b"
+ },
+ {
+ token: [ "punctuation.definition.storage.type.objc", "storage.type.objc"],
+ regex: "(@)(class|protocol)\\b"
+ },
+ {
+ token: [ "punctuation.definition.storage.type.objc", "punctuation"],
+ regex: "(@selector)(\\s*\\()",
+ next: "selectors"
+ },
+ {
+ token: [ "punctuation.definition.storage.modifier.objc", "storage.modifier.objc"],
+ regex: "(@)(synchronized|public|private|protected|package)\\b"
+ },
+ {
+ token: "constant.language.objc",
+ regex: "\\bYES|NO|Nil|nil\\b"
+ },
+ {
+ token: "support.variable.foundation",
+ regex: "\\bNSApp\\b"
+ },
+ {
+ token: [ "support.function.cocoa.leopard"],
+ regex: "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)"
+ },
+ {
+ token: ["support.function.cocoa"],
+ regex: "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)"
+ },
+ {
+ token: ["support.class.cocoa.leopard"],
+ regex: "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)"
+ },
+ {
+ token: ["support.class.cocoa"],
+ regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"
+ },
+ {
+ token: ["support.type.cocoa.leopard"],
+ regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"
+ },
+ {
+ token: ["support.class.quartz"],
+ regex: "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)"
+ },
+ {
+ token: ["support.type.quartz"],
+ regex: "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)"
+ },
+ {
+ token: ["support.type.cocoa"],
+ regex: "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)"
+ },
+ {
+ token: ["support.constant.cocoa"],
+ regex: "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)"
+ },
+ {
+ token: ["support.constant.notification.cocoa.leopard"],
+ regex: "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)"
+ },
+ {
+ token: ["support.constant.notification.cocoa"],
+ regex: "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)"
+ },
+ {
+ token: ["support.constant.cocoa.leopard"],
+ regex: "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)"
+ },
+ {
+ token: ["support.constant.cocoa"],
+ regex: "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)"
+ },
+ {
+ token: "support.function.C99.c",
+ regex: C_Highlight_File.cFunctions
+ },
+ {
+ token : cObj.getKeywords(),
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token: "punctuation.section.scope.begin.objc",
+ regex: "\\[",
+ next: "bracketed_content"
+ },
+ {
+ token: "meta.function.objc",
+ regex: "^(?:-|\\+)\\s*"
+ }
+ ],
+ "constant_NSString": [
+ {
+ token: "constant.character.escape.objc",
+ regex: escapedConstRe
+ },
+ {
+ token: "invalid.illegal.unknown-escape.objc",
+ regex: "\\\\."
+ },
+ {
+ token: "string",
+ regex: '[^"\\\\]+'
+ },
+ {
+ token: "punctuation.definition.string.end",
+ regex: "\"",
+ next: "start"
+ }
+ ],
+ "protocol_list": [
+ {
+ token: "punctuation.section.scope.end.objc",
+ regex: ">",
+ next: "start"
+ },
+ {
+ token: "support.other.protocol.objc",
+ regex: "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b"
+ }
+ ],
+ "selectors": [
+ {
+ token: "support.function.any-method.name-of-parameter.objc",
+ regex: "\\b(?:[a-zA-Z_:][\\w]*)+"
+ },
+ {
+ token: "punctuation",
+ regex: "\\)",
+ next: "start"
+ }
+ ],
+ "bracketed_content": [
+ {
+ token: "punctuation.section.scope.end.objc",
+ regex: "\]",
+ next: "start"
+ },
+ {
+ token: ["support.function.any-method.objc"],
+ regex: "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)",
+ next: "start"
+ },
+ {
+ token: "support.function.any-method.objc",
+ regex: "\\w+(?::|(?=\]))",
+ next: "start"
+ }
+ ],
+ "bracketed_strings": [
+ {
+ token: "punctuation.section.scope.end.objc",
+ regex: "\]",
+ next: "start"
+ },
+ {
+ token: "keyword.operator.logical.predicate.cocoa",
+ regex: "\\b(?:AND|OR|NOT|IN)\\b"
+ },
+ {
+ token: ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"],
+ regex: "\\b(\w+)(:)"
+ },
+ {
+ regex: "\\b(?:ALL|ANY|SOME|NONE)\\b",
+ token: "constant.language.predicate.cocoa"
+ },
+ {
+ regex: "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",
+ token: "constant.language.predicate.cocoa"
+ },
+ {
+ regex: "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",
+ token: "keyword.operator.comparison.predicate.cocoa"
+ },
+ {
+ regex: "\\bC(?:ASEINSENSITIVE|I)\\b",
+ token: "keyword.other.modifier.predicate.cocoa"
+ },
+ {
+ regex: "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",
+ token: "keyword.other.predicate.cocoa"
+ },
+ {
+ regex: escapedConstRe,
+ token: "constant.character.escape.objc"
+ },
+ {
+ regex: "\\\\.",
+ token: "invalid.illegal.unknown-escape.objc"
+ },
+ {
+ token: "string",
+ regex: '[^"\\\\]'
+ },
+ {
+ token: "punctuation.definition.string.end.objc",
+ regex: "\"",
+ next: "predicates"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "methods" : [
+ {
+ token : "meta.function.objc",
+ regex : "(?=\\{|#)|;",
+ next : "start"
+ }
+ ]
+}
+
+ // copy in C-Rules directly
+ for (var r in cRules) {
+ if (this.$rules[r]) {
+ if (this.$rules[r].push)
+ this.$rules[r].push.apply(this.$rules[r], cRules[r]);
+ } else {
+ this.$rules[r] = cRules[r];
+ }
+ }
+
+ this.$rules.bracketed_content = this.$rules.bracketed_content.concat(
+ this.$rules.start, specialVariables
+ );
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(ObjectiveCHighlightRules, CHighlightRules);
+
+exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ocaml.js b/src/fauxton/assets/js/libs/ace/mode/ocaml.js
new file mode 100644
index 000000000..1f69977a0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ocaml.js
@@ -0,0 +1,97 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = OcamlHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;
+
+(function() {
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(\*(.*)\*\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)");
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') &&
+ state === 'start' && indenter.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/ocaml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/ocaml_highlight_rules.js
new file mode 100644
index 000000000..a17f034d9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ocaml_highlight_rules.js
@@ -0,0 +1,337 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var OcamlHighlightRules = function() {
+
+ var keywords = (
+ "and|as|assert|begin|class|constraint|do|done|downto|else|end|" +
+ "exception|external|for|fun|function|functor|if|in|include|" +
+ "inherit|initializer|lazy|let|match|method|module|mutable|new|" +
+ "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" +
+ "virtual|when|while|with"
+ );
+
+ var builtinConstants = ("true|false");
+
+ var builtinFunctions = (
+ "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" +
+ "add_available_units|add_big_int|add_buffer|add_channel|add_char|" +
+ "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" +
+ "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" +
+ "allow_unsafe_modules|always|append|appname_get|appname_set|" +
+ "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" +
+ "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" +
+ "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" +
+ "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" +
+ "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" +
+ "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" +
+ "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" +
+ "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" +
+ "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" +
+ "chown|chr|chroot|classify_float|clear|clear_available_units|" +
+ "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" +
+ "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" +
+ "close_out|close_out_noerr|close_process|close_process|" +
+ "close_process_full|close_process_in|close_process_out|close_subwindow|" +
+ "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" +
+ "combine|combine|command|compact|compare|compare_big_int|compare_num|" +
+ "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" +
+ "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" +
+ "create_matrix|create_matrix|create_matrix|create_object|" +
+ "create_object_and_run_initializers|create_object_opt|create_process|" +
+ "create_process|create_process_env|create_process_env|create_table|" +
+ "current|current_dir_name|current_point|current_x|current_y|curveto|" +
+ "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" +
+ "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" +
+ "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" +
+ "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" +
+ "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" +
+ "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" +
+ "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" +
+ "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" +
+ "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" +
+ "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" +
+ "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" +
+ "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" +
+ "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" +
+ "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" +
+ "for_all|for_all2|force|force_newline|force_val|foreground|fork|" +
+ "format_of_string|formatter_of_buffer|formatter_of_out_channel|" +
+ "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" +
+ "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" +
+ "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" +
+ "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" +
+ "get_all_formatter_output_functions|get_approx_printing|get_copy|" +
+ "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" +
+ "get_formatter_output_functions|get_formatter_tag_functions|get_image|" +
+ "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" +
+ "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" +
+ "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" +
+ "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" +
+ "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" +
+ "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" +
+ "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" +
+ "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" +
+ "global_replace|global_substitute|gmtime|green|grid|group_beginning|" +
+ "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" +
+ "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" +
+ "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" +
+ "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" +
+ "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" +
+ "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" +
+ "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" +
+ "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" +
+ "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" +
+ "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" +
+ "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" +
+ "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" +
+ "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" +
+ "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" +
+ "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" +
+ "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" +
+ "marshal|match_beginning|match_end|matched_group|matched_string|max|" +
+ "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" +
+ "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" +
+ "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" +
+ "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" +
+ "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" +
+ "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" +
+ "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" +
+ "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" +
+ "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" +
+ "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" +
+ "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" +
+ "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" +
+ "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" +
+ "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" +
+ "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" +
+ "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" +
+ "output_char|output_string|output_value|over_max_boxes|pack|params|" +
+ "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" +
+ "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" +
+ "power_big_int_positive_big_int|power_big_int_positive_int|" +
+ "power_int_positive_big_int|power_int_positive_int|power_num|" +
+ "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" +
+ "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" +
+ "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" +
+ "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" +
+ "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" +
+ "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" +
+ "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" +
+ "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" +
+ "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" +
+ "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" +
+ "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" +
+ "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" +
+ "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" +
+ "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" +
+ "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" +
+ "print_bool|print_break|print_char|print_cut|print_endline|print_float|" +
+ "print_flush|print_if_newline|print_int|print_newline|print_space|" +
+ "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" +
+ "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" +
+ "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" +
+ "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" +
+ "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" +
+ "regexp_string_case_fold|register|register_exception|rem|remember_mode|" +
+ "remove|remove_assoc|remove_assq|rename|replace|replace_first|" +
+ "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" +
+ "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" +
+ "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" +
+ "run_initializers|run_initializers_opt|scanf|search_backward|" +
+ "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" +
+ "set_all_formatter_output_functions|set_approx_printing|" +
+ "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" +
+ "set_close_on_exec|set_color|set_ellipsis_text|" +
+ "set_error_when_null_denominator|set_field|set_floating_precision|" +
+ "set_font|set_formatter_out_channel|set_formatter_output_functions|" +
+ "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" +
+ "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" +
+ "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" +
+ "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" +
+ "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" +
+ "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" +
+ "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" +
+ "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" +
+ "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" +
+ "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" +
+ "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" +
+ "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" +
+ "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" +
+ "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" +
+ "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" +
+ "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" +
+ "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" +
+ "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" +
+ "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" +
+ "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" +
+ "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" +
+ "str_formatter|string|string_after|string_before|string_match|" +
+ "string_of_big_int|string_of_bool|string_of_float|string_of_format|" +
+ "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" +
+ "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" +
+ "sub_right|subset|subset|substitute_first|substring|succ|succ|" +
+ "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" +
+ "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" +
+ "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" +
+ "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" +
+ "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" +
+ "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" +
+ "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" +
+ "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" +
+ "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" +
+ "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" +
+ "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" +
+ "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" +
+ "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" +
+ "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" +
+ "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" +
+
+ "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" +
+ "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" +
+ "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" +
+ "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" +
+ "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" +
+ "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" +
+ "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "support.function": builtinFunctions
+ }, "identifier");
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : '\\(\\*.*?\\*\\)\\s*?$'
+ },
+ {
+ token : "comment",
+ regex : '\\(\\*.*',
+ next : "comment"
+ },
+ {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ },
+ {
+ token : "string", // single char
+ regex : "'.'"
+ },
+ {
+ token : "string", // " string
+ regex : '"',
+ next : "qstring"
+ },
+ {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ },
+ {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ },
+ {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ },
+ {
+ token : "keyword.operator",
+ regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="
+ },
+ {
+ token : "paren.lparen",
+ regex : "[[({]"
+ },
+ {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ },
+ {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\)",
+ next : "start"
+ },
+ {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "qstring" : [
+ {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(OcamlHighlightRules, TextHighlightRules);
+
+exports.OcamlHighlightRules = OcamlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/pascal.js b/src/fauxton/assets/js/libs/ace/mode/pascal.js
new file mode 100644
index 000000000..cabdb0dc5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/pascal.js
@@ -0,0 +1,67 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PascalHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["--", "//"];
+ this.blockComment = [
+ {start: "(*", end: "*)"},
+ {start: "{", end: "}"}
+ ];
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/pascal_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/pascal_highlight_rules.js
new file mode 100644
index 000000000..ac8a41800
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/pascal_highlight_rules.js
@@ -0,0 +1,127 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* THIS FILE WAS AUTOGENERATED FROM tool\tm bundles\pascal.tmbundle\Syntaxes\Pascal.plist (UUID: F42FA544-6B1C-11D9-9517-000D93589AF6) */
+/****************************************************************
+ * IT MIGHT NOT BE PERFECT, PARTICULARLY: *
+ * IN DECIDING STATES TO TRANSITION TO, *
+ * IGNORING WHITESPACE, *
+ * IGNORING GROUPS WITH ?:, *
+ * EXTENDING EXISTING MODES, *
+ * GATHERING KEYWORDS, OR *
+ * DECIDING WHEN TO USE PUSH. *
+ * ...But it's a good start from an existing *.tmlanguage file. *
+ ****************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PascalHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { caseInsensitive: true,
+ token: 'keyword.control.pascal',
+ regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' },
+ { caseInsensitive: true,
+ token:
+ [ 'variable.pascal', "text",
+ 'storage.type.prototype.pascal',
+ 'entity.name.function.prototype.pascal' ],
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' },
+ { caseInsensitive: true,
+ token:
+ [ 'variable.pascal', "text",
+ 'storage.type.function.pascal',
+ 'entity.name.function.pascal' ],
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' },
+ { token: 'constant.numeric.pascal',
+ regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '--.*$',
+ push_:
+ [ { token: 'comment.line.double-dash.pascal.one',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-dash.pascal.one' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '//.*$',
+ push_:
+ [ { token: 'comment.line.double-slash.pascal.two',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.pascal.two' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\(\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\*\\)',
+ next: 'pop' },
+ { defaultToken: 'comment.block.pascal.one' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\}',
+ next: 'pop' },
+ { defaultToken: 'comment.block.pascal.two' } ] },
+ { token: 'punctuation.definition.string.begin.pascal',
+ regex: '"',
+ push:
+ [ { token: 'constant.character.escape.pascal', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.pascal',
+ regex: '"',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.pascal' } ],
+ //Double quoted strings are an extension and (generally) support C-style escape sequences.
+ },
+ { token: 'punctuation.definition.string.begin.pascal',
+ regex: '\'',
+ push:
+ [ { token: 'constant.character.escape.apostrophe.pascal',
+ regex: '\'\'' },
+ { token: 'punctuation.definition.string.end.pascal',
+ regex: '\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.pascal' } ] },
+ { token: 'keyword.operator',
+ regex: '[+\\-;,/*%]|:=|=' } ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(PascalHighlightRules, TextHighlightRules);
+
+exports.PascalHighlightRules = PascalHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/perl.js b/src/fauxton/assets/js/libs/ace/mode/perl.js
new file mode 100644
index 000000000..e8d930bc3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/perl.js
@@ -0,0 +1,90 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PerlHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"});
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = [
+ {start: "=begin", end: "=cut"},
+ {start: "=item", end: "=cut"}
+ ];
+
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/perl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/perl_highlight_rules.js
new file mode 100644
index 000000000..7c183fe37
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/perl_highlight_rules.js
@@ -0,0 +1,165 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PerlHighlightRules = function() {
+
+ var keywords = (
+ "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" +
+ "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars"
+ );
+
+ var buildinConstants = ("ARGV|ENV|INC|SIG");
+
+ var builtinFunctions = (
+ "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" +
+ "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" +
+ "getpeername|setpriority|getprotoent|setprotoent|getpriority|" +
+ "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" +
+ "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" +
+ "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" +
+ "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" +
+ "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" +
+ "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" +
+ "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" +
+ "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" +
+ "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" +
+ "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" +
+ "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" +
+ "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" +
+ "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" +
+ "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" +
+ "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" +
+ "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" +
+ "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" +
+ "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" +
+ "map|die|uc|lc|do"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": builtinFunctions
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment.doc",
+ regex : "^=(?:begin|item)\\b",
+ next : "block_comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0x[0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "block_comment": [
+ {
+ token: "comment.doc",
+ regex: "^=cut\\b",
+ next: "start"
+ },
+ {
+ defaultToken: "comment.doc"
+ }
+ ]
+ };
+};
+
+oop.inherits(PerlHighlightRules, TextHighlightRules);
+
+exports.PerlHighlightRules = PerlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/pgsql.js b/src/fauxton/assets/js/libs/ace/mode/pgsql.js
new file mode 100755
index 000000000..cdcf109a4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/pgsql.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("../mode/text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = PgsqlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "start" || state == "keyword.statementEnd") {
+ return "";
+ } else {
+ return this.$getIndent(line); // Keep whatever indent the previous line has
+ }
+ }
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/pgsql_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/pgsql_highlight_rules.js
new file mode 100755
index 000000000..1e1694e01
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/pgsql_highlight_rules.js
@@ -0,0 +1,570 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+// Supporting perl and python for now -- both in pg core and ace
+var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+
+var PgsqlHighlightRules = function() {
+
+ // Keywords, functions, operators last updated for pg 9.1.
+ var keywords = (
+ "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" +
+ "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" +
+ "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" +
+ "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" +
+ "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" +
+ "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" +
+ "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" +
+ "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" +
+ "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" +
+ "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" +
+ "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" +
+ "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" +
+ "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" +
+ "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" +
+ "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" +
+ "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" +
+ "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" +
+ "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" +
+ "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" +
+ "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" +
+ "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" +
+ "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" +
+ "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" +
+ "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" +
+ "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" +
+ "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" +
+ "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" +
+ "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" +
+ "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" +
+ "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" +
+ "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" +
+ "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" +
+ "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" +
+ "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" +
+ "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" +
+ "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" +
+ "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" +
+ "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" +
+ "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" +
+ "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone"
+ );
+
+
+ var builtinFunctions = (
+ "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" +
+ "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" +
+ "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" +
+ "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" +
+ "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" +
+ "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" +
+ "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" +
+ "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" +
+ "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" +
+ "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" +
+ "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" +
+ "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" +
+ "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" +
+ "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" +
+ "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" +
+ "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" +
+ "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" +
+ "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" +
+ "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" +
+ "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" +
+ "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" +
+ "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" +
+ "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" +
+ "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" +
+ "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" +
+ "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" +
+ "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" +
+ "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" +
+ "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" +
+ "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" +
+ "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" +
+ "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" +
+ "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" +
+ "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" +
+ "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" +
+ "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" +
+ "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" +
+ "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" +
+ "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" +
+ "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" +
+ "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" +
+ "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" +
+ "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" +
+ "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" +
+ "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" +
+ "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" +
+ "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" +
+ "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" +
+ "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" +
+ "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" +
+ "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" +
+ "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" +
+ "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" +
+ "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" +
+ "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" +
+ "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" +
+ "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" +
+ "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" +
+ "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" +
+ "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" +
+ "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" +
+ "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" +
+ "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" +
+ "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" +
+ "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" +
+ "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" +
+ "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" +
+ "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" +
+ "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" +
+ "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" +
+ "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" +
+ "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" +
+ "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" +
+ "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" +
+ "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" +
+ "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" +
+ "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" +
+ "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" +
+ "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" +
+ "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" +
+ "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" +
+ "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" +
+ "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" +
+ "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" +
+ "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" +
+ "gist_circle_compress|gist_circle_consistent|gist_point_compress|" +
+ "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" +
+ "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" +
+ "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" +
+ "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" +
+ "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" +
+ "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" +
+ "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" +
+ "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" +
+ "has_function_privilege|has_language_privilege|has_schema_privilege|" +
+ "has_sequence_privilege|has_server_privilege|has_table_privilege|" +
+ "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" +
+ "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" +
+ "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" +
+ "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" +
+ "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" +
+ "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" +
+ "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" +
+ "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" +
+ "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" +
+ "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" +
+ "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" +
+ "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" +
+ "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" +
+ "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" +
+ "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" +
+ "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" +
+ "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" +
+ "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" +
+ "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" +
+ "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" +
+ "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" +
+ "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" +
+ "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" +
+ "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" +
+ "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" +
+ "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" +
+ "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" +
+ "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" +
+ "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" +
+ "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" +
+ "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" +
+ "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" +
+ "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" +
+ "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" +
+ "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" +
+ "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" +
+ "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" +
+ "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" +
+ "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" +
+ "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" +
+ "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" +
+ "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" +
+ "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" +
+ "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" +
+ "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" +
+ "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" +
+ "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" +
+ "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" +
+ "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" +
+ "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" +
+ "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" +
+ "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" +
+ "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" +
+ "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" +
+ "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" +
+ "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" +
+ "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" +
+ "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" +
+ "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" +
+ "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" +
+ "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" +
+ "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" +
+ "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" +
+ "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" +
+ "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" +
+ "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" +
+ "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" +
+ "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" +
+ "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" +
+ "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" +
+ "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" +
+ "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" +
+ "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" +
+ "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" +
+ "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" +
+ "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" +
+ "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" +
+ "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" +
+ "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" +
+ "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" +
+ "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" +
+ "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" +
+ "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" +
+ "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" +
+ "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" +
+ "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" +
+ "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" +
+ "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" +
+ "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" +
+ "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" +
+ "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" +
+ "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" +
+ "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" +
+ "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" +
+ "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" +
+ "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" +
+ "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" +
+ "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" +
+ "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" +
+ "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" +
+ "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" +
+ "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" +
+ "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" +
+ "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" +
+ "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" +
+ "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" +
+ "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" +
+ "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" +
+ "pg_stat_get_function_calls|pg_stat_get_function_self_time|" +
+ "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" +
+ "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" +
+ "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" +
+ "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" +
+ "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" +
+ "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" +
+ "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" +
+ "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" +
+ "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" +
+ "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" +
+ "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" +
+ "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" +
+ "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" +
+ "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" +
+ "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" +
+ "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" +
+ "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" +
+ "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" +
+ "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" +
+ "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" +
+ "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" +
+ "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" +
+ "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" +
+ "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" +
+ "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" +
+ "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" +
+ "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" +
+ "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" +
+ "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" +
+ "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" +
+ "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" +
+ "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" +
+ "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" +
+ "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" +
+ "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" +
+ "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" +
+ "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" +
+ "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" +
+ "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" +
+ "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" +
+ "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" +
+ "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" +
+ "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" +
+ "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" +
+ "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" +
+ "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" +
+ "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" +
+ "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" +
+ "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" +
+ "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" +
+ "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" +
+ "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" +
+ "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" +
+ "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" +
+ "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" +
+ "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" +
+ "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" +
+ "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" +
+ "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" +
+ "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" +
+ "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" +
+ "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" +
+ "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" +
+ "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" +
+ "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" +
+ "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" +
+ "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" +
+ "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" +
+ "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" +
+ "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" +
+ "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" +
+ "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" +
+ "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" +
+ "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" +
+ "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" +
+ "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" +
+ "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" +
+ "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" +
+ "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" +
+ "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" +
+ "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" +
+ "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" +
+ "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" +
+ "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" +
+ "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" +
+ "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" +
+ "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" +
+ "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" +
+ "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" +
+ "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" +
+ "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" +
+ "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" +
+ "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" +
+ "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" +
+ "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" +
+ "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" +
+ "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" +
+ "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" +
+ "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" +
+ "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" +
+ "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
+ "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" +
+ "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" +
+ "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" +
+ "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" +
+ "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" +
+ "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" +
+ "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" +
+ "xpath_exists"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier", true);
+
+
+ var sqlRules = [{
+ token : "string", // single line string -- assume dollar strings if multi-line for now
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "variable.language", // pg identifier
+ regex : '".*?"'
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers
+ }, {
+ token : "keyword.operator",
+ regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" +
+ "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" +
+ "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" +
+ "~=|~>=~|~>~|~~|~~\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+
+ this.$rules = {
+ "start" : [{
+ token : "comment",
+ regex : "--.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "comment"
+ },{
+ token : "keyword.statementBegin",
+ regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added.
+ next : "statement"
+ },{
+ token : "support.buildin", // psql directive
+ regex : "^\\\\[\\S]+.*$"
+ }
+ ],
+
+ "statement" : [{
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentStatement"
+ }, {
+ token : "statementEnd",
+ regex : ";",
+ next : "start"
+ }, {
+ token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter)
+ regex : "\\$perl\\$",
+ next : "perl-start"
+ }, {
+ token : "string",
+ regex : "\\$python\\$",
+ next : "python-start"
+ },{
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line
+ next : "dollarSql"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarStatementString"
+ }
+ ].concat(sqlRules),
+
+ "dollarSql" : [{
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment", // multi-line comment
+ regex : "\\/\\*",
+ next : "commentDollarSql"
+ }, {
+ token : "string", // end quoting with dollar at the start of a line
+ regex : "^\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string",
+ regex : "\\$[\\w_0-9]*\\$",
+ next : "dollarSqlString"
+ }
+ ].concat(sqlRules),
+
+ "comment" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentStatement" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "statement"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "commentDollarSql" : [{
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "dollarSql"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarStatementString" : [{
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "statement"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ],
+
+ "dollarSqlString" : [{
+ token : "string", // closing dollarstring
+ regex : ".*?\\$[\\w_0-9]*\\$",
+ next : "dollarSql"
+ }, {
+ token : "string", // dollarstring spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]);
+ this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]);
+};
+
+oop.inherits(PgsqlHighlightRules, TextHighlightRules);
+
+exports.PgsqlHighlightRules = PgsqlHighlightRules;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/php.js b/src/fauxton/assets/js/libs/ace/mode/php.js
new file mode 100644
index 000000000..18aecb66b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/php.js
@@ -0,0 +1,135 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
+var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var unicode = require("../unicode");
+
+var Mode = function(opts) {
+ var inline = opts && opts.inline;
+ var HighlightRules = inline ? PhpLangHighlightRules : PhpHighlightRules;
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\_]|\s])+", "g"
+ );
+
+
+ this.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "php-start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "php-doc-start") {
+ if (endState != "php-doc-start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("ok", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/php/php.js b/src/fauxton/assets/js/libs/ace/mode/php/php.js
new file mode 100644
index 000000000..12786baa7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/php/php.js
@@ -0,0 +1,5003 @@
+/*
+ php.js 0.1.0 <http://phpjs.hertzen.com/>
+ Copyright (c) 2013 Niklas von Hertzen
+
+ Released under MIT License
+
+ This file contains:
+ - [var PHP = {Constants:{}};]
+ - src/modules/tokenizer/constants.js
+ - src/parser/lexer.js
+ - src/parser/parser.js
+ - src/parser/yyn.js
+ - src/parser/yyn_stmt.js
+ - src/parser/yyn_expr.js
+ - src/parser/yyn_scalar.js
+*/
+
+
+
+define(function(require, exports, module) {
+
+var PHP = {Constants:{}};
+
+
+
+
+PHP.Constants.T_INCLUDE = 262;
+PHP.Constants.T_INCLUDE_ONCE = 261;
+PHP.Constants.T_EVAL = 260;
+PHP.Constants.T_REQUIRE = 259;
+PHP.Constants.T_REQUIRE_ONCE = 258;
+PHP.Constants.T_LOGICAL_OR = 263;
+PHP.Constants.T_LOGICAL_XOR = 264;
+PHP.Constants.T_LOGICAL_AND = 265;
+PHP.Constants.T_PRINT = 266;
+PHP.Constants.T_PLUS_EQUAL = 277;
+PHP.Constants.T_MINUS_EQUAL = 276;
+PHP.Constants.T_MUL_EQUAL = 275;
+PHP.Constants.T_DIV_EQUAL = 274;
+PHP.Constants.T_CONCAT_EQUAL = 273;
+PHP.Constants.T_MOD_EQUAL = 272;
+PHP.Constants.T_AND_EQUAL = 271;
+PHP.Constants.T_OR_EQUAL = 270;
+PHP.Constants.T_XOR_EQUAL = 269;
+PHP.Constants.T_SL_EQUAL = 268;
+PHP.Constants.T_SR_EQUAL = 267;
+PHP.Constants.T_BOOLEAN_OR = 278;
+PHP.Constants.T_BOOLEAN_AND = 279;
+PHP.Constants.T_IS_EQUAL = 283;
+PHP.Constants.T_IS_NOT_EQUAL = 282;
+PHP.Constants.T_IS_IDENTICAL = 281;
+PHP.Constants.T_IS_NOT_IDENTICAL = 280;
+PHP.Constants.T_IS_SMALLER_OR_EQUAL = 285;
+PHP.Constants.T_IS_GREATER_OR_EQUAL = 284;
+PHP.Constants.T_SL = 287;
+PHP.Constants.T_SR = 286;
+PHP.Constants.T_INSTANCEOF = 288;
+PHP.Constants.T_INC = 297;
+PHP.Constants.T_DEC = 296;
+PHP.Constants.T_INT_CAST = 295;
+PHP.Constants.T_DOUBLE_CAST = 294;
+PHP.Constants.T_STRING_CAST = 293;
+PHP.Constants.T_ARRAY_CAST = 292;
+PHP.Constants.T_OBJECT_CAST = 291;
+PHP.Constants.T_BOOL_CAST = 290;
+PHP.Constants.T_UNSET_CAST = 289;
+PHP.Constants.T_NEW = 299;
+PHP.Constants.T_CLONE = 298;
+PHP.Constants.T_EXIT = 300;
+PHP.Constants.T_IF = 301;
+PHP.Constants.T_ELSEIF = 302;
+PHP.Constants.T_ELSE = 303;
+PHP.Constants.T_ENDIF = 304;
+PHP.Constants.T_LNUMBER = 305;
+PHP.Constants.T_DNUMBER = 306;
+PHP.Constants.T_STRING = 307;
+PHP.Constants.T_STRING_VARNAME = 308;
+PHP.Constants.T_VARIABLE = 309;
+PHP.Constants.T_NUM_STRING = 310;
+PHP.Constants.T_INLINE_HTML = 311;
+PHP.Constants.T_CHARACTER = 312;
+PHP.Constants.T_BAD_CHARACTER = 313;
+PHP.Constants.T_ENCAPSED_AND_WHITESPACE = 314;
+PHP.Constants.T_CONSTANT_ENCAPSED_STRING = 315;
+PHP.Constants.T_ECHO = 316;
+PHP.Constants.T_DO = 317;
+PHP.Constants.T_WHILE = 318;
+PHP.Constants.T_ENDWHILE = 319;
+PHP.Constants.T_FOR = 320;
+PHP.Constants.T_ENDFOR = 321;
+PHP.Constants.T_FOREACH = 322;
+PHP.Constants.T_ENDFOREACH = 323;
+PHP.Constants.T_DECLARE = 324;
+PHP.Constants.T_ENDDECLARE = 325;
+PHP.Constants.T_AS = 326;
+PHP.Constants.T_SWITCH = 327;
+PHP.Constants.T_ENDSWITCH = 328;
+PHP.Constants.T_CASE = 329;
+PHP.Constants.T_DEFAULT = 330;
+PHP.Constants.T_BREAK = 331;
+PHP.Constants.T_CONTINUE = 332;
+PHP.Constants.T_GOTO = 333;
+PHP.Constants.T_FUNCTION = 334;
+PHP.Constants.T_CONST = 335;
+PHP.Constants.T_RETURN = 336;
+PHP.Constants.T_TRY = 337;
+PHP.Constants.T_CATCH = 338;
+PHP.Constants.T_THROW = 339;
+PHP.Constants.T_USE = 340;
+//PHP.Constants.T_INSTEADOF = ;
+PHP.Constants.T_GLOBAL = 341;
+PHP.Constants.T_STATIC = 347;
+PHP.Constants.T_ABSTRACT = 346;
+PHP.Constants.T_FINAL = 345;
+PHP.Constants.T_PRIVATE = 344;
+PHP.Constants.T_PROTECTED = 343;
+PHP.Constants.T_PUBLIC = 342;
+PHP.Constants.T_VAR = 348;
+PHP.Constants.T_UNSET = 349;
+PHP.Constants.T_ISSET = 350;
+PHP.Constants.T_EMPTY = 351;
+PHP.Constants.T_HALT_COMPILER = 352;
+PHP.Constants.T_CLASS = 353;
+PHP.Constants.T_TRAIT = 382;
+PHP.Constants.T_INTERFACE = 354;
+PHP.Constants.T_EXTENDS = 355;
+PHP.Constants.T_IMPLEMENTS = 356;
+PHP.Constants.T_OBJECT_OPERATOR = 357;
+PHP.Constants.T_DOUBLE_ARROW = 358;
+PHP.Constants.T_LIST = 359;
+PHP.Constants.T_ARRAY = 360;
+//PHP.Constants.T_CALLABLE = ;
+PHP.Constants.T_CLASS_C = 361;
+PHP.Constants.T_TRAIT_C = 381;
+PHP.Constants.T_METHOD_C = 362;
+PHP.Constants.T_FUNC_C = 363;
+PHP.Constants.T_LINE = 364;
+PHP.Constants.T_FILE = 365;
+PHP.Constants.T_COMMENT = 366;
+PHP.Constants.T_DOC_COMMENT = 367;
+PHP.Constants.T_OPEN_TAG = 368;
+PHP.Constants.T_OPEN_TAG_WITH_ECHO = 369;
+PHP.Constants.T_CLOSE_TAG = 370;
+PHP.Constants.T_WHITESPACE = 371;
+PHP.Constants.T_START_HEREDOC = 372;
+PHP.Constants.T_END_HEREDOC = 373;
+PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES = 374;
+PHP.Constants.T_CURLY_OPEN = 375;
+PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM = 376;
+PHP.Constants.T_DOUBLE_COLON = 376;
+PHP.Constants.T_NAMESPACE = 377;
+PHP.Constants.T_NS_C = 378;
+PHP.Constants.T_DIR = 379;
+PHP.Constants.T_NS_SEPARATOR = 380;
+PHP.Lexer = function( src, ini ) {
+
+
+ var heredoc,
+ lineBreaker = function( result ) {
+ if (result.match(/\n/) !== null) {
+ var quote = result.substring(0, 1);
+ result = '[' + result.split(/\n/).join( quote + "," + quote ) + '].join("\\n")';
+
+ }
+
+ return result;
+ },
+ prev,
+
+ openTag = (ini === undefined || (/^(on|true|1)$/i.test(ini.short_open_tag) ) ? /(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i : /(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i),
+ openTagStart = (ini === undefined || (/^(on|true|1)$/i.test(ini.short_open_tag)) ? /^(\<\?php\s|\<\?|\<\%|\<script language\=('|")?php('|")?\>)/i : /^(\<\?php\s|<\?=|\<script language\=('|")?php('|")?\>)/i),
+ tokens = [
+ {
+ value: PHP.Constants.T_NAMESPACE,
+ re: /^namespace(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_USE,
+ re: /^use(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_ABSTRACT,
+ re: /^abstract(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_IMPLEMENTS,
+ re: /^implements(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_INTERFACE,
+ re: /^interface(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_CONST,
+ re: /^const(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_STATIC,
+ re: /^static(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_FINAL,
+ re: /^final(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_VAR,
+ re: /^var(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_GLOBAL,
+ re: /^global(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_CLONE,
+ re: /^clone(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_THROW,
+ re: /^throw(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_EXTENDS,
+ re: /^extends(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_AND_EQUAL,
+ re: /^&=/
+ },
+ {
+ value: PHP.Constants.T_AS,
+ re: /^as(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_ARRAY_CAST,
+ re: /^\(array\)/i
+ },
+ {
+ value: PHP.Constants.T_BOOL_CAST,
+ re: /^\((bool|boolean)\)/i
+ },
+ {
+ value: PHP.Constants.T_DOUBLE_CAST,
+ re: /^\((real|float|double)\)/i
+ },
+ {
+ value: PHP.Constants.T_INT_CAST,
+ re: /^\((int|integer)\)/i
+ },
+ {
+ value: PHP.Constants.T_OBJECT_CAST,
+ re: /^\(object\)/i
+ },
+ {
+ value: PHP.Constants.T_STRING_CAST,
+ re: /^\(string\)/i
+ },
+ {
+ value: PHP.Constants.T_UNSET_CAST,
+ re: /^\(unset\)/i
+ },
+ {
+ value: PHP.Constants.T_TRY,
+ re: /^try(?=\s*{)/i
+ },
+ {
+ value: PHP.Constants.T_CATCH,
+ re: /^catch(?=\s*\()/i
+ },
+ {
+ value: PHP.Constants.T_INSTANCEOF,
+ re: /^instanceof(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_OR,
+ re: /^or(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_AND,
+ re: /^and(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_XOR,
+ re: /^xor(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_BOOLEAN_AND,
+ re: /^&&/
+ },
+ {
+ value: PHP.Constants.T_BOOLEAN_OR,
+ re: /^\|\|/
+ },
+ {
+ value: PHP.Constants.T_CONTINUE,
+ re: /^continue(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_BREAK,
+ re: /^break(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDDECLARE,
+ re: /^enddeclare(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDFOR,
+ re: /^endfor(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDFOREACH,
+ re: /^endforeach(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDIF,
+ re: /^endif(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDSWITCH,
+ re: /^endswitch(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_ENDWHILE,
+ re: /^endwhile(?=\s|;)/i
+ },
+ {
+ value: PHP.Constants.T_CASE,
+ re: /^case(?=\s)/i
+ },
+ {
+ value: PHP.Constants.T_DEFAULT,
+ re: /^default(?=\s|:)/i
+ },
+ {
+ value: PHP.Constants.T_SWITCH,
+ re: /^switch(?=[ (])/i
+ },
+ {
+ value: PHP.Constants.T_EXIT,
+ re: /^(exit|die)(?=[ \(;])/i
+ },
+ {
+ value: PHP.Constants.T_CLOSE_TAG,
+ re: /^(\?\>|\%\>|\<\/script\>)\s?\s?/i,
+ func: function( result ) {
+ insidePHP = false;
+ return result;
+ }
+ },
+ {
+ value: PHP.Constants.T_DOUBLE_ARROW,
+ re: /^\=\>/
+ },
+ {
+ value: PHP.Constants.T_DOUBLE_COLON,
+ re: /^\:\:/
+ },
+ {
+ value: PHP.Constants.T_METHOD_C,
+ re: /^__METHOD__/
+ },
+ {
+ value: PHP.Constants.T_LINE,
+ re: /^__LINE__/
+ },
+ {
+ value: PHP.Constants.T_FILE,
+ re: /^__FILE__/
+ },
+ {
+ value: PHP.Constants.T_FUNC_C,
+ re: /^__FUNCTION__/
+ },
+ {
+ value: PHP.Constants.T_NS_C,
+ re: /^__NAMESPACE__/
+ },
+ {
+ value: PHP.Constants.T_TRAIT_C,
+ re: /^__TRAIT__/
+ },
+ {
+ value: PHP.Constants.T_DIR,
+ re: /^__DIR__/
+ },
+ {
+ value: PHP.Constants.T_CLASS_C,
+ re: /^__CLASS__/
+ },
+ {
+ value: PHP.Constants.T_INC,
+ re: /^\+\+/
+ },
+ {
+ value: PHP.Constants.T_DEC,
+ re: /^\-\-/
+ },
+ {
+ value: PHP.Constants.T_CONCAT_EQUAL,
+ re: /^\.\=/
+ },
+ {
+ value: PHP.Constants.T_DIV_EQUAL,
+ re: /^\/\=/
+ },
+ {
+ value: PHP.Constants.T_XOR_EQUAL,
+ re: /^\^\=/
+ },
+ {
+ value: PHP.Constants.T_MUL_EQUAL,
+ re: /^\*\=/
+ },
+ {
+ value: PHP.Constants.T_MOD_EQUAL,
+ re: /^\%\=/
+ },
+ {
+ value: PHP.Constants.T_SL_EQUAL,
+ re: /^<<=/
+ },
+ {
+ value: PHP.Constants.T_START_HEREDOC,
+ re: /^<<<[A-Z_0-9]+\s/i,
+ func: function( result ){
+ heredoc = result.substring(3, result.length - 1);
+ return result;
+ }
+ },
+ {
+ value: PHP.Constants.T_SL,
+ re: /^<</
+ },
+ {
+ value: PHP.Constants.T_IS_SMALLER_OR_EQUAL,
+ re: /^<=/
+ },
+ {
+ value: PHP.Constants.T_SR_EQUAL,
+ re: /^>>=/
+ },
+ {
+ value: PHP.Constants.T_SR,
+ re: /^>>/
+ },
+ {
+ value: PHP.Constants.T_IS_GREATER_OR_EQUAL,
+ re: /^>=/
+ },
+ {
+ value: PHP.Constants.T_OR_EQUAL,
+ re: /^\|\=/
+ },
+ {
+ value: PHP.Constants.T_PLUS_EQUAL,
+ re: /^\+\=/
+ },
+ {
+ value: PHP.Constants.T_MINUS_EQUAL,
+ re: /^-\=/
+ },
+ {
+ value: PHP.Constants.T_OBJECT_OPERATOR,
+ re: /^\-\>/i
+ },
+ {
+ value: PHP.Constants.T_CLASS,
+ re: /^class(?=[\s\{])/i,
+ afterWhitespace: true
+ },
+ {
+ value: PHP.Constants.T_TRAIT,
+ re: /^trait(?=[\s]+[A-Za-z])/i,
+ },
+ {
+ value: PHP.Constants.T_PUBLIC,
+ re: /^public(?=[\s])/i
+ },
+ {
+ value: PHP.Constants.T_PRIVATE,
+ re: /^private(?=[\s])/i
+ },
+ {
+ value: PHP.Constants.T_PROTECTED,
+ re: /^protected(?=[\s])/i
+ },
+ {
+ value: PHP.Constants.T_ARRAY,
+ re: /^array(?=\s*?\()/i
+ },
+ {
+ value: PHP.Constants.T_EMPTY,
+ re: /^empty(?=[ \(])/i
+ },
+ {
+ value: PHP.Constants.T_ISSET,
+ re: /^isset(?=[ \(])/i
+ },
+ {
+ value: PHP.Constants.T_UNSET,
+ re: /^unset(?=[ \(])/i
+ },
+ {
+ value: PHP.Constants.T_RETURN,
+ re: /^return(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_FUNCTION,
+ re: /^function(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_ECHO,
+ re: /^echo(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_LIST,
+ re: /^list(?=\s*?\()/i
+ },
+ {
+ value: PHP.Constants.T_PRINT,
+ re: /^print(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_INCLUDE,
+ re: /^include(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_INCLUDE_ONCE,
+ re: /^include_once(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_REQUIRE,
+ re: /^require(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_REQUIRE_ONCE,
+ re: /^require_once(?=[ "'(;])/i
+ },
+ {
+ value: PHP.Constants.T_NEW,
+ re: /^new(?=[ ])/i
+ },
+ {
+ value: PHP.Constants.T_COMMENT,
+ re: /^\/\*([\S\s]*?)(?:\*\/|$)/
+ },
+ {
+ value: PHP.Constants.T_COMMENT,
+ re: /^\/\/.*(\s)?/
+ },
+ {
+ value: PHP.Constants.T_COMMENT,
+ re: /^\#.*(\s)?/
+ },
+ {
+ value: PHP.Constants.T_ELSEIF,
+ re: /^elseif(?=[\s(])/i
+ },
+ {
+ value: PHP.Constants.T_GOTO,
+ re: /^goto(?=[\s(])/i
+ },
+ {
+ value: PHP.Constants.T_ELSE,
+ re: /^else(?=[\s{:])/i
+ },
+ {
+ value: PHP.Constants.T_IF,
+ re: /^if(?=[\s(])/i
+ },
+ {
+ value: PHP.Constants.T_DO,
+ re: /^do(?=[ {])/i
+ },
+ {
+ value: PHP.Constants.T_WHILE,
+ re: /^while(?=[ (])/i
+ },
+ {
+ value: PHP.Constants.T_FOREACH,
+ re: /^foreach(?=[ (])/i
+ },
+ {
+ value: PHP.Constants.T_ISSET,
+ re: /^isset(?=[ (])/i
+ },
+ {
+ value: PHP.Constants.T_IS_IDENTICAL,
+ re: /^===/
+ },
+ {
+ value: PHP.Constants.T_IS_EQUAL,
+ re: /^==/
+ },
+ {
+ value: PHP.Constants.T_IS_NOT_IDENTICAL,
+ re: /^\!==/
+ },
+ {
+ value: PHP.Constants.T_IS_NOT_EQUAL,
+ re: /^(\!=|\<\>)/
+ },
+ {
+ value: PHP.Constants.T_FOR,
+ re: /^for(?=[ (])/i
+ },
+
+ {
+ value: PHP.Constants.T_DNUMBER,
+ re: /^[0-9]*\.[0-9]+([eE][-]?[0-9]*)?/
+ /*,
+ func: function( result ) {
+
+ // transform e to E - token_get_all_variation1.phpt
+ return (result - 0).toString().toUpperCase();
+ }*/
+
+ },
+ {
+ value: PHP.Constants.T_LNUMBER,
+ re: /^(0x[0-9A-F]+|[0-9]+)/i
+ },
+ {
+ value: PHP.Constants.T_OPEN_TAG_WITH_ECHO,
+ re: /^(\<\?=|\<\%=)/i
+ },
+ {
+ value: PHP.Constants.T_OPEN_TAG,
+ re: openTagStart
+ },
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: /^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
+ },
+ {
+ value: PHP.Constants.T_WHITESPACE,
+ re: /^\s+/
+ },
+ {
+ value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING,
+ re: /^("(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*')/,
+ func: function( result, token ) {
+
+ var curlyOpen = 0,
+ len,
+ bracketOpen = 0;
+
+ if (result.substring( 0,1 ) === "'") {
+ return result;
+ }
+
+ var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/g );
+ if ( match !== null ) {
+ // string has a variable
+
+ while( result.length > 0 ) {
+ len = result.length;
+ match = result.match( /^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\@\^\%\"\'\{\}]/ );
+
+ if ( match !== null ) {
+
+ results.push( match[ 0 ] );
+ result = result.substring( 1 );
+
+ if ( curlyOpen > 0 && match[ 0 ] === "}") {
+ curlyOpen--;
+ }
+
+ if ( match[ 0 ] === "[" ) {
+ bracketOpen++;
+ }
+
+ if ( match[ 0 ] === "]" ) {
+ bracketOpen--;
+ }
+
+ }
+
+ match = result.match(/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/);
+
+
+
+ if ( match !== null ) {
+
+ results.push([
+ parseInt(PHP.Constants.T_VARIABLE, 10),
+ match[ 0 ],
+ line
+ ]);
+
+ result = result.substring( match[ 0 ].length );
+
+ match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/);
+
+ if ( match !== null ) {
+
+ results.push([
+ parseInt(PHP.Constants.T_OBJECT_OPERATOR, 10),
+ match[ 1 ],
+ line
+ ]);
+ results.push([
+ parseInt(PHP.Constants.T_STRING, 10),
+ match[ 2 ],
+ line
+ ]);
+ if (match[3]) {
+ results.push(match[3]);
+ }
+ result = result.substring( match[ 0 ].length );
+ }
+
+
+ if ( result.match( /^\[/g ) !== null ) {
+ continue;
+ }
+ }
+
+ var re;
+ if ( curlyOpen > 0) {
+ re = /^([^\\\$"{}\]\)]|\\.)+/g;
+ } else {
+ re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;;
+ }
+
+ while(( match = result.match( re )) !== null ) {
+
+
+ if (result.length === 1) {
+ throw new Error(match);
+ }
+
+
+
+ results.push([
+ parseInt(( curlyOpen > 0 ) ? PHP.Constants.T_CONSTANT_ENCAPSED_STRING : PHP.Constants.T_ENCAPSED_AND_WHITESPACE, 10),
+ match[ 0 ].replace(/\n/g,"\\n").replace(/\r/g,""),
+ line
+ ]);
+
+ line += match[ 0 ].split('\n').length - 1;
+
+ result = result.substring( match[ 0 ].length );
+
+ }
+
+ if( result.match(/^{\$/) !== null ) {
+
+ results.push([
+ parseInt(PHP.Constants.T_CURLY_OPEN, 10),
+ "{",
+ line
+ ]);
+ result = result.substring( 1 );
+ curlyOpen++;
+ }
+
+ if (len === result.length) {
+ // nothing has been found yet
+ if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/g )) !== null) {
+ return;
+ }
+ }
+
+ }
+
+ return undefined;
+
+ } else {
+ result = result.replace(/\r/g,"");
+ }
+
+ /*
+ if (result.match(/\r\n/) !== null) {
+ var quote = result.substring(0, 1);
+
+ result = '[' + result.split(/\r\n/).join( quote + "," + quote ) + '].join("\\n")';
+
+ }
+ */
+ return result;
+ }
+ },
+ {
+ value: PHP.Constants.T_NS_SEPARATOR,
+ re: /^\\(?=[a-zA-Z_])/
+ },
+ {
+ value: PHP.Constants.T_STRING,
+ re: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
+ },
+ {
+ value: -1,
+ re: /^[\[\]\;\:\?\(\)\!\.\,\>\<\=\+\-\/\*\|\&\{\}\@\^\%\"\'\$\~]/
+ }];
+
+
+
+
+
+ var results = [],
+ line = 1,
+ insidePHP = false,
+ cancel = true;
+
+ if ( src === null ) {
+ return results;
+ }
+
+ if ( typeof src !== "string" ) {
+ src = src.toString();
+ }
+
+
+
+ while (src.length > 0 && cancel === true) {
+
+ if ( insidePHP === true ) {
+
+ if ( heredoc !== undefined ) {
+ // we are in a heredoc
+
+ var regexp = new RegExp('([\\S\\s]*?)(\\r\\n|\\n|\\r)(' + heredoc + ')(;|\\r\\n|\\n)',"i");
+
+
+
+ var result = src.match( regexp );
+ if ( result !== null ) {
+ // contents
+
+ results.push([
+ parseInt(PHP.Constants.T_ENCAPSED_AND_WHITESPACE, 10),
+ result[ 1 ].replace(/^\n/g,"").replace(/\\\$/g,"$") + "\n",
+ line
+ ]);
+
+
+ // note the no - 1 for length as regexp include one line as well
+ line += result[ 1 ].split('\n').length;
+
+ // heredoc end tag
+ results.push([
+ parseInt(PHP.Constants.T_END_HEREDOC, 10),
+ result[ 3 ],
+ line
+ ]);
+
+ src = src.substring( result[1].length + result[2].length + result[3].length );
+ heredoc = undefined;
+ }
+
+ if (result === null) {
+ throw Error("sup");
+ }
+
+
+ } else {
+ cancel = tokens.some(function( token ){
+ if ( token.afterWhitespace === true ) {
+ // check last
+ var last = results[ results.length - 1 ];
+ if ( !Array.isArray( last ) || (last[ 0 ] !== PHP.Constants.T_WHITESPACE && last[ 0 ] !== PHP.Constants.T_OPEN_TAG && last[ 0 ] !== PHP.Constants.T_COMMENT)) {
+ return false;
+ }
+ }
+ var result = src.match( token.re );
+
+ if ( result !== null ) {
+ if ( token.value !== -1) {
+ var resultString = result[ 0 ];
+
+
+
+ if (token.func !== undefined ) {
+ resultString = token.func( resultString, token );
+ }
+ if (resultString !== undefined ) {
+
+ results.push([
+ parseInt(token.value, 10),
+ resultString,
+ line
+ ]);
+ line += resultString.split('\n').length - 1;
+ }
+
+ } else {
+ // character token
+ results.push( result[ 0 ] );
+ }
+
+ src = src.substring(result[ 0 ].length);
+
+ return true;
+ }
+ return false;
+
+
+ });
+ }
+
+ } else {
+
+ var result = openTag.exec( src );
+
+
+ if ( result !== null ) {
+ if ( result.index > 0 ) {
+ var resultString = src.substring(0, result.index);
+ results.push ([
+ parseInt(PHP.Constants.T_INLINE_HTML, 10),
+ resultString,
+ line
+ ]);
+
+ line += resultString.split('\n').length - 1;
+
+ src = src.substring( result.index );
+ }
+
+ insidePHP = true;
+ } else {
+
+ results.push ([
+ parseInt(PHP.Constants.T_INLINE_HTML, 10),
+ src.replace(/^\n/, ""),
+ line
+ ]);
+ return results;
+ }
+
+ // src = src.substring(result[ 0 ].length);
+
+ }
+
+
+
+ }
+
+
+
+ return results;
+
+
+
+ };
+
+/*
+ * @author Niklas von Hertzen <niklas at hertzen.com>
+ * @created 15.6.2012
+ * @website http://hertzen.com
+ */
+
+/*
+ * The skeleton for this parser was written by Moriyoshi Koizumi and is based on
+ * the work by Masato Bito and is in the PUBLIC DOMAIN.
+ * Ported to JavaScript by Niklas von Hertzen
+ */
+
+
+PHP.Parser = function ( preprocessedTokens, eval ) {
+
+ var yybase = this.yybase,
+ yydefault = this.yydefault,
+ yycheck = this.yycheck,
+ yyaction = this.yyaction,
+ yylen = this.yylen,
+ yygbase = this.yygbase,
+ yygcheck = this.yygcheck,
+ yyp = this.yyp,
+ yygoto = this.yygoto,
+ yylhs = this.yylhs,
+ terminals = this.terminals,
+ translate = this.translate,
+ yygdefault = this.yygdefault;
+
+
+ this.pos = -1;
+ this.line = 1;
+
+ this.tokenMap = this.createTokenMap( );
+
+ this.dropTokens = {};
+ this.dropTokens[ PHP.Constants.T_WHITESPACE ] = 1;
+ this.dropTokens[ PHP.Constants.T_OPEN_TAG ] = 1;
+ var tokens = [];
+
+ // pre-process
+ preprocessedTokens.forEach( function( token, index ) {
+ if ( typeof token === "object" && token[ 0 ] === PHP.Constants.T_OPEN_TAG_WITH_ECHO) {
+ tokens.push([
+ PHP.Constants.T_OPEN_TAG,
+ token[ 1 ],
+ token[ 2 ]
+ ]);
+ tokens.push([
+ PHP.Constants.T_ECHO,
+ token[ 1 ],
+ token[ 2 ]
+ ]);
+ } else {
+ tokens.push( token );
+ }
+ });
+ this.tokens = tokens;
+
+ // We start off with no lookahead-token
+ var tokenId = this.TOKEN_NONE;
+
+ // The attributes for a node are taken from the first and last token of the node.
+ // From the first token only the startAttributes are taken and from the last only
+ // the endAttributes. Both are merged using the array union operator (+).
+ this.startAttributes = {
+ 'startLine': 1
+ };
+
+ this.endAttributes = {};
+
+ // In order to figure out the attributes for the starting token, we have to keep
+ // them in a stack
+ var attributeStack = [ this.startAttributes ];
+
+ // Start off in the initial state and keep a stack of previous states
+ var state = 0;
+ var stateStack = [ state ];
+
+ // AST stack
+ this.yyastk = [];
+
+ // Current position in the stack(s)
+ this.stackPos = 0;
+
+ var yyn;
+
+ var origTokenId;
+
+
+ for (;;) {
+
+ if ( yybase[ state ] === 0 ) {
+ yyn = yydefault[ state ];
+ } else {
+ if (tokenId === this.TOKEN_NONE ) {
+ // fetch the next token id from the lexer and fetch additional info by-ref
+ origTokenId = this.getNextToken( );
+
+ // map the lexer token id to the internally used token id's
+ tokenId = (origTokenId >= 0 && origTokenId < this.TOKEN_MAP_SIZE) ? translate[ origTokenId ] : this.TOKEN_INVALID;
+
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ }
+
+ if (((yyn = yybase[ state ] + tokenId) >= 0
+ && yyn < this.YYLAST && yycheck[ yyn ] === tokenId
+ || (state < this.YY2TBLSTATE
+ && (yyn = yybase[state + this.YYNLSTATES] + tokenId) >= 0
+ && yyn < this.YYLAST
+ && yycheck[ yyn ] === tokenId))
+ && (yyn = yyaction[ yyn ]) !== this.YYDEFAULT ) {
+ /*
+ * >= YYNLSTATE: shift and reduce
+ * > 0: shift
+ * = 0: accept
+ * < 0: reduce
+ * = -YYUNEXPECTED: error
+ */
+ if (yyn > 0) {
+ /* shift */
+ ++this.stackPos;
+
+ stateStack[ this.stackPos ] = state = yyn;
+ this.yyastk[ this.stackPos ] = this.tokenValue;
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ tokenId = this.TOKEN_NONE;
+
+ if (yyn < this.YYNLSTATES)
+ continue;
+
+ /* $yyn >= YYNLSTATES means shift-and-reduce */
+ yyn -= this.YYNLSTATES;
+ } else {
+ yyn = -yyn;
+ }
+ } else {
+ yyn = yydefault[ state ];
+ }
+ }
+
+ for (;;) {
+ /* reduce/error */
+
+ if ( yyn === 0 ) {
+ /* accept */
+ return this.yyval;
+ } else if (yyn !== this.YYUNEXPECTED ) {
+ /* reduce */
+ for (var attr in this.endAttributes) {
+ attributeStack[ this.stackPos - yylen[ yyn ] ][ attr ] = this.endAttributes[ attr ];
+ }
+ try {
+ this['yyn' + yyn](attributeStack[ this.stackPos - yylen[ yyn ] ]);
+ } catch (e) {
+ /*
+ if (-1 === $e->getRawLine()) {
+ $e->setRawLine($startAttributes['startLine']);
+ }
+ */
+ throw e;
+ }
+
+ /* Goto - shift nonterminal */
+ this.stackPos -= yylen[ yyn ];
+ yyn = yylhs[ yyn ];
+ if ((yyp = yygbase[ yyn ] + stateStack[ this.stackPos ]) >= 0
+ && yyp < this.YYGLAST
+ && yygcheck[ yyp ] === yyn) {
+ state = yygoto[ yyp ];
+ } else {
+ state = yygdefault[ yyn ];
+ }
+
+ ++this.stackPos;
+
+ stateStack[ this.stackPos ] = state;
+ this.yyastk[ this.stackPos ] = this.yyval;
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ } else {
+ /* error */
+ if (eval !== true) {
+
+ var expected = [];
+
+ for (var i = 0; i < this.TOKEN_MAP_SIZE; ++i) {
+ if ((yyn = yybase[ state ] + i) >= 0 && yyn < this.YYLAST && yycheck[ yyn ] == i
+ || state < this.YY2TBLSTATE
+ && (yyn = yybase[ state + this.YYNLSTATES] + i)
+ && yyn < this.YYLAST && yycheck[ yyn ] == i
+ ) {
+ if (yyaction[ yyn ] != this.YYUNEXPECTED) {
+ if (expected.length == 4) {
+ /* Too many expected tokens */
+ expected = [];
+ break;
+ }
+
+ expected.push( this.terminals[ i ] );
+ }
+ }
+ }
+
+ var expectedString = '';
+ if (expected.length) {
+ expectedString = ', expecting ' + expected.join(' or ');
+ }
+ throw new PHP.ParseError('syntax error, unexpected ' + terminals[ tokenId ] + expectedString, this.startAttributes['startLine']);
+ } else {
+ return this.startAttributes['startLine'];
+ }
+
+ }
+
+ if (state < this.YYNLSTATES)
+ break;
+ /* >= YYNLSTATES means shift-and-reduce */
+ yyn = state - this.YYNLSTATES;
+ }
+ }
+};
+
+PHP.ParseError = function( msg, line ) {
+ this.message = msg;
+ this.line = line;
+};
+
+PHP.Parser.prototype.MODIFIER_PUBLIC = 1;
+PHP.Parser.prototype.MODIFIER_PROTECTED = 2;
+PHP.Parser.prototype.MODIFIER_PRIVATE = 4;
+PHP.Parser.prototype.MODIFIER_STATIC = 8;
+PHP.Parser.prototype.MODIFIER_ABSTRACT = 16;
+PHP.Parser.prototype.MODIFIER_FINAL = 32;
+
+PHP.Parser.prototype.getNextToken = function( ) {
+
+ this.startAttributes = {};
+ this.endAttributes = {};
+
+ var token,
+ tmp;
+
+ while (this.tokens[++this.pos] !== undefined) {
+ token = this.tokens[this.pos];
+
+ if (typeof token === "string") {
+ this.startAttributes['startLine'] = this.line;
+ this.endAttributes['endLine'] = this.line;
+
+ // bug in token_get_all
+ if ('b"' === token) {
+ this.tokenValue = 'b"';
+ return '"'.charCodeAt(0);
+ } else {
+ this.tokenValue = token;
+ return token.charCodeAt(0);
+ }
+ } else {
+
+
+
+ this.line += ((tmp = token[ 1 ].match(/\n/g)) === null) ? 0 : tmp.length;
+
+ if (PHP.Constants.T_COMMENT === token[0]) {
+
+ if (!Array.isArray(this.startAttributes['comments'])) {
+ this.startAttributes['comments'] = [];
+ }
+
+ this.startAttributes['comments'].push( {
+ type: "comment",
+ comment: token[1],
+ line: token[2]
+ });
+
+ } else if (PHP.Constants.T_DOC_COMMENT === token[0]) {
+ this.startAttributes['comments'].push( new PHPParser_Comment_Doc(token[1], token[2]) );
+ } else if (this.dropTokens[token[0]] === undefined) {
+ this.tokenValue = token[1];
+ this.startAttributes['startLine'] = token[2];
+ this.endAttributes['endLine'] = this.line;
+
+ return this.tokenMap[token[0]];
+ }
+ }
+ }
+
+ this.startAttributes['startLine'] = this.line;
+
+ // 0 is the EOF token
+ return 0;
+};
+
+PHP.Parser.prototype.tokenName = function( token ) {
+ var constants = ["T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_BOOLEAN_OR","T_BOOLEAN_AND","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_IS_SMALLER_OR_EQUAL","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","T_INSTANCEOF","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_CHARACTER","T_BAD_CHARACTER","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_CONST","T_RETURN","T_TRY","T_CATCH","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_DOUBLE_COLON","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR"];
+ var current = "UNKNOWN";
+ constants.some(function( constant ) {
+ if (PHP.Constants[ constant ] === token) {
+ current = constant;
+ return true;
+ } else {
+ return false;
+ }
+ });
+
+ return current;
+};
+
+/**
+ * Creates the token map.
+ *
+ * The token map maps the PHP internal token identifiers
+ * to the identifiers used by the PHP.Parser. Additionally it
+ * maps T_OPEN_TAG_WITH_ECHO to T_ECHO and T_CLOSE_TAG to ';'.
+ *
+ * @return array The token map
+ */
+
+PHP.Parser.prototype.createTokenMap = function() {
+ var tokenMap = {},
+ name,
+ i;
+ var T_DOUBLE_COLON = PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM;
+ // 256 is the minimum possible token number, as everything below
+ // it is an ASCII value
+ for ( i = 256; i < 1000; ++i ) {
+ // T_DOUBLE_COLON is equivalent to T_PAAMAYIM_NEKUDOTAYIM
+ if ( T_DOUBLE_COLON === i ) {
+ tokenMap[ i ] = this.T_PAAMAYIM_NEKUDOTAYIM;
+ // T_OPEN_TAG_WITH_ECHO with dropped T_OPEN_TAG results in T_ECHO
+ } else if( PHP.Constants.T_OPEN_TAG_WITH_ECHO === i ) {
+ tokenMap[ i ] = PHP.Constants.T_ECHO;
+ // T_CLOSE_TAG is equivalent to ';'
+ } else if( PHP.Constants.T_CLOSE_TAG === i ) {
+ tokenMap[ i ] = 59;
+ // and the others can be mapped directly
+ } else if ( 'UNKNOWN' !== (name = this.tokenName( i ) ) ) {
+ tokenMap[ i ] = this[name];
+ }
+ }
+ return tokenMap;
+};
+
+var yynStandard = function () {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+// todo fix
+
+PHP.Parser.prototype.MakeArray = function( arr ) {
+ return Array.isArray( arr ) ? arr : [ arr ];
+}
+
+
+PHP.Parser.prototype.parseString = function( str ) {
+ var bLength = 0;
+ if ('b' === str[0]) {
+ bLength = 1;
+ }
+
+ if ('\'' === str[ bLength ]) {
+ str = str.replace(
+ ['\\\\', '\\\''],
+ [ '\\', '\'']);
+ } else {
+
+ str = this.parseEscapeSequences( str, '"');
+
+ }
+
+ return str;
+
+};
+
+PHP.Parser.prototype.parseEscapeSequences = function( str, quote ) {
+
+
+
+ if (undefined !== quote) {
+ str = str.replace(new RegExp('\\' + quote, "g"), quote);
+ }
+
+ var replacements = {
+ '\\': '\\',
+ '$': '$',
+ 'n': "\n",
+ 'r': "\r",
+ 't': "\t",
+ 'f': "\f",
+ 'v': "\v",
+ 'e': "\x1B"
+ };
+
+ return str.replace(
+ /~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~/g,
+ function ( matches ){
+ var str = matches[1];
+
+ if ( replacements[ str ] !== undefined ) {
+ return replacements[ str ];
+ } else if ('x' === str[ 0 ] || 'X' === str[ 0 ]) {
+ return chr(hexdec(str));
+ } else {
+ return chr(octdec(str));
+ }
+ }
+ );
+
+ return str;
+};
+
+/* This is an automatically GENERATED file, which should not be manually edited.
+ * Instead edit one of the following:
+ * * the grammar file grammar/zend_language_parser.jsy
+ * * the parser skeleton grammar/kymacc.js.parser
+ * * the preprocessing script grammar/rebuildParser.php
+ *
+ * The skeleton for this parser was written by Moriyoshi Koizumi and is based on
+ * the work by Masato Bito and is in the PUBLIC DOMAIN.
+ * Ported to JavaScript by Niklas von Hertzen
+ */
+
+PHP.Parser.prototype.TOKEN_NONE = -1;
+PHP.Parser.prototype.TOKEN_INVALID = 149;
+
+PHP.Parser.prototype.TOKEN_MAP_SIZE = 384;
+
+PHP.Parser.prototype.YYLAST = 913;
+PHP.Parser.prototype.YY2TBLSTATE = 328;
+PHP.Parser.prototype.YYGLAST = 415;
+PHP.Parser.prototype.YYNLSTATES = 544;
+PHP.Parser.prototype.YYUNEXPECTED = 32767;
+PHP.Parser.prototype.YYDEFAULT = -32766;
+
+// {{{ Tokens
+PHP.Parser.prototype.YYERRTOK = 256;
+PHP.Parser.prototype.T_INCLUDE = 257;
+PHP.Parser.prototype.T_INCLUDE_ONCE = 258;
+PHP.Parser.prototype.T_EVAL = 259;
+PHP.Parser.prototype.T_REQUIRE = 260;
+PHP.Parser.prototype.T_REQUIRE_ONCE = 261;
+PHP.Parser.prototype.T_LOGICAL_OR = 262;
+PHP.Parser.prototype.T_LOGICAL_XOR = 263;
+PHP.Parser.prototype.T_LOGICAL_AND = 264;
+PHP.Parser.prototype.T_PRINT = 265;
+PHP.Parser.prototype.T_PLUS_EQUAL = 266;
+PHP.Parser.prototype.T_MINUS_EQUAL = 267;
+PHP.Parser.prototype.T_MUL_EQUAL = 268;
+PHP.Parser.prototype.T_DIV_EQUAL = 269;
+PHP.Parser.prototype.T_CONCAT_EQUAL = 270;
+PHP.Parser.prototype.T_MOD_EQUAL = 271;
+PHP.Parser.prototype.T_AND_EQUAL = 272;
+PHP.Parser.prototype.T_OR_EQUAL = 273;
+PHP.Parser.prototype.T_XOR_EQUAL = 274;
+PHP.Parser.prototype.T_SL_EQUAL = 275;
+PHP.Parser.prototype.T_SR_EQUAL = 276;
+PHP.Parser.prototype.T_BOOLEAN_OR = 277;
+PHP.Parser.prototype.T_BOOLEAN_AND = 278;
+PHP.Parser.prototype.T_IS_EQUAL = 279;
+PHP.Parser.prototype.T_IS_NOT_EQUAL = 280;
+PHP.Parser.prototype.T_IS_IDENTICAL = 281;
+PHP.Parser.prototype.T_IS_NOT_IDENTICAL = 282;
+PHP.Parser.prototype.T_IS_SMALLER_OR_EQUAL = 283;
+PHP.Parser.prototype.T_IS_GREATER_OR_EQUAL = 284;
+PHP.Parser.prototype.T_SL = 285;
+PHP.Parser.prototype.T_SR = 286;
+PHP.Parser.prototype.T_INSTANCEOF = 287;
+PHP.Parser.prototype.T_INC = 288;
+PHP.Parser.prototype.T_DEC = 289;
+PHP.Parser.prototype.T_INT_CAST = 290;
+PHP.Parser.prototype.T_DOUBLE_CAST = 291;
+PHP.Parser.prototype.T_STRING_CAST = 292;
+PHP.Parser.prototype.T_ARRAY_CAST = 293;
+PHP.Parser.prototype.T_OBJECT_CAST = 294;
+PHP.Parser.prototype.T_BOOL_CAST = 295;
+PHP.Parser.prototype.T_UNSET_CAST = 296;
+PHP.Parser.prototype.T_NEW = 297;
+PHP.Parser.prototype.T_CLONE = 298;
+PHP.Parser.prototype.T_EXIT = 299;
+PHP.Parser.prototype.T_IF = 300;
+PHP.Parser.prototype.T_ELSEIF = 301;
+PHP.Parser.prototype.T_ELSE = 302;
+PHP.Parser.prototype.T_ENDIF = 303;
+PHP.Parser.prototype.T_LNUMBER = 304;
+PHP.Parser.prototype.T_DNUMBER = 305;
+PHP.Parser.prototype.T_STRING = 306;
+PHP.Parser.prototype.T_STRING_VARNAME = 307;
+PHP.Parser.prototype.T_VARIABLE = 308;
+PHP.Parser.prototype.T_NUM_STRING = 309;
+PHP.Parser.prototype.T_INLINE_HTML = 310;
+PHP.Parser.prototype.T_CHARACTER = 311;
+PHP.Parser.prototype.T_BAD_CHARACTER = 312;
+PHP.Parser.prototype.T_ENCAPSED_AND_WHITESPACE = 313;
+PHP.Parser.prototype.T_CONSTANT_ENCAPSED_STRING = 314;
+PHP.Parser.prototype.T_ECHO = 315;
+PHP.Parser.prototype.T_DO = 316;
+PHP.Parser.prototype.T_WHILE = 317;
+PHP.Parser.prototype.T_ENDWHILE = 318;
+PHP.Parser.prototype.T_FOR = 319;
+PHP.Parser.prototype.T_ENDFOR = 320;
+PHP.Parser.prototype.T_FOREACH = 321;
+PHP.Parser.prototype.T_ENDFOREACH = 322;
+PHP.Parser.prototype.T_DECLARE = 323;
+PHP.Parser.prototype.T_ENDDECLARE = 324;
+PHP.Parser.prototype.T_AS = 325;
+PHP.Parser.prototype.T_SWITCH = 326;
+PHP.Parser.prototype.T_ENDSWITCH = 327;
+PHP.Parser.prototype.T_CASE = 328;
+PHP.Parser.prototype.T_DEFAULT = 329;
+PHP.Parser.prototype.T_BREAK = 330;
+PHP.Parser.prototype.T_CONTINUE = 331;
+PHP.Parser.prototype.T_GOTO = 332;
+PHP.Parser.prototype.T_FUNCTION = 333;
+PHP.Parser.prototype.T_CONST = 334;
+PHP.Parser.prototype.T_RETURN = 335;
+PHP.Parser.prototype.T_TRY = 336;
+PHP.Parser.prototype.T_CATCH = 337;
+PHP.Parser.prototype.T_THROW = 338;
+PHP.Parser.prototype.T_USE = 339;
+PHP.Parser.prototype.T_INSTEADOF = 340;
+PHP.Parser.prototype.T_GLOBAL = 341;
+PHP.Parser.prototype.T_STATIC = 342;
+PHP.Parser.prototype.T_ABSTRACT = 343;
+PHP.Parser.prototype.T_FINAL = 344;
+PHP.Parser.prototype.T_PRIVATE = 345;
+PHP.Parser.prototype.T_PROTECTED = 346;
+PHP.Parser.prototype.T_PUBLIC = 347;
+PHP.Parser.prototype.T_VAR = 348;
+PHP.Parser.prototype.T_UNSET = 349;
+PHP.Parser.prototype.T_ISSET = 350;
+PHP.Parser.prototype.T_EMPTY = 351;
+PHP.Parser.prototype.T_HALT_COMPILER = 352;
+PHP.Parser.prototype.T_CLASS = 353;
+PHP.Parser.prototype.T_TRAIT = 354;
+PHP.Parser.prototype.T_INTERFACE = 355;
+PHP.Parser.prototype.T_EXTENDS = 356;
+PHP.Parser.prototype.T_IMPLEMENTS = 357;
+PHP.Parser.prototype.T_OBJECT_OPERATOR = 358;
+PHP.Parser.prototype.T_DOUBLE_ARROW = 359;
+PHP.Parser.prototype.T_LIST = 360;
+PHP.Parser.prototype.T_ARRAY = 361;
+PHP.Parser.prototype.T_CALLABLE = 362;
+PHP.Parser.prototype.T_CLASS_C = 363;
+PHP.Parser.prototype.T_TRAIT_C = 364;
+PHP.Parser.prototype.T_METHOD_C = 365;
+PHP.Parser.prototype.T_FUNC_C = 366;
+PHP.Parser.prototype.T_LINE = 367;
+PHP.Parser.prototype.T_FILE = 368;
+PHP.Parser.prototype.T_COMMENT = 369;
+PHP.Parser.prototype.T_DOC_COMMENT = 370;
+PHP.Parser.prototype.T_OPEN_TAG = 371;
+PHP.Parser.prototype.T_OPEN_TAG_WITH_ECHO = 372;
+PHP.Parser.prototype.T_CLOSE_TAG = 373;
+PHP.Parser.prototype.T_WHITESPACE = 374;
+PHP.Parser.prototype.T_START_HEREDOC = 375;
+PHP.Parser.prototype.T_END_HEREDOC = 376;
+PHP.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES = 377;
+PHP.Parser.prototype.T_CURLY_OPEN = 378;
+PHP.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM = 379;
+PHP.Parser.prototype.T_NAMESPACE = 380;
+PHP.Parser.prototype.T_NS_C = 381;
+PHP.Parser.prototype.T_DIR = 382;
+PHP.Parser.prototype.T_NS_SEPARATOR = 383;
+// }}}
+
+/* @var array Map of token ids to their respective names */
+PHP.Parser.prototype.terminals = [
+ "$EOF",
+ "error",
+ "T_INCLUDE",
+ "T_INCLUDE_ONCE",
+ "T_EVAL",
+ "T_REQUIRE",
+ "T_REQUIRE_ONCE",
+ "','",
+ "T_LOGICAL_OR",
+ "T_LOGICAL_XOR",
+ "T_LOGICAL_AND",
+ "T_PRINT",
+ "'='",
+ "T_PLUS_EQUAL",
+ "T_MINUS_EQUAL",
+ "T_MUL_EQUAL",
+ "T_DIV_EQUAL",
+ "T_CONCAT_EQUAL",
+ "T_MOD_EQUAL",
+ "T_AND_EQUAL",
+ "T_OR_EQUAL",
+ "T_XOR_EQUAL",
+ "T_SL_EQUAL",
+ "T_SR_EQUAL",
+ "'?'",
+ "':'",
+ "T_BOOLEAN_OR",
+ "T_BOOLEAN_AND",
+ "'|'",
+ "'^'",
+ "'&'",
+ "T_IS_EQUAL",
+ "T_IS_NOT_EQUAL",
+ "T_IS_IDENTICAL",
+ "T_IS_NOT_IDENTICAL",
+ "'<'",
+ "T_IS_SMALLER_OR_EQUAL",
+ "'>'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_THROW",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_VAR",
+ "T_UNSET",
+ "T_ISSET",
+ "T_EMPTY",
+ "T_HALT_COMPILER",
+ "T_CLASS",
+ "T_TRAIT",
+ "T_INTERFACE",
+ "T_EXTENDS",
+ "T_IMPLEMENTS",
+ "T_OBJECT_OPERATOR",
+ "T_DOUBLE_ARROW",
+ "T_LIST",
+ "T_ARRAY",
+ "T_CALLABLE",
+ "T_CLASS_C",
+ "T_TRAIT_C",
+ "T_METHOD_C",
+ "T_FUNC_C",
+ "T_LINE",
+ "T_FILE",
+ "T_START_HEREDOC",
+ "T_END_HEREDOC",
+ "T_DOLLAR_OPEN_CURLY_BRACES",
+ "T_CURLY_OPEN",
+ "T_PAAMAYIM_NEKUDOTAYIM",
+ "T_NAMESPACE",
+ "T_NS_C",
+ "T_DIR",
+ "T_NS_SEPARATOR",
+ "';'",
+ "'{'",
+ "'}'",
+ "'('",
+ "')'",
+ "'$'",
+ "']'",
+ "'`'",
+ "'\"'"
+ , "???"
+];
+
+/* @var Map which translates lexer tokens to internal tokens */
+PHP.Parser.prototype.translate = [
+ 0, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 47, 148, 149, 145, 46, 30, 149,
+ 143, 144, 44, 41, 7, 42, 43, 45, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 25, 140,
+ 35, 12, 37, 24, 59, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 60, 149, 146, 29, 149, 147, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 141, 28, 142, 49, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 149, 149, 149, 149,
+ 149, 149, 149, 149, 149, 149, 1, 2, 3, 4,
+ 5, 6, 8, 9, 10, 11, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 26, 27, 31,
+ 32, 33, 34, 36, 38, 39, 40, 48, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 149, 149, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+ 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+ 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
+ 122, 123, 124, 125, 126, 127, 128, 129, 130, 149,
+ 149, 149, 149, 149, 149, 131, 132, 133, 134, 135,
+ 136, 137, 138, 139
+];
+
+PHP.Parser.prototype.yyaction = [
+ 61, 62, 363, 63, 64,-32766,-32766,-32766, 509, 65,
+ 708, 709, 710, 707, 706, 705,-32766,-32766,-32766,-32766,
+ -32766,-32766, 132,-32766,-32766,-32766,-32766,-32766,-32767,-32767,
+ -32767,-32767,-32766, 335,-32766,-32766,-32766,-32766,-32766, 66,
+ 67, 351, 663, 664, 40, 68, 548, 69, 232, 233,
+ 70, 71, 72, 73, 74, 75, 76, 77, 30, 246,
+ 78, 336, 364, -112, 0, 469, 833, 834, 365, 641,
+ 890, 436, 590, 41, 835, 53, 27, 366, 294, 367,
+ 687, 368, 921, 369, 923, 922, 370,-32766,-32766,-32766,
+ 42, 43, 371, 339, 126, 44, 372, 337, 79, 297,
+ 349, 292, 293,-32766, 918,-32766,-32766, 373, 374, 375,
+ 376, 377, 391, 199, 361, 338, 573, 613, 378, 379,
+ 380, 381, 845, 839, 840, 841, 842, 836, 837, 253,
+ -32766, 87, 88, 89, 391, 843, 838, 338, 597, 519,
+ 128, 80, 129, 273, 332, 257, 261, 47, 673, 90,
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100,
+ 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,
+ 799, 247, 884, 108, 109, 110, 226, 247, 21,-32766,
+ 310,-32766,-32766,-32766, 642, 548,-32766,-32766,-32766,-32766,
+ 56, 353,-32766,-32766,-32766, 55,-32766,-32766,-32766,-32766,
+ -32766, 58,-32766,-32766,-32766,-32766,-32766,-32766,-32766,-32766,
+ -32766, 557,-32766,-32766, 518,-32766, 548, 890,-32766, 390,
+ -32766, 228, 252,-32766,-32766,-32766,-32766,-32766, 275,-32766,
+ 234,-32766, 587, 588,-32766,-32766,-32766,-32766,-32766,-32766,
+ -32766, 46, 236,-32766,-32766, 281,-32766, 682, 348,-32766,
+ 390,-32766, 346, 333, 521,-32766,-32766,-32766, 271, 911,
+ 262, 237, 446, 911,-32766, 894, 59, 700, 358, 135,
+ 548, 123, 538, 35,-32766, 333, 122,-32766,-32766,-32766,
+ 271,-32766, 124,-32766, 692,-32766,-32766,-32766,-32766, 700,
+ 273, 22,-32766,-32766,-32766,-32766, 239,-32766,-32766, 612,
+ -32766, 548, 134,-32766, 390,-32766, 462, 354,-32766,-32766,
+ -32766,-32766,-32766, 227,-32766, 238,-32766, 845, 542,-32766,
+ 856, 611, 200,-32766,-32766,-32766, 259, 280,-32766,-32766,
+ 201,-32766, 855, 129,-32766, 390, 130, 202, 333, 206,
+ -32766,-32766,-32766, 271,-32766,-32766,-32766, 125, 601,-32766,
+ 136, 299, 700, 489, 28, 548, 105, 106, 107,-32766,
+ 498, 499,-32766,-32766,-32766, 207,-32766, 133,-32766, 525,
+ -32766,-32766,-32766,-32766, 663, 664, 527,-32766,-32766,-32766,
+ -32766, 528,-32766,-32766, 610,-32766, 548, 427,-32766, 390,
+ -32766, 532, 539,-32766,-32766,-32766,-32766,-32766, 240,-32766,
+ 247,-32766, 697, 543,-32766, 554, 523, 608,-32766,-32766,
+ -32766, 686, 535,-32766,-32766, 54,-32766, 57, 60,-32766,
+ 390, 246, -155, 278, 345,-32766,-32766,-32766, 506, 347,
+ -152, 471, 402, 403,-32766, 405, 404, 272, 493, 416,
+ 548, 318, 417, 505,-32766, 517, 548,-32766,-32766,-32766,
+ 549,-32766, 562,-32766, 916,-32766,-32766,-32766,-32766, 564,
+ 826, 848,-32766,-32766,-32766,-32766, 694,-32766,-32766, 485,
+ -32766, 548, 487,-32766, 390,-32766, 504, 802,-32766,-32766,
+ -32766,-32766,-32766, 279,-32766, 911,-32766, 502, 492,-32766,
+ 413, 483, 269,-32766,-32766,-32766, 243, 337,-32766,-32766,
+ 418,-32766, 454, 229,-32766, 390, 274, 373, 374, 344,
+ -32766,-32766,-32766, 360, 614,-32766, 573, 613, 378, 379,
+ -274, 548, 615, -332, 844,-32766, 258, 51,-32766,-32766,
+ -32766, 270,-32766, 346,-32766, 52,-32766, 260, 0,-32766,
+ -333,-32766,-32766,-32766,-32766,-32766,-32766, 205,-32766,-32766,
+ 49,-32766, 548, 424,-32766, 390,-32766, -266, 264,-32766,
+ -32766,-32766,-32766,-32766, 409,-32766, 343,-32766, 265, 312,
+ -32766, 470, 513, -275,-32766,-32766,-32766, 920, 337,-32766,
+ -32766, 530,-32766, 531, 600,-32766, 390, 592, 373, 374,
+ 578, 581,-32766,-32766, 644, 629,-32766, 573, 613, 378,
+ 379, 635, 548, 636, 576, 627,-32766, 625, 693,-32766,
+ -32766,-32766, 691,-32766, 591,-32766, 582,-32766, 203, 204,
+ -32766, 584, 583,-32766,-32766,-32766,-32766, 586, 599,-32766,
+ -32766, 589,-32766, 690, 558,-32766, 390, 197, 683, 919,
+ 86, 520, 522,-32766, 524, 833, 834, 529, 533,-32766,
+ 534, 537, 541, 835, 48, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 121, 127, 31, 633, 337,
+ 330, 634, 585,-32766, 32, 291, 337, 330, 478, 373,
+ 374, 917, 291, 891, 889, 875, 373, 374, 553, 613,
+ 378, 379, 737, 739, 887, 553, 613, 378, 379, 824,
+ 451, 675, 839, 840, 841, 842, 836, 837, 320, 895,
+ 277, 885, 23, 33, 843, 838, 556, 277, 337, 330,
+ -32766, 34,-32766, 555, 291, 36, 37, 38, 373, 374,
+ 39, 45, 50, 81, 82, 83, 84, 553, 613, 378,
+ 379,-32767,-32767,-32767,-32767, 103, 104, 105, 106, 107,
+ 337, 85, 131, 137, 337, 138, 198, 224, 225, 277,
+ 373, 374, -332, 230, 373, 374, 24, 337, 231, 573,
+ 613, 378, 379, 573, 613, 378, 379, 373, 374, 235,
+ 248, 249, 250, 337, 251, 0, 573, 613, 378, 379,
+ 276, 329, 331, 373, 374,-32766, 337, 574, 490, 792,
+ 337, 609, 573, 613, 378, 379, 373, 374, 25, 300,
+ 373, 374, 319, 337, 795, 573, 613, 378, 379, 573,
+ 613, 378, 379, 373, 374, 516, 355, 359, 445, 482,
+ 796, 507, 573, 613, 378, 379, 508, 548, 337, 890,
+ 775, 791, 337, 604, 803, 808, 806, 698, 373, 374,
+ 888, 807, 373, 374,-32766,-32766,-32766, 573, 613, 378,
+ 379, 573, 613, 378, 379, 873, 832, 804, 872, 851,
+ -32766, 809,-32766,-32766,-32766,-32766, 805, 20, 26, 29,
+ 298, 480, 515, 770, 778, 827, 457, 0, 900, 455,
+ 774, 0, 0, 0, 874, 870, 886, 823, 915, 852,
+ 869, 488, 0, 391, 793, 0, 338, 0, 0, 0,
+ 340, 0, 273
+];
+
+PHP.Parser.prototype.yycheck = [
+ 2, 3, 4, 5, 6, 8, 9, 10, 70, 11,
+ 104, 105, 106, 107, 108, 109, 8, 9, 10, 8,
+ 9, 24, 60, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 24, 7, 26, 27, 28, 29, 30, 41,
+ 42, 7, 123, 124, 7, 47, 70, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 144, 0, 75, 68, 69, 70, 25,
+ 72, 70, 74, 7, 76, 77, 78, 79, 7, 81,
+ 142, 83, 70, 85, 72, 73, 88, 8, 9, 10,
+ 92, 93, 94, 95, 7, 97, 98, 95, 100, 7,
+ 7, 103, 104, 24, 142, 26, 27, 105, 106, 111,
+ 112, 113, 136, 7, 7, 139, 114, 115, 116, 117,
+ 122, 123, 132, 125, 126, 127, 128, 129, 130, 131,
+ 8, 8, 9, 10, 136, 137, 138, 139, 140, 141,
+ 25, 143, 141, 145, 142, 147, 148, 24, 72, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 144, 48, 72, 44, 45, 46, 30, 48, 144, 64,
+ 72, 8, 9, 10, 140, 70, 8, 9, 10, 74,
+ 60, 25, 77, 78, 79, 60, 81, 24, 83, 26,
+ 85, 60, 24, 88, 26, 27, 28, 92, 93, 94,
+ 64, 140, 97, 98, 70, 100, 70, 72, 103, 104,
+ 74, 145, 7, 77, 78, 79, 111, 81, 7, 83,
+ 30, 85, 140, 140, 88, 8, 9, 10, 92, 93,
+ 94, 133, 134, 97, 98, 145, 100, 140, 7, 103,
+ 104, 24, 139, 96, 141, 140, 141, 111, 101, 75,
+ 75, 30, 70, 75, 64, 70, 60, 110, 121, 12,
+ 70, 141, 25, 143, 74, 96, 141, 77, 78, 79,
+ 101, 81, 141, 83, 140, 85, 140, 141, 88, 110,
+ 145, 144, 92, 93, 94, 64, 7, 97, 98, 142,
+ 100, 70, 141, 103, 104, 74, 145, 141, 77, 78,
+ 79, 111, 81, 7, 83, 30, 85, 132, 25, 88,
+ 132, 142, 12, 92, 93, 94, 120, 60, 97, 98,
+ 12, 100, 148, 141, 103, 104, 141, 12, 96, 12,
+ 140, 141, 111, 101, 8, 9, 10, 141, 25, 64,
+ 90, 91, 110, 65, 66, 70, 41, 42, 43, 74,
+ 65, 66, 77, 78, 79, 12, 81, 25, 83, 25,
+ 85, 140, 141, 88, 123, 124, 25, 92, 93, 94,
+ 64, 25, 97, 98, 142, 100, 70, 120, 103, 104,
+ 74, 25, 25, 77, 78, 79, 111, 81, 30, 83,
+ 48, 85, 140, 141, 88, 140, 141, 30, 92, 93,
+ 94, 140, 141, 97, 98, 60, 100, 60, 60, 103,
+ 104, 61, 72, 75, 70, 140, 141, 111, 67, 70,
+ 87, 99, 70, 70, 64, 70, 72, 102, 89, 70,
+ 70, 71, 70, 70, 74, 70, 70, 77, 78, 79,
+ 70, 81, 70, 83, 70, 85, 140, 141, 88, 70,
+ 144, 70, 92, 93, 94, 64, 70, 97, 98, 72,
+ 100, 70, 72, 103, 104, 74, 72, 72, 77, 78,
+ 79, 111, 81, 75, 83, 75, 85, 89, 86, 88,
+ 79, 101, 118, 92, 93, 94, 87, 95, 97, 98,
+ 87, 100, 87, 87, 103, 104, 118, 105, 106, 95,
+ 140, 141, 111, 95, 115, 64, 114, 115, 116, 117,
+ 135, 70, 115, 120, 132, 74, 120, 140, 77, 78,
+ 79, 119, 81, 139, 83, 140, 85, 120, -1, 88,
+ 120, 140, 141, 92, 93, 94, 64, 121, 97, 98,
+ 121, 100, 70, 122, 103, 104, 74, 135, 135, 77,
+ 78, 79, 111, 81, 139, 83, 139, 85, 135, 135,
+ 88, 135, 135, 135, 92, 93, 94, 142, 95, 97,
+ 98, 140, 100, 140, 140, 103, 104, 140, 105, 106,
+ 140, 140, 141, 111, 140, 140, 64, 114, 115, 116,
+ 117, 140, 70, 140, 140, 140, 74, 140, 140, 77,
+ 78, 79, 140, 81, 140, 83, 140, 85, 41, 42,
+ 88, 140, 140, 141, 92, 93, 94, 140, 140, 97,
+ 98, 140, 100, 140, 140, 103, 104, 60, 140, 142,
+ 141, 141, 141, 111, 141, 68, 69, 141, 141, 72,
+ 141, 141, 141, 76, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 23, 141, 143, 142, 95,
+ 96, 142, 140, 141, 143, 101, 95, 96, 142, 105,
+ 106, 142, 101, 142, 142, 142, 105, 106, 114, 115,
+ 116, 117, 50, 51, 142, 114, 115, 116, 117, 142,
+ 123, 142, 125, 126, 127, 128, 129, 130, 131, 142,
+ 136, 142, 144, 143, 137, 138, 142, 136, 95, 96,
+ 143, 143, 145, 142, 101, 143, 143, 143, 105, 106,
+ 143, 143, 143, 143, 143, 143, 143, 114, 115, 116,
+ 117, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 95, 143, 143, 143, 95, 143, 143, 143, 143, 136,
+ 105, 106, 120, 143, 105, 106, 144, 95, 143, 114,
+ 115, 116, 117, 114, 115, 116, 117, 105, 106, 143,
+ 143, 143, 143, 95, 143, -1, 114, 115, 116, 117,
+ 143, 143, 143, 105, 106, 143, 95, 142, 80, 146,
+ 95, 142, 114, 115, 116, 117, 105, 106, 144, 144,
+ 105, 106, 144, 95, 142, 114, 115, 116, 117, 114,
+ 115, 116, 117, 105, 106, 82, 144, 144, 144, 144,
+ 142, 84, 114, 115, 116, 117, 144, 70, 95, 72,
+ 144, 144, 95, 142, 144, 146, 144, 142, 105, 106,
+ 146, 144, 105, 106, 8, 9, 10, 114, 115, 116,
+ 117, 114, 115, 116, 117, 144, 144, 144, 144, 144,
+ 24, 104, 26, 27, 28, 29, 144, 144, 144, 144,
+ 144, 144, 144, 144, 144, 144, 144, -1, 144, 144,
+ 144, -1, -1, -1, 146, 146, 146, 146, 146, 146,
+ 146, 146, -1, 136, 147, -1, 139, -1, -1, -1,
+ 143, -1, 145
+];
+
+PHP.Parser.prototype.yybase = [
+ 0, 574, 581, 623, 655, 2, 718, 402, 747, 659,
+ 672, 688, 743, 701, 705, 483, 483, 483, 483, 483,
+ 351, 356, 366, 366, 367, 366, 344, -2, -2, -2,
+ 200, 200, 231, 231, 231, 231, 231, 231, 231, 231,
+ 200, 231, 451, 482, 532, 316, 370, 115, 146, 285,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 401,
+ 401, 401, 401, 401, 401, 401, 401, 401, 401, 44,
+ 474, 429, 476, 481, 487, 488, 739, 740, 741, 734,
+ 733, 416, 736, 539, 541, 342, 542, 543, 552, 557,
+ 559, 536, 567, 737, 755, 569, 735, 738, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 122, 11, 336,
+ 336, 336, 336, 336, 336, 336, 336, 336, 336, 336,
+ 336, 336, 336, 336, 227, 227, 173, 577, 577, 577,
+ 577, 577, 577, 577, 577, 577, 577, 577, 79, 178,
+ 846, 8, -3, -3, -3, -3, 642, 706, 706, 706,
+ 706, 157, 179, 242, 431, 431, 360, 431, 525, 368,
+ 767, 767, 767, 767, 767, 767, 767, 767, 767, 767,
+ 767, 767, 350, 375, 315, 315, 652, 652, -81, -81,
+ -81, -81, 251, 185, 188, 184, -62, 348, 195, 195,
+ 195, 408, 392, 410, 1, 192, 129, 129, 129, -24,
+ -24, -24, -24, 499, -24, -24, -24, 113, 108, 108,
+ 12, 161, 349, 526, 271, 398, 529, 438, 130, 206,
+ 265, 427, 76, 414, 427, 288, 295, 76, 166, 44,
+ 262, 422, 141, 491, 372, 494, 413, 71, 92, 93,
+ 267, 135, 100, 34, 415, 745, 746, 742, -38, 420,
+ -10, 135, 147, 744, 498, 107, 26, 493, 144, 377,
+ 363, 369, 332, 363, 400, 377, 588, 377, 376, 377,
+ 360, 37, 582, 376, 377, 374, 376, 388, 363, 364,
+ 412, 369, 377, 441, 443, 390, 106, 332, 377, 390,
+ 377, 400, 64, 590, 591, 323, 592, 589, 593, 649,
+ 608, 362, 500, 399, 407, 620, 625, 636, 365, 354,
+ 614, 524, 425, 359, 355, 423, 570, 578, 357, 406,
+ 414, 394, 352, 403, 531, 433, 403, 653, 434, 385,
+ 417, 411, 444, 310, 318, 501, 425, 668, 757, 380,
+ 637, 684, 403, 609, 387, 87, 325, 638, 382, 403,
+ 639, 403, 696, 503, 615, 403, 697, 384, 435, 425,
+ 352, 352, 352, 700, 66, 699, 583, 702, 707, 704,
+ 748, 721, 749, 584, 750, 358, 583, 722, 751, 682,
+ 215, 613, 422, 436, 389, 447, 221, 257, 752, 403,
+ 403, 506, 499, 403, 395, 685, 397, 426, 753, 392,
+ 391, 647, 683, 403, 418, 754, 221, 723, 587, 724,
+ 450, 568, 507, 648, 509, 327, 725, 353, 497, 610,
+ 454, 622, 455, 461, 404, 510, 373, 732, 612, 247,
+ 361, 664, 463, 405, 692, 641, 464, 465, 511, 343,
+ 437, 335, 409, 396, 665, 293, 467, 468, 472, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, 0, 0, 0, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
+ -2, -2, -2, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ 123, 767, 767, 767, 767, 767, 767, 767, 767, 767,
+ 767, 767, 123, 123, 123, 123, 123, 123, 123, 123,
+ 0, 129, 129, 129, 129, -94, -94, -94, 767, 767,
+ 767, 767, 767, 767, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -94, -94, 129, 129,
+ 767, 767, -24, -24, -24, -24, -24, 108, 108, 108,
+ -24, 108, 145, 145, 145, 108, 108, 108, 100, 100,
+ 0, 0, 0, 0, 0, 0, 0, 145, 0, 0,
+ 0, 376, 0, 0, 0, 145, 260, 260, 221, 260,
+ 260, 135, 0, 0, 425, 376, 0, 364, 376, 0,
+ 0, 0, 0, 0, 0, 531, 0, 87, 637, 241,
+ 425, 0, 0, 0, 0, 0, 0, 0, 425, 289,
+ 289, 306, 0, 358, 0, 0, 0, 306, 241, 0,
+ 0, 221
+];
+
+PHP.Parser.prototype.yydefault = [
+ 3,32767,32767, 1,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 104, 96, 110, 95, 106,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 358, 358, 122, 122, 122, 122, 122, 122, 122, 122,
+ 316,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 173, 173, 173,32767, 348, 348, 348, 348, 348, 348,
+ 348,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 363,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 232, 233,
+ 235, 236, 172, 125, 349, 362, 171, 199, 201, 250,
+ 200, 177, 182, 183, 184, 185, 186, 187, 188, 189,
+ 190, 191, 192, 176, 229, 228, 197, 313, 313, 316,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 198, 202,
+ 204, 203, 219, 220, 217, 218, 175, 221, 222, 223,
+ 224, 157, 157, 157, 357, 357,32767, 357,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 158,32767, 211, 212, 276, 276, 117, 117,
+ 117, 117, 117,32767,32767,32767,32767, 284,32767,32767,
+ 32767,32767,32767, 286,32767,32767, 206, 207, 205,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 285,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 334, 321, 272,
+ 32767,32767,32767, 265,32767, 107, 109,32767,32767,32767,
+ 32767, 302, 339,32767,32767,32767, 17,32767,32767,32767,
+ 370, 334,32767,32767, 19,32767,32767,32767,32767, 227,
+ 32767, 338, 332,32767,32767,32767,32767,32767,32767, 63,
+ 32767,32767,32767,32767,32767, 63, 281, 63,32767, 63,
+ 32767, 315, 287,32767, 63, 74,32767, 72,32767,32767,
+ 76,32767, 63, 93, 93, 254, 315, 54, 63, 254,
+ 63,32767,32767,32767,32767, 4,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 267,32767, 323,32767, 337, 336, 324,32767,
+ 265,32767, 215, 194, 266,32767, 196,32767,32767, 270,
+ 273,32767,32767,32767, 134,32767, 268, 180,32767,32767,
+ 32767,32767, 365,32767,32767, 174,32767,32767,32767, 130,
+ 32767, 61, 332,32767,32767, 355,32767,32767, 332, 269,
+ 208, 209, 210,32767, 121,32767, 310,32767,32767,32767,
+ 32767,32767,32767, 327,32767, 333,32767,32767,32767,32767,
+ 111,32767, 302,32767,32767,32767, 75,32767,32767, 178,
+ 126,32767,32767, 364,32767,32767,32767, 320,32767,32767,
+ 32767,32767,32767, 62,32767,32767, 77,32767,32767,32767,
+ 32767, 332,32767,32767,32767, 115,32767, 169,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767, 332,32767,32767,32767,32767,32767,32767,32767, 4,
+ 32767, 151,32767,32767,32767,32767,32767,32767,32767, 25,
+ 25, 3, 137, 3, 137, 25, 101, 25, 25, 137,
+ 93, 93, 25, 25, 25, 144, 25, 25, 25, 25,
+ 25, 25, 25, 25
+];
+
+PHP.Parser.prototype.yygoto = [
+ 141, 141, 173, 173, 173, 173, 173, 173, 173, 173,
+ 141, 173, 142, 143, 144, 148, 153, 155, 181, 175,
+ 172, 172, 172, 172, 174, 174, 174, 174, 174, 174,
+ 174, 168, 169, 170, 171, 179, 757, 758, 392, 760,
+ 781, 782, 783, 784, 785, 786, 787, 789, 725, 145,
+ 146, 147, 149, 150, 151, 152, 154, 177, 178, 180,
+ 196, 208, 209, 210, 211, 212, 213, 214, 215, 217,
+ 218, 219, 220, 244, 245, 266, 267, 268, 430, 431,
+ 432, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 156, 157, 158, 159, 176, 160, 194, 161,
+ 162, 163, 164, 195, 165, 193, 139, 166, 167, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 453, 453, 453, 453, 453, 453, 453, 453, 453, 453,
+ 453, 551, 551, 551, 464, 491, 394, 394, 394, 394,
+ 394, 394, 394, 394, 394, 394, 394, 394, 394, 394,
+ 394, 394, 394, 394, 407, 552, 552, 552, 810, 810,
+ 662, 662, 662, 662, 662, 594, 283, 595, 510, 399,
+ 399, 567, 679, 632, 849, 850, 863, 660, 714, 426,
+ 222, 622, 622, 622, 622, 223, 617, 623, 494, 395,
+ 395, 395, 395, 395, 395, 395, 395, 395, 395, 395,
+ 395, 395, 395, 395, 395, 395, 395, 465, 472, 514,
+ 904, 398, 398, 425, 425, 459, 425, 419, 322, 421,
+ 421, 393, 396, 412, 422, 428, 460, 463, 473, 481,
+ 501, 5, 476, 284, 327, 1, 15, 2, 6, 7,
+ 550, 550, 550, 8, 9, 10, 668, 16, 11, 17,
+ 12, 18, 13, 19, 14, 704, 328, 881, 881, 643,
+ 628, 626, 626, 624, 626, 526, 401, 652, 647, 847,
+ 847, 847, 847, 847, 847, 847, 847, 847, 847, 847,
+ 437, 438, 441, 447, 477, 479, 497, 290, 910, 910,
+ 400, 400, 486, 880, 880, 263, 913, 910, 303, 255,
+ 723, 306, 822, 821, 306, 896, 896, 896, 861, 304,
+ 323, 410, 913, 913, 897, 316, 420, 769, 658, 559,
+ 879, 671, 536, 324, 466, 565, 311, 311, 311, 801,
+ 241, 676, 496, 439, 440, 442, 444, 448, 475, 631,
+ 858, 311, 285, 286, 603, 495, 712, 0, 406, 321,
+ 0, 0, 0, 314, 0, 0, 429, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 411
+];
+
+PHP.Parser.prototype.yygcheck = [
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86,
+ 86, 6, 6, 6, 21, 21, 35, 35, 35, 35,
+ 35, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ 35, 35, 35, 35, 71, 7, 7, 7, 35, 35,
+ 35, 35, 35, 35, 35, 29, 44, 29, 35, 86,
+ 86, 12, 12, 12, 12, 12, 12, 12, 12, 75,
+ 40, 35, 35, 35, 35, 40, 35, 35, 35, 82,
+ 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
+ 82, 82, 82, 82, 82, 82, 82, 36, 36, 36,
+ 104, 82, 82, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 13, 42, 42, 42, 2, 13, 2, 13, 13,
+ 5, 5, 5, 13, 13, 13, 54, 13, 13, 13,
+ 13, 13, 13, 13, 13, 67, 67, 83, 83, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 52, 52, 52, 52, 52, 52, 52, 4, 105, 105,
+ 89, 89, 94, 84, 84, 92, 105, 105, 26, 92,
+ 71, 4, 91, 91, 4, 84, 84, 84, 97, 30,
+ 70, 30, 105, 105, 102, 27, 30, 72, 50, 10,
+ 84, 55, 46, 9, 30, 11, 90, 90, 90, 80,
+ 30, 56, 30, 85, 85, 85, 85, 85, 85, 43,
+ 96, 90, 44, 44, 34, 77, 69, -1, 4, 90,
+ -1, -1, -1, 4, -1, -1, 4, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 71
+];
+
+PHP.Parser.prototype.yygbase = [
+ 0, 0, -286, 0, 10, 239, 130, 154, 0, -10,
+ 25, -23, -29, -289, 0, -30, 0, 0, 0, 0,
+ 0, 83, 0, 0, 0, 0, 245, 84, -11, 142,
+ -28, 0, 0, 0, -13, -88, -42, 0, 0, 0,
+ -344, 0, -38, -12, -188, 0, 23, 0, 0, 0,
+ 66, 0, 247, 0, 205, 24, -18, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 13, 0, -15,
+ 85, 74, 70, 0, 0, 148, 0, -14, 0, 0,
+ -6, 0, -35, 11, 47, 278, -77, 0, 0, 44,
+ 68, 43, 38, 72, 94, 0, -16, 109, 0, 0,
+ 0, 0, 87, 0, 170, 34, 0
+];
+
+PHP.Parser.prototype.yygdefault = [
+ -32768, 362, 3, 546, 382, 570, 571, 572, 307, 305,
+ 560, 566, 467, 4, 568, 140, 295, 575, 296, 500,
+ 577, 414, 579, 580, 308, 309, 415, 315, 216, 593,
+ 503, 313, 596, 357, 602, 301, 449, 383, 350, 461,
+ 221, 423, 456, 630, 282, 638, 540, 646, 649, 450,
+ 657, 352, 433, 434, 667, 672, 677, 680, 334, 325,
+ 474, 684, 685, 256, 689, 511, 512, 703, 242, 711,
+ 317, 724, 342, 788, 790, 397, 408, 484, 797, 326,
+ 800, 384, 385, 386, 387, 435, 818, 815, 289, 866,
+ 287, 443, 254, 853, 468, 356, 903, 862, 288, 388,
+ 389, 302, 898, 341, 905, 912, 458
+];
+
+PHP.Parser.prototype.yylhs = [
+ 0, 1, 2, 2, 4, 4, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 8, 8, 10, 10, 10,
+ 10, 9, 9, 11, 13, 13, 14, 14, 14, 14,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 33, 33,
+ 34, 27, 27, 30, 30, 6, 7, 7, 7, 37,
+ 37, 37, 38, 38, 41, 41, 39, 39, 42, 42,
+ 22, 22, 29, 29, 32, 32, 31, 31, 43, 23,
+ 23, 23, 23, 44, 44, 45, 45, 46, 46, 20,
+ 20, 16, 16, 47, 18, 18, 48, 17, 17, 19,
+ 19, 36, 36, 49, 49, 50, 50, 51, 51, 51,
+ 51, 52, 52, 53, 53, 54, 54, 24, 24, 55,
+ 55, 55, 25, 25, 56, 56, 40, 40, 57, 57,
+ 57, 57, 62, 62, 63, 63, 64, 64, 64, 64,
+ 65, 66, 66, 61, 61, 58, 58, 60, 60, 68,
+ 68, 67, 67, 67, 67, 67, 67, 59, 59, 69,
+ 69, 26, 26, 21, 21, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
+ 15, 15, 15, 71, 77, 77, 79, 79, 80, 81,
+ 81, 81, 81, 81, 81, 86, 86, 35, 35, 35,
+ 72, 72, 87, 87, 82, 82, 88, 88, 88, 88,
+ 88, 73, 73, 73, 76, 76, 76, 78, 78, 93,
+ 93, 93, 93, 93, 93, 93, 93, 93, 93, 93,
+ 93, 93, 93, 12, 12, 12, 12, 12, 12, 74,
+ 74, 74, 74, 94, 94, 96, 96, 95, 95, 97,
+ 97, 28, 28, 28, 28, 99, 99, 98, 98, 98,
+ 98, 98, 100, 100, 84, 84, 89, 89, 83, 83,
+ 101, 101, 101, 101, 90, 90, 90, 90, 85, 85,
+ 91, 91, 91, 70, 70, 102, 102, 102, 75, 75,
+ 103, 103, 104, 104, 104, 104, 92, 92, 92, 92,
+ 105, 105, 105, 105, 105, 105, 105, 106, 106, 106
+];
+
+PHP.Parser.prototype.yylen = [
+ 1, 1, 2, 0, 1, 3, 1, 1, 1, 1,
+ 3, 5, 4, 3, 3, 3, 1, 1, 3, 2,
+ 4, 3, 1, 3, 2, 0, 1, 1, 1, 1,
+ 3, 7, 10, 5, 7, 9, 5, 2, 3, 2,
+ 3, 2, 3, 3, 3, 3, 1, 2, 5, 7,
+ 8, 10, 5, 1, 5, 3, 3, 2, 1, 2,
+ 8, 1, 3, 0, 1, 9, 7, 6, 5, 1,
+ 2, 2, 0, 2, 0, 2, 0, 2, 1, 3,
+ 1, 4, 1, 4, 1, 4, 1, 3, 3, 3,
+ 4, 4, 5, 0, 2, 4, 3, 1, 1, 1,
+ 4, 0, 2, 5, 0, 2, 6, 0, 2, 0,
+ 3, 1, 0, 1, 3, 3, 5, 0, 1, 1,
+ 1, 1, 0, 1, 3, 1, 2, 3, 1, 1,
+ 2, 4, 3, 1, 1, 3, 2, 0, 3, 3,
+ 8, 3, 1, 3, 0, 2, 4, 5, 4, 4,
+ 3, 1, 1, 1, 3, 1, 1, 0, 1, 1,
+ 2, 1, 1, 1, 1, 1, 1, 1, 3, 1,
+ 3, 3, 1, 0, 1, 1, 6, 3, 4, 4,
+ 1, 2, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 2, 2, 2, 2, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 2, 2, 2, 2, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 5, 4,
+ 4, 4, 2, 2, 4, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 4, 3, 3,
+ 2, 9, 10, 3, 0, 4, 1, 3, 2, 4,
+ 6, 8, 4, 4, 4, 1, 1, 1, 2, 3,
+ 1, 1, 1, 1, 1, 1, 0, 3, 3, 4,
+ 4, 0, 2, 3, 0, 1, 1, 0, 3, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 2, 1, 1, 3, 2, 2, 4, 3, 1,
+ 3, 3, 3, 0, 2, 0, 1, 3, 1, 3,
+ 1, 1, 1, 1, 1, 6, 4, 3, 6, 4,
+ 4, 4, 1, 3, 1, 2, 1, 1, 4, 1,
+ 3, 6, 4, 4, 4, 4, 1, 4, 0, 1,
+ 1, 3, 1, 3, 1, 1, 4, 0, 0, 2,
+ 3, 1, 3, 1, 4, 2, 2, 2, 1, 2,
+ 1, 4, 3, 3, 3, 6, 3, 1, 1, 1
+];
+
+
+
+
+
+
+
+PHP.Parser.prototype.yyn0 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn1 = function ( attributes ) {
+ this.yyval = this.Stmt_Namespace_postprocess(this.yyastk[ this.stackPos-(1-1) ]);
+};
+
+PHP.Parser.prototype.yyn2 = function ( attributes ) {
+ if (Array.isArray(this.yyastk[ this.stackPos-(2-2) ])) { this.yyval = this.yyastk[ this.stackPos-(2-1) ].concat( this.yyastk[ this.stackPos-(2-2) ]); } else { this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ]; };
+};
+
+PHP.Parser.prototype.yyn3 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn4 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn5 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn6 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn7 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn8 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn9 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_HaltCompiler(attributes);
+};
+
+PHP.Parser.prototype.yyn10 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[ this.stackPos-(3-2) ], attributes), null, attributes);
+};
+
+PHP.Parser.prototype.yyn11 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Namespace(this.Node_Name(this.yyastk[ this.stackPos-(5-2) ], attributes), this.yyastk[ this.stackPos-(5-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn12 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Namespace(null, this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn13 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Use(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn14 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Const(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn15 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn16 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn17 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[ this.stackPos-(1-1) ], attributes), null, attributes);
+};
+
+PHP.Parser.prototype.yyn18 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[ this.stackPos-(3-1) ], attributes), this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn19 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[ this.stackPos-(2-2) ], attributes), null, attributes);
+};
+
+PHP.Parser.prototype.yyn20 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_UseUse(this.Node_Name(this.yyastk[ this.stackPos-(4-2) ], attributes), this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn21 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn22 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn23 = function ( attributes ) {
+ this.yyval = this.Node_Const(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn24 = function ( attributes ) {
+ if (Array.isArray(this.yyastk[ this.stackPos-(2-2) ])) { this.yyval = this.yyastk[ this.stackPos-(2-1) ].concat( this.yyastk[ this.stackPos-(2-2) ]); } else { this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ]; };
+};
+
+PHP.Parser.prototype.yyn25 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn26 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn27 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn28 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn29 = function ( attributes ) {
+ throw new Error('__halt_compiler() can only be used from the outermost scope');
+};
+
+PHP.Parser.prototype.yyn30 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn31 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_If(this.yyastk[ this.stackPos-(7-3) ], {'stmts': Array.isArray(this.yyastk[ this.stackPos-(7-5) ]) ? this.yyastk[ this.stackPos-(7-5) ] : [this.yyastk[ this.stackPos-(7-5) ]], 'elseifs': this.yyastk[ this.stackPos-(7-6) ], 'Else': this.yyastk[ this.stackPos-(7-7) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn32 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_If(this.yyastk[ this.stackPos-(10-3) ], {'stmts': this.yyastk[ this.stackPos-(10-6) ], 'elseifs': this.yyastk[ this.stackPos-(10-7) ], 'else': this.yyastk[ this.stackPos-(10-8) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn33 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_While(this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn34 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Do(this.yyastk[ this.stackPos-(7-5) ], Array.isArray(this.yyastk[ this.stackPos-(7-2) ]) ? this.yyastk[ this.stackPos-(7-2) ] : [this.yyastk[ this.stackPos-(7-2) ]], attributes);
+};
+
+PHP.Parser.prototype.yyn35 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_For({'init': this.yyastk[ this.stackPos-(9-3) ], 'cond': this.yyastk[ this.stackPos-(9-5) ], 'loop': this.yyastk[ this.stackPos-(9-7) ], 'stmts': this.yyastk[ this.stackPos-(9-9) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn36 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Switch(this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn37 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Break(null, attributes);
+};
+
+PHP.Parser.prototype.yyn38 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Break(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn39 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Continue(null, attributes);
+};
+
+PHP.Parser.prototype.yyn40 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Continue(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn41 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Return(null, attributes);
+};
+
+PHP.Parser.prototype.yyn42 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Return(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn43 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Global(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn44 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Static(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn45 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Echo(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn46 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_InlineHTML(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn47 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn48 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Unset(this.yyastk[ this.stackPos-(5-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn49 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Foreach(this.yyastk[ this.stackPos-(7-3) ], this.yyastk[ this.stackPos-(7-5) ], {'keyVar': null, 'byRef': false, 'stmts': this.yyastk[ this.stackPos-(7-7) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn50 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Foreach(this.yyastk[ this.stackPos-(8-3) ], this.yyastk[ this.stackPos-(8-6) ], {'keyVar': null, 'byRef': true, 'stmts': this.yyastk[ this.stackPos-(8-8) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn51 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Foreach(this.yyastk[ this.stackPos-(10-3) ], this.yyastk[ this.stackPos-(10-8) ], {'keyVar': this.yyastk[ this.stackPos-(10-5) ], 'byRef': this.yyastk[ this.stackPos-(10-7) ], 'stmts': this.yyastk[ this.stackPos-(10-10) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn52 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Declare(this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn53 = function ( attributes ) {
+ this.yyval = []; /* means: no statement */
+};
+
+PHP.Parser.prototype.yyn54 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TryCatch(this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn55 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Throw(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn56 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Goto(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn57 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Label(this.yyastk[ this.stackPos-(2-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn58 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn59 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn60 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Catch(this.yyastk[ this.stackPos-(8-3) ], this.yyastk[ this.stackPos-(8-4) ].substring( 1 ), this.yyastk[ this.stackPos-(8-7) ], attributes);
+};
+
+PHP.Parser.prototype.yyn61 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn62 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn63 = function ( attributes ) {
+ this.yyval = false;
+};
+
+PHP.Parser.prototype.yyn64 = function ( attributes ) {
+ this.yyval = true;
+};
+
+PHP.Parser.prototype.yyn65 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Function(this.yyastk[ this.stackPos-(9-3) ], {'byRef': this.yyastk[ this.stackPos-(9-2) ], 'params': this.yyastk[ this.stackPos-(9-5) ], 'stmts': this.yyastk[ this.stackPos-(9-8) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn66 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Class(this.yyastk[ this.stackPos-(7-2) ], {'type': this.yyastk[ this.stackPos-(7-1) ], 'Extends': this.yyastk[ this.stackPos-(7-3) ], 'Implements': this.yyastk[ this.stackPos-(7-4) ], 'stmts': this.yyastk[ this.stackPos-(7-6) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn67 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Interface(this.yyastk[ this.stackPos-(6-2) ], {'Extends': this.yyastk[ this.stackPos-(6-3) ], 'stmts': this.yyastk[ this.stackPos-(6-5) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn68 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Trait(this.yyastk[ this.stackPos-(5-2) ], this.yyastk[ this.stackPos-(5-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn69 = function ( attributes ) {
+ this.yyval = 0;
+};
+
+PHP.Parser.prototype.yyn70 = function ( attributes ) {
+ this.yyval = this.MODIFIER_ABSTRACT;
+};
+
+PHP.Parser.prototype.yyn71 = function ( attributes ) {
+ this.yyval = this.MODIFIER_FINAL;
+};
+
+PHP.Parser.prototype.yyn72 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn73 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-2) ];
+};
+
+PHP.Parser.prototype.yyn74 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn75 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-2) ];
+};
+
+PHP.Parser.prototype.yyn76 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn77 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-2) ];
+};
+
+PHP.Parser.prototype.yyn78 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn79 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn80 = function ( attributes ) {
+ this.yyval = Array.isArray(this.yyastk[ this.stackPos-(1-1) ]) ? this.yyastk[ this.stackPos-(1-1) ] : [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn81 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-2) ];
+};
+
+PHP.Parser.prototype.yyn82 = function ( attributes ) {
+ this.yyval = Array.isArray(this.yyastk[ this.stackPos-(1-1) ]) ? this.yyastk[ this.stackPos-(1-1) ] : [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn83 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-2) ];
+};
+
+PHP.Parser.prototype.yyn84 = function ( attributes ) {
+ this.yyval = Array.isArray(this.yyastk[ this.stackPos-(1-1) ]) ? this.yyastk[ this.stackPos-(1-1) ] : [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn85 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-2) ];
+};
+
+PHP.Parser.prototype.yyn86 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn87 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn88 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_DeclareDeclare(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn89 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn90 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-3) ];
+};
+
+PHP.Parser.prototype.yyn91 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-2) ];
+};
+
+PHP.Parser.prototype.yyn92 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(5-3) ];
+};
+
+PHP.Parser.prototype.yyn93 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn94 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn95 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Case(this.yyastk[ this.stackPos-(4-2) ], this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn96 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Case(null, this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn97 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn98 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn99 = function ( attributes ) {
+ this.yyval = Array.isArray(this.yyastk[ this.stackPos-(1-1) ]) ? this.yyastk[ this.stackPos-(1-1) ] : [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn100 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-2) ];
+};
+
+PHP.Parser.prototype.yyn101 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn102 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn103 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_ElseIf(this.yyastk[ this.stackPos-(5-3) ], Array.isArray(this.yyastk[ this.stackPos-(5-5) ]) ? this.yyastk[ this.stackPos-(5-5) ] : [this.yyastk[ this.stackPos-(5-5) ]], attributes);
+};
+
+PHP.Parser.prototype.yyn104 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn105 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn106 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_ElseIf(this.yyastk[ this.stackPos-(6-3) ], this.yyastk[ this.stackPos-(6-6) ], attributes);
+};
+
+PHP.Parser.prototype.yyn107 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn108 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Else(Array.isArray(this.yyastk[ this.stackPos-(2-2) ]) ? this.yyastk[ this.stackPos-(2-2) ] : [this.yyastk[ this.stackPos-(2-2) ]], attributes);
+};
+
+PHP.Parser.prototype.yyn109 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn110 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Else(this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn111 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn112 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn113 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn114 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn115 = function ( attributes ) {
+ this.yyval = this.Node_Param(this.yyastk[ this.stackPos-(3-3) ].substring( 1 ), null, this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn116 = function ( attributes ) {
+ this.yyval = this.Node_Param(this.yyastk[ this.stackPos-(5-3) ].substring( 1 ), this.yyastk[ this.stackPos-(5-5) ], this.yyastk[ this.stackPos-(5-1) ], this.yyastk[ this.stackPos-(5-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn117 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn118 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn119 = function ( attributes ) {
+ this.yyval = 'array';
+};
+
+PHP.Parser.prototype.yyn120 = function ( attributes ) {
+ this.yyval = 'callable';
+};
+
+PHP.Parser.prototype.yyn121 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn122 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn123 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn124 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn125 = function ( attributes ) {
+ this.yyval = this.Node_Arg(this.yyastk[ this.stackPos-(1-1) ], false, attributes);
+};
+
+PHP.Parser.prototype.yyn126 = function ( attributes ) {
+ this.yyval = this.Node_Arg(this.yyastk[ this.stackPos-(2-2) ], true, attributes);
+};
+
+PHP.Parser.prototype.yyn127 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn128 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn129 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), attributes);
+};
+
+PHP.Parser.prototype.yyn130 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn131 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn132 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn133 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn134 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_StaticVar(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), null, attributes);
+};
+
+PHP.Parser.prototype.yyn135 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_StaticVar(this.yyastk[ this.stackPos-(3-1) ].substring( 1 ), this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn136 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn137 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn138 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_Property(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn139 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_ClassConst(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn140 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_ClassMethod(this.yyastk[ this.stackPos-(8-4) ], {'type': this.yyastk[ this.stackPos-(8-1) ], 'byRef': this.yyastk[ this.stackPos-(8-3) ], 'params': this.yyastk[ this.stackPos-(8-6) ], 'stmts': this.yyastk[ this.stackPos-(8-8) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn141 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TraitUse(this.yyastk[ this.stackPos-(3-2) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn142 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn143 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn144 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn145 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn146 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TraitUseAdaptation_Precedence(this.yyastk[ this.stackPos-(4-1) ][0], this.yyastk[ this.stackPos-(4-1) ][1], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn147 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[ this.stackPos-(5-1) ][0], this.yyastk[ this.stackPos-(5-1) ][1], this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn148 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[ this.stackPos-(4-1) ][0], this.yyastk[ this.stackPos-(4-1) ][1], this.yyastk[ this.stackPos-(4-3) ], null, attributes);
+};
+
+PHP.Parser.prototype.yyn149 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_TraitUseAdaptation_Alias(this.yyastk[ this.stackPos-(4-1) ][0], this.yyastk[ this.stackPos-(4-1) ][1], null, this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn150 = function ( attributes ) {
+ this.yyval = array(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ]);
+};
+
+PHP.Parser.prototype.yyn151 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn152 = function ( attributes ) {
+ this.yyval = array(null, this.yyastk[ this.stackPos-(1-1) ]);
+};
+
+PHP.Parser.prototype.yyn153 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn154 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn155 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn156 = function ( attributes ) {
+ this.yyval = this.MODIFIER_PUBLIC;
+};
+
+PHP.Parser.prototype.yyn157 = function ( attributes ) {
+ this.yyval = this.MODIFIER_PUBLIC;
+};
+
+PHP.Parser.prototype.yyn158 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn159 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn160 = function ( attributes ) {
+ this.Stmt_Class_verifyModifier(this.yyastk[ this.stackPos-(2-1) ], this.yyastk[ this.stackPos-(2-2) ]); this.yyval = this.yyastk[ this.stackPos-(2-1) ] | this.yyastk[ this.stackPos-(2-2) ];
+};
+
+PHP.Parser.prototype.yyn161 = function ( attributes ) {
+ this.yyval = this.MODIFIER_PUBLIC;
+};
+
+PHP.Parser.prototype.yyn162 = function ( attributes ) {
+ this.yyval = this.MODIFIER_PROTECTED;
+};
+
+PHP.Parser.prototype.yyn163 = function ( attributes ) {
+ this.yyval = this.MODIFIER_PRIVATE;
+};
+
+PHP.Parser.prototype.yyn164 = function ( attributes ) {
+ this.yyval = this.MODIFIER_STATIC;
+};
+
+PHP.Parser.prototype.yyn165 = function ( attributes ) {
+ this.yyval = this.MODIFIER_ABSTRACT;
+};
+
+PHP.Parser.prototype.yyn166 = function ( attributes ) {
+ this.yyval = this.MODIFIER_FINAL;
+};
+
+PHP.Parser.prototype.yyn167 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn168 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn169 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_PropertyProperty(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), null, attributes);
+};
+
+PHP.Parser.prototype.yyn170 = function ( attributes ) {
+ this.yyval = this.Node_Stmt_PropertyProperty(this.yyastk[ this.stackPos-(3-1) ].substring( 1 ), this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn171 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn172 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn173 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn174 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn175 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn176 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignList(this.yyastk[ this.stackPos-(6-3) ], this.yyastk[ this.stackPos-(6-6) ], attributes);
+};
+
+PHP.Parser.prototype.yyn177 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Assign(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn178 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignRef(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn179 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignRef(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn180 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn181 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Clone(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn182 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignPlus(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn183 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignMinus(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn184 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignMul(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn185 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignDiv(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn186 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignConcat(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn187 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignMod(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn188 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignBitwiseAnd(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn189 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignBitwiseOr(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn190 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignBitwiseXor(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn191 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignShiftLeft(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn192 = function ( attributes ) {
+ this.yyval = this.Node_Expr_AssignShiftRight(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn193 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PostInc(this.yyastk[ this.stackPos-(2-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn194 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PreInc(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn195 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PostDec(this.yyastk[ this.stackPos-(2-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn196 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PreDec(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn197 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BooleanOr(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn198 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BooleanAnd(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn199 = function ( attributes ) {
+ this.yyval = this.Node_Expr_LogicalOr(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn200 = function ( attributes ) {
+ this.yyval = this.Node_Expr_LogicalAnd(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn201 = function ( attributes ) {
+ this.yyval = this.Node_Expr_LogicalXor(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn202 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BitwiseOr(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn203 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BitwiseAnd(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn204 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BitwiseXor(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn205 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Concat(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn206 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Plus(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn207 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Minus(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn208 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Mul(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn209 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Div(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn210 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Mod(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn211 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ShiftLeft(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn212 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ShiftRight(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn213 = function ( attributes ) {
+ this.yyval = this.Node_Expr_UnaryPlus(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn214 = function ( attributes ) {
+ this.yyval = this.Node_Expr_UnaryMinus(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn215 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BooleanNot(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn216 = function ( attributes ) {
+ this.yyval = this.Node_Expr_BitwiseNot(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn217 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Identical(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn218 = function ( attributes ) {
+ this.yyval = this.Node_Expr_NotIdentical(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn219 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Equal(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn220 = function ( attributes ) {
+ this.yyval = this.Node_Expr_NotEqual(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn221 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Smaller(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn222 = function ( attributes ) {
+ this.yyval = this.Node_Expr_SmallerOrEqual(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn223 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Greater(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn224 = function ( attributes ) {
+ this.yyval = this.Node_Expr_GreaterOrEqual(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn225 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Instanceof(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn226 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn227 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn228 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Ternary(this.yyastk[ this.stackPos-(5-1) ], this.yyastk[ this.stackPos-(5-3) ], this.yyastk[ this.stackPos-(5-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn229 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Ternary(this.yyastk[ this.stackPos-(4-1) ], null, this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn230 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Isset(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn231 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Empty(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn232 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Include(this.yyastk[ this.stackPos-(2-2) ], "Node_Expr_Include", attributes);
+};
+
+PHP.Parser.prototype.yyn233 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Include(this.yyastk[ this.stackPos-(2-2) ], "Node_Expr_IncludeOnce", attributes);
+};
+
+PHP.Parser.prototype.yyn234 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Eval(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn235 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Include(this.yyastk[ this.stackPos-(2-2) ], "Node_Expr_Require", attributes);
+};
+
+PHP.Parser.prototype.yyn236 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Include(this.yyastk[ this.stackPos-(2-2) ], "Node_Expr_RequireOnce", attributes);
+};
+
+PHP.Parser.prototype.yyn237 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Int(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn238 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Double(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn239 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_String(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn240 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Array(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn241 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Object(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn242 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Bool(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn243 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Cast_Unset(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn244 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Exit(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn245 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ErrorSuppress(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn246 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn247 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Array(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn248 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Array(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn249 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ShellExec(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn250 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Print(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn251 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Closure({'static': false, 'byRef': this.yyastk[ this.stackPos-(9-2) ], 'params': this.yyastk[ this.stackPos-(9-4) ], 'uses': this.yyastk[ this.stackPos-(9-6) ], 'stmts': this.yyastk[ this.stackPos-(9-8) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn252 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Closure({'static': true, 'byRef': this.yyastk[ this.stackPos-(10-3) ], 'params': this.yyastk[ this.stackPos-(10-5) ], 'uses': this.yyastk[ this.stackPos-(10-7) ], 'stmts': this.yyastk[ this.stackPos-(10-9) ]}, attributes);
+};
+
+PHP.Parser.prototype.yyn253 = function ( attributes ) {
+ this.yyval = this.Node_Expr_New(this.yyastk[ this.stackPos-(3-2) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn254 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn255 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-3) ];
+};
+
+PHP.Parser.prototype.yyn256 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn257 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn258 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ClosureUse(this.yyastk[ this.stackPos-(2-2) ].substring( 1 ), this.yyastk[ this.stackPos-(2-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn259 = function ( attributes ) {
+ this.yyval = this.Node_Expr_FuncCall(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn260 = function ( attributes ) {
+ this.yyval = this.Node_Expr_StaticCall(this.yyastk[ this.stackPos-(6-1) ], this.yyastk[ this.stackPos-(6-3) ], this.yyastk[ this.stackPos-(6-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn261 = function ( attributes ) {
+ this.yyval = this.Node_Expr_StaticCall(this.yyastk[ this.stackPos-(8-1) ], this.yyastk[ this.stackPos-(8-4) ], this.yyastk[ this.stackPos-(8-7) ], attributes);
+};
+
+PHP.Parser.prototype.yyn262 = function ( attributes ) {
+
+ if (this.yyastk[ this.stackPos-(4-1) ].type === "Node_Expr_StaticPropertyFetch") {
+ this.yyval = this.Node_Expr_StaticCall(this.yyastk[ this.stackPos-(4-1) ].Class, this.Node_Expr_Variable(this.yyastk[ this.stackPos-(4-1) ].name, attributes), this.yyastk[ this.stackPos-(4-3) ], attributes);
+ } else if (this.yyastk[ this.stackPos-(4-1) ].type === "Node_Expr_ArrayDimFetch") {
+ var tmp = this.yyastk[ this.stackPos-(4-1) ];
+ while (tmp.variable.type === "Node_Expr_ArrayDimFetch") {
+ tmp = tmp.variable;
+ }
+
+ this.yyval = this.Node_Expr_StaticCall(tmp.variable.Class, this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+ tmp.variable = this.Node_Expr_Variable(tmp.variable.name, attributes);
+ } else {
+ throw new Exception;
+ }
+
+};
+
+PHP.Parser.prototype.yyn263 = function ( attributes ) {
+ this.yyval = this.Node_Expr_FuncCall(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn264 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn265 = function ( attributes ) {
+ this.yyval = this.Node_Name('static', attributes);
+};
+
+PHP.Parser.prototype.yyn266 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn267 = function ( attributes ) {
+ this.yyval = this.Node_Name(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn268 = function ( attributes ) {
+ this.yyval = this.Node_Name_FullyQualified(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn269 = function ( attributes ) {
+ this.yyval = this.Node_Name_Relative(this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn270 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn271 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn272 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn273 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn274 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn275 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn276 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn277 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PropertyFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn278 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PropertyFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn279 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn280 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn281 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn282 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn283 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn284 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn285 = function ( attributes ) {
+ this.yyval = [this.Scalar_String_parseEscapeSequences(this.yyastk[ this.stackPos-(1-1) ], '`')];
+};
+
+PHP.Parser.prototype.yyn286 = function ( attributes ) {
+ ; this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn287 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn288 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn289 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_LNumber(this.Scalar_LNumber_parse(this.yyastk[ this.stackPos-(1-1) ]), attributes);
+};
+
+PHP.Parser.prototype.yyn290 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_DNumber(this.Scalar_DNumber_parse(this.yyastk[ this.stackPos-(1-1) ]), attributes);
+};
+
+PHP.Parser.prototype.yyn291 = function ( attributes ) {
+ this.yyval = this.Scalar_String_create(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn292 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_LineConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn293 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_FileConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn294 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_DirConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn295 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_ClassConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn296 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_TraitConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn297 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_MethodConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn298 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_FuncConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn299 = function ( attributes ) {
+ this.yyval = {type: "Node_Scalar_NSConst", attributes: attributes};
+};
+
+PHP.Parser.prototype.yyn300 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_String(this.Scalar_String_parseDocString(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-2) ]), attributes);
+};
+
+PHP.Parser.prototype.yyn301 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_String('', attributes);
+};
+
+PHP.Parser.prototype.yyn302 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ConstFetch(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn303 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn304 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ClassConstFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn305 = function ( attributes ) {
+ this.yyval = this.Node_Expr_UnaryPlus(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn306 = function ( attributes ) {
+ this.yyval = this.Node_Expr_UnaryMinus(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn307 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Array(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn308 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Array(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn309 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn310 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ClassConstFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn311 = function ( attributes ) {
+ ; this.yyval = this.Node_Scalar_Encapsed(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn312 = function ( attributes ) {
+ ; this.yyval = this.Node_Scalar_Encapsed(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn313 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn314 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn315 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn316 = function () {
+ this.yyval = this.yyastk[ this.stackPos ];
+};
+
+PHP.Parser.prototype.yyn317 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn318 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn319 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(3-3) ], this.yyastk[ this.stackPos-(3-1) ], false, attributes);
+};
+
+PHP.Parser.prototype.yyn320 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(1-1) ], null, false, attributes);
+};
+
+PHP.Parser.prototype.yyn321 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn322 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn323 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn324 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn325 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(6-2) ], this.yyastk[ this.stackPos-(6-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn326 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn327 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PropertyFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn328 = function ( attributes ) {
+ this.yyval = this.Node_Expr_MethodCall(this.yyastk[ this.stackPos-(6-1) ], this.yyastk[ this.stackPos-(6-3) ], this.yyastk[ this.stackPos-(6-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn329 = function ( attributes ) {
+ this.yyval = this.Node_Expr_FuncCall(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn330 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn331 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn332 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn333 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn334 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn335 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(2-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn336 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn337 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn338 = function ( attributes ) {
+ this.yyval = this.Node_Expr_StaticPropertyFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn339 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn340 = function ( attributes ) {
+ this.yyval = this.Node_Expr_StaticPropertyFetch(this.yyastk[ this.stackPos-(3-1) ], this.yyastk[ this.stackPos-(3-3) ].substring( 1 ), attributes);
+};
+
+PHP.Parser.prototype.yyn341 = function ( attributes ) {
+ this.yyval = this.Node_Expr_StaticPropertyFetch(this.yyastk[ this.stackPos-(6-1) ], this.yyastk[ this.stackPos-(6-5) ], attributes);
+};
+
+PHP.Parser.prototype.yyn342 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn343 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn344 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn345 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.yyastk[ this.stackPos-(4-1) ], this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn346 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), attributes);
+};
+
+PHP.Parser.prototype.yyn347 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn348 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn349 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn350 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn351 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn352 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn353 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn354 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn355 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(1-1) ];
+};
+
+PHP.Parser.prototype.yyn356 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(4-3) ];
+};
+
+PHP.Parser.prototype.yyn357 = function ( attributes ) {
+ this.yyval = null;
+};
+
+PHP.Parser.prototype.yyn358 = function ( attributes ) {
+ this.yyval = [];
+};
+
+PHP.Parser.prototype.yyn359 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn360 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(3-1) ].push( this.yyastk[ this.stackPos-(3-3) ] ); this.yyval = this.yyastk[ this.stackPos-(3-1) ];
+};
+
+PHP.Parser.prototype.yyn361 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn362 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(3-3) ], this.yyastk[ this.stackPos-(3-1) ], false, attributes);
+};
+
+PHP.Parser.prototype.yyn363 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(1-1) ], null, false, attributes);
+};
+
+PHP.Parser.prototype.yyn364 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(4-4) ], this.yyastk[ this.stackPos-(4-1) ], true, attributes);
+};
+
+PHP.Parser.prototype.yyn365 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayItem(this.yyastk[ this.stackPos-(2-2) ], null, true, attributes);
+};
+
+PHP.Parser.prototype.yyn366 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn367 = function ( attributes ) {
+ this.yyastk[ this.stackPos-(2-1) ].push( this.yyastk[ this.stackPos-(2-2) ] ); this.yyval = this.yyastk[ this.stackPos-(2-1) ];
+};
+
+PHP.Parser.prototype.yyn368 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(1-1) ]];
+};
+
+PHP.Parser.prototype.yyn369 = function ( attributes ) {
+ this.yyval = [this.yyastk[ this.stackPos-(2-1) ], this.yyastk[ this.stackPos-(2-2) ]];
+};
+
+PHP.Parser.prototype.yyn370 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), attributes);
+};
+
+PHP.Parser.prototype.yyn371 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[ this.stackPos-(4-1) ].substring( 1 ), attributes), this.yyastk[ this.stackPos-(4-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn372 = function ( attributes ) {
+ this.yyval = this.Node_Expr_PropertyFetch(this.Node_Expr_Variable(this.yyastk[ this.stackPos-(3-1) ].substring( 1 ), attributes), this.yyastk[ this.stackPos-(3-3) ], attributes);
+};
+
+PHP.Parser.prototype.yyn373 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn374 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(3-2) ], attributes);
+};
+
+PHP.Parser.prototype.yyn375 = function ( attributes ) {
+ this.yyval = this.Node_Expr_ArrayDimFetch(this.Node_Expr_Variable(this.yyastk[ this.stackPos-(6-2) ], attributes), this.yyastk[ this.stackPos-(6-4) ], attributes);
+};
+
+PHP.Parser.prototype.yyn376 = function ( attributes ) {
+ this.yyval = this.yyastk[ this.stackPos-(3-2) ];
+};
+
+PHP.Parser.prototype.yyn377 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_String(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn378 = function ( attributes ) {
+ this.yyval = this.Node_Scalar_String(this.yyastk[ this.stackPos-(1-1) ], attributes);
+};
+
+PHP.Parser.prototype.yyn379 = function ( attributes ) {
+ this.yyval = this.Node_Expr_Variable(this.yyastk[ this.stackPos-(1-1) ].substring( 1 ), attributes);
+};
+
+/*
+* @author Niklas von Hertzen <niklas at hertzen.com>
+* @created 20.7.2012
+* @website http://hertzen.com
+ */
+
+
+PHP.Parser.prototype.Stmt_Namespace_postprocess = function( a ) {
+ return a;
+};
+
+
+PHP.Parser.prototype.Node_Stmt_Echo = function() {
+ return {
+ type: "Node_Stmt_Echo",
+ exprs: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_If = function() {
+ return {
+ type: "Node_Stmt_If",
+ cond: arguments[ 0 ],
+ stmts: arguments[ 1 ].stmts,
+ elseifs: arguments[ 1 ].elseifs,
+ Else: arguments[ 1 ].Else || null,
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_For = function() {
+
+ return {
+ type: "Node_Stmt_For",
+ init: arguments[ 0 ].init,
+ cond: arguments[ 0 ].cond,
+ loop: arguments[ 0 ].loop,
+ stmts: arguments[ 0 ].stmts,
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Function = function() {
+ return {
+ type: "Node_Stmt_Function",
+ name: arguments[ 0 ],
+ byRef: arguments[ 1 ].byRef,
+ params: arguments[ 1 ].params,
+ stmts: arguments[ 1 ].stmts,
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Stmt_Class_verifyModifier = function() {
+
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Namespace = function() {
+ return {
+ type: "Node_Stmt_Namespace",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_Use = function() {
+ return {
+ type: "Node_Stmt_Use",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_UseUse = function() {
+ return {
+ type: "Node_Stmt_UseUse",
+ name: arguments[ 0 ],
+ as: arguments[1],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_TraitUseAdaptation_Precedence = function() {
+ return {
+ type: "Node_Stmt_TraitUseAdaptation_Precedence",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_TraitUseAdaptation_Alias = function() {
+ return {
+ type: "Node_Stmt_TraitUseAdaptation_Alias",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_Trait = function() {
+ return {
+ type: "Node_Stmt_Trait",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_TraitUse = function() {
+ return {
+ type: "Node_Stmt_TraitUse",
+ name: arguments[ 0 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Stmt_Class = function() {
+ return {
+ type: "Node_Stmt_Class",
+ name: arguments[ 0 ],
+ Type: arguments[ 1 ].type,
+ Extends: arguments[ 1 ].Extends,
+ Implements: arguments[ 1 ].Implements,
+ stmts: arguments[ 1 ].stmts,
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_ClassMethod = function() {
+ return {
+ type: "Node_Stmt_ClassMethod",
+ name: arguments[ 0 ],
+ Type: arguments[ 1 ].type,
+ byRef: arguments[ 1 ].byRef,
+ params: arguments[ 1 ].params,
+ stmts: arguments[ 1 ].stmts,
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_ClassConst = function() {
+ return {
+ type: "Node_Stmt_ClassConst",
+ consts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Interface = function() {
+ return {
+ type: "Node_Stmt_Interface",
+ name: arguments[ 0 ],
+ Extends: arguments[ 1 ].Extends,
+ stmts: arguments[ 1 ].stmts,
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Throw = function() {
+ return {
+ type: "Node_Stmt_Throw",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Catch = function() {
+ return {
+ type: "Node_Stmt_Catch",
+ Type: arguments[ 0 ],
+ variable: arguments[ 1 ],
+ stmts: arguments[ 2 ],
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_TryCatch = function() {
+ return {
+ type: "Node_Stmt_TryCatch",
+ stmts: arguments[ 0 ],
+ catches: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_Foreach = function() {
+ return {
+ type: "Node_Stmt_Foreach",
+ expr: arguments[ 0 ],
+ valueVar: arguments[ 1 ],
+ keyVar: arguments[ 2 ].keyVar,
+ byRef: arguments[ 2 ].byRef,
+ stmts: arguments[ 2 ].stmts,
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_While = function() {
+ return {
+ type: "Node_Stmt_While",
+ cond: arguments[ 0 ],
+ stmts: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Do = function() {
+ return {
+ type: "Node_Stmt_Do",
+ cond: arguments[ 0 ],
+ stmts: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Break = function() {
+ return {
+ type: "Node_Stmt_Break",
+ num: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Continue = function() {
+ return {
+ type: "Node_Stmt_Continue",
+ num: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Return = function() {
+ return {
+ type: "Node_Stmt_Return",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Case = function() {
+ return {
+ type: "Node_Stmt_Case",
+ cond: arguments[ 0 ],
+ stmts: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Switch = function() {
+ return {
+ type: "Node_Stmt_Switch",
+ cond: arguments[ 0 ],
+ cases: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Else = function() {
+
+ return {
+ type: "Node_Stmt_Else",
+ stmts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_ElseIf = function() {
+ return {
+ type: "Node_Stmt_ElseIf",
+ cond: arguments[ 0 ],
+ stmts: arguments[ 1 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_InlineHTML = function() {
+ return {
+ type: "Node_Stmt_InlineHTML",
+ value: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_StaticVar = function() {
+ return {
+ type: "Node_Stmt_StaticVar",
+ name: arguments[ 0 ],
+ def: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_Static = function() {
+ return {
+ type: "Node_Stmt_Static",
+ vars: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Global = function() {
+ return {
+ type: "Node_Stmt_Global",
+ vars: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_PropertyProperty = function() {
+ return {
+ type: "Node_Stmt_PropertyProperty",
+ name: arguments[ 0 ],
+ def: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Stmt_Property = function() {
+ return {
+ type: "Node_Stmt_Property",
+ Type: arguments[ 0 ],
+ props: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Stmt_Unset = function() {
+ return {
+ type: "Node_Stmt_Unset",
+ variables: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+/*
+* @author Niklas von Hertzen <niklas at hertzen.com>
+* @created 20.7.2012
+* @website http://hertzen.com
+ */
+
+
+PHP.Parser.prototype.Node_Expr_Variable = function( a ) {
+ return {
+ type: "Node_Expr_Variable",
+ name: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Expr_FuncCall = function() {
+
+ return {
+ type: "Node_Expr_FuncCall",
+ func: arguments[ 0 ],
+ args: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_MethodCall = function() {
+
+ return {
+ type: "Node_Expr_MethodCall",
+ variable: arguments[ 0 ],
+ name: arguments[ 1 ],
+ args: arguments[ 2 ],
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_StaticCall = function() {
+
+ return {
+ type: "Node_Expr_StaticCall",
+ Class: arguments[ 0 ],
+ func: arguments[ 1 ],
+ args: arguments[ 2 ],
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Ternary = function() {
+
+ return {
+ type: "Node_Expr_Ternary",
+ cond: arguments[ 0 ],
+ If: arguments[ 1 ],
+ Else: arguments[ 2 ],
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignList = function() {
+
+ return {
+ type: "Node_Expr_AssignList",
+ assignList: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Assign = function() {
+
+ return {
+ type: "Node_Expr_Assign",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignConcat = function() {
+
+ return {
+ type: "Node_Expr_AssignConcat",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignMinus = function() {
+
+ return {
+ type: "Node_Expr_AssignMinus",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignPlus = function() {
+
+ return {
+ type: "Node_Expr_AssignPlus",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignDiv = function() {
+
+ return {
+ type: "Node_Expr_AssignDiv",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignRef = function() {
+
+ return {
+ type: "Node_Expr_AssignRef",
+ variable: arguments[ 0 ],
+ refVar: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignMul = function() {
+
+ return {
+ type: "Node_Expr_AssignMul",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_AssignMod = function() {
+
+ return {
+ type: "Node_Expr_AssignMod",
+ variable: arguments[ 0 ],
+ expr: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Plus = function() {
+
+ return {
+ type: "Node_Expr_Plus",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Minus = function() {
+
+ return {
+ type: "Node_Expr_Minus",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Mul = function() {
+
+ return {
+ type: "Node_Expr_Mul",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Div = function() {
+
+ return {
+ type: "Node_Expr_Div",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Mod = function() {
+
+ return {
+ type: "Node_Expr_Mod",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Greater = function() {
+
+ return {
+ type: "Node_Expr_Greater",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Equal = function() {
+
+ return {
+ type: "Node_Expr_Equal",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_NotEqual = function() {
+
+ return {
+ type: "Node_Expr_NotEqual",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Identical = function() {
+
+ return {
+ type: "Node_Expr_Identical",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_NotIdentical = function() {
+
+ return {
+ type: "Node_Expr_NotIdentical",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_GreaterOrEqual = function() {
+
+ return {
+ type: "Node_Expr_GreaterOrEqual",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_SmallerOrEqual = function() {
+
+ return {
+ type: "Node_Expr_SmallerOrEqual",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Concat = function() {
+
+ return {
+ type: "Node_Expr_Concat",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Smaller = function() {
+
+ return {
+ type: "Node_Expr_Smaller",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_PostInc = function() {
+
+ return {
+ type: "Node_Expr_PostInc",
+ variable: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_PostDec = function() {
+
+ return {
+ type: "Node_Expr_PostDec",
+ variable: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_PreInc = function() {
+
+ return {
+ type: "Node_Expr_PreInc",
+ variable: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_PreDec = function() {
+
+ return {
+ type: "Node_Expr_PreDec",
+ variable: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Include = function() {
+ return {
+ expr: arguments[ 0 ],
+ type: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+};
+
+PHP.Parser.prototype.Node_Expr_ArrayDimFetch = function() {
+
+ return {
+ type: "Node_Expr_ArrayDimFetch",
+ variable: arguments[ 0 ],
+ dim: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_StaticPropertyFetch = function() {
+
+ return {
+ type: "Node_Expr_StaticPropertyFetch",
+ Class: arguments[ 0 ],
+ name: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_ClassConstFetch = function() {
+
+ return {
+ type: "Node_Expr_ClassConstFetch",
+ Class: arguments[ 0 ],
+ name: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_StaticPropertyFetch = function() {
+
+ return {
+ type: "Node_Expr_StaticPropertyFetch",
+ Class: arguments[ 0 ],
+ name: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_ConstFetch = function() {
+
+ return {
+ type: "Node_Expr_ConstFetch",
+ name: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_ArrayItem = function() {
+
+ return {
+ type: "Node_Expr_ArrayItem",
+ value: arguments[ 0 ],
+ key: arguments[ 1 ],
+ byRef: arguments[ 2 ],
+ attributes: arguments[ 3 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Array = function() {
+
+ return {
+ type: "Node_Expr_Array",
+ items: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_PropertyFetch = function() {
+
+ return {
+ type: "Node_Expr_PropertyFetch",
+ variable: arguments[ 0 ],
+ name: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_New = function() {
+
+ return {
+ type: "Node_Expr_New",
+ Class: arguments[ 0 ],
+ args: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Print = function() {
+ return {
+ type: "Node_Expr_Print",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Exit = function() {
+ return {
+ type: "Node_Expr_Exit",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Cast_Bool = function() {
+ return {
+ type: "Node_Expr_Cast_Bool",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Cast_Int = function() {
+ return {
+ type: "Node_Expr_Cast_Int",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Cast_String = function() {
+ return {
+ type: "Node_Expr_Cast_String",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Cast_Double = function() {
+ return {
+ type: "Node_Expr_Cast_Double",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Cast_Array = function() {
+ return {
+ type: "Node_Expr_Cast_Array",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Cast_Object = function() {
+ return {
+ type: "Node_Expr_Cast_Object",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_ErrorSuppress = function() {
+ return {
+ type: "Node_Expr_ErrorSuppress",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_Isset = function() {
+ return {
+ type: "Node_Expr_Isset",
+ variables: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+
+
+PHP.Parser.prototype.Node_Expr_UnaryMinus = function() {
+ return {
+ type: "Node_Expr_UnaryMinus",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_UnaryPlus = function() {
+ return {
+ type: "Node_Expr_UnaryPlus",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Empty = function() {
+ return {
+ type: "Node_Expr_Empty",
+ variable: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BooleanOr = function() {
+ return {
+ type: "Node_Expr_BooleanOr",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_LogicalOr = function() {
+ return {
+ type: "Node_Expr_LogicalOr",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_LogicalAnd = function() {
+ return {
+ type: "Node_Expr_LogicalAnd",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Expr_LogicalXor = function() {
+ return {
+ type: "Node_Expr_LogicalXor",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BitwiseAnd = function() {
+ return {
+ type: "Node_Expr_BitwiseAnd",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BitwiseOr = function() {
+ return {
+ type: "Node_Expr_BitwiseOr",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BitwiseNot = function() {
+ return {
+ type: "Node_Expr_BitwiseNot",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BooleanNot = function() {
+ return {
+ type: "Node_Expr_BooleanNot",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_BooleanAnd = function() {
+ return {
+ type: "Node_Expr_BooleanAnd",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Instanceof = function() {
+
+ return {
+ type: "Node_Expr_Instanceof",
+ left: arguments[ 0 ],
+ right: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Expr_Clone = function() {
+
+ return {
+ type: "Node_Expr_Clone",
+ expr: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+/*
+* @author Niklas von Hertzen <niklas at hertzen.com>
+* @created 20.7.2012
+* @website http://hertzen.com
+ */
+
+
+
+PHP.Parser.prototype.Scalar_LNumber_parse = function( a ) {
+
+ return a;
+};
+
+PHP.Parser.prototype.Scalar_DNumber_parse = function( a ) {
+
+ return a;
+};
+
+PHP.Parser.prototype.Scalar_String_parseDocString = function() {
+
+ return '"' + arguments[ 1 ].replace(/([^"\\]*(?:\\.[^"\\]*)*)"/g, '$1\\"') + '"';
+};
+
+
+PHP.Parser.prototype.Node_Scalar_String = function( ) {
+
+ return {
+ type: "Node_Scalar_String",
+ value: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Scalar_String_create = function( ) {
+ return {
+ type: "Node_Scalar_String",
+ value: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Scalar_LNumber = function() {
+
+ return {
+ type: "Node_Scalar_LNumber",
+ value: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Scalar_DNumber = function() {
+
+ return {
+ type: "Node_Scalar_DNumber",
+ value: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+
+PHP.Parser.prototype.Node_Scalar_Encapsed = function() {
+
+ return {
+ type: "Node_Scalar_Encapsed",
+ parts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Name = function() {
+
+ return {
+ type: "Node_Name",
+ parts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Name_FullyQualified = function() {
+
+ return {
+ type: "Node_Name_FullyQualified",
+ parts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Name_Relative = function() {
+
+ return {
+ type: "Node_Name_Relative",
+ parts: arguments[ 0 ],
+ attributes: arguments[ 1 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Param = function() {
+
+ return {
+ type: "Node_Param",
+ name: arguments[ 0 ],
+ def: arguments[ 1 ],
+ Type: arguments[ 2 ],
+ byRef: arguments[ 3 ],
+ attributes: arguments[ 4 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Arg = function() {
+
+ return {
+ type: "Node_Name",
+ value: arguments[ 0 ],
+ byRef: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+PHP.Parser.prototype.Node_Const = function() {
+
+ return {
+ type: "Node_Const",
+ name: arguments[ 0 ],
+ value: arguments[ 1 ],
+ attributes: arguments[ 2 ]
+ };
+
+};
+
+
+exports.PHP = PHP;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/php_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/php_highlight_rules.js
new file mode 100644
index 000000000..033671eb2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/php_highlight_rules.js
@@ -0,0 +1,1088 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var PhpLangHighlightRules = function() {
+ var docComment = DocCommentHighlightRules;
+ // http://php.net/quickref.php
+ var builtinFunctions = lang.arrayToMap(
+ ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' +
+ 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' +
+ 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' +
+ 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' +
+ 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' +
+ 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' +
+ 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' +
+ 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' +
+ 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' +
+ 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' +
+ 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' +
+ 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' +
+ 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' +
+ 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' +
+ 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' +
+ 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' +
+ 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' +
+ 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' +
+ 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' +
+ 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' +
+ 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' +
+ 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' +
+ 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' +
+ 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' +
+ 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' +
+ 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' +
+ 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' +
+ 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' +
+ 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' +
+ 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' +
+ 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' +
+ 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' +
+ 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' +
+ 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' +
+ 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' +
+ 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' +
+ 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' +
+ 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' +
+ 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' +
+ 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' +
+ 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' +
+ 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' +
+ 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' +
+ 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' +
+ 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' +
+ 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' +
+ 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' +
+ 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' +
+ 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' +
+ 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' +
+ 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' +
+ 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' +
+ 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' +
+ 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' +
+ 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' +
+ 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' +
+ 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' +
+ 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' +
+ 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' +
+ 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' +
+ 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' +
+ 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' +
+ 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' +
+ 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' +
+ 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' +
+ 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' +
+ 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' +
+ 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' +
+ 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' +
+ 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' +
+ 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' +
+ 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' +
+ 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' +
+ 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' +
+ 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' +
+ 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' +
+ 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' +
+ 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' +
+ 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' +
+ 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' +
+ 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' +
+ 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' +
+ 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' +
+ 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' +
+ 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' +
+ 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' +
+ 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' +
+ 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' +
+ 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' +
+ 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' +
+ 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' +
+ 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' +
+ 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' +
+ 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' +
+ 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' +
+ 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' +
+ 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' +
+ 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' +
+ 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' +
+ 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' +
+ 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' +
+ 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' +
+ 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' +
+ 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' +
+ 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' +
+ 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' +
+ 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' +
+ 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' +
+ 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' +
+ 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' +
+ 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' +
+ 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' +
+ 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' +
+ 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' +
+ 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' +
+ 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' +
+ 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' +
+ 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' +
+ 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' +
+ 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' +
+ 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' +
+ 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' +
+ 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' +
+ 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' +
+ 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' +
+ 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' +
+ 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' +
+ 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' +
+ 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' +
+ 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' +
+ 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' +
+ 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' +
+ 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' +
+ 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' +
+ 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' +
+ 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' +
+ 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' +
+ 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' +
+ 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' +
+ 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' +
+ 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' +
+ 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' +
+ 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' +
+ 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' +
+ 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' +
+ 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' +
+ 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' +
+ 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' +
+ 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' +
+ 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' +
+ 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' +
+ 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' +
+ 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' +
+ 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' +
+ 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' +
+ 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' +
+ 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' +
+ 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' +
+ 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' +
+ 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' +
+ 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' +
+ 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' +
+ 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' +
+ 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' +
+ 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' +
+ 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' +
+ 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' +
+ 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' +
+ 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' +
+ 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' +
+ 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' +
+ 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' +
+ 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' +
+ 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' +
+ 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' +
+ 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' +
+ 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' +
+ 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' +
+ 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' +
+ 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' +
+ 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' +
+ 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' +
+ 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' +
+ 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' +
+ 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' +
+ 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' +
+ 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' +
+ 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' +
+ 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' +
+ 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' +
+ 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' +
+ 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' +
+ 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' +
+ 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' +
+ 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' +
+ 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' +
+ 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' +
+ 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' +
+ 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' +
+ 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' +
+ 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' +
+ 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' +
+ 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' +
+ 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' +
+ 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' +
+ 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' +
+ 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' +
+ 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' +
+ 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' +
+ 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' +
+ 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' +
+ 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' +
+ 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' +
+ 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' +
+ 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' +
+ 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' +
+ 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' +
+ 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' +
+ 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' +
+ 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' +
+ 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' +
+ 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' +
+ 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' +
+ 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' +
+ 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' +
+ 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' +
+ 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' +
+ 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' +
+ 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' +
+ 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' +
+ 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' +
+ 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' +
+ 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' +
+ 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' +
+ 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' +
+ 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' +
+ 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' +
+ 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' +
+ 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' +
+ 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' +
+ 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' +
+ 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' +
+ 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' +
+ 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' +
+ 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' +
+ 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' +
+ 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' +
+ 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' +
+ 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' +
+ 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' +
+ 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' +
+ 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' +
+ 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' +
+ 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' +
+ 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' +
+ 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' +
+ 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' +
+ 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' +
+ 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' +
+ 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' +
+ 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' +
+ 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' +
+ 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' +
+ 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' +
+ 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' +
+ 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' +
+ 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' +
+ 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' +
+ 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' +
+ 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' +
+ 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' +
+ 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' +
+ 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' +
+ 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' +
+ 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' +
+ 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' +
+ 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' +
+ 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' +
+ 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' +
+ 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' +
+ 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' +
+ 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' +
+ 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' +
+ 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' +
+ 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' +
+ 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' +
+ 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' +
+ 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' +
+ 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' +
+ 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' +
+ 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' +
+ 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' +
+ 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' +
+ 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' +
+ 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' +
+ 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' +
+ 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' +
+ 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' +
+ 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' +
+ 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' +
+ 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' +
+ 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' +
+ 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' +
+ 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' +
+ 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' +
+ 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' +
+ 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' +
+ 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' +
+ 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' +
+ 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' +
+ 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' +
+ 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' +
+ 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' +
+ 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' +
+ 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' +
+ 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' +
+ 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' +
+ 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' +
+ 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' +
+ 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' +
+ 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' +
+ 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' +
+ 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' +
+ 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' +
+ 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' +
+ 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' +
+ 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' +
+ 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' +
+ 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' +
+ 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' +
+ 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' +
+ 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' +
+ 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' +
+ 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' +
+ 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' +
+ 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' +
+ 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' +
+ 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' +
+ 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' +
+ 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' +
+ 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' +
+ 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' +
+ 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' +
+ 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' +
+ 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' +
+ 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' +
+ 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' +
+ 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' +
+ 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' +
+ 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' +
+ 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' +
+ 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' +
+ 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' +
+ 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' +
+ 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' +
+ 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' +
+ 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' +
+ 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' +
+ 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' +
+ 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' +
+ 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' +
+ 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' +
+ 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' +
+ 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' +
+ 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' +
+ 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' +
+ 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' +
+ 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' +
+ 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' +
+ 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' +
+ 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' +
+ 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' +
+ 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' +
+ 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' +
+ 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' +
+ 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' +
+ 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' +
+ 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' +
+ 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' +
+ 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' +
+ 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' +
+ 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' +
+ 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' +
+ 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' +
+ 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' +
+ 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' +
+ 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' +
+ 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' +
+ 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' +
+ 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' +
+ 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' +
+ 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' +
+ 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' +
+ 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' +
+ 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' +
+ 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' +
+ 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' +
+ 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' +
+ 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' +
+ 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' +
+ 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' +
+ 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' +
+ 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' +
+ 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' +
+ 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' +
+ 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' +
+ 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' +
+ 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' +
+ 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' +
+ 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' +
+ 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' +
+ 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' +
+ 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' +
+ 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' +
+ 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' +
+ 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' +
+ 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' +
+ 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' +
+ 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' +
+ 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' +
+ 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' +
+ 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' +
+ 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' +
+ 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' +
+ 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' +
+ 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' +
+ 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' +
+ 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' +
+ 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' +
+ 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' +
+ 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' +
+ 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' +
+ 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' +
+ 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' +
+ 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' +
+ 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' +
+ 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' +
+ 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' +
+ 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' +
+ 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' +
+ 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' +
+ 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' +
+ 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' +
+ 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' +
+ 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' +
+ 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' +
+ 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' +
+ 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' +
+ 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' +
+ 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' +
+ 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' +
+ 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' +
+ 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' +
+ 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' +
+ 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' +
+ 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' +
+ 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' +
+ 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' +
+ 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' +
+ 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' +
+ 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' +
+ 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' +
+ 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' +
+ 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' +
+ 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' +
+ 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' +
+ 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' +
+ 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' +
+ 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
+ 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' +
+ 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' +
+ 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' +
+ 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' +
+ 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' +
+ 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' +
+ 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' +
+ 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' +
+ 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' +
+ 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' +
+ 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' +
+ 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' +
+ 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' +
+ 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' +
+ 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' +
+ 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' +
+ 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' +
+ 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' +
+ 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' +
+ 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' +
+ 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' +
+ 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' +
+ 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' +
+ 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' +
+ 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' +
+ 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' +
+ 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' +
+ 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' +
+ 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' +
+ 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' +
+ 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' +
+ 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' +
+ 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' +
+ 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' +
+ 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' +
+ 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' +
+ 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' +
+ 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' +
+ 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' +
+ 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' +
+ 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' +
+ 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' +
+ 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' +
+ 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' +
+ 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' +
+ 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' +
+ 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' +
+ 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' +
+ 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' +
+ 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' +
+ 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' +
+ 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' +
+ 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' +
+ 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' +
+ 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' +
+ 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' +
+ 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' +
+ 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' +
+ 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' +
+ 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' +
+ 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' +
+ 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' +
+ 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' +
+ 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' +
+ 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' +
+ 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' +
+ 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' +
+ 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' +
+ 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' +
+ 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' +
+ 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' +
+ 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' +
+ 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' +
+ 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' +
+ 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' +
+ 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' +
+ 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' +
+ 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' +
+ 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' +
+ 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' +
+ 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' +
+ 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' +
+ 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' +
+ 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' +
+ 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' +
+ 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' +
+ 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' +
+ 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' +
+ 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' +
+ 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' +
+ 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' +
+ 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' +
+ 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' +
+ 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' +
+ 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' +
+ 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' +
+ 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' +
+ 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' +
+ 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' +
+ 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' +
+ 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' +
+ 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' +
+ 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' +
+ 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' +
+ 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' +
+ 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' +
+ 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' +
+ 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' +
+ 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' +
+ 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' +
+ 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' +
+ 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' +
+ 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' +
+ 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' +
+ 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' +
+ 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' +
+ 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' +
+ 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' +
+ 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' +
+ 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' +
+ 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' +
+ 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' +
+ 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' +
+ 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' +
+ 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' +
+ 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' +
+ 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' +
+ 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' +
+ 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' +
+ 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' +
+ 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' +
+ 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' +
+ 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' +
+ 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' +
+ 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' +
+ 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' +
+ 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' +
+ 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' +
+ 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' +
+ 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' +
+ 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' +
+ 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' +
+ 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' +
+ 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' +
+ 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' +
+ 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' +
+ 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' +
+ 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' +
+ 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' +
+ 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' +
+ 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' +
+ 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' +
+ 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' +
+ 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' +
+ 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' +
+ 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' +
+ 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' +
+ 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' +
+ 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' +
+ 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' +
+ 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' +
+ 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' +
+ 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' +
+ 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' +
+ 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' +
+ 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' +
+ 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' +
+ 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' +
+ 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' +
+ 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' +
+ 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' +
+ 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' +
+ 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' +
+ 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' +
+ 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' +
+ 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' +
+ 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' +
+ 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' +
+ 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' +
+ 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' +
+ 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' +
+ 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' +
+ 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' +
+ 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' +
+ 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' +
+ 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' +
+ 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' +
+ 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' +
+ 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' +
+ 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' +
+ 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' +
+ 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' +
+ 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' +
+ 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' +
+ 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' +
+ 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' +
+ 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' +
+ 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' +
+ 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' +
+ 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' +
+ 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' +
+ 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' +
+ 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' +
+ 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' +
+ 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' +
+ 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' +
+ 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' +
+ 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' +
+ 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' +
+ 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' +
+ 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' +
+ 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' +
+ 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' +
+ 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' +
+ 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' +
+ 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' +
+ 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' +
+ 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' +
+ 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' +
+ 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' +
+ 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' +
+ 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' +
+ 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' +
+ 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' +
+ 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' +
+ 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' +
+ 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' +
+ 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' +
+ 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' +
+ 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' +
+ 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' +
+ 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' +
+ 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' +
+ 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' +
+ 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' +
+ 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' +
+ 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' +
+ 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' +
+ 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' +
+ 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' +
+ 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' +
+ 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' +
+ 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' +
+ 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' +
+ 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' +
+ 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' +
+ 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' +
+ 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' +
+ 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' +
+ 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' +
+ 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' +
+ 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' +
+ 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' +
+ 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' +
+ 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' +
+ 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' +
+ 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' +
+ 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' +
+ 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' +
+ 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' +
+ 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' +
+ 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' +
+ 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' +
+ 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' +
+ 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' +
+ 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' +
+ 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' +
+ 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' +
+ 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' +
+ 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' +
+ 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' +
+ 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' +
+ 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' +
+ 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' +
+ 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' +
+ 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' +
+ 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' +
+ 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' +
+ 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' +
+ 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' +
+ 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' +
+ 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' +
+ 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' +
+ 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' +
+ 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' +
+ 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' +
+ 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' +
+ 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' +
+ 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' +
+ 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' +
+ 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' +
+ 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' +
+ 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' +
+ 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' +
+ 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' +
+ 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' +
+ 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' +
+ 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' +
+ 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' +
+ 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' +
+ 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' +
+ 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' +
+ 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' +
+ 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' +
+ 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' +
+ 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' +
+ 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' +
+ 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' +
+ 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' +
+ 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' +
+ 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' +
+ 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' +
+ 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' +
+ 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' +
+ 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' +
+ 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' +
+ 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' +
+ 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' +
+ 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' +
+ 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' +
+ 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|')
+ );
+
+ // http://php.net/manual/en/reserved.keywords.php
+ var keywords = lang.arrayToMap(
+ ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' +
+ 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' +
+ 'public|static|switch|throw|try|use|var|while|xor').split('|')
+ );
+
+ // http://php.net/manual/en/reserved.keywords.php
+ var languageConstructs = lang.arrayToMap(
+ ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|')
+ );
+
+ var builtinConstants = lang.arrayToMap(
+ ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|')
+ );
+
+ var builtinVariables = lang.arrayToMap(
+ ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' +
+ '$http_response_header|$argc|$argv').split('|')
+ );
+
+ // Discovery done by downloading 'Many HTML files' from: http://php.net/download-docs.php
+ // Then search for files containing 'deprecated' (case-insensitive) and look at each file that turns up.
+ var builtinFunctionsDeprecated = lang.arrayToMap(
+ ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' +
+ 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' +
+ 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' +
+ 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' +
+ 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' +
+ 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' +
+ 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' +
+ 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' +
+ 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' +
+ 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' +
+ 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' +
+ 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' +
+ 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' +
+ 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' +
+ 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' +
+ 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' +
+ 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' +
+ 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' +
+ 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' +
+ 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' +
+ 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' +
+ 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' +
+ 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' +
+ 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' +
+ 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' +
+ 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' +
+ 'sql_regcase').split('|')
+ );
+
+ var keywordsDeprecated = lang.arrayToMap(
+ ('cfunction|old_function').split('|')
+ );
+
+ var futureReserved = lang.arrayToMap([]);
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /(?:#|\/\/)(?:[^?]|\?[^>])*/
+ },
+ docComment.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // " string start
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "string", // ' string start
+ regex : "'",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language", // constants
+ regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" +
+ "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" +
+ "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" +
+ "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" +
+ "VERSION))|__COMPILER_HALT_OFFSET__)\\b"
+ }, {
+ token : ["keyword", "text", "support.class"],
+ regex : "\\b(new)(\\s+)(\\w+)"
+ }, {
+ token : ["support.class", "keyword.operator"],
+ regex : "\\b(\\w+)(::)"
+ }, {
+ token : "constant.language", // constants
+ regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" +
+ "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" +
+ "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" +
+ "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" +
+ "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" +
+ "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" +
+ "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" +
+ "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" +
+ "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" +
+ "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" +
+ "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" +
+ "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" +
+ "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
+ "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" +
+ "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" +
+ "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (futureReserved.hasOwnProperty(value))
+ return "invalid.illegal";
+ else if (builtinFunctions.hasOwnProperty(value))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/))
+ return "variable";
+ return "identifier";
+ },
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ onMatch : function(value, currentSate, state) {
+ value = value.substr(3);
+ if (value[0] == "'" || value[0] == '"')
+ value = value.slice(1, -1);
+ state.unshift(this.next, value);
+ return "markup.list";
+ },
+ regex : /<<<(?:\w+|'\w+'|"\w+")$/,
+ next: "heredoc"
+ }, {
+ token : "keyword.operator",
+ regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "heredoc" : [
+ {
+ onMatch : function(value, currentSate, stack) {
+ if (stack[1] != value)
+ return "string";
+ stack.shift();
+ stack.shift();
+ return "markup.list"
+ },
+ regex : "^\\w+(?=;?$)",
+ next: "start"
+ }, {
+ token: "string",
+ regex : ".*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'
+ }, {
+ token : "constant.language.escape",
+ regex : /\$[\w]+(?:\[[\w\]+]|=>\w+)?/
+ }, {
+ token : "constant.language.escape",
+ regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now
+ },
+ {token : "string", regex : '"', next : "start"},
+ {defaultToken : "string"}
+ ],
+ "qstring" : [
+ {token : "constant.language.escape", regex : /\\['\\]/},
+ {token : "string", regex : "'", next : "start"},
+ {defaultToken : "string"}
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(PhpLangHighlightRules, TextHighlightRules);
+
+
+var PhpHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ token : "support.php_tag", // php open tag
+ regex : "<\\?(?:php|=)?",
+ push : "php-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "support.php_tag", // php close tag
+ regex : "\\?>",
+ next : "pop"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(PhpHighlightRules, HtmlHighlightRules);
+
+exports.PhpHighlightRules = PhpHighlightRules;
+exports.PhpLangHighlightRules = PhpLangHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/php_worker.js b/src/fauxton/assets/js/libs/ace/mode/php_worker.js
new file mode 100644
index 000000000..59ebcf489
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/php_worker.js
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var PHP = require("./php/php").PHP;
+
+var PhpWorker = exports.PhpWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(PhpWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+
+ // var start = new Date();
+
+ var tokens = PHP.Lexer(value, {short_open_tag: 1});
+ try {
+ new PHP.Parser(tokens);
+ } catch(e) {
+ errors.push({
+ row: e.line - 1,
+ column: null,
+ text: e.message.charAt(0).toUpperCase() + e.message.substring(1),
+ type: "error"
+ });
+ }
+
+ // console.log("lint time: " + (new Date() - start));
+
+ if (errors.length) {
+ this.sender.emit("error", errors);
+ } else {
+ this.sender.emit("ok");
+ }
+ };
+
+}).call(PhpWorker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/plain_text.js b/src/fauxton/assets/js/libs/ace/mode/plain_text.js
new file mode 100644
index 000000000..f8e61c665
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/plain_text.js
@@ -0,0 +1,55 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+
+var Mode = function() {
+ this.HighlightRules = TextHighlightRules;
+ this.$behaviour = new Behaviour();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ return '';
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/plain_text_test.js b/src/fauxton/assets/js/libs/ace/mode/plain_text_test.js
new file mode 100644
index 000000000..7e02f5da5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/plain_text_test.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var PlainTextMode = require("./plain_text").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new PlainTextMode();
+ },
+
+ "test: lines should not be indented" : function() {
+ assert.equal("", this.mode.getNextLineIndent("start", " abc", " "));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/powershell.js b/src/fauxton/assets/js/libs/ace/mode/powershell.js
new file mode 100644
index 000000000..8cc556844
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/powershell.js
@@ -0,0 +1,61 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PowershellHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"});
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "<#", end: "#>"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/powershell_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/powershell_highlight_rules.js
new file mode 100644
index 000000000..6a03ac74a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/powershell_highlight_rules.js
@@ -0,0 +1,145 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PowershellHighlightRules = function() {
+
+ var keywords = (
+ "function|if|else|elseif|switch|while|default|for|do|until|break|continue|" +
+ "foreach|return|filter|in|trap|throw|param|begin|process|end"
+ );
+
+ var builtinFunctions = (
+ "Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" +
+ "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" +
+ "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" +
+ "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" +
+ "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" +
+ "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" +
+ "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" +
+ "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" +
+ "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" +
+ "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" +
+ "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" +
+ "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" +
+ "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" +
+ "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" +
+ "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" +
+ "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" +
+ "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" +
+ "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" +
+ "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" +
+ "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" +
+ "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" +
+ "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" +
+ "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" +
+ "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" +
+ "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" +
+ "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" +
+ "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" +
+ "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" +
+ "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" +
+ "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" +
+ "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" +
+ "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" +
+ "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" +
+ "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" +
+ "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" +
+ "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" +
+ "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" +
+ "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" +
+ "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" +
+ "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" +
+ "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier");
+
+ var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" +
+ "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" +
+ "is|isnot|as|" +
+ "and|or|band|bor|not";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "comment.start",
+ regex : "<#",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
+ }, {
+ token : "constant.language",
+ regex : "[$][Nn]ull\\b"
+ }, {
+ token : "variable.instance",
+ regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\-(?:" + binaryOperatorsRe + ")"
+ }, {
+ token : "keyword.operator",
+ regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-="
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.end",
+ regex : "#>",
+ next : "start"
+ }, {
+ token : "doc.comment.tag",
+ regex : "^\\.\\w+"
+ }, {
+ token : "comment",
+ regex : "\\w+"
+ }, {
+ token : "comment",
+ regex : "."
+ }
+ ]
+ };
+};
+
+oop.inherits(PowershellHighlightRules, TextHighlightRules);
+
+exports.PowershellHighlightRules = PowershellHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/prolog.js b/src/fauxton/assets/js/libs/ace/mode/prolog.js
new file mode 100644
index 000000000..6f89e92f3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/prolog.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PrologHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "/\\*";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/prolog_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/prolog_highlight_rules.js
new file mode 100644
index 000000000..fb3fa74fc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/prolog_highlight_rules.js
@@ -0,0 +1,238 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from https://raw.github.com/stephenroller/prolog-tmbundle/master/Syntaxes/Prolog.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PrologHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { include: '#comment' },
+ { include: '#basic_fact' },
+ { include: '#rule' },
+ { include: '#directive' },
+ { include: '#fact' } ],
+ '#atom':
+ [ { token: 'constant.other.atom.prolog',
+ regex: '\\b[a-z][a-zA-Z0-9_]*\\b' },
+ { token: 'constant.numeric.prolog',
+ regex: '-?\\d+(?:\\.\\d+)?' },
+ { include: '#string' } ],
+ '#basic_elem':
+ [ { include: '#comment' },
+ { include: '#statement' },
+ { include: '#constants' },
+ { include: '#operators' },
+ { include: '#builtins' },
+ { include: '#list' },
+ { include: '#atom' },
+ { include: '#variable' } ],
+ '#basic_fact':
+ [ { token:
+ [ 'entity.name.function.fact.basic.prolog',
+ 'punctuation.end.fact.basic.prolog' ],
+ regex: '([a-z]\\w*)(\\.)' } ],
+ '#builtins':
+ [ { token: 'support.function.builtin.prolog',
+ regex: '\\b(?:\n\t\t\t\t\t\tabolish|abort|ancestors|arg|ascii|assert[az]|\n\t\t\t\t\t\tatom(?:ic)?|body|char|close|conc|concat|consult|\n\t\t\t\t\t\tdefine|definition|dynamic|dump|fail|file|free|\n\t\t\t\t\t\tfree_proc|functor|getc|goal|halt|head|head|integer|\n\t\t\t\t\t\tlength|listing|match_args|member|next_clause|nl|\n\t\t\t\t\t\tnonvar|nth|number|cvars|nvars|offset|op|\n\t\t\t\t\t\tprint?|prompt|putc|quoted|ratom|read|redefine|\n\t\t\t\t\t\trename|retract(?:all)?|see|seeing|seen|skip|spy|\n\t\t\t\t\t\tstatistics|system|tab|tell|telling|term|\n\t\t\t\t\t\ttime|told|univ|unlink_clause|unspy_predicate|\n\t\t\t\t\t\tvar|write\n\t\t\t\t\t)\\b' } ],
+ '#comment':
+ [ { token:
+ [ 'punctuation.definition.comment.prolog',
+ 'comment.line.percentage.prolog' ],
+ regex: '(%)(.*$)' },
+ { token: 'punctuation.definition.comment.prolog',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.prolog',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.prolog' } ] } ],
+ '#constants':
+ [ { token: 'constant.language.prolog',
+ regex: '\\b(?:true|false|yes|no)\\b' } ],
+ '#directive':
+ [ { token: 'keyword.operator.directive.prolog',
+ regex: ':-',
+ push:
+ [ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' },
+ { include: '#comment' },
+ { include: '#statement' },
+ { defaultToken: 'meta.directive.prolog' } ] } ],
+ '#expr':
+ [ { include: '#comments' },
+ { token: 'meta.expression.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' },
+ { include: '#expr' },
+ { defaultToken: 'meta.expression.prolog' } ] },
+ { token: 'keyword.control.cutoff.prolog', regex: '!' },
+ { token: 'punctuation.control.and.prolog', regex: ',' },
+ { token: 'punctuation.control.or.prolog', regex: ';' },
+ { include: '#basic_elem' } ],
+ '#fact':
+ [ { token:
+ [ 'entity.name.function.fact.prolog',
+ 'punctuation.begin.fact.parameters.prolog' ],
+ regex: '([a-z]\\w*)(\\()(?!.*:-)',
+ push:
+ [ { token:
+ [ 'punctuation.end.fact.parameters.prolog',
+ 'punctuation.end.fact.prolog' ],
+ regex: '(\\))(\\.)',
+ next: 'pop' },
+ { include: '#parameter' },
+ { defaultToken: 'meta.fact.prolog' } ] } ],
+ '#list':
+ [ { token: 'punctuation.begin.list.prolog',
+ regex: '\\[(?=.*\\])',
+ push:
+ [ { token: 'punctuation.end.list.prolog',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#comment' },
+ { token: 'punctuation.separator.list.prolog', regex: ',' },
+ { token: 'punctuation.concat.list.prolog',
+ regex: '\\|',
+ push:
+ [ { token: 'meta.list.concat.prolog',
+ regex: '(?=\\s*\\])',
+ next: 'pop' },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.list.concat.prolog' } ] },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.list.prolog' } ] } ],
+ '#operators':
+ [ { token: 'keyword.operator.prolog',
+ regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ],
+ '#parameter':
+ [ { token: 'variable.language.anonymous.prolog',
+ regex: '\\b_\\b' },
+ { token: 'variable.parameter.prolog',
+ regex: '\\b[A-Z_]\\w*\\b' },
+ { token: 'punctuation.separator.parameters.prolog', regex: ',' },
+ { include: '#basic_elem' },
+ { token: 'invalid.illegal.invalidchar.prolog', regex: '[^\\s]' } ],
+ '#rule':
+ [ { token: 'meta.rule.prolog',
+ regex: '(?=[a-z]\\w*.*:-)',
+ push:
+ [ { token: 'punctuation.rule.end.prolog',
+ regex: '\\.',
+ next: 'pop' },
+ { token: 'meta.rule.signature.prolog',
+ regex: '(?=[a-z]\\w*.*:-)',
+ push:
+ [ { token: 'meta.rule.signature.prolog',
+ regex: '(?=:-)',
+ next: 'pop' },
+ { token: 'entity.name.function.rule.prolog',
+ regex: '[a-z]\\w*(?=\\(|\\s*:-)' },
+ { token: 'punctuation.rule.parameters.begin.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.rule.parameters.end.prolog',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#parameter' },
+ { defaultToken: 'meta.rule.parameters.prolog' } ] },
+ { defaultToken: 'meta.rule.signature.prolog' } ] },
+ { token: 'keyword.operator.definition.prolog',
+ regex: ':-',
+ push:
+ [ { token: 'meta.rule.definition.prolog',
+ regex: '(?=\\.)',
+ next: 'pop' },
+ { include: '#comment' },
+ { include: '#expr' },
+ { defaultToken: 'meta.rule.definition.prolog' } ] },
+ { defaultToken: 'meta.rule.prolog' } ] } ],
+ '#statement':
+ [ { token: 'meta.statement.prolog',
+ regex: '(?=[a-z]\\w*\\()',
+ push:
+ [ { token: 'punctuation.end.statement.parameters.prolog',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#builtins' },
+ { include: '#atom' },
+ { token: 'punctuation.begin.statement.parameters.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.statement.parameters.prolog',
+ regex: '(?=\\))',
+ next: 'pop' },
+ { token: 'punctuation.separator.statement.prolog', regex: ',' },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.statement.parameters.prolog' } ] },
+ { defaultToken: 'meta.statement.prolog' } ] } ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.prolog',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.prolog',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.prolog', regex: '\\\\.' },
+ { token: 'constant.character.escape.quote.prolog',
+ regex: '\'\'' },
+ { defaultToken: 'string.quoted.single.prolog' } ] } ],
+ '#variable':
+ [ { token: 'variable.language.anonymous.prolog',
+ regex: '\\b_\\b' },
+ { token: 'variable.other.prolog',
+ regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] }
+
+ this.normalizeRules();
+};
+
+PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ],
+ foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)',
+ foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)',
+ keyEquivalent: '^~P',
+ name: 'Prolog',
+ scopeName: 'source.prolog' }
+
+
+oop.inherits(PrologHighlightRules, TextHighlightRules);
+
+exports.PrologHighlightRules = PrologHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/properties.js b/src/fauxton/assets/js/libs/ace/mode/properties.js
new file mode 100644
index 000000000..0f89b75b6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/properties.js
@@ -0,0 +1,45 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = PropertiesHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/properties_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/properties_highlight_rules.js
new file mode 100644
index 000000000..0fbaceb64
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/properties_highlight_rules.js
@@ -0,0 +1,86 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PropertiesHighlightRules = function() {
+
+ var escapeRe = /\\u[0-9a-fA-F]{4}|\\/;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /[!#].*$/
+ }, {
+ // Empty value
+ token : "keyword",
+ regex : /[=:]$/
+ }, {
+ token : "keyword",
+ regex : /[=:]/,
+ next : "value"
+ }, {
+ token : "constant.language.escape",
+ regex : escapeRe
+ }, {
+ defaultToken: "variable"
+ }
+ ],
+ "value" : [
+ {
+ // Multi-line string
+ regex : /\\$/,
+ token : "string",
+ next : "value"
+ }, {
+ regex : /$/,
+ token : "string",
+ next : "start"
+ }, {
+ token : "constant.language.escape",
+ regex : escapeRe
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(PropertiesHighlightRules, TextHighlightRules);
+
+exports.PropertiesHighlightRules = PropertiesHighlightRules;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/protobuf.js b/src/fauxton/assets/js/libs/ace/mode/protobuf.js
new file mode 100644
index 000000000..a3660bd09
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/protobuf.js
@@ -0,0 +1,66 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Zef Hemel
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ var highlighter = new ProtobufHighlightRules();
+ this.foldingRules = new CStyleFoldMode();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$keywordList = highlighter.$keywordList;
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ // Extra logic goes here.
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/protobuf_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/protobuf_highlight_rules.js
new file mode 100644
index 000000000..fd241549f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/protobuf_highlight_rules.js
@@ -0,0 +1,66 @@
+define(function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+ var ProtobufHighlightRules = function() {
+
+ var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" +
+ "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" +
+ "string|bytes";
+ var keywordDeclaration = "message|required|optional|repeated|package|" +
+ "import|option|enum";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.declaration.protobuf": keywordDeclaration,
+ "support.type": builtinTypes
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /\/\/.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.protobuf"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']'
+ }, {
+ token: "constant.numeric", // hex
+ regex: "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }],
+ "comment": [{
+ token: "comment", // closing comment
+ regex: ".*?\\*\\/",
+ next: "start"
+ }, {
+ token: "comment", // comment spanning whole line
+ regex: ".+"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(ProtobufHighlightRules, TextHighlightRules);
+
+ exports.ProtobufHighlightRules = ProtobufHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/python.js b/src/fauxton/assets/js/libs/ace/mode/python.js
new file mode 100644
index 000000000..d561c084d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/python.js
@@ -0,0 +1,113 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = PythonHighlightRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+
+ // ignore trailing comments
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ // outdenting in python is slightly different because it always applies
+ // to the next line and only of a new line is inserted
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/python_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/python_highlight_rules.js
new file mode 100644
index 000000000..ccb406755
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/python_highlight_rules.js
@@ -0,0 +1,191 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+/*
+ * TODO: python delimiters
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var PythonHighlightRules = function() {
+
+ var keywords = (
+ "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
+ "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
+ "raise|return|try|while|with|yield"
+ );
+
+ var builtinConstants = (
+ "True|False|None|NotImplemented|Ellipsis|__debug__"
+ );
+
+ var builtinFunctions = (
+ "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
+ "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
+ "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
+ "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
+ "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
+ "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
+ "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" +
+ "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern"
+ );
+
+ //var futureReserved = "";
+ var keywordMapper = this.createKeywordMapper({
+ "invalid.deprecated": "debugger",
+ "support.function": builtinFunctions,
+ //"invalid.illegal": futureReserved,
+ "constant.language": builtinConstants,
+ "keyword": keywords
+ }, "identifier");
+
+ var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?";
+
+ var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
+ var octInteger = "(?:0[oO]?[0-7]+)";
+ var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
+ var binInteger = "(?:0[bB][01]+)";
+ var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
+
+ var exponent = "(?:[eE][+-]?\\d+)";
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+
+ var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}",
+ next : "qstring3"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // imaginary
+ regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // long integer
+ regex : integer + "[lL]\\b"
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line ''' string end
+ regex : "'{3}",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+};
+
+oop.inherits(PythonHighlightRules, TextHighlightRules);
+
+exports.PythonHighlightRules = PythonHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/python_test.js b/src/fauxton/assets/js/libs/ace/mode/python_test.js
new file mode 100644
index 000000000..31b343be4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/python_test.js
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Mode = require("./python").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new Mode();
+ },
+
+ "test: getTokenizer() (smoke test)" : function() {
+ var tokenizer = this.mode.getTokenizer();
+
+ assert.ok(tokenizer instanceof Tokenizer);
+
+ var tokens = tokenizer.getLineTokens("'juhu'", "start").tokens;
+ assert.equal("string", tokens[0].type);
+ },
+
+ "test: auto outdent after 'pass', 'return' and 'raise'" : function() {
+ assert.ok(this.mode.checkOutdent("start", " pass", "\n"));
+ assert.ok(this.mode.checkOutdent("start", " pass ", "\n"));
+ assert.ok(this.mode.checkOutdent("start", " return", "\n"));
+ assert.ok(this.mode.checkOutdent("start", " raise", "\n"));
+ assert.equal(this.mode.checkOutdent("start", " raise", " "), false);
+ assert.ok(this.mode.checkOutdent("start", " pass # comment", "\n"));
+ assert.equal(this.mode.checkOutdent("start", "'juhu'", "\n"), false);
+ },
+
+ "test: auto outdent" : function() {
+ var session = new EditSession([" if True:", " pass", " "]);
+ this.mode.autoOutdent("start", session, 1);
+ assert.equal(" ", session.getLine(2));
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/r.js b/src/fauxton/assets/js/libs/ace/mode/r.js
new file mode 100644
index 000000000..c21a16e7f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/r.js
@@ -0,0 +1,154 @@
+/*
+ * r.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *
+ */
+define(function(require, exports, module) {
+ "use strict";
+
+ var Range = require("../range").Range;
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var Tokenizer = require("../tokenizer").Tokenizer;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+ var unicode = require("../unicode");
+
+ var Mode = function()
+ {
+ this.HighlightRules = RHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function()
+ {
+ this.lineCommentStart = "#";
+ // todo import codeModel from RStudio
+ /*this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "._]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "._]|\s])+", "g"
+ );
+
+ this.$complements = {
+ "(": ")",
+ "[": "]",
+ '"': '"',
+ "'": "'",
+ "{": "}"
+ };
+ this.$reOpen = /^[(["'{]$/;
+ this.$reClose = /^[)\]"'}]$/;
+
+ this.getNextLineIndent = function(state, line, tab, tabSize, row)
+ {
+ return this.codeModel.getNextLineIndent(row, line, state, tab, tabSize);
+ };
+
+ this.allowAutoInsert = this.smartAllowAutoInsert;
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\{\}\)]/.test(input);
+ };
+
+ this.getIndentForOpenBrace = function(openBracePos)
+ {
+ return this.codeModel.getIndentForOpenBrace(openBracePos);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ if (row == 0)
+ return 0;
+
+ var line = doc.getLine(row);
+
+ var match = line.match(/^(\s*[\}\)])/);
+ if (match)
+ {
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.codeModel.getIndentForOpenBrace(openBracePos);
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ }
+
+ match = line.match(/^(\s*\{)/);
+ if (match)
+ {
+ var column = match[1].length;
+ var indent = this.codeModel.getBraceIndent(row-1);
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ }
+ };
+
+ this.$getIndent = function(line) {
+ var match = line.match(/^(\s+)/);
+ if (match) {
+ return match[1];
+ }
+
+ return "";
+ };
+
+ this.transformAction = function(state, action, editor, session, text) {
+ if (action === 'insertion' && text === "\n") {
+
+ // If newline in a doxygen comment, continue the comment
+ var pos = editor.getSelectionRange().start;
+ var match = /^((\s*#+')\s*)/.exec(session.doc.getLine(pos.row));
+ if (match && editor.getSelectionRange().start.column >= match[2].length) {
+ return {text: "\n" + match[1]};
+ }
+ }
+ return false;
+ };*/
+ }).call(Mode.prototype);
+ exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/r_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/r_highlight_rules.js
new file mode 100644
index 000000000..99a743761
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/r_highlight_rules.js
@@ -0,0 +1,188 @@
+/*
+ * r_highlight_rules.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+define(function(require, exports, module)
+{
+
+ var oop = require("../lib/oop");
+ var lang = require("../lib/lang");
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+
+ var RHighlightRules = function()
+ {
+
+ var keywords = lang.arrayToMap(
+ ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass")
+ .split("|")
+ );
+
+ var buildinConstants = lang.arrayToMap(
+ ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" +
+ "NA_complex_").split("|")
+ );
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ // Roxygen
+ token : "comment.sectionhead",
+ regex : "#+(?!').*(?:----|====|####)\\s*$"
+ },
+ {
+ // Roxygen
+ token : "comment",
+ regex : "#+'",
+ next : "rd-start"
+ },
+ {
+ token : "comment",
+ regex : "#.*$"
+ },
+ {
+ token : "string", // multi line string start
+ regex : '["]',
+ next : "qqstring"
+ },
+ {
+ token : "string", // multi line string start
+ regex : "[']",
+ next : "qstring"
+ },
+ {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+[Li]?\\b"
+ },
+ {
+ token : "constant.numeric", // explicit integer
+ regex : "\\d+L\\b"
+ },
+ {
+ token : "constant.numeric", // number
+ regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.numeric", // number with leading decimal
+ regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"
+ },
+ {
+ token : "constant.language.boolean",
+ regex : "(?:TRUE|FALSE|T|F)\\b"
+ },
+ {
+ token : "identifier",
+ regex : "`.*?`"
+ },
+ {
+ onMatch : function(value) {
+ if (keywords[value])
+ return "keyword";
+ else if (buildinConstants[value])
+ return "constant.language";
+ else if (value == '...' || value.match(/^\.\.\d+$/))
+ return "variable.language";
+ else
+ return "identifier";
+ },
+ regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b"
+ },
+ {
+ token : "keyword.operator",
+ regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"
+ },
+ {
+ token : "keyword.operator", // infix operators
+ regex : "%.*?%"
+ },
+ {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ },
+ {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ },
+ {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ var rdRules = new TexHighlightRules("comment").getRules();
+
+ // Make all embedded TeX virtual-comment so they don't interfere with
+ // auto-indent.
+ for (var i = 0; i < rdRules["start"].length; i++) {
+ rdRules["start"][i].token += ".virtual-comment";
+ }
+
+ this.addRules(rdRules, "rd-");
+ this.$rules["rd-start"].unshift({
+ token: "text",
+ regex: "^",
+ next: "start"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "keyword",
+ regex : "@(?!@)[^ ]*"
+ });
+ this.$rules["rd-start"].unshift({
+ token : "comment",
+ regex : "@@"
+ });
+ this.$rules["rd-start"].push({
+ token : "comment",
+ regex : "[^%\\\\[({\\])}]+"
+ });
+ };
+
+ oop.inherits(RHighlightRules, TextHighlightRules);
+
+ exports.RHighlightRules = RHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/rdoc.js b/src/fauxton/assets/js/libs/ace/mode/rdoc.js
new file mode 100644
index 000000000..8d3e90a61
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rdoc.js
@@ -0,0 +1,61 @@
+/*
+ * rdoc.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *
+ */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ this.HighlightRules = RDocHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/rdoc_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/rdoc_highlight_rules.js
new file mode 100644
index 000000000..df511b4a6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rdoc_highlight_rules.js
@@ -0,0 +1,99 @@
+/*
+ * rdoc_highlight_rules.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var LaTeXHighlightRules = require("./latex_highlight_rules");
+
+var RDocHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : "text", // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ // This mode is necessary to prevent spell checking, but to keep the
+ // same syntax highlighting behavior.
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell.text", // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell.text",
+ regex : "\\s+"
+ }, {
+ token : "nospell.text",
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(RDocHighlightRules, TextHighlightRules);
+
+exports.RDocHighlightRules = RDocHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/rhtml.js b/src/fauxton/assets/js/libs/ace/mode/rhtml.js
new file mode 100644
index 000000000..a111f9347
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rhtml.js
@@ -0,0 +1,86 @@
+/*
+ * rhtml.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+
+var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
+/* Make life easier, don't do these right now
+var SweaveBackgroundHighlighter = require("mode/sweave_background_highlighter").SweaveBackgroundHighlighter;
+var RCodeModel = require("mode/r_code_model").RCodeModel;
+*/
+
+var Mode = function(doc, session) {
+ this.$session = session;
+ this.HighlightRules = RHtmlHighlightRules;
+
+ /* Or these.
+ this.codeModel = new RCodeModel(doc, this.$tokenizer, /^r-/,
+ /^<!--\s*begin.rcode\s*(.*)/);
+ this.foldingRules = this.codeModel;
+ this.$sweaveBackgroundHighlighter = new SweaveBackgroundHighlighter(
+ session,
+ /^<!--\s*begin.rcode\s*(?:.*)/,
+ /^\s*end.rcode\s*-->/,
+ true); */
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.insertChunkInfo = {
+ value: "<!--begin.rcode\n\nend.rcode-->\n",
+ position: {row: 0, column: 15}
+ };
+
+ this.getLanguageMode = function(position)
+ {
+ return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML';
+ };
+
+ /* this.getNextLineIndent = function(state, line, tab, tabSize, row)
+ {
+ return this.codeModel.getNextLineIndent(row, line, state, tab, tabSize);
+ }; */
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/rhtml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/rhtml_highlight_rules.js
new file mode 100644
index 000000000..0ab65a923
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rhtml_highlight_rules.js
@@ -0,0 +1,46 @@
+/*
+ * rhtml_highlight_rules.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var RHtmlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token: "support.function.codebegin",
+ regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
+ next: "r-start"
+ });
+
+ this.embedRules(RHighlightRules, "r-", [{
+ token: "support.function.codeend",
+ regex: "^\\s*end.rcode\\s*-->",
+ next: "start"
+ }], ["start"]);
+
+ this.normalizeRules();
+};
+oop.inherits(RHtmlHighlightRules, TextHighlightRules);
+
+exports.RHtmlHighlightRules = RHtmlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ruby.js b/src/fauxton/assets/js/libs/ace/mode/ruby.js
new file mode 100644
index 000000000..7d14bb57f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ruby.js
@@ -0,0 +1,91 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ruby_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/ruby_highlight_rules.js
new file mode 100644
index 000000000..44ff305f6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ruby_highlight_rules.js
@@ -0,0 +1,249 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+// exports is for Haml
+var constantOtherSymbol = exports.constantOtherSymbol = {
+ token : "constant.other.symbol.ruby", // symbol
+ regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
+};
+
+var qString = exports.qString = {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+};
+
+var qqString = exports.qqString = {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+};
+
+var tString = exports.tString = {
+ token : "string", // backtick string
+ regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
+};
+
+var constantNumericHex = exports.constantNumericHex = {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
+};
+
+var constantNumericFloat = exports.constantNumericFloat = {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
+};
+
+var RubyHighlightRules = function() {
+
+ var builtinFunctions = (
+ "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
+ "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
+ "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
+ "has_many|has_one|belongs_to|has_and_belongs_to_many"
+ );
+
+ var keywords = (
+ "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
+ );
+
+ var buildinConstants = (
+ "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
+ );
+
+ var builtinVariables = (
+ "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "variable.language": builtinVariables,
+ "support.function": builtinFunctions,
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "comment", // multi line comment
+ regex : "^=begin(?:$|\\s.*$)",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ },
+
+ qString,
+ qqString,
+ tString,
+
+ {
+ token : "text", // namespaces aren't symbols
+ regex : "::"
+ }, {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+ }, {
+ token : "support.class", // class name
+ regex : "[A-Z][a-zA-Z_\\d]+"
+ },
+
+ constantOtherSymbol,
+ constantNumericHex,
+ constantNumericFloat,
+
+ {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "punctuation.separator.key-value",
+ regex : "=>"
+ }, {
+ stateName: "heredoc",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[3]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"string", value: tokens[2]},
+ {type:"support.class", value: tokens[3]},
+ {type:"string", value: tokens[4]}
+ ];
+ },
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value == stack[1]) {
+ stack.shift();
+ stack.shift();
+ return "support.class";
+ }
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^ +"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value == stack[1]) {
+ stack.shift();
+ stack.shift();
+ return "support.class";
+ }
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "^=end(?:$|\\s.*$)",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/ruby_test.js b/src/fauxton/assets/js/libs/ace/mode/ruby_test.js
new file mode 100644
index 000000000..25548f029
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/ruby_test.js
@@ -0,0 +1,78 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var Mode = require("./ruby").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new Mode();
+ },
+
+ "test getNextLineIndent": function() {
+ assert.equal(this.mode.getNextLineIndent("start", "class Foo", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " def thing(wut)", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " fork do", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " fork do |wut| ", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " something = :ruby", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " if something == 3", " "), " ");
+ assert.equal(this.mode.getNextLineIndent("start", " else", " "), " ");
+ },
+
+ "test: checkOutdent": function() {
+ assert.ok(this.mode.checkOutdent("start", " en", "d"));
+ assert.ok(this.mode.checkOutdent("start", " els", "e"));
+ assert.ok(this.mode.checkOutdent("start", " ", "}"));
+ assert.equal(this.mode.checkOutdent("start", " end", "\n"), false);
+ assert.equal(this.mode.checkOutdent("start", "foo = ba", "r"), false);
+ },
+
+ "test: auto outdent" : function() {
+ var session = new EditSession(["class Phil", " Foo = 'bar'", " end"]);
+ this.mode.autoOutdent("start", session, 2);
+ assert.equal(" end", session.getLine(2));
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/rust.js b/src/fauxton/assets/js/libs/ace/mode/rust.js
new file mode 100644
index 000000000..2a468568c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rust.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules;
+// TODO: pick appropriate fold mode
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RustHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "/\\*";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/rust_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/rust_highlight_rules.js
new file mode 100644
index 000000000..acb6c92aa
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/rust_highlight_rules.js
@@ -0,0 +1,129 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from https://raw.github.com/dbp/sublime-rust/master/Rust.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var RustHighlightRules = function() {
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = { start:
+ [ { token: 'variable.other.source.rust',
+ regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' },
+ { token: 'string.quoted.single.source.rust',
+ regex: '\'',
+ push:
+ [ { token: 'string.quoted.single.source.rust',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#rust_escaped_character' },
+ { defaultToken: 'string.quoted.single.source.rust' } ] },
+ { token: 'string.quoted.double.source.rust',
+ regex: '"',
+ push:
+ [ { token: 'string.quoted.double.source.rust',
+ regex: '"',
+ next: 'pop' },
+ { include: '#rust_escaped_character' },
+ { defaultToken: 'string.quoted.double.source.rust' } ] },
+ { token: [ 'keyword.source.rust', 'meta.function.source.rust',
+ 'entity.name.function.source.rust', 'meta.function.source.rust' ],
+ regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
+ { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
+ { token: 'keyword.source.rust',
+ regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
+ { token: 'storage.type.source.rust',
+ regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
+ { token: 'variable.language.source.rust', regex: '\\bself\\b' },
+ { token: 'keyword.operator',
+ regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' },
+ { token: 'constant.language.source.rust',
+ regex: '\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b' },
+ { token: 'support.constant.source.rust',
+ regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' },
+ { token: 'meta.preprocessor.source.rust',
+ regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' },
+ { token: 'constant.numeric.integer.source.rust',
+ regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' },
+ { token: 'constant.numeric.hex.source.rust',
+ regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' },
+ { token: 'constant.numeric.binary.source.rust',
+ regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' },
+ { token: 'constant.numeric.float.source.rust',
+ regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' },
+ { token: 'comment.line.documentation.source.rust',
+ regex: '//!.*$',
+ push_:
+ [ { token: 'comment.line.documentation.source.rust',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.documentation.source.rust' } ] },
+ { token: 'comment.line.double-dash.source.rust',
+ regex: '//.*$',
+ push_:
+ [ { token: 'comment.line.double-dash.source.rust',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-dash.source.rust' } ] },
+ { token: 'comment.block.source.rust',
+ regex: '/\\*',
+ push:
+ [ { token: 'comment.block.source.rust',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.source.rust' } ] } ],
+ '#rust_escaped_character':
+ [ { token: 'constant.character.escape.source.rust',
+ regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] }
+
+ this.normalizeRules();
+};
+
+RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ],
+ foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$',
+ foldingStopMarker: '^\\s*\\}',
+ name: 'Rust',
+ scopeName: 'source.rust' }
+
+
+oop.inherits(RustHighlightRules, TextHighlightRules);
+
+exports.RustHighlightRules = RustHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/sass.js b/src/fauxton/assets/js/libs/ace/mode/sass.js
new file mode 100644
index 000000000..de78c71b8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sass.js
@@ -0,0 +1,52 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SassHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sass_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/sass_highlight_rules.js
new file mode 100644
index 000000000..0183f7353
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sass_highlight_rules.js
@@ -0,0 +1,79 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+
+var SassHighlightRules = function() {
+ ScssHighlightRules.call(this);
+ var start = this.$rules.start;
+ if (start[1].token == "comment") {
+ start.splice(1, 1, {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, -1, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\s*\/\*/,
+ next: "comment"
+ }, {
+ token: "error.invalid",
+ regex: "/\\*|[{;}]"
+ }, {
+ token: "support.type",
+ regex: /^\s*:[\w\-]+\s/
+ });
+
+ this.$rules.comment = [
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
+ if (stack[1] === -1)
+ stack[1] = Math.max(stack[2], value.length - 1);
+ if (value.length <= stack[1]) {
+ /*shift3x*/stack.shift();stack.shift();stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ]
+ }
+};
+
+oop.inherits(SassHighlightRules, ScssHighlightRules);
+
+exports.SassHighlightRules = SassHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scad.js b/src/fauxton/assets/js/libs/ace/mode/scad.js
new file mode 100644
index 000000000..ca8dc9590
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scad.js
@@ -0,0 +1,99 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = scadHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "* ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scad_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/scad_highlight_rules.js
new file mode 100644
index 000000000..20d7b64a5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scad_highlight_rules.js
@@ -0,0 +1,142 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var scadHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": "module|if|else|for",
+ "constant.language": "NULL"
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant", // <CONSTANT>
+ regex : "<[a-zA-Z0-9.]+>"
+ }, {
+ token : "keyword", // pre-compiler directivs
+ regex : "(?:use|include)"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(scadHighlightRules, TextHighlightRules);
+
+exports.scadHighlightRules = scadHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scala.js b/src/fauxton/assets/js/libs/ace/mode/scala.js
new file mode 100644
index 000000000..5253cec95
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scala.js
@@ -0,0 +1,25 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+
+ this.HighlightRules = ScalaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scala_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/scala_highlight_rules.js
new file mode 100644
index 000000000..1d8ec8de1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scala_highlight_rules.js
@@ -0,0 +1,160 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ScalaHighlightRules = function() {
+
+ // taken from http://download.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html
+ var keywords = (
+ "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" +
+ "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" +
+ "override|package|private|protected|sealed|super|this|trait|type|val|var|with"
+ );
+
+ var buildinConstants = ("true|false");
+
+ var langClasses = (
+ "AbstractMethodError|AssertionError|ClassCircularityError|"+
+ "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+
+ "ExceptionInInitializerError|IllegalAccessError|"+
+ "IllegalThreadStateException|InstantiationError|InternalError|"+
+
+ "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+
+ "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+
+ "SuppressWarnings|TypeNotPresentException|UnknownError|"+
+ "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+
+ "InstantiationException|IndexOutOfBoundsException|"+
+ "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+
+ "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+
+ "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+
+ "InterruptedException|NoSuchMethodException|IllegalAccessException|"+
+ "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+
+ "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+
+ "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+
+ "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+
+ "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+
+ "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+
+ "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+
+ "ArrayStoreException|ClassCastException|LinkageError|"+
+ "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+
+ "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+
+ "Cloneable|Class|CharSequence|Comparable|String|Object|" +
+ "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" +
+ "Option|Array|Char|Byte|Short|Int|Long|Nothing"
+
+
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword": keywords,
+ "support.function": langClasses,
+ "constant.language": buildinConstants
+ }, "identifier");
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string",
+ regex : '"""',
+ next : "tstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)', // " strings can't span multiple lines
+ next : "string"
+ }, {
+ token : "symbol.constant", // single line
+ regex : "'[\\w\\d_]+"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "string" : [
+ {
+ token : "escape",
+ regex : '\\\\"'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string.invalid",
+ regex : '[^"\\\\]*$',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }
+ ],
+ "tstring" : [
+ {
+ token : "string", // closing comment
+ regex : '"{3,5}',
+ next : "start"
+ }, {
+ token : "string", // comment spanning whole line
+ regex : ".+?"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(ScalaHighlightRules, TextHighlightRules);
+
+exports.ScalaHighlightRules = ScalaHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scheme.js b/src/fauxton/assets/js/libs/ace/mode/scheme.js
new file mode 100644
index 000000000..4accf238b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scheme.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * NalaGinrut@gmail.com
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = SchemeHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scheme_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/scheme_highlight_rules.js
new file mode 100644
index 000000000..bb628c163
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scheme_highlight_rules.js
@@ -0,0 +1,123 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * NalaGinrut@gmail.com
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SchemeHighlightRules = function() {
+ var keywordControl = "case|do|let|loop|if|else|when";
+ var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?";
+ var constantLanguage = "#t|#f";
+ var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control": keywordControl,
+ "keyword.operator": keywordOperator,
+ "constant.language": constantLanguage,
+ "support.function": supportFunctions
+ }, "identifier", true);
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "comment",
+ regex : ";.*$"
+ },
+ {
+ "token": ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"],
+ "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
+ },
+ {
+ "token": "punctuation.definition.constant.character.scheme",
+ "regex": "#:\\S+"
+ },
+ {
+ "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"],
+ "regex": "(\\*)(\\S*)(\\*)"
+ },
+ {
+ "token" : "constant.numeric", // hex
+ "regex" : "#[xXoObB][0-9a-fA-F]+"
+ },
+ {
+ "token" : "constant.numeric", // float
+ "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"
+ },
+ {
+ "token" : keywordMapper,
+ "regex" : "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"
+ },
+ {
+ "token" : "string",
+ "regex" : '"(?=.)',
+ "next" : "qqstring"
+ }
+ ],
+ "qqstring": [
+ {
+ "token": "constant.character.escape.scheme",
+ "regex": "\\\\."
+ },
+ {
+ "token" : "string",
+ "regex" : '[^"\\\\]+',
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : "\\\\$",
+ "next" : "qqstring",
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : '"|$',
+ "next" : "start",
+ "merge" : true
+ }
+ ]
+}
+
+};
+
+oop.inherits(SchemeHighlightRules, TextHighlightRules);
+
+exports.SchemeHighlightRules = SchemeHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scss.js b/src/fauxton/assets/js/libs/ace/mode/scss.js
new file mode 100644
index 000000000..111f71aab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scss.js
@@ -0,0 +1,84 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ScssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ // ignore braces in comments
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ var match = line.match(/^.*\{\s*$/);
+ if (match) {
+ indent += tab;
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/scss_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/scss_highlight_rules.js
new file mode 100644
index 000000000..d63149dfb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/scss_highlight_rules.js
@@ -0,0 +1,296 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var ScssHighlightRules = function() {
+
+ var properties = lang.arrayToMap( (function () {
+
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
+
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
+ "border-end-style|border-end-width|border-image|border-start|" +
+ "border-start-color|border-start-style|border-start-width|box-align|" +
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
+ "text-decoration-style|transform|transform-origin|transition|" +
+ "transition-delay|transition-duration|transition-property|" +
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
+ "window-shadow|border-radius").split("|");
+
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
+ "background-position|background-repeat|background|border-bottom-color|" +
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
+ "border-color|border-left-color|border-left-style|border-left-width|" +
+ "border-left|border-right-color|border-right-style|border-right-width|" +
+ "border-right|border-spacing|border-style|border-top-color|" +
+ "border-top-style|border-top-width|border-top|border-width|border|bottom|" +
+ "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
+ "min-width|opacity|orphans|outline-color|" +
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
+ "z-index").split("|");
+
+ //The return array
+ var ret = [];
+
+ //All prefixProperties will get the browserPrefix in
+ //the begning by join the prefixProperties array with the value of browserPrefix
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
+ Array.prototype.push.apply(
+ ret,
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
+ );
+ }
+
+ //Add also prefixProperties and properties without any browser prefix
+ Array.prototype.push.apply(ret, prefixProperties);
+ Array.prototype.push.apply(ret, properties);
+
+ return ret;
+
+ })() );
+
+
+
+ var functions = lang.arrayToMap(
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
+ "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
+ );
+
+ var constants = lang.arrayToMap(
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
+ "distribute-all-lines|distribute-letter|distribute-space|" +
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
+ "zero").split("|")
+ );
+
+ var colors = lang.arrayToMap(
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
+ "purple|red|silver|teal|white|yellow").split("|")
+ );
+
+ var keywords = lang.arrayToMap(
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
+ )
+
+ var tags = lang.arrayToMap(
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
+ );
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '["].*\\\\$',
+ next : "qqstring"
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "string", // multi line string start
+ regex : "['].*\\\\$",
+ next : "qstring"
+ }, {
+ token : "constant.numeric",
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
+ }, {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ token : function(value) {
+ if (properties.hasOwnProperty(value.toLowerCase()))
+ return "support.type";
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (constants.hasOwnProperty(value))
+ return "constant.language";
+ else if (functions.hasOwnProperty(value))
+ return "support.function";
+ else if (colors.hasOwnProperty(value.toLowerCase()))
+ return "support.constant.color";
+ else if (tags.hasOwnProperty(value.toLowerCase()))
+ return "variable.language";
+ else
+ return "text";
+ },
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
+ }, {
+ token : "variable",
+ regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
+ }, {
+ token: "variable.language",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "variable.language",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ token : "keyword.operator",
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]
+ };
+};
+
+oop.inherits(ScssHighlightRules, TextHighlightRules);
+
+exports.ScssHighlightRules = ScssHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sh.js b/src/fauxton/assets/js/libs/ace/mode/sh.js
new file mode 100644
index 000000000..c66c26199
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sh.js
@@ -0,0 +1,112 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = ShHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[\:]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ var outdents = {
+ "pass": 1,
+ "return": 1,
+ "raise": 1,
+ "break": 1,
+ "continue": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens;
+
+ if (!tokens)
+ return false;
+
+ // ignore trailing comments
+ do {
+ var last = tokens.pop();
+ } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/))));
+
+ if (!last)
+ return false;
+
+ return (last.type == "keyword" && outdents[last.value]);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ // outdenting in sh is slightly different because it always applies
+ // to the next line and only of a new line is inserted
+
+ row += 1;
+ var indent = this.$getIndent(doc.getLine(row));
+ var tab = doc.getTabString();
+ if (indent.slice(-tab.length) == tab)
+ doc.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sh_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/sh_highlight_rules.js
new file mode 100644
index 000000000..d9ed56008
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sh_highlight_rules.js
@@ -0,0 +1,144 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set'
+ );
+
+var languageConstructs = exports.languageConstructs = (
+ '[|]|alias|bg|bind|break|builtin|'+
+ 'cd|command|compgen|complete|continue|'+
+ 'dirs|disown|echo|enable|eval|exec|'+
+ 'exit|fc|fg|getopts|hash|help|history|'+
+ 'jobs|kill|let|logout|popd|printf|pushd|'+
+ 'pwd|return|set|shift|shopt|source|'+
+ 'suspend|test|times|trap|type|ulimit|'+
+ 'umask|unalias|wait'
+);
+
+var ShHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": reservedKeywords,
+ "support.function.builtin": languageConstructs,
+ "invalid.deprecated": "debugger"
+ }, "identifier");
+
+ var integer = "(?:(?:[1-9]\\d*)|(?:0))";
+ // var integer = "(?:" + decimalInteger + ")";
+
+ var fraction = "(?:\\.\\d+)";
+ var intPart = "(?:\\d+)";
+ var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
+ var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")";
+ var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
+ var fileDescriptor = "(?:&" + intPart + ")";
+
+ var variableName = "[a-zA-Z][a-zA-Z0-9_]*";
+ var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant",
+ regex : /\\./
+ }, {
+ token : ["text", "comment"],
+ regex : /(^|\s)(#.*)$/
+ }, {
+ token : "string",
+ regex : '"',
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
+ }, {
+ token : "constant",
+ regex : /\$\w+/
+ }, {
+ token : "string",
+ regex : '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ start : "'", end : "'"
+ }, {
+ token : "constant.numeric", // float
+ regex : floatNumber
+ }, {
+ token : "constant.numeric", // integer
+ regex : integer + "\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]\\)\\}]"
+ } ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sjs.js b/src/fauxton/assets/js/libs/ace/mode/sjs.js
new file mode 100644
index 000000000..e075d60ba
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sjs.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var JSMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ var highlighter = new SJSHighlightRules();
+
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.$keywordList = highlighter.$keywordList;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, JSMode);
+(function() {
+ // disable jshint
+ this.createWorker = function(session) {
+ return null;
+ }
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sjs_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/sjs_highlight_rules.js
new file mode 100644
index 000000000..29ddda399
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sjs_highlight_rules.js
@@ -0,0 +1,233 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SJSHighlightRules = function() {
+ var parent = new JavaScriptHighlightRules();
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-6][0-7]?|" + // oct
+ "37[0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ var contextAware = function(f) {
+ f.isContextAware = true;
+ return f;
+ };
+
+ var ctxBegin = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ if (stack.length === 0)
+ stack.unshift(currentState);
+ stack.unshift(opts.next);
+ return opts.next;
+ }),
+ };
+ };
+
+ var ctxEnd = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ stack.shift();
+ return stack[0] || "start";
+ }),
+ };
+ };
+
+ this.$rules = parent.$rules;
+ this.$rules.no_regex = [
+ {
+ token: "keyword",
+ regex: "(waitfor|or|and|collapse|spawn|retract)\\b"
+ },
+ {
+ token: "keyword.operator",
+ regex: "(->|=>|\\.\\.)"
+ },
+ {
+ token: "variable.language",
+ regex: "(hold|default)\\b"
+ },
+ ctxBegin({
+ token: "string",
+ regex: "`",
+ next: "bstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ {
+ token: ["paren.lparen", "text", "paren.rparen"],
+ regex: "(\\{)(\\s*)(\\|)",
+ next: "block_arguments",
+ }
+
+ ].concat(this.$rules.no_regex);
+
+ this.$rules.block_arguments = [
+ {
+ token: "paren.rparen",
+ regex: "\\|",
+ next: "no_regex",
+ }
+ ].concat(this.$rules.function_arguments);
+
+ this.$rules.bstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "bstring"
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$\\{",
+ next: "string_interp"
+ }),
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$",
+ next: "bstring_interp_single"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : "`",
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+
+ this.$rules.qqstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "qqstring",
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "#\\{",
+ next: "string_interp"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : '"',
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+
+ // collect all context-aware (or stateless), brace-less
+ // states. This gives us most normal highlighting
+ // for use within interpreted contexts
+ // without interfering with context nesting
+ var embeddableRules = [];
+ for (var i=0; i<this.$rules.no_regex.length; i++) {
+ var rule = this.$rules.no_regex[i];
+ var token = String(rule.token);
+ if(token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) {
+ embeddableRules.push(rule);
+ }
+ };
+
+ this.$rules.string_interp = [
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\}"
+ }),
+ ctxBegin({
+ token: "paren.lparen",
+ regex: '{',
+ next: "string_interp"
+ }),
+ ].concat(embeddableRules);
+
+ // backtick strings can have single interpolation, which accept
+ // \w+ followed by an optional set of function call parens
+ this.$rules.bstring_interp_single = [
+ {
+ token: ["identifier", "paren.lparen"],
+ regex: '(\\w+)(\\()',
+ next: 'bstring_interp_single_call'
+ },
+ // identifier-only match ends this interp
+ ctxEnd({
+ token : "identifier",
+ regex : "\\w*",
+ })
+ ];
+
+ // the call part of a bstring_interp_single
+ // is terminated by a close paren `)`, but
+ // can have nested parens.
+ this.$rules.bstring_interp_single_call = [
+ ctxBegin({
+ token: "paren.lparen",
+ regex: "\\(",
+ next: "bstring_interp_single_call"
+ }),
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\)"
+ })
+ ].concat(embeddableRules);
+}
+oop.inherits(SJSHighlightRules, TextHighlightRules);
+
+exports.SJSHighlightRules = SJSHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/snippets.js b/src/fauxton/assets/js/libs/ace/mode/snippets.js
new file mode 100644
index 000000000..865e0b3a6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/snippets.js
@@ -0,0 +1,112 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SnippetHighlightRules = function() {
+
+ var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" +
+ "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";
+
+ this.$rules = {
+ "start" : [
+ {token:"constant.language.escape", regex: /\\[\$}`\\]/},
+ {token:"keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"},
+ {token:"variable", regex: "\\$\\w+"},
+ {onMatch: function(value, state, stack) {
+ if (stack[1])
+ stack[1]++;
+ else
+ stack.unshift(state, 1);
+ return this.tokenName;
+ }, tokenName: "markup.list", regex: "\\${", next: "varDecl"},
+ {onMatch: function(value, state, stack) {
+ if (!stack[1])
+ return "text";
+ stack[1]--;
+ if (!stack[1])
+ stack.splice(0,2);
+ return this.tokenName;
+ }, tokenName: "markup.list", regex: "}"},
+ {token: "doc.comment", regex:/^\${2}-{5,}$/}
+ ],
+ "varDecl" : [
+ {regex: /\d+\b/, token: "constant.numeric"},
+ {token:"keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"},
+ {token:"variable", regex: "\\w+"},
+ {regex: /:/, token: "punctuation.operator", next: "start"},
+ {regex: /\//, token: "string.regex", next: "regexp"},
+ {regex: "", next: "start"}
+ ],
+ "regexp" : [
+ {regex: /\\./, token: "escape"},
+ {regex: /\[/, token: "regex.start", next: "charClass"},
+ {regex: "/", token: "string.regex", next: "format"},
+ //{"default": "string.regex"},
+ {"token": "string.regex", regex:"."}
+ ],
+ charClass : [
+ {regex: "\\.", token: "escape"},
+ {regex: "\\]", token: "regex.end", next: "regexp"},
+ {"token": "string.regex", regex:"."}
+ ],
+ "format" : [
+ {regex: /\\[ulULE]/, token: "keyword"},
+ {regex: /\$\d+/, token: "variable"},
+ {regex: "/[gim]*:?", token: "string.regex", next: "start"},
+ // {"default": "string"},
+ {"token": "string", regex:"."}
+ ]
+ };
+};
+oop.inherits(SnippetHighlightRules, TextHighlightRules);
+
+exports.SnippetHighlightRules = SnippetHighlightRules;
+
+var SnippetGroupHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {token: "text", regex: "^\\t", next: "sn-start"},
+ {token:"invalid", regex: /^ \s*/},
+ {token:"comment", regex: /^#.*/},
+ {token:"constant.language.escape", regex: "^regex ", next: "regex"},
+ {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"}
+ ],
+ "regex" : [
+ {token:"text", regex: "\\."},
+ {token:"keyword", regex: "/"},
+ {token:"empty", regex: "$", next: "start"}
+ ]
+ };
+ this.embedRules(SnippetHighlightRules, "sn-", [
+ {token: "text", regex: "^\\t", next: "sn-start"},
+ {onMatch: function(value, state, stack) {
+ stack.splice(stack.length);
+ return this.tokenName;
+ }, tokenName: "text", regex: "^(?!\t)", next: "start"}
+ ])
+
+};
+
+oop.inherits(SnippetGroupHighlightRules, TextHighlightRules);
+
+exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules;
+
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SnippetGroupHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$indentWithTabs = true;
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/soy_template.js b/src/fauxton/assets/js/libs/ace/mode/soy_template.js
new file mode 100644
index 000000000..493c49ce6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/soy_template.js
@@ -0,0 +1,60 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = SoyTemplateHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/soy_template_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/soy_template_highlight_rules.js
new file mode 100644
index 000000000..50e3ae487
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/soy_template_highlight_rules.js
@@ -0,0 +1,356 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This file was autogenerated from tm bundles\SoyTemplate\Syntaxes\SoyTemplate.tmLanguage (uuid: ) */
+/****************************************************************************************
+ * IT MIGHT NOT BE PERFECT ...But it's a good start from an existing *.tmlanguage file. *
+ * fileTypes *
+ ****************************************************************************************/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var SoyTemplateHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var soyRules = { start:
+ [ { include: '#template' },
+ { include: '#if' },
+ { include: '#comment-line' },
+ { include: '#comment-block' },
+ { include: '#comment-doc' },
+ { include: '#call' },
+ { include: '#css' },
+ { include: '#param' },
+ { include: '#print' },
+ { include: '#msg' },
+ { include: '#for' },
+ { include: '#foreach' },
+ { include: '#switch' },
+ { include: '#tag' },
+ { include: 'text.html.basic' } ],
+ '#call':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.call.soy' ],
+ regex: '(\\{/?)(\\s*)(?=call|delcall)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token: ['entity.name.tag.soy', 'variable.parameter.soy'],
+ regex: '(call|delcall)(\\s+[\\.\\w]+)'},
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(data)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.call.soy' } ] } ],
+ '#comment-line':
+ [ { token:
+ [ 'comment.line.double-slash.soy',
+ 'punctuation.definition.comment.soy',
+ 'comment.line.double-slash.soy' ],
+ regex: '(\\s+)(//)(.*$)' } ],
+ '#comment-block':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*(?!\\*)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.soy' } ] } ],
+ '#comment-doc':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*\\*(?!/)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { token: [ 'support.type.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(@param|@param\\?)(\\s+)(\\w+)' },
+ { defaultToken: 'comment.block.documentation.soy' } ] } ],
+ '#css':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.css.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(css)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'support.constant.soy',
+ regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' },
+ { defaultToken: 'meta.tag.css.soy' } ] } ],
+ '#for':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.for.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(for)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { token: 'support.function.soy', regex: '\\brange\\b' },
+ { include: '#variable' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { defaultToken: 'meta.tag.for.soy' } ] } ],
+ '#foreach':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.foreach.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(foreach)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { include: '#variable' },
+ { defaultToken: 'meta.tag.foreach.soy' } ] } ],
+ '#function':
+ [ { token: 'support.function.soy',
+ regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' } ],
+ '#if':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.if.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(if|elseif)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#operator' },
+ { include: '#function' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.if.soy' } ] } ],
+ '#namespace':
+ [ { token: [ 'entity.name.tag.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' } ],
+ '#number': [ { token: 'constant.numeric', regex: '[\\d]+' } ],
+ '#operator':
+ [ { token: 'keyword.operator.soy',
+ regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' } ],
+ '#param':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.param.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(param)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b([\\w]*)(\\s*)((?::)?)' },
+ { defaultToken: 'meta.tag.param.soy' } ] } ],
+ '#primitive':
+ [ { token: 'constant.language.soy',
+ regex: '\\b(?:null|false|true)\\b' } ],
+ '#msg':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.msg.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(msg)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(meaning|desc)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.msg.soy' } ] } ],
+ '#print':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.print.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(print)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#print-parameter' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#attribute-lookup' },
+ { defaultToken: 'meta.tag.print.soy' } ] } ],
+ '#print-parameter':
+ [ { token: 'keyword.operator.soy', regex: '\\|' },
+ { token: 'variable.parameter.soy',
+ regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' } ],
+ '#special-character':
+ [ { token: 'support.constant.soy',
+ regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' } ],
+ '#string-quoted-double': [ { token: 'string.quoted.double', regex: '"[^"]*"' } ],
+ '#string-quoted-single': [ { token: 'string.quoted.single', regex: '\'[^\']*\'' } ],
+ '#switch':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.switch.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(switch|case)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#number' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.switch.soy' } ] } ],
+ '#attribute-lookup':
+ [ { token: 'punctuation.definition.attribute-lookup.begin.soy',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.attribute-lookup.end.soy',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' } ] } ],
+ '#tag':
+ [ { token: 'punctuation.definition.tag.begin.soy',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#namespace' },
+ { include: '#variable' },
+ { include: '#special-character' },
+ { include: '#tag-simple' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#attribute-lookup' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#print-parameter' } ] } ],
+ '#tag-simple':
+ [ { token: 'entity.name.tag.soy',
+ regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})'} ],
+ '#template':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.template.soy' ],
+ regex: '(\\{/?)(\\s*)(?=template|deltemplate)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy' ],
+ regex: '(template|deltemplate)(\\s+)([\\.\\w]+)',
+ originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' },
+ { defaultToken: 'meta.tag.template.soy' } ] } ],
+ '#variable': [ { token: 'variable.other.soy', regex: '\\$[\\w\\.]+' } ] }
+
+
+ for (var i in soyRules) {
+ if (this.$rules[i]) {
+ this.$rules[i].unshift.call(this.$rules[i], soyRules[i]);
+ } else {
+ this.$rules[i] = soyRules[i];
+ }
+ }
+
+ this.normalizeRules();
+};
+
+SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate',
+ fileTypes: [ 'soy' ],
+ firstLineMatch: '\\{\\s*namespace\\b',
+ foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}',
+ foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}',
+ name: 'SoyTemplate',
+ scopeName: 'source.soy' }
+
+
+oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules);
+
+exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/space.js b/src/fauxton/assets/js/libs/ace/mode/space.js
new file mode 100644
index 000000000..3210298c8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/space.js
@@ -0,0 +1,21 @@
+define(function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+// defines the parent mode
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var FoldMode = require("./folding/coffee").FoldMode;
+// defines the language specific highlighters and folding rules
+var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules;
+var Mode = function() {
+ // set everything up
+ var highlighter = new SpaceHighlightRules();
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+(function() {
+
+}).call(Mode.prototype);
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/space_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/space_highlight_rules.js
new file mode 100644
index 000000000..4a347b197
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/space_highlight_rules.js
@@ -0,0 +1,56 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SpaceHighlightRules = function() {
+
+ // Todo: support multiline values that escape the newline with spaces.
+ this.$rules = {
+ "start" : [
+ {
+ token : "empty_line",
+ regex : / */,
+ next : "key"
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "key"
+ }
+ ],
+ "key" : [
+ {
+ token : "variable",
+ regex : /\S+/
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "start"
+ },{
+ token : "keyword.operator",
+ regex : / /,
+ next : "value"
+ }
+ ],
+ "value" : [
+ {
+ token : "keyword.operator",
+ regex : /$/,
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : /[^$]/
+ }
+ ]
+ };
+
+};
+
+oop.inherits(SpaceHighlightRules, TextHighlightRules);
+
+exports.SpaceHighlightRules = SpaceHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sql.js b/src/fauxton/assets/js/libs/ace/mode/sql.js
new file mode 100644
index 000000000..d10a4727d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sql.js
@@ -0,0 +1,53 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = SqlHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/sql_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/sql_highlight_rules.js
new file mode 100644
index 000000000..e16ac9ab3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/sql_highlight_rules.js
@@ -0,0 +1,94 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SqlHighlightRules = function() {
+
+ var keywords = (
+ "select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
+ "when|else|end|type|left|right|join|on|outer|desc|asc"
+ );
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(SqlHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlHighlightRules;
+});
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/stylus.js b/src/fauxton/assets/js/libs/ace/mode/stylus.js
new file mode 100644
index 000000000..e33220b56
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/stylus.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = StylusHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/stylus_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/stylus_highlight_rules.js
new file mode 100644
index 000000000..c9fb62475
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/stylus_highlight_rules.js
@@ -0,0 +1,165 @@
+/*
+ THIS FILE WAS AUTOGENERATED BY Stylus.tmlanguage (UUID: 60519324-6A3A-4382-9E0B-546993A3869A) */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var CssHighlightRules = require("./css_highlight_rules");
+
+var StylusHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.type": CssHighlightRules.supportType,
+ "support.function": CssHighlightRules.supportFunction,
+ "support.constant": CssHighlightRules.supportConstant,
+ "support.constant.color": CssHighlightRules.supportConstantColor,
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
+ }, "text", true);
+
+ this.$rules = {
+ start: [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ },
+ {
+ token: ["entity.name.function.stylus", "text"],
+ regex: "^([-a-zA-Z_][-\\w]*)?(\\()"
+ },
+ {
+ token: ["entity.other.attribute-name.class.stylus"],
+ regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"
+ },
+ {
+ token: ["entity.language.stylus"],
+ regex: "^ *&"
+ },
+ {
+ token: ["variable.language.stylus"],
+ regex: "(arguments)"
+ },
+ {
+ token: ["keyword.stylus"],
+ regex: "@[-\\w]+"
+ },
+ {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
+ regex : CssHighlightRules.pseudoElements
+ }, {
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
+ regex : CssHighlightRules.pseudoClasses
+ },
+ {
+ token: ["entity.name.tag.stylus"],
+ regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"
+ },
+ {
+ token : "constant.numeric", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ },
+ {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ },
+ {
+ token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"],
+ regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)"
+ },
+ {
+ token: "meta.vendor-prefix.stylus",
+ regex: "-webkit-|-moz\\-|-ms-|-o-"
+ },
+ {
+ token: "keyword.control.stylus",
+ regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"
+ },
+ {
+ token: "keyword.operator.stylus",
+ regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="
+ },
+ {
+ token: "keyword.operator.stylus",
+ regex: "(?:in|is(?:nt)?|not)\\b"
+ },
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token : "constant.numeric",
+ regex : CssHighlightRules.numRe
+ },
+ {
+ token : "keyword",
+ regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"
+ },
+ {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : ".*?\\*\\/",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '[^"\\\\]+'
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ },
+ {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "string",
+ regex : "[^'\\\\]+"
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(StylusHighlightRules, TextHighlightRules);
+
+exports.StylusHighlightRules = StylusHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/svg.js b/src/fauxton/assets/js/libs/ace/mode/svg.js
new file mode 100644
index 000000000..0ca57e10d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/svg.js
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var XmlMode = require("./xml").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules;
+var MixedFoldMode = require("./folding/mixed").FoldMode;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ XmlMode.call(this);
+
+ this.HighlightRules = SvgHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode
+ });
+
+ this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
+ "js-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(Mode, XmlMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/svg_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/svg_highlight_rules.js
new file mode 100644
index 000000000..25722d726
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/svg_highlight_rules.js
@@ -0,0 +1,49 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var SvgHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ this.normalizeRules();
+};
+
+oop.inherits(SvgHighlightRules, XmlHighlightRules);
+
+exports.SvgHighlightRules = SvgHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/tcl.js b/src/fauxton/assets/js/libs/ace/mode/tcl.js
new file mode 100644
index 000000000..c8e7c4360
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/tcl.js
@@ -0,0 +1,84 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = TclHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/tcl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/tcl_highlight_rules.js
new file mode 100644
index 000000000..55b0ad6a3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/tcl_highlight_rules.js
@@ -0,0 +1,172 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TclHighlightRules = function() {
+
+ //TODO var builtinFunctions = "";
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "support.function",
+ regex : '[\\\\]$',
+ next : "splitlineStart"
+ }, {
+ token : "text",
+ regex : '[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[\])'
+ }, {
+ token : "text", // last value before command
+ regex : '^|[^{][;][^}]|[/\r/]',
+ next : "commandItem"
+ }, {
+ token : "string", // single line
+ regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line """ string start
+ regex : '[ ]*["]',
+ next : "qqstring"
+ }, {
+ token : "variable.instance",
+ regex : "[$]",
+ next : "variable"
+ }, {
+ token : "support.function",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"
+ }, {
+ token : "identifier",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "paren.lparen",
+ regex : "[[{]",
+ next : "commandItem"
+ }, {
+ token : "paren.lparen",
+ regex : "[(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "commandItem" : [
+ {
+ token : "comment",
+ regex : "#.*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : "#.*$",
+ next : "start"
+ }, {
+ token : "string", // single line
+ regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "variable.instance",
+ regex : "[$]",
+ next : "variable"
+ }, {
+ token : "support.function",
+ regex : "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "support.function",
+ regex : "[a-zA-Z0-9_/]+(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "support.function",
+ regex : "(?:[:][:])",
+ next : "commandItem"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "support.function",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"
+ }, {
+ token : "keyword",
+ regex : "[a-zA-Z0-9_/]+",
+ next : "start"
+ } ],
+ "commentfollow" : [
+ {
+ token : "comment",
+ regex : ".*\\\\$",
+ next : "commentfollow"
+ }, {
+ token : "comment",
+ regex : '.+',
+ next : "start"
+ } ],
+ "splitlineStart" : [
+ {
+ token : "text",
+ regex : "^.",
+ next : "start"
+ }],
+ "variable" : [
+ {
+ token : "variable.instance", // variable tcl
+ regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",
+ next : "start"
+ }, {
+ token : "variable.instance", // variable tcl with braces
+ regex : "{?[a-zA-Z_\\d]+}?",
+ next : "start"
+ }],
+ "qqstring" : [ {
+ token : "string", // multi line """ string end
+ regex : '(?:[^\\\\]|\\\\.)*?["]',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ } ]
+ };
+};
+
+oop.inherits(TclHighlightRules, TextHighlightRules);
+
+exports.TclHighlightRules = TclHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/tex.js b/src/fauxton/assets/js/libs/ace/mode/tex.js
new file mode 100644
index 000000000..cf7b7373d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/tex.js
@@ -0,0 +1,68 @@
+/*
+ * tex.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *
+ */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ if (suppressHighlighting)
+ this.HighlightRules = TextHighlightRules;
+ else
+ this.HighlightRules = TexHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.allowAutoInsert = function() {
+ return false;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/tex_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/tex_highlight_rules.js
new file mode 100644
index 000000000..c64d031fa
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/tex_highlight_rules.js
@@ -0,0 +1,107 @@
+/*
+ * tex_highlight_rules.js
+ *
+ * Copyright (C) 2009-11 by RStudio, Inc.
+ *
+ * The Initial Developer of the Original Code is
+ * Ajax.org B.V.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * This program is licensed to you under the terms of version 3 of the
+ * GNU Affero General Public License. This program is distributed WITHOUT
+ * ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
+ * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
+ * AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
+ *
+ */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TexHighlightRules = function(textClass) {
+
+ if (!textClass)
+ textClass = "text";
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",
+ next : "nospell"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
+ }, {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ // Obviously these are neither keywords nor operators, but
+ // labelling them as such was the easiest way to get them
+ // to be colored distinctly from regular text
+ token : "paren.keyword.operator",
+ regex : "[\\])}]"
+ }, {
+ token : textClass,
+ regex : "\\s+"
+ }
+ ],
+ // This mode is necessary to prevent spell checking, but to keep the
+ // same syntax highlighting behavior. The list of commands comes from
+ // Texlipse.
+ "nospell" : [
+ {
+ token : "comment",
+ regex : "%.*$",
+ next : "start"
+ }, {
+ token : "nospell." + textClass, // non-command
+ regex : "\\\\[$&%#\\{\\}]"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"
+ }, {
+ token : "keyword", // command
+ regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
+ next : "start"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[[({]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "[\\])]"
+ }, {
+ token : "paren.keyword.operator",
+ regex : "}",
+ next : "start"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\s+"
+ }, {
+ token : "nospell." + textClass,
+ regex : "\\w+"
+ }
+ ]
+ };
+};
+
+oop.inherits(TexHighlightRules, TextHighlightRules);
+
+exports.TexHighlightRules = TexHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/text.js b/src/fauxton/assets/js/libs/ace/mode/text.js
new file mode 100644
index 000000000..b853c52d9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/text.js
@@ -0,0 +1,384 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+var unicode = require("../unicode");
+var lang = require("../lib/lang");
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = TextHighlightRules;
+ this.$behaviour = new Behaviour();
+};
+
+(function() {
+
+ this.tokenRe = new RegExp("^["
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]+", "g"
+ );
+
+ this.nonTokenRe = new RegExp("^(?:[^"
+ + unicode.packages.L
+ + unicode.packages.Mn + unicode.packages.Mc
+ + unicode.packages.Nd
+ + unicode.packages.Pc + "\\$_]|\s])+", "g"
+ );
+
+ this.getTokenizer = function() {
+ if (!this.$tokenizer) {
+ this.$highlightRules = new this.HighlightRules();
+ this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());
+ }
+ return this.$tokenizer;
+ };
+
+ this.lineCommentStart = "";
+ this.blockComment = "";
+
+ this.toggleCommentLines = function(state, session, startRow, endRow) {
+ var doc = session.doc;
+
+ var ignoreBlankLines = true;
+ var shouldRemove = true;
+ var minIndent = Infinity;
+ var tabSize = session.getTabSize();
+ var insertAtTabStop = false;
+
+ if (!this.lineCommentStart) {
+ if (!this.blockComment)
+ return false;
+ var lineCommentStart = this.blockComment.start;
+ var lineCommentEnd = this.blockComment.end;
+ var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")");
+ var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$");
+
+ var comment = function(line, i) {
+ if (testRemove(line, i))
+ return;
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ doc.insertInLine({row: i, column: line.length}, lineCommentEnd);
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+
+ var uncomment = function(line, i) {
+ var m;
+ if (m = line.match(regexpEnd))
+ doc.removeInLine(i, line.length - m[0].length, line.length);
+ if (m = line.match(regexpStart))
+ doc.removeInLine(i, m[1].length, m[0].length);
+ };
+
+ var testRemove = function(line, row) {
+ if (regexpStart.test(line))
+ return true;
+ var tokens = session.getTokens(row);
+ for (var i = 0; i < tokens.length; i++) {
+ if (tokens[i].type === 'comment')
+ return true;
+ }
+ };
+ } else {
+ if (Array.isArray(this.lineCommentStart)) {
+ var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|");
+ var lineCommentStart = this.lineCommentStart[0];
+ } else {
+ var regexpStart = lang.escapeRegExp(this.lineCommentStart);
+ var lineCommentStart = this.lineCommentStart;
+ }
+ regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?");
+
+ insertAtTabStop = session.getUseSoftTabs();
+
+ var uncomment = function(line, i) {
+ var m = line.match(regexpStart);
+ if (!m) return;
+ var start = m[1].length, end = m[0].length;
+ if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ")
+ end--;
+ doc.removeInLine(i, start, end);
+ };
+ var commentWithSpace = lineCommentStart + " ";
+ var comment = function(line, i) {
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ if (shouldInsertSpace(line, minIndent, minIndent))
+ doc.insertInLine({row: i, column: minIndent}, commentWithSpace);
+ else
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+ var testRemove = function(line, i) {
+ return regexpStart.test(line);
+ };
+
+ var shouldInsertSpace = function(line, before, after) {
+ var spaces = 0;
+ while (before-- && line.charAt(before) == " ")
+ spaces++;
+ if (spaces % tabSize != 0)
+ return false;
+ var spaces = 0;
+ while (line.charAt(after++) == " ")
+ spaces++;
+ if (tabSize > 2)
+ return spaces % tabSize != tabSize - 1;
+ else
+ return spaces % tabSize == 0;
+ return true;
+ };
+ }
+
+ function iter(fun) {
+ for (var i = startRow; i <= endRow; i++)
+ fun(doc.getLine(i), i);
+ }
+
+
+ var minEmptyLength = Infinity;
+ iter(function(line, i) {
+ var indent = line.search(/\S/);
+ if (indent !== -1) {
+ if (indent < minIndent)
+ minIndent = indent;
+ if (shouldRemove && !testRemove(line, i))
+ shouldRemove = false;
+ } else if (minEmptyLength > line.length) {
+ minEmptyLength = line.length;
+ }
+ });
+
+ if (minIndent == Infinity) {
+ minIndent = minEmptyLength;
+ ignoreBlankLines = false;
+ shouldRemove = false;
+ }
+
+ if (insertAtTabStop && minIndent % tabSize != 0)
+ minIndent = Math.floor(minIndent / tabSize) * tabSize;
+
+ iter(shouldRemove ? uncomment : comment);
+ };
+
+ this.toggleBlockComment = function(state, session, range, cursor) {
+ var comment = this.blockComment;
+ if (!comment)
+ return;
+ if (!comment.start && comment[0])
+ comment = comment[0];
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ var sel = session.selection;
+ var initialRange = session.selection.toOrientedRange();
+ var startRow, colDiff;
+
+ if (token && /comment/.test(token.type)) {
+ var startRange, endRange;
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.start);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ startRange = new Range(row, column, row, column + comment.start.length);
+ break
+ }
+ token = iterator.stepBackward();
+ };
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.end);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ endRange = new Range(row, column, row, column + comment.end.length);
+ break;
+ }
+ token = iterator.stepForward();
+ }
+ if (endRange)
+ session.remove(endRange);
+ if (startRange) {
+ session.remove(startRange);
+ startRow = startRange.start.row;
+ colDiff = -comment.start.length
+ }
+ } else {
+ colDiff = comment.start.length
+ startRow = range.start.row;
+ session.insert(range.end, comment.end);
+ session.insert(range.start, comment.start);
+ }
+ // todo: selection should have ended up in the right place automatically!
+ if (initialRange.start.row == startRow)
+ initialRange.start.column += colDiff;
+ if (initialRange.end.row == startRow)
+ initialRange.end.column += colDiff;
+ session.selection.fromOrientedRange(initialRange);
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.createModeDelegates = function (mapping) {
+ this.$embeds = [];
+ this.$modes = {};
+ for (var i in mapping) {
+ if (mapping[i]) {
+ this.$embeds.push(i);
+ this.$modes[i] = new mapping[i]();
+ }
+ }
+
+ var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions'];
+
+ for (var i = 0; i < delegations.length; i++) {
+ (function(scope) {
+ var functionName = delegations[i];
+ var defaultHandler = scope[functionName];
+ scope[delegations[i]] = function() {
+ return this.$delegator(functionName, arguments, defaultHandler);
+ }
+ } (this));
+ }
+ };
+
+ this.$delegator = function(method, args, defaultHandler) {
+ var state = args[0];
+ if (typeof state != "string")
+ state = state[0];
+ for (var i = 0; i < this.$embeds.length; i++) {
+ if (!this.$modes[this.$embeds[i]]) continue;
+
+ var split = state.split(this.$embeds[i]);
+ if (!split[0] && split[1]) {
+ args[0] = split[1];
+ var mode = this.$modes[this.$embeds[i]];
+ return mode[method].apply(mode, args);
+ }
+ }
+ var ret = defaultHandler.apply(this, args);
+ return defaultHandler ? ret : undefined;
+ };
+
+ this.transformAction = function(state, action, editor, session, param) {
+ if (this.$behaviour) {
+ var behaviours = this.$behaviour.getBehaviours();
+ for (var key in behaviours) {
+ if (behaviours[key][action]) {
+ var ret = behaviours[key][action].apply(this, arguments);
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ }
+ };
+
+ this.getKeywords = function(append) {
+ // this is for autocompletion to pick up regexp'ed keywords
+ if (!this.completionKeywords) {
+ var rules = this.$tokenizer.rules;
+ var completionKeywords = [];
+ for (var rule in rules) {
+ var ruleItr = rules[rule];
+ for (var r = 0, l = ruleItr.length; r < l; r++) {
+ if (typeof ruleItr[r].token === "string") {
+ if (/keyword|support|storage/.test(ruleItr[r].token))
+ completionKeywords.push(ruleItr[r].regex);
+ }
+ else if (typeof ruleItr[r].token === "object") {
+ for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {
+ if (/keyword|support|storage/.test(ruleItr[r].token[a])) {
+ // drop surrounding parens
+ var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a];
+ completionKeywords.push(rule.substr(1, rule.length - 2));
+ }
+ }
+ }
+ }
+ }
+ this.completionKeywords = completionKeywords;
+ }
+ // this is for highlighting embed rules, like HAML/Ruby or Obj-C/C
+ if (!append)
+ return this.$keywordList;
+ return completionKeywords.concat(this.$keywordList || []);
+ };
+
+ this.$createKeywordList = function() {
+ if (!this.$highlightRules)
+ this.getTokenizer();
+ return this.$keywordList = this.$highlightRules.$keywordList || [];
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var keywords = this.$keywordList || this.$createKeywordList();
+ return keywords.map(function(word) {
+ return {
+ name: word,
+ value: word,
+ score: 0,
+ meta: "keyword"
+ };
+ });
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/text_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/text_highlight_rules.js
new file mode 100644
index 000000000..48e016b03
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/text_highlight_rules.js
@@ -0,0 +1,234 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+
+var TextHighlightRules = function() {
+
+ // regexp must not have capturing parentheses
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [{
+ token : "empty_line",
+ regex : '^$'
+ }, {
+ defaultToken : "text"
+ }]
+ };
+};
+
+(function() {
+
+ this.addRules = function(rules, prefix) {
+ if (!prefix) {
+ for (var key in rules)
+ this.$rules[key] = rules[key];
+ return;
+ }
+ for (var key in rules) {
+ var state = rules[key];
+ for (var i = 0; i < state.length; i++) {
+ var rule = state[i];
+ if (rule.next) {
+ if (typeof rule.next != "string") {
+ if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)
+ rule.nextState = prefix + rule.nextState;
+ } else {
+ if (rule.next.indexOf(prefix) !== 0)
+ rule.next = prefix + rule.next;
+ }
+
+ }
+ }
+ this.$rules[prefix + key] = state;
+ }
+ };
+
+ this.getRules = function() {
+ return this.$rules;
+ };
+
+ this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {
+ var embedRules = new HighlightRules().getRules();
+ if (states) {
+ for (var i = 0; i < states.length; i++)
+ states[i] = prefix + states[i];
+ } else {
+ states = [];
+ for (var key in embedRules)
+ states.push(prefix + key);
+ }
+
+ this.addRules(embedRules, prefix);
+
+ if (escapeRules) {
+ var addRules = Array.prototype[append ? "push" : "unshift"];
+ for (var i = 0; i < states.length; i++)
+ addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));
+ }
+
+ if (!this.$embeds)
+ this.$embeds = [];
+ this.$embeds.push(prefix);
+ };
+
+ this.getEmbeds = function() {
+ return this.$embeds;
+ };
+
+ var pushState = function(currentState, stack) {
+ if (currentState != "start")
+ stack.unshift(this.nextState, currentState);
+ return this.nextState;
+ };
+ var popState = function(currentState, stack) {
+ if (stack[0] !== currentState)
+ return "start";
+ stack.shift();
+ return stack.shift();
+ };
+
+ this.normalizeRules = function() {
+ var id = 0;
+ var rules = this.$rules;
+ function processState(key) {
+ var state = rules[key];
+ state.processed = true;
+ for (var i = 0; i < state.length; i++) {
+ var rule = state[i];
+ if (!rule.regex && rule.start) {
+ rule.regex = rule.start;
+ if (!rule.next)
+ rule.next = [];
+ rule.next.push({
+ defaultToken: rule.token
+ }, {
+ token: rule.token + ".end",
+ regex: rule.end || rule.start,
+ next: "pop"
+ });
+ rule.token = rule.token + ".start";
+ rule.push = true;
+ }
+ var next = rule.next || rule.push;
+ if (next && Array.isArray(next)) {
+ var stateName = rule.stateName;
+ if (!stateName) {
+ stateName = rule.token;
+ if (typeof stateName != "string")
+ stateName = stateName[0] || "";
+ if (rules[stateName])
+ stateName += id++;
+ }
+ rules[stateName] = next;
+ rule.next = stateName;
+ processState(stateName);
+ } else if (next == "pop") {
+ rule.next = popState;
+ }
+
+ if (rule.push) {
+ rule.nextState = rule.next || rule.push;
+ rule.next = pushState;
+ delete rule.push;
+ }
+
+ if (rule.rules) {
+ for (var r in rule.rules) {
+ if (rules[r]) {
+ if (rules[r].push)
+ rules[r].push.apply(rules[r], rule.rules[r]);
+ } else {
+ rules[r] = rule.rules[r];
+ }
+ }
+ }
+ if (rule.include || typeof rule == "string") {
+ var includeName = rule.include || rule;
+ var toInsert = rules[includeName];
+ } else if (Array.isArray(rule))
+ toInsert = rule;
+
+ if (toInsert) {
+ var args = [i, 1].concat(toInsert);
+ if (rule.noEscape)
+ args = args.filter(function(x) {return !x.next;});
+ state.splice.apply(state, args);
+ // skip included rules since they are already processed
+ //i += args.length - 3;
+ i--;
+ toInsert = null
+ }
+
+ if (rule.keywordMap) {
+ rule.token = this.createKeywordMapper(
+ rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive
+ );
+ delete rule.defaultToken;
+ }
+ }
+ };
+ Object.keys(rules).forEach(processState, this);
+ };
+
+ this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {
+ var keywords = Object.create(null);
+ Object.keys(map).forEach(function(className) {
+ var a = map[className];
+ if (ignoreCase)
+ a = a.toLowerCase();
+ var list = a.split(splitChar || "|");
+ for (var i = list.length; i--; )
+ keywords[list[i]] = className;
+ });
+ // in old versions of opera keywords["__proto__"] sets prototype
+ // even on objects with __proto__=null
+ if (Object.getPrototypeOf(keywords)) {
+ keywords.__proto__ = null;
+ }
+ this.$keywordList = Object.keys(keywords);
+ map = null;
+ return ignoreCase
+ ? function(value) {return keywords[value.toLowerCase()] || defaultToken }
+ : function(value) {return keywords[value] || defaultToken };
+ }
+
+ this.getKeywords = function() {
+ return this.$keywords;
+ };
+
+}).call(TextHighlightRules.prototype);
+
+exports.TextHighlightRules = TextHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/text_test.js b/src/fauxton/assets/js/libs/ace/mode/text_test.js
new file mode 100644
index 000000000..e856e6649
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/text_test.js
@@ -0,0 +1,64 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var TextMode = require("./text").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new TextMode();
+ },
+
+ "test: toggle comment lines should not do anything" : function() {
+ var session = new EditSession([" abc", "cde", "fg"]);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" abc", "cde", "fg"].join("\n"), session.toString());
+ },
+
+
+ "test: lines should be indented" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc", " "));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/textile.js b/src/fauxton/assets/js/libs/ace/mode/textile.js
new file mode 100644
index 000000000..0c9a86bb6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/textile.js
@@ -0,0 +1,66 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TextileHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ if (state == "intag")
+ return tab;
+
+ return "";
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/textile_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/textile_highlight_rules.js
new file mode 100644
index 000000000..5edb84534
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/textile_highlight_rules.js
@@ -0,0 +1,93 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TextileHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : function(value) {
+ if (value.charAt(0) == "h")
+ return "markup.heading." + value.charAt(1);
+ else
+ return "markup.heading";
+ },
+ regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
+ next : "blocktag"
+ },
+ {
+ token : "keyword",
+ regex : "[\\*]+|[#]+"
+ },
+ {
+ token : "text",
+ regex : ".+"
+ }
+ ],
+ "blocktag" : [
+ {
+ token : "keyword",
+ regex : "\\. ",
+ next : "start"
+ },
+ {
+ token : "keyword",
+ regex : "\\(",
+ next : "blocktagproperties"
+ }
+ ],
+ "blocktagproperties" : [
+ {
+ token : "keyword",
+ regex : "\\)",
+ next : "blocktag"
+ },
+ {
+ token : "string",
+ regex : "[a-zA-Z0-9\\-_]+"
+ },
+ {
+ token : "keyword",
+ regex : "#"
+ }
+ ]
+ };
+};
+
+oop.inherits(TextileHighlightRules, TextHighlightRules);
+
+exports.TextileHighlightRules = TextileHighlightRules;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/toml.js b/src/fauxton/assets/js/libs/ace/mode/toml.js
new file mode 100644
index 000000000..c277b84d3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/toml.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules;
+var FoldMode = require("./folding/ini").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = TomlHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/toml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/toml_highlight_rules.js
new file mode 100644
index 000000000..686ffae2c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/toml_highlight_rules.js
@@ -0,0 +1,103 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TomlHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start": [
+ {
+ token: "comment.toml",
+ regex: /#.*$/
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token: ["variable.keygroup.toml"],
+ regex: "(?:^\\s*)(\\[([^\\]]+)\\])"
+ },
+ {
+ token : keywordMapper,
+ regex : identifierRe
+ },
+ {
+ token : "support.date.toml",
+ regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"
+ },
+ {
+ token: "constant.numeric.toml",
+ regex: "-?\\d+(\\.?\\d+)?"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ },
+ {
+ token : "constant.language.escape",
+ regex : '\\\\[0tnr"\\\\]'
+ },
+ {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ },
+ {
+ defaultToken: "string"
+ }
+ ]
+ }
+
+};
+
+oop.inherits(TomlHighlightRules, TextHighlightRules);
+
+exports.TomlHighlightRules = TomlHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/twig.js b/src/fauxton/assets/js/libs/ace/mode/twig.js
new file mode 100644
index 000000000..06e4faa1c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/twig.js
@@ -0,0 +1,92 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TwigHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new HtmlBehaviour();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.blockComment = {start: "{#", end: "#}"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/twig_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/twig_highlight_rules.js
new file mode 100644
index 000000000..dcd37a501
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/twig_highlight_rules.js
@@ -0,0 +1,166 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TwigHighlightRules = function() {
+ // inherit from html
+ HtmlHighlightRules.call(this);
+
+ var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";
+ tags = tags + "|end" + tags.replace(/\|/g, "|end");
+ var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode";
+ var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string";
+ var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd";
+ var constants = "null|none|true|false";
+ var operators = "b-and|b-xor|b-or|in|is|and|or|not"
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control.twig": tags,
+ "support.function.twig": [filters, functions, tests].join("|"),
+ "keyword.operator.twig": operators,
+ "constant.language.twig": constants
+ }, "identifier");
+
+ // add twig start tags to the HTML start tags
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable.other.readwrite.local.twig",
+ regex : "\\{\\{-?",
+ push : "twig-start"
+ }, {
+ token : "meta.tag.twig",
+ regex : "\\{%-?",
+ push : "twig-start"
+ }, {
+ token : "comment.block.twig",
+ regex : "\\{#-?",
+ push : "twig-comment"
+ });
+ }
+
+ // add twig closing comment to HTML comments
+ this.$rules["twig-comment"] = [{
+ token : "comment.block.twig",
+ regex : ".*-?#\\}",
+ next : "pop"
+ }];
+
+ this.$rules["twig-start"] = [{
+ token : "variable.other.readwrite.local.twig",
+ regex : "-?\\}\\}",
+ next : "pop"
+ }, {
+ token : "meta.tag.twig",
+ regex : "-?%\\}",
+ next : "pop"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-qstring"
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-qqstring"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator.assignment",
+ regex : "=|~"
+ }, {
+ token : "keyword.operator.comparison",
+ regex : "==|!=|<|>|>=|<=|==="
+ }, {
+ token : "keyword.operator.arithmetic",
+ regex : "\\+|-|/|%|//|\\*|\\*\\*"
+ }, {
+ token : "keyword.operator.other",
+ regex : "\\.\\.|\\|"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|\:|\,|\;|\./
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ];
+
+ this.$rules["twig-qqstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\"$#ntr]|#{[^"}]*}/
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.$rules["twig-qstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\'ntr]}/
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.normalizeRules();
+};
+
+oop.inherits(TwigHighlightRules, TextHighlightRules);
+
+exports.TwigHighlightRules = TwigHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/typescript.js b/src/fauxton/assets/js/libs/ace/mode/typescript.js
new file mode 100644
index 000000000..32d24c31c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/typescript.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var jsMode = require("./javascript").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TypeScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, jsMode);
+
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/typescript_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/typescript_highlight_rules.js
new file mode 100644
index 000000000..da6a533e4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/typescript_highlight_rules.js
@@ -0,0 +1,98 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ * Garen J. Torikian <gjtorikian AT gmail DOT com>
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 21e323af-f665-4161-96e7-5087d262557e) */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var TypeScriptHighlightRules = function() {
+
+ var tsRules = [
+ // Match stuff like: module name {...}
+ {
+ token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"],
+ regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"
+ },
+ // Match stuff like: super(argument, list)
+ {
+ token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"],
+ regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"
+ },
+ // Match stuff like: function() {...}
+ {
+ token: ["entity.name.function.ts","paren.lparen", "paren.rparen"],
+ regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"
+ },
+ // Match stuff like: (function: return type)
+ {
+ token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"],
+ regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"
+ },
+ {
+ token: ["keyword.operator.ts"],
+ regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"
+ },
+ {
+ token: ["storage.type.variable.ts"],
+ regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"
+ },
+ {
+ token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"],
+ regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"
+ },
+ {
+ token: "keyword",
+ regex: "(?:super|export|class|extends|import)\\b"
+ }
+ ];
+
+ var JSRules = new JavaScriptHighlightRules().getRules();
+
+ JSRules.start = tsRules.concat(JSRules.start);
+ this.$rules = JSRules;
+};
+
+oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
+
+exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/vbscript.js b/src/fauxton/assets/js/libs/ace/mode/vbscript.js
new file mode 100644
index 000000000..8060445de
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/vbscript.js
@@ -0,0 +1,60 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Contributor(s):
+ *
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = VBScriptHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["'", "REM"];
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/vbscript_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/vbscript_highlight_rules.js
new file mode 100644
index 000000000..a3323b42f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/vbscript_highlight_rules.js
@@ -0,0 +1,276 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode_highlight_rules.tmpl.js (UUID: 7F9C9343-D48E-4E7D-BFE8-F680714DCD3E) */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var VBScriptHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start": [
+ {
+ token: [
+ "meta.ending-space"
+ ],
+ regex: "$"
+ },
+// {
+// token: [
+// "#round-brackets"
+// ],
+// regex: ""
+// },
+ {
+ token: [
+ null
+ ],
+ regex: "^(?=\\t)",
+ next: "state_3"
+ },
+ {
+ token: [null],
+ regex: "^(?= )",
+ next: "state_4"
+ },
+ {
+ token: [
+ "storage.type.function.asp",
+ "text",
+ "entity.name.function.asp",
+ "text",
+ "punctuation.definition.parameters.asp",
+ "variable.parameter.function.asp",
+ "punctuation.definition.parameters.asp"
+ ],
+ regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?"
+ },
+ {
+ token: "punctuation.definition.comment.asp",
+ regex: "'|REM",
+ next: "comment"
+ },
+ {
+ token: [
+ "keyword.control.asp"
+ ],
+ regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)"
+ },
+ {
+ token: [
+ "keyword.operator.asp"
+ ],
+ regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)"
+ },
+ {
+ token: [
+ "storage.type.asp"
+ ],
+ regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"
+ },
+ {
+ token: [
+ "storage.modifier.asp"
+ ],
+ regex: "(?:\\b(Private|Public|Default)\\b)"
+ },
+ {
+ token: [
+ "constant.language.asp"
+ ],
+ regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)"
+ },
+ {
+ token: [
+ "punctuation.definition.string.begin.asp"
+ ],
+ regex: '"',
+ next: "string"
+ },
+ {
+ token: [
+ "punctuation.definition.variable.asp"
+ ],
+ regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"
+ },
+ {
+ token: [
+ "support.class.asp"
+ ],
+ regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)"
+ },
+ {
+ token: [
+ "support.class.collection.asp"
+ ],
+ regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)"
+ },
+ {
+ token: [
+ "support.constant.asp"
+ ],
+ regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)"
+ },
+ {
+ token: [
+ "support.function.asp"
+ ],
+ regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
+ },
+ {
+ token: [
+ "support.function.event.asp"
+ ],
+ regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)"
+ },
+// {
+// token: [
+// "support.type.vb.asp"
+// ],
+// regex: "(?:(?<=as )(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b))", // ERROR: This contains a lookbehind, which JS does not support :("
+// },
+ {
+ token: [
+ "support.function.vb.asp"
+ ],
+ regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)"
+ },
+ {
+ token: [
+ "constant.numeric.asp"
+ ],
+ regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"
+ },
+ {
+ token: [
+ "support.type.vb.asp"
+ ],
+ regex: "(?:\\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)"
+ },
+ {
+ token: [
+ "entity.name.function.asp"
+ ],
+ regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"
+ },
+// {
+// token: [
+// "variable.other.asp"
+// ],
+// regex: "(?:((?<=(\\+|=|-|\\&|\\\\|/|<|>|\\(|,))\\s*\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?!(\\(|\\.))|\\b([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?)\\b(?=\\s*(\\+|=|-|\\&|\\\\|/|<|>|\\(|\\)))))", // ERROR: This contains a lookbehind, which JS does not support :("
+// },
+ {
+ token: [
+ "keyword.operator.asp"
+ ],
+ regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&"
+ }
+ ],
+ "state_3": [
+ {
+ token: [
+ "meta.odd-tab.tabs",
+ "meta.even-tab.tabs"
+ ],
+ regex: "(\\t)(\\t)?"
+ },
+ {
+ token: "meta.leading-space",
+ regex: "(?=[^\\t])",
+ next: "start"
+ },
+ {
+ token: "meta.leading-space",
+ regex: ".",
+ next: "state_3"
+ }
+ ],
+ "state_4": [
+ {
+ token: [
+ "meta.odd-tab.spaces",
+ "meta.even-tab.spaces"
+ ],
+ regex: "( )( )?"
+ },
+ {
+ token: "meta.leading-space",
+ regex: "(?=[^ ])",
+ next: "start"
+ },
+ {
+ token: "meta.leading-space",
+ regex: ".",
+ next: "state_4"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment.line.apostrophe.asp",
+ regex: "$|(?=(?:%>))",
+ next: "start"
+ },
+ {
+ token: "comment.line.apostrophe.asp",
+ regex: "."
+ }
+ ],
+ "string": [
+ {
+ token: "constant.character.escape.apostrophe.asp",
+ regex: '""'
+ },
+ {
+ token: "string.quoted.double.asp",
+ regex: '"',
+ next: "start"
+ },
+ {
+ token: "string.quoted.double.asp",
+ regex: "."
+ }
+ ]
+}
+
+};
+
+oop.inherits(VBScriptHighlightRules, TextHighlightRules);
+
+exports.VBScriptHighlightRules = VBScriptHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/velocity.js b/src/fauxton/assets/js/libs/ace/mode/velocity.js
new file mode 100644
index 000000000..c76859f5b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/velocity.js
@@ -0,0 +1,59 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2012, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ THIS FILE WAS AUTOGENERATED BY mode.tmpl.js
+*/
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
+var FoldMode = require("./folding/velocity").FoldMode;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+
+var Mode = function() {
+ this.HighlightRules = VelocityHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = new HtmlBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "##";
+ this.blockComment = {start: "#*", end: "*#"};
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/velocity_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/velocity_highlight_rules.js
new file mode 100644
index 000000000..506a58365
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/velocity_highlight_rules.js
@@ -0,0 +1,177 @@
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var VelocityHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var builtinConstants = lang.arrayToMap(
+ ('true|false|null').split('|')
+ );
+
+ var builtinFunctions = lang.arrayToMap(
+ ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')
+ );
+
+ var builtinVariables = lang.arrayToMap(
+ ('$contentRoot|$foreach').split('|')
+ );
+
+ var keywords = lang.arrayToMap(
+ ("#set|#macro|#include|#parse|" +
+ "#if|#elseif|#else|#foreach|" +
+ "#break|#end|#stop"
+ ).split('|')
+ );
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules.start.push(
+ {
+ token : "comment",
+ regex : "##.*$"
+ },{
+ token : "comment.block", // multi line comment
+ regex : "#\\*",
+ next : "vm_comment"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ );
+
+ this.$rules["vm_comment"] = [
+ {
+ token : "comment", // closing comment
+ regex : "\\*#|-->",
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ];
+
+ this.$rules["vm_start"] = [
+ {
+ token: "variable",
+ regex: "}",
+ next: "pop"
+ }, {
+ token : "string.regexp",
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : function(value) {
+ if (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ // TODO: Unicode escape sequences
+ // TODO: Unicode identifiers
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "variable",
+ regex: "\\${",
+ push: "vm_start"
+ });
+ }
+
+ this.normalizeRules();
+};
+
+oop.inherits(VelocityHighlightRules, TextHighlightRules);
+
+exports.VelocityHighlightRules = VelocityHighlightRules;
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mode/verilog.js b/src/fauxton/assets/js/libs/ace/mode/verilog.js
new file mode 100644
index 000000000..67e9049e3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/verilog.js
@@ -0,0 +1,54 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = VerilogHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/verilog_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/verilog_highlight_rules.js
new file mode 100644
index 000000000..83aa16a6c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/verilog_highlight_rules.js
@@ -0,0 +1,101 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var VerilogHighlightRules = function() {
+var keywords = "always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|" +
+ "deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|" +
+ "endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|" +
+ "highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|" +
+ "macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|" +
+ "posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|" +
+ "reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|" +
+ "strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|" +
+ "unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xor" +
+ "begin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|" +
+ "endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|" +
+ "macromodule|module|primitive|repeat|specify|table|task|while";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "//.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+};
+
+oop.inherits(VerilogHighlightRules, TextHighlightRules);
+
+exports.VerilogHighlightRules = VerilogHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/vhdl.js b/src/fauxton/assets/js/libs/ace/mode/vhdl.js
new file mode 100644
index 000000000..13245e0cf
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/vhdl.js
@@ -0,0 +1,52 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = VHDLHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/vhdl_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/vhdl_highlight_rules.js
new file mode 100644
index 000000000..671d0fe28
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/vhdl_highlight_rules.js
@@ -0,0 +1,115 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2013, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var VHDLHighlightRules = function() {
+
+
+
+ var keywords = "access|after|ailas|all|architecture|assert|attribute|"+
+ "begin|block|buffer|bus|case|component|configuration|"+
+ "disconnect|downto|else|elsif|end|entity|file|for|function|"+
+ "generate|generic|guarded|if|impure|in|inertial|inout|is|"+
+ "label|linkage|literal|loop|mapnew|next|of|on|open|"+
+ "others|out|port|process|pure|range|record|reject|"+
+ "report|return|select|shared|subtype|then|to|transport|"+
+ "type|unaffected|united|until|wait|when|while|with";
+
+ var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+
+ "positive|real|register|severity|signal|signed|"+
+ "std_logic|std_logic_vector|string||text|time|unsigned|"+
+ "variable";
+
+ var storageModifiers = "array|constant";
+
+ var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+
+ "srl|xnor|xor";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.operator": keywordOperators,
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "storage.modifier": storageModifiers,
+ "storage.type": storageType
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "keyword", // pre-compiler directives
+ regex : "\\s*(?:library|package|use)\\b",
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\'|\\:|\\,|\\;|\\."
+ },{
+ token : "paren.lparen",
+ regex : "[[(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+
+
+ };
+};
+
+oop.inherits(VHDLHighlightRules, TextHighlightRules);
+
+exports.VHDLHighlightRules = VHDLHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xml.js b/src/fauxton/assets/js/libs/ace/mode/xml.js
new file mode 100644
index 000000000..c6e18fc68
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xml.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/xml_highlight_rules.js
new file mode 100644
index 000000000..dd3d2a28d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xml_highlight_rules.js
@@ -0,0 +1,216 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var xmlUtil = require("./xml_util");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var XmlHighlightRules = function(normalize) {
+ this.$rules = {
+ start : [
+ {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
+ },
+ {
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
+ regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
+ },
+ {token : "comment", regex : "<\\!--", next : "comment"},
+ {
+ token : ["punctuation.doctype.begin", "meta.tag.doctype"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
+ },
+ {include : "tag"},
+ {include : "reference"}
+ ],
+
+ xml_declaration : [
+ {include : "attributes"},
+ {include : "instruction"}
+ ],
+
+ instruction : [
+ {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
+ ],
+
+ doctype : [
+ {include : "space"},
+ {include : "string"},
+ {token : "punctuation.doctype.end", regex : ">", next : "start"},
+ {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.begin", regex : "\\[", push : "declarations"}
+ ],
+
+ declarations : [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.end",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.begin", "keyword"],
+ regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.end",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.end", regex : "\\]\\]>", next : "start"},
+ {token : "text", regex : "\\s+"},
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment", regex : "-->", next : "start"},
+ {defaultToken : "comment"}
+ ],
+
+ tag : [{
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
+ regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
+ ]
+ }, {
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
+ regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
+ next: [
+ {include : "space"},
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
+ ]
+ }],
+
+ space : [
+ {token : "text", regex : "\\s+"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }, {
+ token : "invalid.illegal", regex : "&"
+ }],
+
+ string: [{
+ token : "string",
+ regex : "'",
+ push : "qstring_inner"
+ }, {
+ token : "string",
+ regex : '"',
+ push : "qqstring_inner"
+ }],
+
+ qstring_inner: [
+ {token : "string", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string"}
+ ],
+
+ qqstring_inner: [
+ {token : "string", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string"}
+ ],
+
+ attributes: [{
+ token : "entity.other.attribute-name",
+ regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ }, {
+ token : "keyword.operator.separator",
+ regex : "="
+ }, {
+ include : "space"
+ }, {
+ include : "string"
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
+ regex : "(<)(" + tag + ")",
+ next: [
+ {include : "space"},
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "space"},
+ {token : "meta.tag.punctuation.end", regex : ">", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
+ regex : "(</)(" + tag + ")",
+ next: tag + "-end"
+ }, {
+ token: "string.begin",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.end",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xml_test.js b/src/fauxton/assets/js/libs/ace/mode/xml_test.js
new file mode 100644
index 000000000..39edf6339
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xml_test.js
@@ -0,0 +1,75 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var XmlMode = require("./xml").Mode;
+var assert = require("../test/assertions");
+
+module.exports = {
+ setUp : function() {
+ this.mode = new XmlMode();
+ },
+
+ "test: getTokenizer() (smoke test)" : function() {
+ var tokenizer = this.mode.getTokenizer();
+
+ assert.ok(tokenizer instanceof Tokenizer);
+
+ var tokens = tokenizer.getLineTokens("<juhu>", "start").tokens;
+ assert.equal("meta.tag.punctuation.begin", tokens[0].type);
+ },
+
+ "test: toggle comment lines should not do anything" : function() {
+ var session = new EditSession([" abc", " cde", "fg"]);
+
+ this.mode.toggleCommentLines("start", session, 0, 1);
+ assert.equal([" <!-- abc-->", " <!--cde-->", "fg"].join("\n"), session.toString());
+ },
+
+ "test: next line indent should be the same as the current line indent" : function() {
+ assert.equal(" ", this.mode.getNextLineIndent("start", " abc"));
+ assert.equal("", this.mode.getNextLineIndent("start", "abc"));
+ assert.equal("\t", this.mode.getNextLineIndent("start", "\tabc"));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/mode/xml_util.js b/src/fauxton/assets/js/libs/ace/mode/xml_util.js
new file mode 100644
index 000000000..abae60757
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xml_util.js
@@ -0,0 +1,100 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+function string(state) {
+ return [{
+ token : "string",
+ regex : '"',
+ next : state + "_qqstring"
+ }, {
+ token : "string",
+ regex : "'",
+ next : state + "_qstring"
+ }];
+}
+
+function multiLineString(quote, state) {
+ return [
+ {token : "string", regex : quote, next : state},
+ {
+ token : "constant.language.escape",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ },
+ {defaultToken : "string"}
+ ];
+}
+
+exports.tag = function(states, name, nextState, tagMap) {
+ states[name] = [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ //token : "meta.tag",
+
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
+ if (tagMap[value])
+ return "meta.tag.tag-name." + tagMap[value];
+ else
+ return "meta.tag.tag-name";
+ },
+ regex : "[-_a-zA-Z0-9:]+",
+ next : name + "_embed_attribute_list"
+ }, {
+ token: "empty",
+ regex: "",
+ next : name + "_embed_attribute_list"
+ }];
+
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
+
+ states[name + "_embed_attribute_list"] = [{
+ token : "meta.tag.r",
+ regex : "/?>",
+ next : nextState
+ }, {
+ token : "keyword.operator",
+ regex : "="
+ }, {
+ token : "entity.other.attribute-name",
+ regex : "[-_a-zA-Z0-9:]+"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }].concat(string(name));
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery.js b/src/fauxton/assets/js/libs/ace/mode/xquery.js
new file mode 100644
index 000000000..f316b9012
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery.js
@@ -0,0 +1,139 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var XQueryLexer = require("./xquery/XQueryLexer").XQueryLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+
+var Mode = function() {
+ this.$tokenizer = new XQueryLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);
+ if (match)
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (! /^\s+$/.test(line))
+ return false;
+
+ return /^\s*[\}\)]/.test(input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ var line = doc.getLine(row);
+ var match = line.match(/^(\s*[\}\)])/);
+
+ if (!match) return 0;
+
+ var column = match[1].length;
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
+
+ if (!openBracePos || openBracePos.row == row) return 0;
+
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
+ doc.replace(new Range(row, 0, row, column-1), indent);
+ };
+
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
+ var i, line;
+ var outdent = true;
+ var re = /^\s*\(:(.*):\)/;
+
+ for (i=startRow; i<= endRow; i++) {
+ if (!re.test(doc.getLine(i))) {
+ outdent = false;
+ break;
+ }
+ }
+
+ var range = new Range(0, 0, 0, 0);
+ for (i=startRow; i<= endRow; i++) {
+ line = doc.getLine(i);
+ range.start.row = i;
+ range.end.row = i;
+ range.end.column = line.length;
+
+ doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)");
+ }
+ };
+
+ this.createWorker = function(session) {
+
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations([e.data]);
+ });
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("highlight", function(tokens) {
+ that.$tokenizer.tokens = tokens.data.tokens;
+ that.$tokenizer.lines = session.getDocument().getAllLines();
+
+ var rows = Object.keys(that.$tokenizer.tokens);
+ for(var i=0; i < rows.length; i++) {
+ var row = parseInt(rows[i]);
+ delete session.bgTokenizer.lines[row];
+ delete session.bgTokenizer.states[row];
+ session.bgTokenizer.fireUpdateEvent(row, row);
+ }
+ });
+
+ return worker;
+ };
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/JSONParseTreeHandler.js b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONParseTreeHandler.js
new file mode 100644
index 000000000..9b8507631
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONParseTreeHandler.js
@@ -0,0 +1,178 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+
+ var JSONParseTreeHandler = exports.JSONParseTreeHandler = function(code) {
+
+ //List of nodes that are not targeted by the parse tree size optimization.
+ var list = [
+ "OrExpr", "AndExpr", "ComparisonExpr", "StringConcatExpr", "RangeExpr"
+ //, "AdditiveExpr", "MultiplicativeExpr"
+ , "UnionExpr", "IntersectExceptExpr", "InstanceofExpr", "TreatExpr", "CastableExpr"
+ , "CastExpr", "UnaryExpr", "ValueExpr", "FTContainsExpr", "SimpleMapExpr", "PathExpr", "RelativePathExpr"
+ , "PostfixExpr", "StepExpr"
+ ];
+
+ var ast = null;
+ var ptr = null;
+ var remains = code;
+ var cursor = 0;
+ var lineCursor = 0;
+ var line = 0;
+ var col = 0;
+
+ function createNode(name){
+ return { name: name, children: [], getParent: null, pos: { sl: 0, sc: 0, el: 0, ec: 0 } };
+ }
+
+ function pushNode(name, begin){
+ var node = createNode(name);
+ if(ast === null) {
+ ast = node;
+ ptr = node;
+ } else {
+ node.getParent = ptr;
+ ptr.children.push(node);
+ ptr = ptr.children[ptr.children.length - 1];
+ }
+ }
+
+ function popNode(){
+
+ if(ptr.children.length > 0) {
+ var s = ptr.children[0];
+ var e = null;
+ //We want to skip empty non terminals. For instance PredicateList:
+ // [108] AxisStep ::= (ReverseStep | ForwardStep) PredicateList
+ // [120] PredicateList ::= Predicate*
+ for(var i= ptr.children.length - 1; i >= 0;i--) {
+ e = ptr.children[i];
+ if(e.pos.el !== 0 || e.pos.ec !== 0) {
+ break;
+ }
+ }
+ ptr.pos.sl = s.pos.sl;
+ ptr.pos.sc = s.pos.sc;
+ ptr.pos.el = e.pos.el;
+ ptr.pos.ec = e.pos.ec;
+ }
+
+ //Normalize EQName && FunctionName
+ if(ptr.name === "FunctionName") {
+ ptr.name = "EQName";
+ }
+ if(ptr.name === "EQName" && ptr.value === undefined) {
+ ptr.value = ptr.children[0].value;
+ ptr.children.pop();
+ }
+
+ if(ptr.getParent !== null) {
+ ptr = ptr.getParent;
+ //for(var i in ptr.children) {
+ //delete ptr.children[i].getParent;
+ //}
+ } else {
+ //delete ptr.getParent;
+ }
+
+ //Parse tree size optimization
+ if(ptr.children.length > 0) {
+ var lastChild = ptr.children[ptr.children.length - 1];
+ if(lastChild.children.length === 1 && list.indexOf(lastChild.name) !== -1) {
+ ptr.children[ptr.children.length - 1] = lastChild.children[0];
+ }
+ }
+ }
+
+ this.closeParseTree = function() {
+ while(ptr.getParent !== null) {
+ popNode();
+ }
+ popNode();
+ };
+
+ this.peek = function() {
+ return ptr;
+ };
+
+ this.getParseTree = function() {
+ return ast;
+ };
+
+ this.reset = function(input) {};
+
+ this.startNonterminal = function(name, begin) {
+ pushNode(name, begin);
+ };
+
+ this.endNonterminal = function(name, end) {
+ popNode();
+ };
+
+ this.terminal = function(name, begin, end) {
+ name = (name.substring(0, 1) === "'" && name.substring(name.length - 1) === "'") ? "TOKEN" : name;
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
+ };
+
+ this.whitespace = function(begin, end) {
+ var name = "WS";
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
+ };
+
+ function setValue(node, begin, end) {
+
+ var e = end - cursor;
+ ptr.value = remains.substring(0, e);
+ remains = remains.substring(e);
+ cursor = end;
+
+ var sl = line;
+ var sc = lineCursor;
+ var el = sl + ptr.value.split("\n").length - 1;
+ var lastIdx = ptr.value.lastIndexOf("\n");
+ var ec = lastIdx === -1 ? sc + ptr.value.length : ptr.value.substring(lastIdx + 1).length;
+// ec = ec === 0 ? 0 : ec - 1;
+
+ line = el;
+ //lineCursor = ec === 0 ? 0 : ec;
+ lineCursor = ec;
+
+ ptr.pos.sl = sl;
+ ptr.pos.sc = sc;
+ ptr.pos.el = el;
+ ptr.pos.ec = ec;
+ }
+ };
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqLexer.js b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqLexer.js
new file mode 100644
index 000000000..d2a9b482a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqLexer.js
@@ -0,0 +1,302 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+
+ var JSONiqTokenizer = require("./JSONiqTokenizer").JSONiqTokenizer;
+
+ var TokenHandler = function(code) {
+
+ var input = code;
+
+ this.tokens = [];
+
+ this.reset = function(code) {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function(name, begin) {};
+
+ this.endNonterminal = function(name, end) {};
+
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: "WS",
+ value: input.substring(begin, end)
+ });
+ };
+ };
+ var keys = "NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit".split("|");
+ var keywords = keys.map(
+ function(val) { return { name: "'" + val + "'", token: "keyword" }; }
+ );
+
+ var ncnames = keys.map(
+ function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; }
+ );
+
+ var cdata = "constant.language";
+ var number = "constant";
+ var xmlcomment = "comment";
+ var pi = "xml-pe";
+ var pragma = "constant.buildin";
+
+ var Rules = {
+ start: [
+ { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } },
+ { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
+ { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
+ { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
+ { name: "'<?'", token: pi, next: function(stack) { stack.push("PI"); } },
+ { name: "''''", token: "string", next: function(stack){ stack.push("AposString"); } },
+ { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotString"); } },
+ { name: "Annotation", token: "support.function" },
+ { name: "ModuleDecl", token: "keyword", next: function(stack){ stack.push("Prefix"); } },
+ { name: "OptionDecl", token: "keyword", next: function(stack){ stack.push("_EQName"); } },
+ { name: "AttrTest", token: "support.type" },
+ { name: "Variable", token: "variable" },
+ { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
+ { name: "IntegerLiteral", token: number },
+ { name: "DecimalLiteral", token: number },
+ { name: "DoubleLiteral", token: number },
+ { name: "Operator", token: "keyword.operator" },
+ { name: "EQName", token: function(val) { return keys.indexOf(val) !== -1 ? "keyword" : "support.function"; } },
+ { name: "'('", token:"lparen" },
+ { name: "')'", token:"rparen" },
+ { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
+ { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) stack.pop(); } },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: "EQName", token: "text", next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: "NCName", token: "text", next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: "'>'", token: "meta.tag", next: function(stack){ stack.push("TagContent"); } },
+ { name: "QName", token: "entity.other.attribute-name" },
+ { name: "'='", token: "text" },
+ { name: "''''", token: "string", next: function(stack){ stack.push("AposAttr"); } },
+ { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotAttr"); } },
+ { name: "'/>'", token: "meta.tag.r", next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: "ElementContentChar", token: "text" },
+ { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
+ { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
+ { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "text" },
+ { name: "'}}'", token: "text" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } },
+ { name: "EndTag", token: "meta.tag", next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "EscapeApos", token: "constant.language.escape" },
+ { name: "AposAttrContentChar", token: "string" },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "string" },
+ { name: "'}}'", token: "string" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
+ ],
+ QuotAttr: [
+ { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "EscapeQuot", token: "constant.language.escape" },
+ { name: "QuotAttrContentChar", token: "string" },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "string" },
+ { name: "'}}'", token: "string" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
+ ],
+ Pragma: [
+ { name: "PragmaContents", token: pragma },
+ { name: "'#'", token: pragma },
+ { name: "'#)'", token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: "CommentContents", token: "comment" },
+ { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
+ { name: "':)'", token: "comment", next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: "DocCommentContents", token: "comment.doc" },
+ { name: "DocTag", token: "comment.doc.tag" },
+ { name: "'(:'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
+ { name: "':)'", token: "comment.doc", next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: "DirCommentContents", token: xmlcomment },
+ { name: "'-->'", token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: "CDataSectionContents", token: cdata },
+ { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: "DirPIContents", token: pi },
+ { name: "'?'", token: pi },
+ { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "EscapeApos", token: "constant.language.escape" },
+ { name: "AposChar", token: "string" }
+ ],
+ QuotString: [
+ { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "EscapeQuot", token: "constant.language.escape" },
+ { name: "QuotChar", token: "string" }
+ ]
+ };
+
+exports.JSONiqLexer = function() {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state, row) {
+ state = (state === "start" || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new JSONiqTokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+
+ h.tokens = [];
+ tokenizer["parse_" + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === "WS") {
+ tokens.push({
+ type: "text",
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === "EOF") { break; }
+ if(token.value === "") { throw "Encountered empty string lexical rule."; }
+
+ tokens.push({
+ type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: "text", value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(["start"])
+ };
+ } else {
+ throw e;
+ }
+ }
+ }
+
+
+ if(this.tokens[row] !== undefined) {
+ var cachedLine = this.lines[row];
+ var begin = sharedStart([line, cachedLine]);
+ var diff = cachedLine.length - line.length;
+ var idx = 0;
+ var col = 0;
+ for(var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ for(var j = 0; j < this.tokens[row].length; j++) {
+ var semanticToken = this.tokens[row][j];
+ if(
+ ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) ||
+ (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff))
+ ) {
+ idx = i;
+ tokens[i].type = semanticToken.type;
+ }
+ }
+ col += token.value.length;
+ }
+ }
+
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+
+ function sharedStart(A) {
+ var tem1, tem2, s, A = A.slice(0).sort();
+ tem1 = A[0];
+ s = tem1.length;
+ tem2 = A.pop();
+ while(s && tem2.indexOf(tem1) == -1) {
+ tem1 = tem1.substring(0, --s);
+ }
+ return tem1;
+ }
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.ebnf b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.ebnf
new file mode 100644
index 000000000..b03294875
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.ebnf
@@ -0,0 +1,544 @@
+<?xqlint
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
+{
+ init(string, parsingEventHandler);
+?>
+
+start ::= '<![CDATA['
+ | '<!--'
+ | '<?'
+ | '(#'
+ | '(:~'
+ | '(:'
+ | '"'
+ | "'"
+ | "}"
+ | "{"
+ | "("
+ | ")"
+ | "/"
+ | "["
+ | "]"
+ | ","
+ | "."
+ | ";"
+ | ":"
+ | "!"
+ | "|"
+ | Annotation
+ | ModuleDecl
+ | OptionDecl
+ | AttrTest
+ | Wildcard
+ | IntegerLiteral
+ | DecimalLiteral
+ | DoubleLiteral
+ | Variable
+ | EQName
+ | Tag
+ | Operator
+ | EOF
+
+StartTag ::= '>' | '/>' | QName | "=" | '"' | "'" | EOF
+
+
+TagContent
+ ::= ElementContentChar | Tag | EndTag | '<![CDATA[' | '<!--' | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | EOF
+ /* ws: explicit */
+
+AposAttr
+ ::= EscapeApos | AposAttrContentChar | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | "'" | EOF
+ /* ws: explicit */
+
+QuotAttr
+ ::= EscapeQuot | QuotAttrContentChar | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | '"' | EOF
+ /* ws: explicit */
+
+CData ::= CDataSectionContents | ']]>' | EOF
+ /* ws: explicit */
+
+XMLComment
+ ::= DirCommentContents | '-->' | EOF
+ /* ws: explicit */
+
+PI ::= DirPIContents | '?' | '?>' | EOF
+ /* ws: explicit */
+
+Pragma ::= PragmaContents | '#' | '#)' | EOF
+ /* ws: explicit */
+
+Comment ::= ':)' | '(:' | CommentContents | EOF
+ /* ws: explicit */
+
+CommentDoc
+ ::= DocTag | DocCommentContents | ':)' | '(:' | EOF
+ /* ws: explicit */
+
+QuotString
+ ::= PredefinedEntityRef | CharRef | EscapeQuot | QuotChar | '"' | EOF
+ /* ws: explicit */
+
+AposString
+ ::= PredefinedEntityRef | CharRef | EscapeApos | AposChar | "'" | EOF
+ /* ws: explicit */
+
+Prefix ::= NCName
+
+_EQName ::= EQName
+
+Whitespace
+ ::= S^WS
+ /* ws: definition */
+
+EQName ::= FunctionName
+ | 'attribute'
+ | 'comment'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'function'
+ | 'if'
+ | 'item'
+ | 'namespace-node'
+ | 'node'
+ | 'processing-instruction'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'switch'
+ | 'text'
+ | 'typeswitch'
+FunctionName
+ ::= EQName^Token
+ | 'after'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'child'
+ | 'collation'
+ | 'copy'
+ | 'count'
+ | 'declare'
+ | 'default'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'descending'
+ | 'div'
+ | 'document'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'every'
+ | 'except'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'import'
+ | 'insert'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'last'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'module'
+ | 'namespace'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'rename'
+ | 'replace'
+ | 'return'
+ | 'satisfies'
+ | 'self'
+ | 'some'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'try'
+ | 'union'
+ | 'unordered'
+ | 'validate'
+ | 'where'
+ | 'with'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'variable'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+NCName ::= NCName^Token
+ | 'after'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'collation'
+ | 'count'
+ | 'default'
+ | 'descending'
+ | 'div'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'except'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'return'
+ | 'satisfies'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'union'
+ | 'where'
+ | 'with'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'attribute'
+ | 'child'
+ | 'comment'
+ | 'copy'
+ | 'declare'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'document'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'every'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'function'
+ | 'if'
+ | 'import'
+ | 'insert'
+ | 'item'
+ | 'last'
+ | 'module'
+ | 'namespace'
+ | 'namespace-node'
+ | 'node'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'processing-instruction'
+ | 'rename'
+ | 'replace'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'self'
+ | 'some'
+ | 'switch'
+ | 'text'
+ | 'try'
+ | 'typeswitch'
+ | 'unordered'
+ | 'validate'
+ | 'variable'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+<?TOKENS?>
+
+ModuleDecl
+ ::= ('import' S)? ('module' | 'schema') S 'namespace'
+
+Annotation
+ ::= '%' EQName ?
+
+OptionDecl
+ ::= 'declare' S ( ( 'decimal-format' | 'option' )
+ | ('default' S 'decimal-format') )
+
+Operator ::= '!=' | ':=' | '>=' | '<=' | '=' | '<' | '>' | '-' | '+' | 'div' | '||' | '?'
+
+Variable ::= '$' EQName
+
+Tag ::= '<' QName
+
+EndTag ::= '</' QName S? '>'
+
+PragmaContents
+ ::= ( Char* - ( Char* '#' Char* ) )+
+DirCommentContents
+ ::= ( ( Char - '-' ) | '-' ( Char - '-' ) )+
+DirPIContents
+ ::= ( Char* - ( Char* '?' Char* ) )+
+CDataSectionContents
+ ::= ( Char+ - ( Char* ']]>' Char* ) ) & ']]'
+ | ( Char+ - ( Char* ']]>' Char* ) ) & $
+AttrTest ::= "@" ( Wildcard | QName )
+Wildcard ::= "*"
+ | (NCName ":" "*")
+ | ("*" ":" NCName)
+ | (BracedURILiteral "*")
+EQName ::= QName
+ | URIQualifiedName
+URIQualifiedName
+ ::= BracedURILiteral NCName
+BracedURILiteral
+ ::= 'Q' '{' (PredefinedEntityRef | CharRef | [^&{}] )* '}'
+URILiteral
+ ::= StringLiteral
+IntegerLiteral
+ ::= Digits
+DecimalLiteral
+ ::= '.' Digits
+ | Digits '.' [0-9]*
+ /* ws: explicit */
+DoubleLiteral
+ ::= ( '.' Digits | Digits ( '.' [0-9]* )? ) [Ee] [+#x002D]? Digits
+ /* ws: explicit */
+PredefinedEntityRef
+ ::= '&' ( 'lt' | 'gt' | 'amp' | 'quot' | 'apos' ) ';'
+ /* ws: explicit */
+EscapeQuot
+ ::= '""'
+EscapeApos
+ ::= "''"
+QuotChar ::= (Char - ["&])+
+AposChar ::= (Char - [&'])+
+ElementContentChar
+ ::= (Char - [&<{}])+
+QuotAttrContentChar
+ ::= (Char - ["&<{}])+
+AposAttrContentChar
+ ::= (Char - [&'<{}])+
+PITarget ::= NCName - ( ( 'X' | 'x' ) ( 'M' | 'm' ) ( 'L' | 'l' ) )
+Name ::= NameStartChar NameChar*
+NameStartChar
+ ::= [:A-Z_a-z#x00C0-#x00D6#x00D8-#x00F6#x00F8-#x02FF#x0370-#x037D#x037F-#x1FFF#x200C-#x200D#x2070-#x218F#x2C00-#x2FEF#x3001-#xD7FF#xF900-#xFDCF#xFDF0-#xFFFD#x10000-#xEFFFF]
+NameChar ::= NameStartChar
+ | [-.0-9#x00B7#x0300-#x036F#x203F-#x2040]
+NCName ::= Name - ( Char* (':' | '.') Char* )
+Char ::= [#x0009#x000A#x000D#x0020-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
+QName ::= PrefixedName
+ | UnprefixedName
+PrefixedName
+ ::= Prefix ':' LocalPart
+UnprefixedName
+ ::= LocalPart
+Prefix ::= NCName
+LocalPart
+ ::= NCName
+S ::= [#x0009#x000A#x000D#x0020]+
+CharRef ::= '&#' [0-9]+ ';'
+ | '&#x' [0-9A-Fa-f]+ ';'
+Digits ::= [0-9]+
+CommentContents
+ ::= ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) & '(:'
+ | ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) & $
+ | ( ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) - ( Char* '(' ) ) & ':'
+DocTag ::= ' @' NCName?
+DocCommentContents
+ ::= ( ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) - ( Char* '(' ) ) & ':'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) & '(:'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) & ' @'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @') Char* ) ) & $
+EOF ::= $
+NonNCNameChar
+ ::= $
+ | ':'
+ | '.'
+ | ( Char - NameChar )
+DelimitingChar
+ ::= NonNCNameChar
+ | '-'
+ | '.'
+DelimitingChar
+ \\ IntegerLiteral DecimalLiteral DoubleLiteral
+NonNCNameChar
+ \\ EQName^Token QName NCName^Token 'NaN' 'after' 'all'
+ 'allowing' 'ancestor' 'ancestor-or-self' 'and' 'any'
+ 'append' 'array' 'as' 'ascending' 'at' 'attribute'
+ 'base-uri' 'before' 'boundary-space' 'break' 'by' 'case'
+ 'cast' 'castable' 'catch' 'check' 'child' 'collation'
+ 'collection' 'comment' 'constraint' 'construction'
+ 'contains' 'content' 'context' 'continue' 'copy'
+ 'copy-namespaces' 'count' 'decimal-format'
+ 'decimal-separator' 'declare' 'default' 'delete'
+ 'descendant' 'descendant-or-self' 'descending'
+ 'diacritics' 'different' 'digit' 'distance' 'div'
+ 'document' 'document-node' 'element' 'else' 'empty'
+ 'empty-sequence' 'encoding' 'end' 'entire' 'eq' 'every'
+ 'exactly' 'except' 'exit' 'external' 'first' 'following'
+ 'following-sibling' 'for' 'foreach' 'foreign' 'from'
+ 'ft-option' 'ftand' 'ftnot' 'ftor' 'function' 'ge'
+ 'greatest' 'group' 'grouping-separator' 'gt' 'idiv' 'if'
+ 'import' 'in' 'index' 'infinity' 'inherit' 'insensitive'
+ 'insert' 'instance' 'integrity' 'intersect' 'into' 'is'
+ 'item' 'json' 'json-item' 'key' 'language' 'last' 'lax'
+ 'le' 'least' 'let' 'levels' 'loop' 'lowercase' 'lt'
+ 'minus-sign' 'mod' 'modify' 'module' 'most' 'namespace'
+ 'namespace-node' 'ne' 'next' 'no' 'no-inherit'
+ 'no-preserve' 'node' 'nodes' 'not' 'object' 'occurs'
+ 'of' 'on' 'only' 'option' 'or' 'order' 'ordered'
+ 'ordering' 'paragraph' 'paragraphs' 'parent'
+ 'pattern-separator' 'per-mille' 'percent' 'phrase'
+ 'position' 'preceding' 'preceding-sibling' 'preserve'
+ 'previous' 'processing-instruction' 'relationship'
+ 'rename' 'replace' 'return' 'returning' 'revalidation'
+ 'same' 'satisfies' 'schema' 'schema-attribute'
+ 'schema-element' 'score' 'self' 'sensitive' 'sentence'
+ 'sentences' 'skip' 'sliding' 'some' 'stable' 'start'
+ 'stemming' 'stop' 'strict' 'strip' 'structured-item'
+ 'switch' 'text' 'then' 'thesaurus' 'times' 'to'
+ 'treat' 'try' 'tumbling' 'type' 'typeswitch' 'union'
+ 'unique' 'unordered' 'updating' 'uppercase' 'using'
+ 'validate' 'value' 'variable' 'version' 'weight'
+ 'when' 'where' 'while' 'wildcards' 'window' 'with'
+ 'without' 'word' 'words' 'xquery' 'zero-digit'
+'*' << Wildcard '*'^OccurrenceIndicator
+EQName^Token
+ << 'after' 'ancestor' 'ancestor-or-self' 'and' 'as' 'ascending' 'attribute' 'before' 'case' 'cast' 'castable' 'child' 'collation' 'comment' 'copy' 'count' 'declare' 'default' 'delete' 'descendant' 'descendant-or-self' 'descending' 'div' 'document' 'document-node' 'element' 'else' 'empty' 'empty-sequence' 'end' 'eq' 'every' 'except' 'first' 'following' 'following-sibling' 'for' 'function' 'ge' 'group' 'gt' 'idiv' 'if' 'import' 'insert' 'instance' 'intersect' 'into' 'is' 'item' 'last' 'le' 'let' 'lt' 'mod' 'modify' 'module' 'namespace' 'namespace-node' 'ne' 'node' 'only' 'or' 'order' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'return' 'satisfies' 'schema-attribute' 'schema-element' 'self' 'some' 'stable' 'start' 'switch' 'text' 'to' 'treat' 'try' 'typeswitch' 'union' 'unordered' 'validate' 'where' 'with' 'xquery' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'collection' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'variable' 'version' 'while' 'constraint' 'loop' 'returning' 'append' 'array' 'json-item' 'object' 'structured-item'
+NCName^Token
+ << 'after' 'and' 'as' 'ascending' 'before' 'case' 'cast' 'castable' 'collation' 'count' 'default' 'descending' 'div' 'else' 'empty' 'end' 'eq' 'except' 'for' 'ge' 'group' 'gt' 'idiv' 'instance' 'intersect' 'into' 'is' 'le' 'let' 'lt' 'mod' 'modify' 'ne' 'only' 'or' 'order' 'return' 'satisfies' 'stable' 'start' 'to' 'treat' 'union' 'where' 'with' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'ancestor' 'ancestor-or-self' 'attribute' 'child' 'comment' 'copy' 'declare' 'delete' 'descendant' 'descendant-or-self' 'document' 'document-node' 'element' 'empty-sequence' 'every' 'first' 'following' 'following-sibling' 'function' 'if' 'import' 'insert' 'item' 'last' 'module' 'namespace' 'namespace-node' 'node' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'schema-attribute' 'schema-element' 'self' 'some' 'switch' 'text' 'try' 'typeswitch' 'unordered' 'validate' 'variable' 'xquery' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'version' 'while' 'constraint' 'loop' 'returning'
+
+<?ENCORE?>
+
+<?xqlint
+});
+?>
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.js b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.js
new file mode 100644
index 000000000..bef94c473
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/JSONiqTokenizer.js
@@ -0,0 +1,4205 @@
+// This file was generated on Mon Mar 18, 2013 16:57 (UTC+01) by REx v5.24 which is Copyright (c) 1979-2013 by Gunther Rademacher <grd@gmx.net>
+// REx command line: JSONiqTokenizer.ebnf -ll 2 -backtrack -tree -javascript -a xqlint
+
+ // line 2 "JSONiqTokenizer.ebnf"
+ /* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ define(function(require, exports, module){
+ var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ // line 40 "JSONiqTokenizer.js"
+ var self = this;
+
+ this.ParseException = function(b, e, s, o, x)
+ {
+ var
+ begin = b,
+ end = e,
+ state = s,
+ offending = o,
+ expected = x;
+
+ this.getBegin = function() {return begin;};
+ this.getEnd = function() {return end;};
+ this.getState = function() {return state;};
+ this.getExpected = function() {return expected;};
+ this.getOffending = function() {return offending;};
+
+ this.getMessage = function()
+ {
+ return offending < 0 ? "lexical analysis failed" : "syntax error";
+ };
+ };
+
+ function init(string, parsingEventHandler)
+ {
+ eventHandler = parsingEventHandler;
+ input = string;
+ size = string.length;
+ reset(0, 0, 0);
+ }
+
+ this.getInput = function()
+ {
+ return input;
+ };
+
+ function reset(l, b, e)
+ {
+ b0 = b; e0 = b;
+ l1 = l; b1 = b; e1 = e;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? JSONiqTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = JSONiqTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [JSONiqTokenizer.TOKEN[e.getExpected()]];
+ }
+ return expected;
+ };
+
+ this.getErrorMessage = function(e)
+ {
+ var tokenSet = this.getExpectedTokenSet(e);
+ var found = this.getOffendingToken(e);
+ var prefix = input.substring(0, e.getBegin());
+ var lines = prefix.split("\n");
+ var line = lines.length;
+ var column = lines[line - 1].length + 1;
+ var size = e.getEnd() - e.getBegin();
+ return e.getMessage()
+ + (found == null ? "" : ", found " + found)
+ + "\nwhile expecting "
+ + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]"))
+ + "\n"
+ + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ")
+ + "at line " + line + ", column " + column + ":\n..."
+ + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64))
+ + "...";
+ };
+
+ this.parse_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // S^WS | EOF | '!' | '"' | "'" | '(' | '(#' | '(:' | '(:~' | ')' | ',' | '.' |
+ // '/' | ':' | ';' | '<!--' | '<![CDATA[' | '<?' | '[' | ']' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' |
+ // 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '}'
+ switch (l1)
+ {
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 56: // '<?'
+ shift(56); // '<?'
+ break;
+ case 40: // '(#'
+ shift(40); // '(#'
+ break;
+ case 42: // '(:~'
+ shift(42); // '(:~'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ case 274: // '}'
+ shift(274); // '}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 39: // '('
+ shift(39); // '('
+ break;
+ case 43: // ')'
+ shift(43); // ')'
+ break;
+ case 49: // '/'
+ shift(49); // '/'
+ break;
+ case 62: // '['
+ shift(62); // '['
+ break;
+ case 63: // ']'
+ shift(63); // ']'
+ break;
+ case 46: // ','
+ shift(46); // ','
+ break;
+ case 48: // '.'
+ shift(48); // '.'
+ break;
+ case 53: // ';'
+ shift(53); // ';'
+ break;
+ case 51: // ':'
+ shift(51); // ':'
+ break;
+ case 34: // '!'
+ shift(34); // '!'
+ break;
+ case 273: // '|'
+ shift(273); // '|'
+ break;
+ case 2: // Annotation
+ shift(2); // Annotation
+ break;
+ case 1: // ModuleDecl
+ shift(1); // ModuleDecl
+ break;
+ case 3: // OptionDecl
+ shift(3); // OptionDecl
+ break;
+ case 12: // AttrTest
+ shift(12); // AttrTest
+ break;
+ case 13: // Wildcard
+ shift(13); // Wildcard
+ break;
+ case 15: // IntegerLiteral
+ shift(15); // IntegerLiteral
+ break;
+ case 16: // DecimalLiteral
+ shift(16); // DecimalLiteral
+ break;
+ case 17: // DoubleLiteral
+ shift(17); // DoubleLiteral
+ break;
+ case 5: // Variable
+ shift(5); // Variable
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 4: // Operator
+ shift(4); // Operator
+ break;
+ case 33: // EOF
+ shift(33); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 58: // '>'
+ shift(58); // '>'
+ break;
+ case 50: // '/>'
+ shift(50); // '/>'
+ break;
+ case 27: // QName
+ shift(27); // QName
+ break;
+ case 57: // '='
+ shift(57); // '='
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ // '<!--' | '<![CDATA[' | '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 23: // ElementContentChar
+ shift(23); // ElementContentChar
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 7: // EndTag
+ shift(7); // EndTag
+ break;
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ // '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 25: // AposAttrContentChar
+ shift(25); // AposAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ // '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 24: // QuotAttrContentChar
+ shift(24); // QuotAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 11: // CDataSectionContents
+ shift(11); // CDataSectionContents
+ break;
+ case 64: // ']]>'
+ shift(64); // ']]>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 9: // DirCommentContents
+ shift(9); // DirCommentContents
+ break;
+ case 47: // '-->'
+ shift(47); // '-->'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 10: // DirPIContents
+ shift(10); // DirPIContents
+ break;
+ case 59: // '?'
+ shift(59); // '?'
+ break;
+ case 60: // '?>'
+ shift(60); // '?>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 8: // PragmaContents
+ shift(8); // PragmaContents
+ break;
+ case 36: // '#'
+ shift(36); // '#'
+ break;
+ case 37: // '#)'
+ shift(37); // '#)'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 30: // CommentContents
+ shift(30); // CommentContents
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 31: // DocTag
+ shift(31); // DocTag
+ break;
+ case 32: // DocCommentContents
+ shift(32); // DocCommentContents
+ break;
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"'
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 21: // QuotChar
+ shift(21); // QuotChar
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 22: // AposChar
+ shift(22); // AposChar
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' |
+ // 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' |
+ // 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' |
+ // 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' |
+ // 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 14: // EQName^Token
+ shift(14); // EQName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 26: // NCName^Token
+ shift(26); // NCName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 28) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = JSONiqTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = JSONiqTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]];
+ }
+ else
+ {
+ if (c0 < 0xdc00)
+ {
+ var c1 = current < size ? input.charCodeAt(current) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000)
+ {
+ ++current;
+ c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000;
+ nonbmp = true;
+ }
+ }
+ var lo = 0, hi = 5;
+ for (var m = 3; ; m = (hi + lo) >> 1)
+ {
+ if (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]];
+
+ if (code > 4095)
+ {
+ result = code;
+ code &= 4095;
+ end = current;
+ }
+ }
+
+ result >>= 12;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ return error(begin, end, state, -1, -1);
+ }
+
+ if (nonbmp)
+ {
+ for (var i = result >> 9; i > 0; --i)
+ {
+ --end;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ }
+ }
+ else
+ {
+ end -= result >> 9;
+ }
+
+ return (result & 511) - 1;
+ }
+}
+
+JSONiqTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 276; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2062 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(JSONiqTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+JSONiqTokenizer.MAP0 =
+[
+ /* 0 */ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5,
+ /* 36 */ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24,
+ /* 64 */ 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31,
+ /* 91 */ 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ /* 118 */ 57, 58, 59, 60, 31, 61, 62, 63, 64, 35
+];
+
+JSONiqTokenizer.MAP1 =
+[
+ /* 0 */ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181,
+ /* 21 */ 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 42 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 63 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 84 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 105 */ 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331,
+ /* 126 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433,
+ /* 147 */ 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331,
+ /* 168 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416,
+ /* 189 */ 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416,
+ /* 210 */ 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
+ /* 231 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 256 */ 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ /* 290 */ 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31,
+ /* 317 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ /* 344 */ 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43,
+ /* 371 */ 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35,
+ /* 398 */ 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ /* 425 */ 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
+];
+
+JSONiqTokenizer.MAP2 =
+[
+ /* 0 */ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31,
+ /* 17 */ 35
+];
+
+JSONiqTokenizer.INITIAL =
+[
+ /* 0 */ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+JSONiqTokenizer.TRANSITION =
+[
+ /* 0 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 30 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 45 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 60 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 75 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 90 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 150 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 255 */ 17590, 22874, 18847, 17152, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189,
+ /* 270 */ 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265, 22008,
+ /* 285 */ 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520, 17251,
+ /* 300 */ 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199, 21915,
+ /* 315 */ 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530,
+ /* 330 */ 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960, 36550,
+ /* 345 */ 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094, 18251,
+ /* 360 */ 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858,
+ /* 375 */ 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590, 17590,
+ /* 390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 405 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 510 */ 17590, 17590, 18590, 21686, 17152, 19027, 19252, 17687, 19027, 28677, 30771, 36436, 17330, 17349, 18940,
+ /* 525 */ 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265,
+ /* 540 */ 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520,
+ /* 555 */ 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199,
+ /* 570 */ 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265,
+ /* 585 */ 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960,
+ /* 600 */ 36550, 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094,
+ /* 615 */ 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400,
+ /* 630 */ 17858, 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590,
+ /* 645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 660 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 765 */ 17590, 17590, 17590, 20083, 18847, 18648, 19027, 19252, 21242, 19027, 17173, 30771, 36436, 17330, 17349,
+ /* 780 */ 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025,
+ /* 795 */ 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497,
+ /* 810 */ 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417,
+ /* 825 */ 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472,
+ /* 840 */ 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742,
+ /* 855 */ 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717,
+ /* 870 */ 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650,
+ /* 885 */ 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590,
+ /* 900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 915 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1020 */ 17590, 17590, 17590, 17590, 18774, 18789, 18805, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330,
+ /* 1035 */ 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676,
+ /* 1050 */ 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909,
+ /* 1065 */ 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258,
+ /* 1080 */ 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617,
+ /* 1095 */ 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906,
+ /* 1110 */ 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185,
+ /* 1125 */ 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163,
+ /* 1140 */ 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590,
+ /* 1155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1170 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1275 */ 17590, 17590, 17590, 17590, 17590, 18832, 22889, 18925, 19027, 19252, 17569, 19027, 17173, 30771, 36436,
+ /* 1290 */ 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18956, 21855, 18660,
+ /* 1305 */ 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 19073, 17311, 18669, 19018, 19027, 17447,
+ /* 1320 */ 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 18972, 21862, 17504, 17527,
+ /* 1335 */ 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921,
+ /* 1350 */ 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175,
+ /* 1365 */ 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159,
+ /* 1380 */ 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838,
+ /* 1395 */ 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590,
+ /* 1410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1425 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1440 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1530 */ 17590, 17590, 17590, 17590, 17590, 17590, 21818, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771,
+ /* 1545 */ 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855,
+ /* 1560 */ 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027,
+ /* 1575 */ 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504,
+ /* 1590 */ 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538,
+ /* 1605 */ 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481,
+ /* 1620 */ 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114,
+ /* 1635 */ 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251,
+ /* 1650 */ 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546,
+ /* 1665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1680 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1695 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21671, 18847, 19006, 19027, 19252, 17687, 19027, 17173,
+ /* 1800 */ 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460,
+ /* 1815 */ 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018,
+ /* 1830 */ 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862,
+ /* 1845 */ 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772,
+ /* 1860 */ 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595,
+ /* 1875 */ 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098,
+ /* 1890 */ 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402,
+ /* 1905 */ 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516,
+ /* 1920 */ 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1935 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1950 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22395, 20098, 18731, 19027, 19252, 17687, 19027,
+ /* 2055 */ 17173, 23525, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 18129, 17308, 17327, 17346, 18937,
+ /* 2070 */ 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 20746, 19130, 17311, 18669,
+ /* 2085 */ 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585,
+ /* 2100 */ 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730,
+ /* 2115 */ 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590,
+ /* 2130 */ 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081,
+ /* 2145 */ 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849,
+ /* 2160 */ 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758,
+ /* 2175 */ 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2190 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2205 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19043, 18847, 18620, 19027, 19252, 17687,
+ /* 2310 */ 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346,
+ /* 2325 */ 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311,
+ /* 2340 */ 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559,
+ /* 2355 */ 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703,
+ /* 2370 */ 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874,
+ /* 2385 */ 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632,
+ /* 2400 */ 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384,
+ /* 2415 */ 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393,
+ /* 2430 */ 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2445 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2460 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19100, 22410, 19006, 19027, 19252,
+ /* 2565 */ 17687, 19027, 19084, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327,
+ /* 2580 */ 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848,
+ /* 2595 */ 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543,
+ /* 2610 */ 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368,
+ /* 2625 */ 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795,
+ /* 2640 */ 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413,
+ /* 2655 */ 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354,
+ /* 2670 */ 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530,
+ /* 2685 */ 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2700 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2715 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21967, 21982, 19006, 19027,
+ /* 2820 */ 19252, 17687, 19027, 18701, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308,
+ /* 2835 */ 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217,
+ /* 2850 */ 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490,
+ /* 2865 */ 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661,
+ /* 2880 */ 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744,
+ /* 2895 */ 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692,
+ /* 2910 */ 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338,
+ /* 2925 */ 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445,
+ /* 2940 */ 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2955 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2970 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22380, 18847, 19006,
+ /* 3075 */ 19027, 19252, 30659, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 19157,
+ /* 3090 */ 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192,
+ /* 3105 */ 21217, 19299, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663,
+ /* 3120 */ 20490, 17543, 17559, 19191, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633,
+ /* 3135 */ 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934,
+ /* 3150 */ 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738,
+ /* 3165 */ 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005,
+ /* 3180 */ 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429,
+ /* 3195 */ 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21758, 18847,
+ /* 3330 */ 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675,
+ /* 3345 */ 19237, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157,
+ /* 3360 */ 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322,
+ /* 3375 */ 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259,
+ /* 3390 */ 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902,
+ /* 3405 */ 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021,
+ /* 3420 */ 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308,
+ /* 3435 */ 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816,
+ /* 3450 */ 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21626,
+ /* 3585 */ 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281,
+ /* 3600 */ 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421,
+ /* 3615 */ 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824,
+ /* 3630 */ 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466,
+ /* 3645 */ 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171,
+ /* 3660 */ 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976,
+ /* 3675 */ 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281,
+ /* 3690 */ 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645,
+ /* 3705 */ 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3840 */ 19268, 19284, 19326, 18482, 27869, 30509, 24384, 31417, 23323, 18482, 19370, 18482, 18484, 27202, 19389,
+ /* 3855 */ 27202, 27202, 19411, 24384, 34295, 24384, 24384, 25485, 18482, 18482, 18482, 18482, 18482, 25794, 27202,
+ /* 3870 */ 27202, 27202, 27202, 28530, 19459, 24384, 24384, 24384, 24384, 24017, 18036, 24041, 18482, 18482, 18482,
+ /* 3885 */ 18484, 19487, 27202, 27202, 27202, 27202, 19503, 35523, 19539, 24384, 24384, 24384, 19647, 18482, 35623,
+ /* 3900 */ 18482, 18482, 23052, 27202, 19557, 27202, 27202, 30764, 23993, 24384, 19579, 24384, 24384, 26758, 18482,
+ /* 3915 */ 18482, 19346, 27867, 27202, 27202, 19599, 17590, 23998, 24384, 24384, 19619, 25683, 18482, 18482, 28511,
+ /* 3930 */ 27202, 27203, 23997, 19639, 19887, 28419, 18902, 18483, 19663, 27202, 24325, 35844, 19887, 30991, 19713,
+ /* 3945 */ 19395, 19736, 22259, 19754, 22073, 19770, 35154, 19795, 19816, 19836, 19859, 25794, 34248, 24116, 19720,
+ /* 3960 */ 19875, 30988, 23482, 30981, 28304, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4095 */ 17590, 21743, 18847, 19006, 19027, 19252, 17431, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189,
+ /* 4110 */ 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008,
+ /* 4125 */ 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251,
+ /* 4140 */ 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915,
+ /* 4155 */ 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530,
+ /* 4170 */ 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550,
+ /* 4185 */ 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251,
+ /* 4200 */ 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858,
+ /* 4215 */ 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590,
+ /* 4230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4350 */ 17590, 17590, 22365, 18847, 19907, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940,
+ /* 4365 */ 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265,
+ /* 4380 */ 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520,
+ /* 4395 */ 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890,
+ /* 4410 */ 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265,
+ /* 4425 */ 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960,
+ /* 4440 */ 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094,
+ /* 4455 */ 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400,
+ /* 4470 */ 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590,
+ /* 4485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4605 */ 17590, 17590, 17590, 21641, 18847, 19326, 18482, 27869, 30544, 24384, 29176, 21442, 18482, 18482, 18482,
+ /* 4620 */ 18484, 27202, 27202, 27202, 27202, 19935, 24384, 24384, 24384, 24384, 32316, 18482, 18482, 18482, 18482,
+ /* 4635 */ 18482, 25794, 27202, 27202, 27202, 27202, 28530, 19965, 24384, 24384, 24384, 24384, 31473, 18475, 18482,
+ /* 4650 */ 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19988, 24384, 24384, 24384, 24384, 24384,
+ /* 4665 */ 33654, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29523, 29939, 24384, 24384, 24384,
+ /* 4680 */ 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 20017, 22934, 24384, 24384, 24384, 18481,
+ /* 4695 */ 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870,
+ /* 4710 */ 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794,
+ /* 4725 */ 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590,
+ /* 4740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4860 */ 17590, 17590, 17590, 17590, 20068, 19058, 20158, 20367, 20884, 17944, 20276, 20853, 25651, 20604, 20460,
+ /* 4875 */ 20185, 20209, 17189, 17208, 17281, 17675, 20232, 20273, 20295, 20338, 22456, 20777, 20600, 21329, 20635,
+ /* 4890 */ 20365, 20937, 21207, 17292, 17421, 21157, 17192, 21217, 22425, 20279, 25549, 22436, 20276, 20383, 18983,
+ /* 4905 */ 20421, 20446, 21317, 21051, 20476, 20322, 20663, 20490, 17543, 17559, 17585, 22463, 20540, 19523, 20246,
+ /* 4920 */ 20556, 20257, 20430, 20585, 20620, 20193, 20651, 17661, 18368, 17703, 17730, 17772, 19513, 20679, 20692,
+ /* 4935 */ 22446, 21027, 21097, 18990, 21111, 20708, 20736, 17744, 17795, 17874, 17590, 25536, 20349, 20762, 20812,
+ /* 4950 */ 20169, 20828, 21376, 17714, 17976, 18021, 18560, 20844, 20569, 25560, 20869, 20900, 18114, 18159, 20916,
+ /* 4965 */ 20953, 21013, 21043, 21067, 18281, 21083, 18574, 21127, 21143, 21181, 20515, 20930, 20883, 20504, 21197,
+ /* 4980 */ 21233, 21258, 20524, 20216, 17405, 21270, 21286, 21302, 20720, 20310, 21345, 21361, 21392, 17590, 17590,
+ /* 4995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5115 */ 17590, 17590, 17590, 17590, 17590, 21952, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436,
+ /* 5130 */ 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 21427, 21855, 18660,
+ /* 5145 */ 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 21479,
+ /* 5160 */ 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527,
+ /* 5175 */ 17258, 36417, 36500, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 28667, 21921,
+ /* 5190 */ 17617, 36472, 18265, 17237, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 21550, 21509, 17481, 19175,
+ /* 5205 */ 17906, 18742, 17960, 36550, 17714, 17976, 21535, 30636, 18692, 18413, 18632, 18081, 18098, 18114, 18159,
+ /* 5220 */ 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838,
+ /* 5235 */ 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590,
+ /* 5250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5310 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5340 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5355 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5370 */ 17590, 17590, 17590, 17590, 17590, 17590, 21773, 18847, 21587, 19027, 19252, 17687, 19027, 17173, 30771,
+ /* 5385 */ 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855,
+ /* 5400 */ 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027,
+ /* 5415 */ 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504,
+ /* 5430 */ 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538,
+ /* 5445 */ 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481,
+ /* 5460 */ 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114,
+ /* 5475 */ 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251,
+ /* 5490 */ 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546,
+ /* 5505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5565 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5595 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5610 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5625 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21611, 18847, 19006, 19027, 19252, 18169, 19027, 17173,
+ /* 5640 */ 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460,
+ /* 5655 */ 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018,
+ /* 5670 */ 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862,
+ /* 5685 */ 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772,
+ /* 5700 */ 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595,
+ /* 5715 */ 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098,
+ /* 5730 */ 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402,
+ /* 5745 */ 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516,
+ /* 5760 */ 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5820 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5850 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5865 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5880 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21728, 19115, 21878, 19027, 19252, 17687, 19027,
+ /* 5895 */ 19310, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937,
+ /* 5910 */ 17379, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669,
+ /* 5925 */ 19018, 19027, 17447, 21906, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585,
+ /* 5940 */ 21862, 17504, 17527, 17258, 36417, 18322, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730,
+ /* 5955 */ 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590,
+ /* 5970 */ 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081,
+ /* 5985 */ 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849,
+ /* 6000 */ 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758,
+ /* 6015 */ 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6075 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21937, 18605, 19006, 19027, 19252, 22018,
+ /* 6150 */ 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346,
+ /* 6165 */ 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311,
+ /* 6180 */ 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559,
+ /* 6195 */ 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703,
+ /* 6210 */ 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874,
+ /* 6225 */ 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632,
+ /* 6240 */ 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384,
+ /* 6255 */ 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393,
+ /* 6270 */ 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6330 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6360 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6375 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21656, 21833, 19006, 19027, 19252,
+ /* 6405 */ 17687, 19027, 21519, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327,
+ /* 6420 */ 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848,
+ /* 6435 */ 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543,
+ /* 6450 */ 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368,
+ /* 6465 */ 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795,
+ /* 6480 */ 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413,
+ /* 6495 */ 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354,
+ /* 6510 */ 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530,
+ /* 6525 */ 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6585 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6600 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6615 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6630 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482,
+ /* 6660 */ 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384,
+ /* 6675 */ 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010,
+ /* 6690 */ 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202,
+ /* 6705 */ 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 32253, 18482, 18482, 18482, 18482, 23052, 27202,
+ /* 6720 */ 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202,
+ /* 6735 */ 27202, 27202, 22171, 22934, 24384, 24384, 24384, 22228, 18482, 18482, 27202, 27202, 35771, 20047, 24385,
+ /* 6750 */ 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466,
+ /* 6765 */ 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981,
+ /* 6780 */ 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6840 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6855 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6870 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6885 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034,
+ /* 6915 */ 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096,
+ /* 6930 */ 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202,
+ /* 6945 */ 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202,
+ /* 6960 */ 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052,
+ /* 6975 */ 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867,
+ /* 6990 */ 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047,
+ /* 7005 */ 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425,
+ /* 7020 */ 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482,
+ /* 7035 */ 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7095 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7110 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7125 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7140 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847,
+ /* 7170 */ 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202,
+ /* 7185 */ 22096, 24384, 24384, 24384, 24384, 31644, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202,
+ /* 7200 */ 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202,
+ /* 7215 */ 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482,
+ /* 7230 */ 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482,
+ /* 7245 */ 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771,
+ /* 7260 */ 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802,
+ /* 7275 */ 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988,
+ /* 7290 */ 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7350 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7365 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7380 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7395 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305,
+ /* 7425 */ 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202,
+ /* 7440 */ 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202,
+ /* 7455 */ 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 33557, 31659, 18482, 18482, 18482, 18482, 18484,
+ /* 7470 */ 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482,
+ /* 7485 */ 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482,
+ /* 7500 */ 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202,
+ /* 7515 */ 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202,
+ /* 7530 */ 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779,
+ /* 7545 */ 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7605 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7620 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7635 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7650 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7680 */ 22305, 18847, 22034, 18482, 27869, 34068, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202,
+ /* 7695 */ 27202, 27202, 22245, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202,
+ /* 7710 */ 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482,
+ /* 7725 */ 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482,
+ /* 7740 */ 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482,
+ /* 7755 */ 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202,
+ /* 7770 */ 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484,
+ /* 7785 */ 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793,
+ /* 7800 */ 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7860 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7875 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7890 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7905 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7920 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7935 */ 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202,
+ /* 7950 */ 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794,
+ /* 7965 */ 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482,
+ /* 7980 */ 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482,
+ /* 7995 */ 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758,
+ /* 8010 */ 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482,
+ /* 8025 */ 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991,
+ /* 8040 */ 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856,
+ /* 8055 */ 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590,
+ /* 8070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8115 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8130 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8160 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8175 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8190 */ 17590, 17590, 22290, 18847, 22034, 18482, 27869, 34957, 24384, 29176, 22062, 18482, 18482, 18482, 18484,
+ /* 8205 */ 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482,
+ /* 8220 */ 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482,
+ /* 8235 */ 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647,
+ /* 8250 */ 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384,
+ /* 8265 */ 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482,
+ /* 8280 */ 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887,
+ /* 8295 */ 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248,
+ /* 8310 */ 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590,
+ /* 8325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8340 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8355 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8370 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8385 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8400 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8415 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8430 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8445 */ 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482,
+ /* 8460 */ 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482,
+ /* 8475 */ 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482,
+ /* 8490 */ 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384,
+ /* 8505 */ 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384,
+ /* 8520 */ 24384, 34436, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481,
+ /* 8535 */ 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870,
+ /* 8550 */ 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794,
+ /* 8565 */ 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590,
+ /* 8580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8595 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8610 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8625 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8640 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8655 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8670 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8685 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8700 */ 17590, 17590, 17590, 17590, 22320, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 27077, 36436, 17330,
+ /* 8715 */ 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676,
+ /* 8730 */ 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909,
+ /* 8745 */ 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258,
+ /* 8760 */ 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617,
+ /* 8775 */ 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906,
+ /* 8790 */ 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 19919, 18081, 18098, 18114, 18159, 18185,
+ /* 8805 */ 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163,
+ /* 8820 */ 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590,
+ /* 8835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8850 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8865 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8880 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8895 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8910 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8925 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8940 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8955 */ 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436,
+ /* 8970 */ 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660,
+ /* 8985 */ 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447,
+ /* 9000 */ 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527,
+ /* 9015 */ 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921,
+ /* 9030 */ 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175,
+ /* 9045 */ 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159,
+ /* 9060 */ 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838,
+ /* 9075 */ 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590,
+ /* 9090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9150 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9210 */ 17590, 17590, 17590, 17590, 17590, 17590, 22275, 22479, 19006, 19027, 19252, 17687, 19027, 19141, 30771,
+ /* 9225 */ 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 22510, 21855,
+ /* 9240 */ 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027,
+ /* 9255 */ 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504,
+ /* 9270 */ 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538,
+ /* 9285 */ 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481,
+ /* 9300 */ 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114,
+ /* 9315 */ 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251,
+ /* 9330 */ 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546,
+ /* 9345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9360 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9375 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9405 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22574, 18847, 22954, 22970, 27597, 22986, 23002, 23033,
+ /* 9480 */ 22062, 18482, 18482, 18482, 23049, 27202, 27202, 27202, 23068, 22096, 24384, 24384, 24384, 23088, 31359,
+ /* 9495 */ 31082, 19693, 18482, 28112, 28225, 19443, 35045, 27202, 27202, 23108, 23139, 23155, 23178, 24384, 24384,
+ /* 9510 */ 23212, 35330, 31659, 23228, 18482, 23256, 23274, 27795, 26712, 23293, 35214, 34879, 33340, 23312, 18235,
+ /* 9525 */ 23359, 32708, 23949, 24384, 23380, 35255, 23429, 18482, 33884, 23408, 23448, 27202, 27202, 23498, 23518,
+ /* 9540 */ 21406, 23541, 24384, 24384, 23570, 26114, 23601, 23623, 18482, 33444, 23651, 32875, 27202, 22171, 18862,
+ /* 9555 */ 23702, 36589, 24384, 18481, 23731, 32601, 27202, 23750, 23768, 20047, 32969, 24367, 25677, 18482, 18483,
+ /* 9570 */ 27202, 27202, 19738, 23870, 23784, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 28217,
+ /* 9585 */ 31795, 23804, 26925, 34916, 23831, 26501, 25793, 23859, 23895, 23482, 30981, 22080, 19438, 27956, 19678,
+ /* 9600 */ 29812, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9615 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9630 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9660 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22589, 18847, 22034, 18482, 27869, 25325, 24384,
+ /* 9735 */ 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384,
+ /* 9750 */ 30621, 18482, 18482, 18482, 18482, 28902, 25794, 27202, 27202, 27202, 34019, 23914, 22148, 24384, 24384,
+ /* 9765 */ 24384, 28393, 23930, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503,
+ /* 9780 */ 24384, 24384, 24384, 24384, 24384, 31154, 26591, 18482, 18482, 18482, 31585, 23965, 27202, 27202, 27202,
+ /* 9795 */ 23986, 22185, 24014, 24384, 24384, 24384, 24033, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171,
+ /* 9810 */ 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482,
+ /* 9825 */ 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847,
+ /* 9840 */ 30990, 27868, 34251, 26504, 24057, 24107, 24132, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956,
+ /* 9855 */ 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9870 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9885 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9915 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22604, 18847, 22034, 19697, 27869, 24166,
+ /* 9990 */ 24384, 24182, 24198, 26600, 18482, 18482, 18484, 24233, 24249, 27202, 27202, 22096, 24268, 24284, 24384,
+ /* 10005 */ 24384, 30621, 19800, 35427, 35999, 32609, 18482, 25794, 24303, 28959, 23752, 27202, 35010, 22148, 24341,
+ /* 10020 */ 32040, 26837, 24383, 31473, 31659, 18482, 18482, 18482, 24784, 18484, 27202, 27202, 27202, 27202, 24401,
+ /* 10035 */ 19503, 24384, 24384, 24384, 24384, 20134, 31154, 18482, 18482, 18482, 27845, 23052, 27202, 27202, 33502,
+ /* 10050 */ 27202, 30764, 21406, 24384, 24384, 22938, 24384, 26114, 18482, 36246, 18482, 27867, 27202, 24423, 27202,
+ /* 10065 */ 22171, 22934, 24384, 24442, 24384, 36762, 28438, 18482, 34466, 34508, 35771, 24461, 24385, 24477, 25677,
+ /* 10080 */ 18482, 36220, 27202, 27202, 24498, 30954, 23715, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296,
+ /* 10095 */ 24521, 30990, 27868, 34251, 30090, 23343, 24546, 19856, 25793, 19779, 30988, 23482, 26152, 22080, 19438,
+ /* 10110 */ 29824, 24562, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10125 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10140 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10170 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22619, 18847, 22034, 25767, 22132,
+ /* 10245 */ 25325, 23162, 29176, 24597, 24091, 23607, 24656, 26122, 24680, 24426, 24696, 28551, 22096, 24731, 24445,
+ /* 10260 */ 24747, 23364, 30621, 18482, 18482, 18482, 18482, 24781, 25794, 27202, 27202, 27202, 34210, 35010, 22148,
+ /* 10275 */ 24384, 24384, 24384, 33259, 31473, 22525, 24087, 24213, 18482, 18482, 34908, 24800, 30419, 27202, 27202,
+ /* 10290 */ 32418, 19503, 29781, 35065, 24384, 24384, 19891, 31154, 24835, 18482, 18482, 24854, 29214, 27202, 27202,
+ /* 10305 */ 32006, 27202, 30764, 35344, 24384, 24384, 31544, 24384, 26114, 33098, 27814, 27002, 27867, 34668, 25625,
+ /* 10320 */ 24871, 22171, 22934, 19214, 34531, 24889, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887,
+ /* 10335 */ 25677, 18482, 33615, 27202, 27202, 24907, 24930, 23554, 30991, 18484, 27202, 31802, 22199, 19466, 23052,
+ /* 10350 */ 23296, 19847, 30877, 31015, 24955, 19859, 24983, 34248, 30871, 25793, 19779, 30988, 23482, 30981, 22080,
+ /* 10365 */ 19438, 24999, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10380 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10395 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10425 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10440 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22634, 18847, 25024, 25040,
+ /* 10500 */ 31293, 25056, 25072, 25088, 22062, 34734, 24217, 36253, 34808, 32637, 25104, 23072, 32848, 22245, 36623,
+ /* 10515 */ 25120, 30679, 27356, 30621, 25136, 26455, 25174, 25208, 22540, 23240, 25224, 25240, 25256, 25306, 25341,
+ /* 10530 */ 25357, 25418, 25446, 25470, 26739, 25522, 31659, 23635, 25576, 27398, 25593, 28592, 25945, 25617, 27202,
+ /* 10545 */ 32546, 27295, 25641, 25850, 25667, 24384, 34758, 25699, 25716, 22552, 27787, 30221, 25756, 25789, 25810,
+ /* 10560 */ 25828, 28333, 28988, 30764, 21493, 33405, 25848, 25866, 25904, 26114, 31227, 26677, 30167, 27867, 25941,
+ /* 10575 */ 25961, 27202, 22171, 22934, 25977, 25997, 24384, 23394, 27775, 25740, 25270, 26013, 26048, 26064, 26104,
+ /* 10590 */ 26138, 26178, 26211, 26230, 26247, 30500, 26380, 26282, 28388, 30991, 33711, 27202, 33645, 26324, 36716,
+ /* 10605 */ 26353, 26374, 35300, 30990, 26396, 26415, 30927, 26358, 33832, 26442, 26471, 26487, 26520, 23482, 33146,
+ /* 10620 */ 26539, 26555, 27956, 31266, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10635 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10650 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10680 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10695 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22649, 18847, 26576,
+ /* 10755 */ 26189, 26616, 25325, 26643, 29176, 22062, 26669, 18482, 18482, 18484, 26693, 27202, 27202, 27202, 22096,
+ /* 10770 */ 26728, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 26782, 25794, 27202, 27202, 27202, 26258,
+ /* 10785 */ 35010, 22148, 24384, 24384, 24384, 21571, 31473, 31659, 18482, 18482, 33949, 18482, 18484, 27202, 27202,
+ /* 10800 */ 25812, 27202, 27202, 19503, 24384, 24384, 24384, 26800, 24384, 31154, 18482, 18482, 18482, 35570, 23052,
+ /* 10815 */ 27202, 27202, 27202, 26817, 30764, 21406, 24384, 24384, 24384, 26836, 26114, 18482, 18482, 18482, 27867,
+ /* 10830 */ 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047,
+ /* 10845 */ 24385, 19887, 25677, 31882, 18483, 35699, 27202, 19738, 26853, 19887, 30991, 18484, 27202, 31802, 19425,
+ /* 10860 */ 19466, 23052, 23296, 26913, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482,
+ /* 10875 */ 24967, 31061, 19438, 26953, 27663, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10890 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10905 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10920 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10935 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10950 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22664, 18847,
+ /* 11010 */ 26990, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202,
+ /* 11025 */ 22096, 24384, 24384, 24384, 24384, 23017, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202,
+ /* 11040 */ 27202, 35010, 27024, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 27047, 18482, 18484, 27202,
+ /* 11055 */ 27202, 27331, 27202, 27202, 27066, 24384, 24384, 29025, 24384, 24384, 19647, 18482, 18482, 18482, 18482,
+ /* 11070 */ 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 33957,
+ /* 11085 */ 27867, 27202, 27202, 27093, 17590, 23998, 24384, 24384, 27114, 27135, 36322, 27153, 27201, 27219, 28359,
+ /* 11100 */ 18229, 34780, 34405, 27235, 35972, 27268, 27293, 27311, 36040, 33984, 20980, 31851, 21453, 30535, 27347,
+ /* 11115 */ 32520, 27372, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988,
+ /* 11130 */ 23482, 30981, 22080, 26337, 30118, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11160 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11175 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11190 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11205 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305,
+ /* 11265 */ 18847, 22034, 27397, 27414, 27436, 27452, 27473, 22062, 18482, 18482, 30171, 18484, 27202, 27202, 27982,
+ /* 11280 */ 27202, 22096, 24384, 24384, 25700, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 34013, 27202, 27202,
+ /* 11295 */ 27202, 27202, 29731, 22148, 24384, 24384, 24384, 24384, 27119, 31659, 27489, 18482, 18482, 18482, 18484,
+ /* 11310 */ 27185, 27202, 27202, 27202, 27202, 19503, 27457, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482,
+ /* 11325 */ 27050, 23052, 27202, 27202, 27202, 32469, 30764, 23993, 24384, 24384, 24384, 34982, 26758, 18482, 18482,
+ /* 11340 */ 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202,
+ /* 11355 */ 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 20796, 27202,
+ /* 11370 */ 29362, 22110, 33940, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779,
+ /* 11385 */ 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11400 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11415 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11430 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11445 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11460 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11520 */ 22679, 18847, 22034, 27508, 27528, 27553, 35182, 27569, 22062, 29693, 26300, 23258, 27585, 24715, 27613,
+ /* 11535 */ 27202, 27648, 22096, 36597, 27698, 24384, 27733, 18877, 18482, 27811, 18482, 27830, 22046, 27865, 32194,
+ /* 11550 */ 27202, 25158, 27885, 27913, 22148, 29458, 24384, 29977, 34392, 26750, 27763, 26889, 18482, 18482, 27252,
+ /* 11565 */ 29886, 27929, 27202, 27202, 27202, 27981, 27998, 28024, 28045, 24384, 24384, 28062, 28081, 28128, 25506,
+ /* 11580 */ 28145, 26088, 28160, 27202, 28173, 24640, 28189, 30764, 31496, 24384, 28205, 34154, 36166, 24939, 28241,
+ /* 11595 */ 28259, 28283, 21463, 33034, 28320, 28349, 17590, 20967, 23092, 28375, 28409, 28095, 28435, 28454, 28474,
+ /* 11610 */ 28509, 28527, 20001, 33682, 25879, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30272, 28267,
+ /* 11625 */ 28546, 28567, 19425, 28583, 23052, 23296, 19847, 19471, 28608, 28653, 31075, 25794, 34248, 19856, 25793,
+ /* 11640 */ 19779, 29644, 35950, 30318, 22080, 19438, 27956, 23123, 28693, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11655 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11670 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11685 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11700 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11715 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11775 */ 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202,
+ /* 11790 */ 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794,
+ /* 11805 */ 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 22494, 18482, 18482, 18482,
+ /* 11820 */ 18482, 18484, 25283, 27202, 27202, 27202, 27202, 19503, 29397, 24384, 24384, 24384, 24384, 19647, 18482,
+ /* 11835 */ 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758,
+ /* 11850 */ 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482,
+ /* 11865 */ 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991,
+ /* 11880 */ 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856,
+ /* 11895 */ 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590,
+ /* 11910 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11925 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11940 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11955 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11970 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12030 */ 17590, 17590, 22694, 18847, 28740, 28775, 28810, 28834, 28850, 28873, 28889, 24142, 28936, 31945, 36329,
+ /* 12045 */ 25290, 28954, 27632, 28975, 29004, 24505, 29020, 25454, 29041, 23017, 27512, 29083, 29103, 30721, 18482,
+ /* 12060 */ 23478, 29123, 24819, 27202, 29148, 28920, 27024, 29166, 23196, 24384, 29192, 35529, 31659, 18482, 18482,
+ /* 12075 */ 25601, 32589, 29211, 27202, 27202, 31434, 30700, 29230, 27066, 24384, 24384, 24384, 29255, 29306, 19647,
+ /* 12090 */ 18482, 33383, 18482, 18482, 23052, 27202, 29333, 27202, 27202, 30764, 23993, 35925, 24384, 24384, 24384,
+ /* 12105 */ 27717, 36123, 18482, 18482, 29350, 29413, 27202, 35642, 17590, 21411, 29432, 24384, 25981, 18481, 33866,
+ /* 12120 */ 18482, 27202, 26967, 27203, 23997, 32729, 19887, 25677, 18482, 26897, 27202, 27202, 29451, 23870, 24354,
+ /* 12135 */ 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 31737, 19859, 25794, 34248,
+ /* 12150 */ 19856, 29474, 29539, 29283, 29581, 29637, 22080, 32533, 29501, 19678, 27944, 17590, 17590, 17590, 17590,
+ /* 12165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12285 */ 17590, 17590, 17590, 22709, 18847, 22034, 29660, 29512, 25325, 33242, 29176, 29682, 27245, 18482, 29709,
+ /* 12300 */ 33286, 26974, 27202, 29725, 29747, 22096, 19221, 24384, 32702, 29772, 18877, 26784, 33892, 28458, 18482,
+ /* 12315 */ 18482, 25794, 29797, 27202, 29840, 27202, 35010, 22148, 35817, 24384, 29859, 24384, 24017, 36756, 25192,
+ /* 12330 */ 18482, 18482, 29879, 18484, 27202, 29902, 27202, 26032, 27202, 29925, 24384, 29960, 24384, 33594, 24384,
+ /* 12345 */ 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29239, 29993, 24384, 24384, 24384,
+ /* 12360 */ 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 31665,
+ /* 12375 */ 18482, 18482, 19603, 27202, 27203, 23997, 30013, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870,
+ /* 12390 */ 19887, 30991, 18484, 27202, 31802, 19949, 19466, 36661, 19563, 19847, 30029, 30128, 30062, 19859, 25794,
+ /* 12405 */ 30078, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 30106, 17590, 17590, 17590,
+ /* 12420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12540 */ 17590, 17590, 17590, 17590, 22724, 18847, 30152, 30187, 30237, 30288, 30304, 30344, 22062, 35616, 32797,
+ /* 12555 */ 25773, 18484, 29909, 34096, 26820, 27202, 22096, 24914, 23189, 29195, 24384, 18877, 34444, 30360, 18482,
+ /* 12570 */ 18482, 18482, 23413, 24707, 27202, 27202, 27202, 35010, 30378, 34990, 24384, 24384, 24384, 24017, 29554,
+ /* 12585 */ 18482, 18482, 27137, 18482, 31281, 30394, 27202, 27202, 30413, 30566, 19503, 30435, 24384, 24384, 29969,
+ /* 12600 */ 35678, 19647, 28759, 30455, 35459, 35606, 23052, 28724, 30490, 30525, 30560, 30764, 23993, 20123, 30582,
+ /* 12615 */ 30606, 30675, 26291, 33426, 28938, 27682, 30695, 23675, 33466, 28493, 17590, 23944, 20405, 34338, 20997,
+ /* 12630 */ 32331, 26308, 30716, 30737, 24315, 30756, 21563, 36372, 30787, 26653, 24611, 33177, 32448, 30814, 31804,
+ /* 12645 */ 25430, 25917, 26523, 18484, 28818, 31802, 29269, 19466, 28297, 34240, 23815, 26076, 30842, 30858, 32115,
+ /* 12660 */ 30893, 30915, 32757, 25793, 30943, 30988, 23482, 30981, 30970, 31007, 27956, 19678, 29489, 17590, 17590,
+ /* 12675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12795 */ 17590, 17590, 17590, 17590, 17590, 22739, 18847, 31031, 31047, 32397, 31098, 31114, 31170, 22062, 18482,
+ /* 12810 */ 29565, 35577, 36725, 27202, 33216, 31186, 24407, 22096, 24384, 20142, 31202, 34301, 27748, 31218, 33388,
+ /* 12825 */ 27166, 18482, 29087, 27277, 27202, 31251, 31309, 27202, 31328, 31344, 24384, 31375, 31391, 24384, 31410,
+ /* 12840 */ 31659, 18482, 36130, 32801, 18482, 18484, 27202, 27202, 31433, 31450, 27202, 19503, 24384, 24384, 31470,
+ /* 12855 */ 33588, 24384, 32977, 18482, 18482, 18482, 18482, 30038, 27202, 27202, 27202, 27202, 31489, 32244, 24384,
+ /* 12870 */ 24384, 24384, 24384, 31512, 18482, 28755, 18482, 24634, 35732, 27202, 27202, 28637, 31538, 35788, 24384,
+ /* 12885 */ 24384, 19337, 31986, 18482, 33208, 25316, 27203, 29997, 29863, 19887, 25677, 18482, 18483, 27202, 27202,
+ /* 12900 */ 19738, 31560, 19887, 31601, 32369, 33316, 30136, 31629, 19972, 31681, 31726, 31753, 31781, 30046, 31820,
+ /* 12915 */ 31847, 25794, 34282, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 31867, 30252, 17590,
+ /* 12930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13050 */ 17590, 17590, 17590, 17590, 17590, 17590, 22754, 18847, 22034, 18909, 30474, 31902, 24287, 31918, 31934,
+ /* 13065 */ 32767, 35262, 27008, 29621, 34103, 19820, 29416, 33323, 22096, 27031, 30439, 29435, 28857, 29596, 18482,
+ /* 13080 */ 18482, 18482, 31961, 18482, 25794, 27202, 27202, 35038, 27202, 35010, 22148, 24384, 24384, 29389, 24384,
+ /* 13095 */ 24017, 31979, 18482, 26937, 18482, 18482, 18484, 27202, 31454, 32002, 27202, 27202, 32022, 24384, 33015,
+ /* 13110 */ 32056, 24384, 24384, 33690, 18482, 18482, 33119, 18482, 23052, 27202, 27202, 27624, 27202, 29756, 32078,
+ /* 13125 */ 24384, 24384, 34332, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 36691, 23998, 24384,
+ /* 13140 */ 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202,
+ /* 13155 */ 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 31710, 22155, 33181, 24252, 32103, 30990, 27868,
+ /* 13170 */ 34251, 19859, 25794, 34248, 30265, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944,
+ /* 13185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 32138, 32166, 32186, 30826, 33252, 29067,
+ /* 13320 */ 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 23585,
+ /* 13335 */ 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 32210, 24384, 24384, 24384,
+ /* 13350 */ 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 32233, 24384,
+ /* 13365 */ 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764,
+ /* 13380 */ 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998,
+ /* 13395 */ 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 33857, 18483,
+ /* 13410 */ 36057, 27202, 19738, 35289, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990,
+ /* 13425 */ 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678,
+ /* 13440 */ 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22769, 18847, 32269, 31613, 34604, 32285, 32301,
+ /* 13575 */ 32351, 22062, 18482, 32367, 19354, 32385, 27202, 32413, 27098, 32434, 22096, 24384, 32485, 20052, 32506,
+ /* 13590 */ 18877, 25396, 23734, 18482, 18482, 32562, 32625, 27202, 32653, 27202, 23664, 32673, 32689, 24384, 32724,
+ /* 13605 */ 24384, 25888, 32745, 34706, 18482, 27381, 32783, 24577, 24838, 32817, 24873, 32838, 32864, 27202, 32899,
+ /* 13620 */ 32934, 24384, 32957, 29317, 24384, 30798, 26214, 27678, 33875, 18482, 23052, 36352, 27202, 32993, 27202,
+ /* 13635 */ 30764, 23993, 32087, 24384, 33013, 24384, 35853, 18482, 18482, 30362, 27965, 27202, 27202, 33754, 17590,
+ /* 13650 */ 20112, 24384, 24384, 34576, 20792, 18482, 18482, 33031, 27202, 27203, 36159, 24385, 19887, 25677, 18482,
+ /* 13665 */ 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 34554, 24150, 33050, 33080,
+ /* 13680 */ 33114, 27868, 34251, 23843, 26560, 31696, 19856, 25793, 19779, 30988, 23482, 30981, 33135, 22123, 27956,
+ /* 13695 */ 23463, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22784, 18847, 33162, 28106, 33197, 25325,
+ /* 13830 */ 33232, 29176, 22062, 33275, 35433, 18482, 18484, 33302, 26399, 33339, 27202, 22096, 33356, 28065, 33404,
+ /* 13845 */ 24384, 18877, 22229, 18482, 33421, 18482, 18482, 33442, 33460, 24811, 27202, 27202, 26627, 22148, 24758,
+ /* 13860 */ 35190, 24384, 24384, 25925, 29611, 18482, 18482, 29290, 25186, 33482, 33501, 27202, 27202, 33518, 36276,
+ /* 13875 */ 19503, 33554, 24384, 24384, 33573, 32490, 19647, 18482, 18482, 31235, 33610, 23052, 27202, 27202, 33631,
+ /* 13890 */ 27202, 30764, 23993, 24384, 24384, 33670, 24384, 26862, 27492, 18482, 33706, 27867, 32883, 34639, 27202,
+ /* 13905 */ 17590, 32036, 24765, 23788, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 33727, 36097, 19887, 25677,
+ /* 13920 */ 18482, 23334, 27202, 29150, 19738, 23870, 35357, 30328, 18484, 33748, 34675, 33770, 19466, 34050, 33824,
+ /* 13935 */ 31831, 30990, 27868, 34251, 33848, 28913, 33908, 19856, 30469, 33973, 25385, 36033, 34000, 22080, 19438,
+ /* 13950 */ 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22799, 18847, 34035, 32576, 34084,
+ /* 14085 */ 34119, 34135, 34170, 34186, 32150, 36005, 31522, 31886, 34202, 34226, 34267, 29334, 34317, 34354, 34378,
+ /* 14100 */ 34421, 26801, 18877, 26195, 29666, 25402, 18482, 35091, 25794, 34460, 34482, 34504, 25832, 35010, 22148,
+ /* 14115 */ 34524, 34547, 34570, 19623, 24017, 36654, 35111, 24664, 18482, 32335, 34592, 31312, 34620, 34636, 27202,
+ /* 14130 */ 34655, 34691, 28046, 34750, 34774, 24384, 33785, 19647, 34796, 32170, 34844, 24581, 33485, 26704, 34828,
+ /* 14145 */ 34860, 35493, 29132, 36704, 33800, 35368, 32941, 34146, 26758, 34895, 18482, 18482, 34932, 34948, 27202,
+ /* 14160 */ 32997, 17590, 29944, 34973, 24384, 36296, 25500, 30202, 35875, 35006, 35026, 26266, 20396, 31146, 35061,
+ /* 14175 */ 35081, 35127, 24623, 28484, 27897, 19738, 35143, 35170, 26162, 28794, 35206, 35230, 33064, 35245, 23052,
+ /* 14190 */ 23296, 29054, 30990, 27868, 34251, 19859, 25794, 34248, 24530, 25147, 35278, 31765, 35316, 33370, 22080,
+ /* 14205 */ 19438, 27956, 24072, 28623, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14310 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22814, 18847, 22034, 34720,
+ /* 14340 */ 34059, 35384, 20989, 35400, 35416, 35449, 18482, 18482, 23432, 35475, 27202, 27202, 27202, 35509, 31127,
+ /* 14355 */ 24384, 24384, 24384, 35545, 18482, 26871, 35101, 35593, 24855, 25794, 30397, 23502, 26024, 35639, 35658,
+ /* 14370 */ 22148, 19541, 19583, 30590, 35674, 27709, 35560, 29107, 18482, 18482, 18482, 18484, 27202, 35694, 27202,
+ /* 14385 */ 27202, 27202, 35715, 24384, 36580, 24384, 24384, 24384, 19647, 30215, 18482, 18482, 18482, 23052, 35731,
+ /* 14400 */ 27202, 27202, 27202, 27537, 22904, 24384, 24384, 24384, 24384, 23879, 35748, 18482, 18482, 25008, 35770,
+ /* 14415 */ 27202, 27202, 17590, 20031, 35787, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385,
+ /* 14430 */ 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 23898, 18484, 34488, 31802, 25371, 19466,
+ /* 14445 */ 23052, 23296, 26426, 30990, 27868, 34251, 19859, 25794, 35804, 19856, 27178, 35833, 33092, 23482, 30981,
+ /* 14460 */ 22080, 22212, 28705, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14565 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22829, 18847, 22034,
+ /* 14595 */ 35869, 28716, 25325, 31137, 29176, 22062, 26766, 18482, 22558, 18484, 23970, 27202, 29843, 27202, 22096,
+ /* 14610 */ 33732, 24384, 31394, 24384, 18877, 18482, 18482, 26880, 18482, 18482, 25794, 27202, 30740, 27202, 27202,
+ /* 14625 */ 35010, 22148, 24384, 24891, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202,
+ /* 14640 */ 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052,
+ /* 14655 */ 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867,
+ /* 14670 */ 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997,
+ /* 14685 */ 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425,
+ /* 14700 */ 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482,
+ /* 14715 */ 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14820 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22844, 18847,
+ /* 14850 */ 22034, 27849, 27869, 35891, 24384, 35907, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202,
+ /* 14865 */ 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202,
+ /* 14880 */ 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31575, 18482, 18482, 18482, 18482, 26231, 27202,
+ /* 14895 */ 27202, 27202, 27202, 27202, 19503, 35923, 24384, 24384, 24384, 24384, 19647, 18482, 28129, 18482, 18482,
+ /* 14910 */ 35941, 27202, 32822, 27202, 32657, 30764, 23993, 24384, 32217, 24384, 32062, 26758, 18482, 18482, 18482,
+ /* 14925 */ 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203,
+ /* 14940 */ 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802,
+ /* 14955 */ 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988,
+ /* 14970 */ 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15075 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22859,
+ /* 15105 */ 18847, 22034, 35966, 34820, 25325, 33931, 29176, 35988, 18482, 23277, 18482, 36021, 27202, 27202, 36056,
+ /* 15120 */ 36073, 22096, 24384, 24384, 36096, 33921, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202,
+ /* 15135 */ 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 36113, 18482, 25577, 18482, 18482, 18484,
+ /* 15150 */ 27202, 27202, 27324, 27202, 27202, 36146, 24384, 24384, 34362, 24384, 24384, 19647, 28243, 18482, 18482,
+ /* 15165 */ 18482, 23052, 30899, 27202, 27202, 27202, 23686, 23993, 33808, 24384, 24384, 24384, 26758, 18482, 18482,
+ /* 15180 */ 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202,
+ /* 15195 */ 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202,
+ /* 15210 */ 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779,
+ /* 15225 */ 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15330 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15360 */ 22305, 18847, 22034, 19373, 27869, 36182, 24384, 36198, 22062, 18482, 18482, 18482, 18049, 27202, 27202,
+ /* 15375 */ 27202, 35485, 22096, 24384, 24384, 24384, 29371, 18877, 18482, 36214, 18482, 28788, 18482, 25794, 34872,
+ /* 15390 */ 27202, 27420, 27202, 35010, 22148, 29380, 24384, 24482, 24384, 24017, 31659, 18482, 36236, 18482, 18482,
+ /* 15405 */ 18484, 27202, 36080, 27202, 27202, 27202, 19503, 24384, 28029, 24384, 24384, 24384, 19647, 18482, 18482,
+ /* 15420 */ 32122, 18482, 35754, 27202, 27202, 36269, 27202, 33531, 23993, 24384, 24384, 36292, 24384, 36312, 18482,
+ /* 15435 */ 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 25730, 18482, 18482, 36345,
+ /* 15450 */ 27202, 27203, 19203, 24385, 19887, 25677, 31963, 18483, 27202, 32462, 19738, 23870, 36368, 30991, 18484,
+ /* 15465 */ 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793,
+ /* 15480 */ 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15585 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15600 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15615 */ 17590, 22350, 18847, 36388, 19027, 19252, 17687, 36433, 17173, 17595, 36436, 17330, 17349, 18940, 17189,
+ /* 15630 */ 17208, 17281, 17675, 36452, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008,
+ /* 15645 */ 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251,
+ /* 15660 */ 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915,
+ /* 15675 */ 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530,
+ /* 15690 */ 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550,
+ /* 15705 */ 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251,
+ /* 15720 */ 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858,
+ /* 15735 */ 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590,
+ /* 15750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15840 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15855 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15870 */ 17590, 17590, 22335, 18847, 19006, 19027, 19252, 17687, 19027, 21712, 30771, 36436, 17330, 17349, 18940,
+ /* 15885 */ 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265,
+ /* 15900 */ 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520,
+ /* 15915 */ 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890,
+ /* 15930 */ 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265,
+ /* 15945 */ 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960,
+ /* 15960 */ 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094,
+ /* 15975 */ 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400,
+ /* 15990 */ 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590,
+ /* 16005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16095 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16110 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16125 */ 17590, 17590, 17590, 21788, 18847, 36488, 19027, 19252, 17687, 19027, 17173, 17779, 36436, 17330, 17349,
+ /* 16140 */ 18940, 17189, 17208, 17281, 17675, 17810, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025,
+ /* 16155 */ 17265, 22008, 17292, 17421, 21157, 17192, 21165, 21997, 17311, 18669, 19018, 19027, 17447, 32909, 17497,
+ /* 16170 */ 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417,
+ /* 16185 */ 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472,
+ /* 16200 */ 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742,
+ /* 16215 */ 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717,
+ /* 16230 */ 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650,
+ /* 16245 */ 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590,
+ /* 16260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16350 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16365 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16380 */ 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330,
+ /* 16395 */ 17349, 18940, 17189, 17208, 17281, 17675, 36516, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676,
+ /* 16410 */ 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909,
+ /* 16425 */ 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258,
+ /* 16440 */ 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617,
+ /* 16455 */ 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906,
+ /* 16470 */ 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185,
+ /* 16485 */ 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163,
+ /* 16500 */ 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590,
+ /* 16515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16605 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16620 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16635 */ 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19326, 18482, 27869, 30764, 24384, 29176, 28008, 18482,
+ /* 16650 */ 18482, 18482, 18484, 27202, 27202, 27202, 27202, 36566, 24384, 24384, 24384, 24384, 22919, 18482, 18482,
+ /* 16665 */ 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 36613, 24384, 24384, 24384, 24384, 24017,
+ /* 16680 */ 18892, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384,
+ /* 16695 */ 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384,
+ /* 16710 */ 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384,
+ /* 16725 */ 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202,
+ /* 16740 */ 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251,
+ /* 16755 */ 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590,
+ /* 16770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16860 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16875 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16890 */ 17590, 17590, 17590, 17590, 17590, 17590, 36639, 36677, 18731, 19027, 19252, 17687, 19027, 17454, 17595,
+ /* 16905 */ 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17223, 17308, 17327, 17346, 18937, 36741, 21855,
+ /* 16920 */ 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027,
+ /* 16935 */ 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504,
+ /* 16950 */ 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538,
+ /* 16965 */ 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481,
+ /* 16980 */ 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114,
+ /* 16995 */ 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251,
+ /* 17010 */ 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546,
+ /* 17025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17115 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17130 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538,
+ /* 17162 */ 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592,
+ /* 17174 */ 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352,
+ /* 17191 */ 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17202 */ 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744,
+ /* 17213 */ 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0,
+ /* 17226 */ 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592,
+ /* 17246 */ 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088,
+ /* 17257 */ 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17268 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592,
+ /* 17279 */ 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744,
+ /* 17290 */ 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17301 */ 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2158592, 2404352, 2412544, 2158592,
+ /* 17312 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17323 */ 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17334 */ 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280,
+ /* 17345 */ 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592,
+ /* 17356 */ 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0,
+ /* 17371 */ 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0,
+ /* 17395 */ 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744,
+ /* 17406 */ 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877,
+ /* 17419 */ 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920,
+ /* 17431 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 3104768,
+ /* 17448 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17459 */ 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0,
+ /* 17477 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592,
+ /* 17488 */ 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312,
+ /* 17499 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592,
+ /* 17510 */ 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592,
+ /* 17521 */ 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17532 */ 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664,
+ /* 17543 */ 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17554 */ 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744,
+ /* 17565 */ 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0,
+ /* 17578 */ 0, 167936, 0, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 17600 */ 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592,
+ /* 17615 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632,
+ /* 17626 */ 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592,
+ /* 17637 */ 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744,
+ /* 17648 */ 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744,
+ /* 17662 */ 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17673 */ 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744,
+ /* 17684 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0,
+ /* 17699 */ 0, 2162688, 0, 0, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200,
+ /* 17712 */ 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984,
+ /* 17723 */ 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2207744, 2207744, 2207744, 2207744,
+ /* 17734 */ 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744,
+ /* 17745 */ 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344,
+ /* 17756 */ 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288,
+ /* 17769 */ 2158592, 2158592, 1508, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0,
+ /* 17785 */ 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744,
+ /* 17800 */ 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0,
+ /* 17813 */ 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592,
+ /* 17831 */ 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592,
+ /* 17842 */ 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592,
+ /* 17857 */ 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592,
+ /* 17870 */ 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808,
+ /* 17881 */ 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032,
+ /* 17892 */ 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592,
+ /* 17903 */ 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096,
+ /* 17914 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592,
+ /* 17925 */ 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17936 */ 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744,
+ /* 17947 */ 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2523136, 2527232, 2158592,
+ /* 17963 */ 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17974 */ 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17985 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0,
+ /* 18004 */ 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320,
+ /* 18019 */ 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744,
+ /* 18031 */ 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45,
+ /* 18052 */ 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232,
+ /* 18071 */ 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560,
+ /* 18083 */ 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688,
+ /* 18094 */ 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18106 */ 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744,
+ /* 18117 */ 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744,
+ /* 18128 */ 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592,
+ /* 18147 */ 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592,
+ /* 18159 */ 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744,
+ /* 18170 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2207744,
+ /* 18186 */ 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736,
+ /* 18197 */ 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0,
+ /* 18214 */ 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536,
+ /* 18226 */ 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97,
+ /* 18248 */ 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592,
+ /* 18261 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592,
+ /* 18272 */ 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744,
+ /* 18283 */ 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304,
+ /* 18294 */ 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592,
+ /* 18305 */ 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744,
+ /* 18316 */ 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18327 */ 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272,
+ /* 18343 */ 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424,
+ /* 18354 */ 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056,
+ /* 18365 */ 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152,
+ /* 18376 */ 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616,
+ /* 18387 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592,
+ /* 18398 */ 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592,
+ /* 18409 */ 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792,
+ /* 18423 */ 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744,
+ /* 18434 */ 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928,
+ /* 18445 */ 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560,
+ /* 18458 */ 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0,
+ /* 18481 */ 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 3006464, 2383872, 0, 2020,
+ /* 18504 */ 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824,
+ /* 18515 */ 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0,
+ /* 18529 */ 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744,
+ /* 18540 */ 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592,
+ /* 18554 */ 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877,
+ /* 18569 */ 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877,
+ /* 18582 */ 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242,
+ /* 18598 */ 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27,
+ /* 18617 */ 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 18636 */ 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0,
+ /* 18649 */ 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18665 */ 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592,
+ /* 18676 */ 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18687 */ 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232,
+ /* 18698 */ 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24,
+ /* 18713 */ 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536,
+ /* 18728 */ 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 18747 */ 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592,
+ /* 18758 */ 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592,
+ /* 18771 */ 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347,
+ /* 18786 */ 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0,
+ /* 18810 */ 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928,
+ /* 18824 */ 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27,
+ /* 18838 */ 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27,
+ /* 18859 */ 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0,
+ /* 18885 */ 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45,
+ /* 18911 */ 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0,
+ /* 18934 */ 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592,
+ /* 18946 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0,
+ /* 18959 */ 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080,
+ /* 18979 */ 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 18997 */ 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0,
+ /* 19011 */ 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472,
+ /* 19025 */ 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 19036 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143,
+ /* 19050 */ 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032,
+ /* 19067 */ 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592,
+ /* 19082 */ 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124,
+ /* 19097 */ 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931,
+ /* 19115 */ 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0,
+ /* 19137 */ 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0,
+ /* 19150 */ 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592,
+ /* 19172 */ 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592,
+ /* 19183 */ 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744,
+ /* 19194 */ 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97,
+ /* 19219 */ 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0,
+ /* 19244 */ 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 19259 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24,
+ /* 19273 */ 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24,
+ /* 19294 */ 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592,
+ /* 19311 */ 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242,
+ /* 19328 */ 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45,
+ /* 19353 */ 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45,
+ /* 19378 */ 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 19404 */ 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0,
+ /* 19424 */ 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67,
+ /* 19451 */ 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45,
+ /* 19476 */ 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 19500 */ 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877,
+ /* 19524 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 19535 */ 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857,
+ /* 19556 */ 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97,
+ /* 19581 */ 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67,
+ /* 19606 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 19631 */ 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0,
+ /* 19657 */ 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97,
+ /* 19684 */ 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189,
+ /* 19710 */ 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67,
+ /* 19734 */ 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97,
+ /* 19759 */ 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97,
+ /* 19784 */ 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 19811 */ 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67,
+ /* 19836 */ 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97,
+ /* 19864 */ 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0,
+ /* 19891 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 0, 94242, 0, 0, 0, 2211840, 102439, 0,
+ /* 19915 */ 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776,
+ /* 19928 */ 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280,
+ /* 19943 */ 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 57889, 547,
+ /* 19967 */ 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67,
+ /* 19993 */ 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97,
+ /* 20017 */ 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97,
+ /* 20043 */ 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97,
+ /* 20068 */ 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884,
+ /* 20086 */ 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0,
+ /* 20105 */ 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97,
+ /* 20131 */ 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97,
+ /* 20155 */ 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730,
+ /* 20173 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730,
+ /* 20184 */ 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730,
+ /* 20195 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730,
+ /* 20206 */ 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730,
+ /* 20217 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20228 */ 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286,
+ /* 20246 */ 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 20257 */ 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877,
+ /* 20274 */ 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 20285 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341,
+ /* 20296 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645,
+ /* 20307 */ 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730,
+ /* 20319 */ 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216,
+ /* 20330 */ 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2785565, 2158877,
+ /* 20341 */ 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877,
+ /* 20352 */ 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877,
+ /* 20363 */ 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20374 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877,
+ /* 20385 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0,
+ /* 20398 */ 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354,
+ /* 20422 */ 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730,
+ /* 20433 */ 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730,
+ /* 20444 */ 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730,
+ /* 20455 */ 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730,
+ /* 20466 */ 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730,
+ /* 20477 */ 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20488 */ 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744,
+ /* 20499 */ 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877,
+ /* 20510 */ 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877,
+ /* 20525 */ 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730,
+ /* 20538 */ 2158730, 2572426, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 20549 */ 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613,
+ /* 20560 */ 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877,
+ /* 20571 */ 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877,
+ /* 20583 */ 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20594 */ 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730,
+ /* 20605 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20616 */ 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730,
+ /* 20627 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730,
+ /* 20638 */ 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20649 */ 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442,
+ /* 20660 */ 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20671 */ 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2158877, 2433309, 2158877,
+ /* 20682 */ 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877,
+ /* 20693 */ 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877,
+ /* 20704 */ 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730,
+ /* 20715 */ 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752,
+ /* 20726 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730,
+ /* 20739 */ 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744,
+ /* 20750 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2707741, 2732317,
+ /* 20764 */ 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877,
+ /* 20775 */ 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45,
+ /* 20797 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877,
+ /* 20817 */ 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357,
+ /* 20828 */ 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20839 */ 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517,
+ /* 20850 */ 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18,
+ /* 20864 */ 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730,
+ /* 20875 */ 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730,
+ /* 20886 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20897 */ 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20908 */ 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744,
+ /* 20919 */ 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693,
+ /* 20930 */ 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20941 */ 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20952 */ 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821,
+ /* 20964 */ 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97,
+ /* 20986 */ 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97,
+ /* 21010 */ 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 21024 */ 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877,
+ /* 21035 */ 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205,
+ /* 21046 */ 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 21057 */ 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866,
+ /* 21068 */ 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730,
+ /* 21079 */ 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744,
+ /* 21090 */ 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685,
+ /* 21101 */ 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730,
+ /* 21114 */ 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730,
+ /* 21125 */ 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629,
+ /* 21136 */ 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730,
+ /* 21147 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744,
+ /* 21158 */ 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744,
+ /* 21169 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2207744, 2535424,
+ /* 21183 */ 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056,
+ /* 21194 */ 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730,
+ /* 21206 */ 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968,
+ /* 21217 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 21228 */ 2207744, 0, 542, 0, 544, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176,
+ /* 21242 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744,
+ /* 21259 */ 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877,
+ /* 21272 */ 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730,
+ /* 21283 */ 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672,
+ /* 21294 */ 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877,
+ /* 21307 */ 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730,
+ /* 21319 */ 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730,
+ /* 21330 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 21341 */ 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749,
+ /* 21354 */ 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501,
+ /* 21367 */ 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930,
+ /* 21380 */ 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 21391 */ 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642,
+ /* 21404 */ 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592,
+ /* 21428 */ 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139,
+ /* 21453 */ 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67,
+ /* 21478 */ 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 21490 */ 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0,
+ /* 21513 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 21524 */ 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744,
+ /* 21540 */ 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0,
+ /* 21554 */ 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97,
+ /* 21581 */ 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 21603 */ 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27,
+ /* 21617 */ 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242,
+ /* 21634 */ 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538,
+ /* 21652 */ 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976,
+ /* 21672 */ 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0,
+ /* 21691 */ 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592,
+ /* 21711 */ 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27,
+ /* 21727 */ 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18,
+ /* 21745 */ 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24,
+ /* 21763 */ 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0,
+ /* 21782 */ 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976,
+ /* 21804 */ 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24,
+ /* 21823 */ 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27,
+ /* 21844 */ 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592,
+ /* 21861 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216,
+ /* 21872 */ 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0,
+ /* 21887 */ 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21905 */ 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 21921 */ 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 21932 */ 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439,
+ /* 21947 */ 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0,
+ /* 21966 */ 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18,
+ /* 21984 */ 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0,
+ /* 22004 */ 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744,
+ /* 22015 */ 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0,
+ /* 22030 */ 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718,
+ /* 22052 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45,
+ /* 22077 */ 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564,
+ /* 22100 */ 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97,
+ /* 22124 */ 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889,
+ /* 22149 */ 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472,
+ /* 22173 */ 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0,
+ /* 22202 */ 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033,
+ /* 22228 */ 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0,
+ /* 22251 */ 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790,
+ /* 22275 */ 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884,
+ /* 22293 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27,
+ /* 22311 */ 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0,
+ /* 22329 */ 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538,
+ /* 22346 */ 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0,
+ /* 22364 */ 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976,
+ /* 22381 */ 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078,
+ /* 22399 */ 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127,
+ /* 22423 */ 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877,
+ /* 22439 */ 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22450 */ 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22461 */ 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22472 */ 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24,
+ /* 22487 */ 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592,
+ /* 22511 */ 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45,
+ /* 22537 */ 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45,
+ /* 22562 */ 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22583 */ 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22600 */ 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101,
+ /* 22619 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884,
+ /* 22637 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27,
+ /* 22655 */ 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22673 */ 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22690 */ 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107,
+ /* 22709 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884,
+ /* 22727 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27,
+ /* 22745 */ 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22763 */ 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22780 */ 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113,
+ /* 22799 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884,
+ /* 22817 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27,
+ /* 22835 */ 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22853 */ 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22870 */ 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820,
+ /* 22887 */ 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0,
+ /* 22911 */ 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0,
+ /* 22938 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0,
+ /* 22963 */ 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45,
+ /* 22985 */ 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97,
+ /* 23008 */ 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646,
+ /* 23033 */ 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 23058 */ 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23084 */ 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793,
+ /* 23109 */ 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0,
+ /* 23136 */ 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074,
+ /* 23159 */ 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97,
+ /* 23184 */ 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97,
+ /* 23210 */ 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45,
+ /* 23235 */ 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45,
+ /* 23260 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 23286 */ 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97,
+ /* 23312 */ 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45,
+ /* 23335 */ 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67,
+ /* 23359 */ 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97,
+ /* 23384 */ 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45,
+ /* 23410 */ 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45,
+ /* 23435 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23461 */ 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67,
+ /* 23487 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23513 */ 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592,
+ /* 23538 */ 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97,
+ /* 23560 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373,
+ /* 23585 */ 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45,
+ /* 23610 */ 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407,
+ /* 23635 */ 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67,
+ /* 23660 */ 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67,
+ /* 23685 */ 1446, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 97, 1491, 97, 97, 97, 97, 97, 97,
+ /* 23710 */ 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45,
+ /* 23735 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23761 */ 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97,
+ /* 23785 */ 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97,
+ /* 23809 */ 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67,
+ /* 23836 */ 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67,
+ /* 23862 */ 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45,
+ /* 23889 */ 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747,
+ /* 23914 */ 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97,
+ /* 23938 */ 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97,
+ /* 23964 */ 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294,
+ /* 23989 */ 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324,
+ /* 24017 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45,
+ /* 24044 */ 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67,
+ /* 24069 */ 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45,
+ /* 24094 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0,
+ /* 24120 */ 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45,
+ /* 24145 */ 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67,
+ /* 24170 */ 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24,
+ /* 24194 */ 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45,
+ /* 24218 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 24243 */ 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97,
+ /* 24268 */ 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97,
+ /* 24293 */ 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67,
+ /* 24319 */ 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 97, 97,
+ /* 24343 */ 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97,
+ /* 24369 */ 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 24394 */ 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67,
+ /* 24419 */ 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97,
+ /* 24444 */ 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97,
+ /* 24469 */ 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885,
+ /* 24494 */ 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97,
+ /* 24519 */ 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45,
+ /* 24545 */ 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45,
+ /* 24570 */ 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45,
+ /* 24595 */ 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45,
+ /* 24619 */ 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67,
+ /* 24643 */ 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45,
+ /* 24668 */ 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 24694 */ 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67,
+ /* 24719 */ 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 24745 */ 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97,
+ /* 24770 */ 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 24796 */ 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67,
+ /* 24821 */ 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 24847 */ 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67,
+ /* 24872 */ 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97,
+ /* 24897 */ 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 24923 */ 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45,
+ /* 24949 */ 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97,
+ /* 24976 */ 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97,
+ /* 25001 */ 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242,
+ /* 25026 */ 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180,
+ /* 25049 */ 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809,
+ /* 25071 */ 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0,
+ /* 25095 */ 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499,
+ /* 25120 */ 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45,
+ /* 25145 */ 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788,
+ /* 25170 */ 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45,
+ /* 25195 */ 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45,
+ /* 25220 */ 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765,
+ /* 25245 */ 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789,
+ /* 25269 */ 790, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67,
+ /* 25294 */ 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67,
+ /* 25319 */ 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 810,
+ /* 25343 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833,
+ /* 25365 */ 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97,
+ /* 25391 */ 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694,
+ /* 25416 */ 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97,
+ /* 25441 */ 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97,
+ /* 25466 */ 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0,
+ /* 25490 */ 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 25516 */ 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877,
+ /* 25541 */ 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 25552 */ 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877,
+ /* 25563 */ 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730,
+ /* 25575 */ 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45,
+ /* 25599 */ 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67,
+ /* 25624 */ 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0,
+ /* 25648 */ 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113,
+ /* 25668 */ 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 25694 */ 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97,
+ /* 25719 */ 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 25745 */ 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45,
+ /* 25768 */ 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45,
+ /* 25793 */ 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67,
+ /* 25819 */ 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 25844 */ 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97,
+ /* 25869 */ 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97,
+ /* 25894 */ 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97,
+ /* 25919 */ 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440,
+ /* 25945 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67,
+ /* 25970 */ 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525,
+ /* 25995 */ 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67,
+ /* 26020 */ 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67,
+ /* 26045 */ 1060, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0,
+ /* 26067 */ 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45,
+ /* 26092 */ 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97,
+ /* 26116 */ 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0,
+ /* 26142 */ 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45,
+ /* 26167 */ 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45,
+ /* 26191 */ 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45,
+ /* 26216 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 26241 */ 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 800,
+ /* 26266 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97,
+ /* 26292 */ 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45,
+ /* 26318 */ 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45,
+ /* 26344 */ 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67,
+ /* 26368 */ 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97,
+ /* 26393 */ 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97,
+ /* 26418 */ 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0,
+ /* 26446 */ 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678,
+ /* 26470 */ 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967,
+ /* 26492 */ 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45,
+ /* 26518 */ 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011,
+ /* 26543 */ 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67,
+ /* 26567 */ 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45,
+ /* 26590 */ 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45,
+ /* 26614 */ 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67,
+ /* 26639 */ 25398, 542, 13112, 544, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45,
+ /* 26663 */ 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45,
+ /* 26687 */ 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1245,
+ /* 26712 */ 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 97, 97, 97, 97, 559, 97, 97, 97, 97,
+ /* 26737 */ 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97,
+ /* 26762 */ 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45,
+ /* 26789 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 26815 */ 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97,
+ /* 26840 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 26866 */ 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45,
+ /* 26892 */ 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833,
+ /* 26917 */ 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45,
+ /* 26944 */ 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67,
+ /* 26969 */ 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 132, 94242, 0, 0,
+ /* 26994 */ 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27017 */ 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568,
+ /* 27041 */ 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45,
+ /* 27066 */ 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592,
+ /* 27089 */ 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510,
+ /* 27110 */ 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0,
+ /* 27136 */ 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45,
+ /* 27161 */ 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45,
+ /* 27185 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27210 */ 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97,
+ /* 27236 */ 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27261 */ 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67,
+ /* 27286 */ 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67,
+ /* 27311 */ 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67,
+ /* 27335 */ 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97,
+ /* 27360 */ 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45,
+ /* 27385 */ 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27411 */ 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67,
+ /* 27436 */ 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 297, 97, 97, 97,
+ /* 27460 */ 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24,
+ /* 27485 */ 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153,
+ /* 27510 */ 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220,
+ /* 27535 */ 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 67, 67, 67, 67, 272, 67, 0,
+ /* 27561 */ 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27,
+ /* 27585 */ 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67,
+ /* 27610 */ 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67,
+ /* 27635 */ 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67,
+ /* 27660 */ 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45,
+ /* 27686 */ 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97,
+ /* 27711 */ 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97,
+ /* 27737 */ 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365,
+ /* 27761 */ 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45,
+ /* 27786 */ 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67,
+ /* 27811 */ 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701,
+ /* 27836 */ 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27861 */ 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27887 */ 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67,
+ /* 27912 */ 1702, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67,
+ /* 27935 */ 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97,
+ /* 27962 */ 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67,
+ /* 27987 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0,
+ /* 28012 */ 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 28038 */ 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112,
+ /* 28062 */ 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97,
+ /* 28087 */ 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45,
+ /* 28114 */ 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28139 */ 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45,
+ /* 28163 */ 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264,
+ /* 28187 */ 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97,
+ /* 28211 */ 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45,
+ /* 28236 */ 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401,
+ /* 28261 */ 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45,
+ /* 28285 */ 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67,
+ /* 28309 */ 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67,
+ /* 28334 */ 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67,
+ /* 28358 */ 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 97, 97, 97, 1506, 97, 97, 97, 97,
+ /* 28383 */ 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97,
+ /* 28408 */ 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655,
+ /* 28432 */ 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45,
+ /* 28456 */ 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67,
+ /* 28481 */ 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468,
+ /* 28505 */ 67, 67, 1471, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596,
+ /* 28529 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67,
+ /* 28555 */ 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97,
+ /* 28581 */ 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45,
+ /* 28605 */ 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97,
+ /* 28630 */ 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67,
+ /* 28655 */ 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592,
+ /* 28678 */ 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055,
+ /* 28696 */ 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67,
+ /* 28723 */ 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38,
+ /* 28746 */ 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28769 */ 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45,
+ /* 28794 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67,
+ /* 28819 */ 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850,
+ /* 28843 */ 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627,
+ /* 28867 */ 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0,
+ /* 28893 */ 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45,
+ /* 28917 */ 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45,
+ /* 28940 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67,
+ /* 28966 */ 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67,
+ /* 28992 */ 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0,
+ /* 29014 */ 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138,
+ /* 29037 */ 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97,
+ /* 29063 */ 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45,
+ /* 29089 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 29115 */ 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0,
+ /* 29141 */ 1301, 0, 0, 0, 1307, 0, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97,
+ /* 29167 */ 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27,
+ /* 29192 */ 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45,
+ /* 29218 */ 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67,
+ /* 29243 */ 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152,
+ /* 29269 */ 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45,
+ /* 29295 */ 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97,
+ /* 29320 */ 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 29345 */ 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1773,
+ /* 29370 */ 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 29396 */ 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1439, 67, 67, 67, 67, 67,
+ /* 29421 */ 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 29447 */ 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97,
+ /* 29472 */ 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060,
+ /* 29497 */ 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67,
+ /* 29522 */ 237, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 1963, 67, 67, 67, 97, 97, 97, 97, 0,
+ /* 29548 */ 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45,
+ /* 29573 */ 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18,
+ /* 29598 */ 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45,
+ /* 29623 */ 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97,
+ /* 29649 */ 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 29674 */ 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45,
+ /* 29698 */ 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 29724 */ 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67,
+ /* 29748 */ 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97,
+ /* 29774 */ 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67,
+ /* 29799 */ 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67,
+ /* 29825 */ 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 29851 */ 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 29876 */ 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67,
+ /* 29901 */ 67, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67,
+ /* 29926 */ 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97,
+ /* 29952 */ 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97,
+ /* 29976 */ 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97,
+ /* 30003 */ 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 30028 */ 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67,
+ /* 30052 */ 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0,
+ /* 30077 */ 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45,
+ /* 30102 */ 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97,
+ /* 30127 */ 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0,
+ /* 30153 */ 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45,
+ /* 30176 */ 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45,
+ /* 30201 */ 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45,
+ /* 30226 */ 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67,
+ /* 30251 */ 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45,
+ /* 30276 */ 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0,
+ /* 30301 */ 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 97, 2001,
+ /* 30325 */ 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 347, 97, 97, 97,
+ /* 30350 */ 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 30376 */ 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67,
+ /* 30399 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67,
+ /* 30425 */ 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 30450 */ 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952,
+ /* 30474 */ 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67,
+ /* 30499 */ 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0,
+ /* 30525 */ 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67,
+ /* 30550 */ 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 30576 */ 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97,
+ /* 30600 */ 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427,
+ /* 30624 */ 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 30645 */ 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592,
+ /* 30656 */ 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0,
+ /* 30671 */ 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97,
+ /* 30695 */ 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45,
+ /* 30719 */ 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67,
+ /* 30744 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 30769 */ 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636,
+ /* 30791 */ 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67,
+ /* 30817 */ 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809,
+ /* 30841 */ 53531, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97,
+ /* 30864 */ 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45,
+ /* 30890 */ 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67,
+ /* 30915 */ 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45,
+ /* 30940 */ 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97,
+ /* 30966 */ 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97,
+ /* 30991 */ 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45,
+ /* 31017 */ 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538,
+ /* 31041 */ 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45,
+ /* 31064 */ 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45,
+ /* 31088 */ 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809,
+ /* 31113 */ 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97,
+ /* 31136 */ 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0,
+ /* 31162 */ 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67,
+ /* 31188 */ 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 31213 */ 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45,
+ /* 31238 */ 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67,
+ /* 31263 */ 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45,
+ /* 31289 */ 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67,
+ /* 31314 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 31340 */ 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18,
+ /* 31361 */ 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 31386 */ 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97,
+ /* 31411 */ 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67,
+ /* 31437 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 31462 */ 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638,
+ /* 31487 */ 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97,
+ /* 31515 */ 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0,
+ /* 31541 */ 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97,
+ /* 31566 */ 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45,
+ /* 31591 */ 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45,
+ /* 31615 */ 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0,
+ /* 31641 */ 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0,
+ /* 31666 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45,
+ /* 31691 */ 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1781, 97, 97, 97,
+ /* 31717 */ 97, 97, 97, 0, 0, 97, 97, 0, 97, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97,
+ /* 31743 */ 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97,
+ /* 31770 */ 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45,
+ /* 31794 */ 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97,
+ /* 31818 */ 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0,
+ /* 31844 */ 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 2044,
+ /* 31869 */ 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 31896 */ 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97,
+ /* 31920 */ 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367,
+ /* 31944 */ 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45,
+ /* 31969 */ 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 31995 */ 1548, 45, 45, 45, 45, 45, 45, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277,
+ /* 32019 */ 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97,
+ /* 32044 */ 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97,
+ /* 32069 */ 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327,
+ /* 32095 */ 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97,
+ /* 32121 */ 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0,
+ /* 32146 */ 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158,
+ /* 32169 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225,
+ /* 32194 */ 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97,
+ /* 32218 */ 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112,
+ /* 32241 */ 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0,
+ /* 32266 */ 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67,
+ /* 32290 */ 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97,
+ /* 32314 */ 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45,
+ /* 32339 */ 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27,
+ /* 32365 */ 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45,
+ /* 32390 */ 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67,
+ /* 32414 */ 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67,
+ /* 32439 */ 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67,
+ /* 32463 */ 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 97, 97, 97,
+ /* 32488 */ 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97,
+ /* 32513 */ 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45,
+ /* 32539 */ 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 712,
+ /* 32563 */ 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45,
+ /* 32588 */ 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45,
+ /* 32613 */ 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67,
+ /* 32638 */ 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67,
+ /* 32664 */ 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112,
+ /* 32688 */ 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97,
+ /* 32712 */ 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 32738 */ 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940,
+ /* 32764 */ 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45,
+ /* 32789 */ 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45,
+ /* 32815 */ 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67,
+ /* 32840 */ 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67,
+ /* 32864 */ 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67,
+ /* 32889 */ 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0,
+ /* 32914 */ 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744,
+ /* 32927 */ 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97,
+ /* 32944 */ 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97,
+ /* 32968 */ 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67,
+ /* 32994 */ 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97,
+ /* 33019 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 33044 */ 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 0,
+ /* 33068 */ 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97,
+ /* 33095 */ 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45,
+ /* 33120 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016,
+ /* 33145 */ 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0,
+ /* 33171 */ 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813,
+ /* 33194 */ 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67,
+ /* 33219 */ 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97,
+ /* 33245 */ 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97,
+ /* 33270 */ 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45,
+ /* 33295 */ 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67,
+ /* 33320 */ 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67,
+ /* 33345 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577,
+ /* 33370 */ 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45,
+ /* 33395 */ 45, 45, 45, 45, 676, 45, 45, 45, 45, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 33420 */ 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730,
+ /* 33444 */ 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67,
+ /* 33470 */ 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 33496 */ 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049,
+ /* 33520 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 33547 */ 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97,
+ /* 33564 */ 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97,
+ /* 33589 */ 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 45, 1218, 45,
+ /* 33613 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67,
+ /* 33638 */ 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921,
+ /* 33663 */ 922, 1175, 0, 0, 0, 0, 45, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97,
+ /* 33688 */ 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45,
+ /* 33714 */ 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97,
+ /* 33739 */ 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 33764 */ 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97,
+ /* 33790 */ 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 33814 */ 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97,
+ /* 33839 */ 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 33864 */ 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45,
+ /* 33889 */ 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925,
+ /* 33914 */ 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97,
+ /* 33941 */ 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417,
+ /* 33966 */ 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97,
+ /* 33993 */ 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45,
+ /* 34019 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0,
+ /* 34044 */ 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67,
+ /* 34067 */ 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 45, 45, 67, 211, 67, 67, 67,
+ /* 34091 */ 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67,
+ /* 34116 */ 67, 481, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97,
+ /* 34140 */ 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97,
+ /* 34164 */ 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0,
+ /* 34189 */ 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67,
+ /* 34213 */ 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 34239 */ 498, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0,
+ /* 34266 */ 0, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97,
+ /* 34292 */ 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67,
+ /* 34318 */ 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1352, 97,
+ /* 34339 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97,
+ /* 34364 */ 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 34390 */ 97, 595, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97,
+ /* 34415 */ 97, 97, 97, 97, 97, 1646, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97,
+ /* 34440 */ 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 751,
+ /* 34466 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67,
+ /* 34491 */ 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 34516 */ 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 34540 */ 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45,
+ /* 34565 */ 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97,
+ /* 34590 */ 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67,
+ /* 34615 */ 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038,
+ /* 34639 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67,
+ /* 34664 */ 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97,
+ /* 34689 */ 97, 97, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928,
+ /* 34714 */ 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45,
+ /* 34739 */ 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97,
+ /* 34764 */ 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 34788 */ 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441,
+ /* 34813 */ 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67,
+ /* 34838 */ 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67,
+ /* 34861 */ 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67,
+ /* 34886 */ 67, 67, 1056, 67, 67, 67, 67, 67, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45,
+ /* 34910 */ 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45,
+ /* 34935 */ 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67,
+ /* 34959 */ 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97,
+ /* 34983 */ 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67,
+ /* 35009 */ 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67,
+ /* 35032 */ 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67,
+ /* 35057 */ 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647,
+ /* 35082 */ 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685,
+ /* 35108 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 1658, 45, 45, 45, 45, 45,
+ /* 35133 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0,
+ /* 35159 */ 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97,
+ /* 35184 */ 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67,
+ /* 35209 */ 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 35234 */ 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45,
+ /* 35259 */ 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1966, 97, 97,
+ /* 35284 */ 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0,
+ /* 35311 */ 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97,
+ /* 35335 */ 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97,
+ /* 35362 */ 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 67, 67,
+ /* 35386 */ 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18,
+ /* 35410 */ 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45,
+ /* 35434 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45,
+ /* 35459 */ 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67,
+ /* 35484 */ 472, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67,
+ /* 35509 */ 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1103, 97,
+ /* 35530 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0,
+ /* 35557 */ 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45,
+ /* 35581 */ 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708,
+ /* 35606 */ 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35631 */ 45, 1198, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470,
+ /* 35656 */ 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97,
+ /* 35680 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67,
+ /* 35705 */ 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0,
+ /* 35730 */ 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45,
+ /* 35754 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 35779 */ 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503,
+ /* 35804 */ 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97,
+ /* 35830 */ 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97,
+ /* 35856 */ 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35882 */ 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809,
+ /* 35906 */ 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97,
+ /* 35931 */ 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67,
+ /* 35956 */ 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35981 */ 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684,
+ /* 36005 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45,
+ /* 36031 */ 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97,
+ /* 36056 */ 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67,
+ /* 36081 */ 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 36106 */ 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1392, 45,
+ /* 36131 */ 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0,
+ /* 36155 */ 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372,
+ /* 36180 */ 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97,
+ /* 36204 */ 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 36230 */ 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45,
+ /* 36255 */ 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67,
+ /* 36281 */ 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 36306 */ 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45,
+ /* 36332 */ 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67,
+ /* 36357 */ 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 36382 */ 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592,
+ /* 36403 */ 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36414 */ 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592,
+ /* 36425 */ 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592,
+ /* 36436 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36447 */ 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0,
+ /* 36466 */ 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36477 */ 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0,
+ /* 36489 */ 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688,
+ /* 36506 */ 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286,
+ /* 36530 */ 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36543 */ 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592,
+ /* 36555 */ 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67,
+ /* 36567 */ 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97,
+ /* 36590 */ 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 57889, 0,
+ /* 36615 */ 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264,
+ /* 36640 */ 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0,
+ /* 36655 */ 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 0, 2146304,
+ /* 36679 */ 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0,
+ /* 36697 */ 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97,
+ /* 36725 */ 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0,
+ /* 36750 */ 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537,
+ /* 36774 */ 45, 45, 45, 45
+];
+
+JSONiqTokenizer.EXPECTED =
+[
+ /* 0 */ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358,
+ /* 21 */ 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634,
+ /* 42 */ 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634,
+ /* 63 */ 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751,
+ /* 84 */ 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510,
+ /* 105 */ 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578,
+ /* 126 */ 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536,
+ /* 147 */ 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762,
+ /* 168 */ 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759,
+ /* 189 */ 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793,
+ /* 210 */ 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979,
+ /* 231 */ 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927,
+ /* 252 */ 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984,
+ /* 273 */ 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024,
+ /* 293 */ 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062,
+ /* 311 */ 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084,
+ /* 329 */ 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063,
+ /* 347 */ 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150,
+ /* 365 */ 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165,
+ /* 383 */ 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235,
+ /* 401 */ 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625,
+ /* 419 */ 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032,
+ /* 437 */ 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686,
+ /* 455 */ 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686,
+ /* 473 */ 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402,
+ /* 491 */ 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686,
+ /* 509 */ 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686,
+ /* 527 */ 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409,
+ /* 545 */ 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513,
+ /* 563 */ 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552,
+ /* 581 */ 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656,
+ /* 599 */ 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515,
+ /* 617 */ 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686,
+ /* 635 */ 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698,
+ /* 653 */ 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686,
+ /* 671 */ 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944,
+ /* 689 */ 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548,
+ /* 707 */ 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686,
+ /* 725 */ 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815,
+ /* 743 */ 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260,
+ /* 761 */ 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260,
+ /* 779 */ 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882,
+ /* 797 */ 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883,
+ /* 815 */ 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686,
+ /* 833 */ 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686,
+ /* 851 */ 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811,
+ /* 869 */ 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964,
+ /* 887 */ 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686,
+ /* 905 */ 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083,
+ /* 923 */ 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855,
+ /* 941 */ 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686,
+ /* 959 */ 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686,
+ /* 977 */ 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457,
+ /* 995 */ 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449,
+ /* 1013 */ 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146,
+ /* 1031 */ 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219,
+ /* 1049 */ 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234,
+ /* 1067 */ 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198,
+ /* 1085 */ 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276,
+ /* 1103 */ 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264,
+ /* 1121 */ 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276,
+ /* 1139 */ 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223,
+ /* 1157 */ 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276,
+ /* 1175 */ 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292,
+ /* 1193 */ 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276,
+ /* 1211 */ 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318,
+ /* 1229 */ 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592,
+ /* 1247 */ 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592,
+ /* 1265 */ 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594,
+ /* 1283 */ 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431,
+ /* 1301 */ 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812,
+ /* 1319 */ 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455,
+ /* 1337 */ 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474,
+ /* 1355 */ 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353,
+ /* 1373 */ 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469,
+ /* 1391 */ 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503,
+ /* 1409 */ 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417,
+ /* 1427 */ 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212,
+ /* 1445 */ 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592,
+ /* 1463 */ 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592,
+ /* 1481 */ 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592,
+ /* 1499 */ 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592,
+ /* 1517 */ 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592,
+ /* 1535 */ 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592,
+ /* 1553 */ 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592,
+ /* 1571 */ 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594,
+ /* 1589 */ 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506,
+ /* 1607 */ 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592,
+ /* 1625 */ 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522,
+ /* 1643 */ 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383,
+ /* 1661 */ 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592,
+ /* 1679 */ 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419,
+ /* 1697 */ 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536,
+ /* 1715 */ 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626,
+ /* 1733 */ 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581,
+ /* 1751 */ 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732,
+ /* 1769 */ 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747,
+ /* 1787 */ 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592,
+ /* 1805 */ 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592,
+ /* 1823 */ 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936,
+ /* 1841 */ 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965,
+ /* 1859 */ 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830,
+ /* 1877 */ 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415,
+ /* 1895 */ 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855,
+ /* 1913 */ 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860,
+ /* 1931 */ 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498,
+ /* 1949 */ 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592,
+ /* 1967 */ 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592,
+ /* 1985 */ 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921,
+ /* 2003 */ 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592,
+ /* 2021 */ 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592,
+ /* 2039 */ 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716,
+ /* 2057 */ 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837,
+ /* 2075 */ 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496,
+ /* 2090 */ 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256,
+ /* 2101 */ 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000,
+ /* 2117 */ 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304,
+ /* 2134 */ 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864,
+ /* 2149 */ 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576,
+ /* 2168 */ 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16,
+ /* 2184 */ 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0,
+ /* 2198 */ 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192,
+ /* 2218 */ 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384,
+ /* 2234 */ 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096,
+ /* 2251 */ 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4,
+ /* 2269 */ 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384,
+ /* 2285 */ 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2,
+ /* 2303 */ 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144,
+ /* 2316 */ 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4,
+ /* 2331 */ 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0,
+ /* 2347 */ -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0,
+ /* 2362 */ 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721,
+ /* 2386 */ -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0,
+ /* 2402 */ 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112,
+ /* 2428 */ 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016,
+ /* 2442 */ 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288,
+ /* 2457 */ 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728,
+ /* 2468 */ 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536,
+ /* 2484 */ 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536,
+ /* 2501 */ 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600,
+ /* 2521 */ -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728,
+ /* 2535 */ 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216,
+ /* 2548 */ 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12,
+ /* 2559 */ 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256,
+ /* 2575 */ 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216,
+ /* 2591 */ 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8,
+ /* 2615 */ 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576,
+ /* 2635 */ 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0,
+ /* 2651 */ 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768,
+ /* 2667 */ 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0,
+ /* 2683 */ 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592,
+ /* 2699 */ 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12,
+ /* 2714 */ 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0,
+ /* 2736 */ 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864,
+ /* 2752 */ 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072,
+ /* 2768 */ 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288,
+ /* 2784 */ 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120,
+ /* 2806 */ 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432,
+ /* 2823 */ 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4,
+ /* 2836 */ 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64,
+ /* 2850 */ 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288,
+ /* 2863 */ 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912,
+ /* 2876 */ 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048,
+ /* 2892 */ 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288,
+ /* 2908 */ 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768,
+ /* 2922 */ 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304,
+ /* 2936 */ 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432,
+ /* 2948 */ 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807,
+ /* 2961 */ 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216,
+ /* 2985 */ 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456
+];
+
+JSONiqTokenizer.TOKEN =
+[
+ "(0)",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "QuotChar",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'NaN'",
+ "'['",
+ "']'",
+ "']]>'",
+ "'after'",
+ "'all'",
+ "'allowing'",
+ "'ancestor'",
+ "'ancestor-or-self'",
+ "'and'",
+ "'any'",
+ "'append'",
+ "'array'",
+ "'as'",
+ "'ascending'",
+ "'at'",
+ "'attribute'",
+ "'base-uri'",
+ "'before'",
+ "'boundary-space'",
+ "'break'",
+ "'by'",
+ "'case'",
+ "'cast'",
+ "'castable'",
+ "'catch'",
+ "'check'",
+ "'child'",
+ "'collation'",
+ "'collection'",
+ "'comment'",
+ "'constraint'",
+ "'construction'",
+ "'contains'",
+ "'content'",
+ "'context'",
+ "'continue'",
+ "'copy'",
+ "'copy-namespaces'",
+ "'count'",
+ "'decimal-format'",
+ "'decimal-separator'",
+ "'declare'",
+ "'default'",
+ "'delete'",
+ "'descendant'",
+ "'descendant-or-self'",
+ "'descending'",
+ "'diacritics'",
+ "'different'",
+ "'digit'",
+ "'distance'",
+ "'div'",
+ "'document'",
+ "'document-node'",
+ "'element'",
+ "'else'",
+ "'empty'",
+ "'empty-sequence'",
+ "'encoding'",
+ "'end'",
+ "'entire'",
+ "'eq'",
+ "'every'",
+ "'exactly'",
+ "'except'",
+ "'exit'",
+ "'external'",
+ "'first'",
+ "'following'",
+ "'following-sibling'",
+ "'for'",
+ "'foreach'",
+ "'foreign'",
+ "'from'",
+ "'ft-option'",
+ "'ftand'",
+ "'ftnot'",
+ "'ftor'",
+ "'function'",
+ "'ge'",
+ "'greatest'",
+ "'group'",
+ "'grouping-separator'",
+ "'gt'",
+ "'idiv'",
+ "'if'",
+ "'import'",
+ "'in'",
+ "'index'",
+ "'infinity'",
+ "'inherit'",
+ "'insensitive'",
+ "'insert'",
+ "'instance'",
+ "'integrity'",
+ "'intersect'",
+ "'into'",
+ "'is'",
+ "'item'",
+ "'json'",
+ "'json-item'",
+ "'key'",
+ "'language'",
+ "'last'",
+ "'lax'",
+ "'le'",
+ "'least'",
+ "'let'",
+ "'levels'",
+ "'loop'",
+ "'lowercase'",
+ "'lt'",
+ "'minus-sign'",
+ "'mod'",
+ "'modify'",
+ "'module'",
+ "'most'",
+ "'namespace'",
+ "'namespace-node'",
+ "'ne'",
+ "'next'",
+ "'no'",
+ "'no-inherit'",
+ "'no-preserve'",
+ "'node'",
+ "'nodes'",
+ "'not'",
+ "'object'",
+ "'occurs'",
+ "'of'",
+ "'on'",
+ "'only'",
+ "'option'",
+ "'or'",
+ "'order'",
+ "'ordered'",
+ "'ordering'",
+ "'paragraph'",
+ "'paragraphs'",
+ "'parent'",
+ "'pattern-separator'",
+ "'per-mille'",
+ "'percent'",
+ "'phrase'",
+ "'position'",
+ "'preceding'",
+ "'preceding-sibling'",
+ "'preserve'",
+ "'previous'",
+ "'processing-instruction'",
+ "'relationship'",
+ "'rename'",
+ "'replace'",
+ "'return'",
+ "'returning'",
+ "'revalidation'",
+ "'same'",
+ "'satisfies'",
+ "'schema'",
+ "'schema-attribute'",
+ "'schema-element'",
+ "'score'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'xquery'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+ // line 543 "JSONiqTokenizer.ebnf"
+ });
+ // line 4205 "JSONiqTokenizer.js"
+// End
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/Readme.md b/src/fauxton/assets/js/libs/ace/mode/xquery/Readme.md
new file mode 100644
index 000000000..0ebee1d06
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/Readme.md
@@ -0,0 +1,6 @@
+WARNING!
+============================
+
+Files in this folder are generated automatically from the xquery.js project (https://github.com/wcandillon/xquery.js).
+Instructions on how to generate the XQuery parser are available at https://github.com/wcandillon/xquery.js
+
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryLexer.js b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryLexer.js
new file mode 100644
index 000000000..7f925f6bc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryLexer.js
@@ -0,0 +1,303 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+
+ var XQueryTokenizer = require("./XQueryTokenizer").XQueryTokenizer;
+
+ var TokenHandler = function(code) {
+
+ var input = code;
+
+ this.tokens = [];
+
+ this.reset = function(code) {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function(name, begin) {};
+
+ this.endNonterminal = function(name, end) {};
+
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: "WS",
+ value: input.substring(begin, end)
+ });
+ };
+ };
+
+ var keys = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position|strict".split("|");
+ var keywords = keys.map(
+ function(val) { return { name: "'" + val + "'", token: "keyword" }; }
+ );
+
+ var ncnames = keys.map(
+ function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; }
+ );
+
+ var cdata = "constant.language";
+ var number = "constant";
+ var xmlcomment = "comment";
+ var pi = "xml-pe";
+ var pragma = "constant.buildin";
+
+ var Rules = {
+ start: [
+ { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } },
+ { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
+ { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
+ { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
+ { name: "'<?'", token: pi, next: function(stack) { stack.push("PI"); } },
+ { name: "''''", token: "string", next: function(stack){ stack.push("AposString"); } },
+ { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotString"); } },
+ { name: "Annotation", token: "support.function" },
+ { name: "ModuleDecl", token: "keyword", next: function(stack){ stack.push("Prefix"); } },
+ { name: "OptionDecl", token: "keyword", next: function(stack){ stack.push("_EQName"); } },
+ { name: "AttrTest", token: "support.type" },
+ { name: "Variable", token: "variable" },
+ { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
+ { name: "IntegerLiteral", token: number },
+ { name: "DecimalLiteral", token: number },
+ { name: "DoubleLiteral", token: number },
+ { name: "Operator", token: "keyword.operator" },
+ { name: "EQName", token: function(val) { return keys.indexOf(val) !== -1 ? "keyword" : "support.function"; } },
+ { name: "'('", token:"lparen" },
+ { name: "')'", token:"rparen" },
+ { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
+ { name: "'}'", token: "text", next: function(stack){ if(stack.length > 1) stack.pop(); } },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: "EQName", token: "text", next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: "NCName", token: "text", next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: "'>'", token: "meta.tag", next: function(stack){ stack.push("TagContent"); } },
+ { name: "QName", token: "entity.other.attribute-name" },
+ { name: "'='", token: "text" },
+ { name: "''''", token: "string", next: function(stack){ stack.push("AposAttr"); } },
+ { name: "'\"'", token: "string", next: function(stack){ stack.push("QuotAttr"); } },
+ { name: "'/>'", token: "meta.tag.r", next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: "ElementContentChar", token: "text" },
+ { name: "'<![CDATA['", token: cdata, next: function(stack){ stack.push("CData"); } },
+ { name: "'<!--'", token: xmlcomment, next: function(stack){ stack.push("XMLComment"); } },
+ { name: "Tag", token: "meta.tag", next: function(stack){ stack.push("StartTag"); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "text" },
+ { name: "'}}'", token: "text" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } },
+ { name: "EndTag", token: "meta.tag", next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "EscapeApos", token: "constant.language.escape" },
+ { name: "AposAttrContentChar", token: "string" },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "string" },
+ { name: "'}}'", token: "string" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
+ ],
+ QuotAttr: [
+ { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "EscapeQuot", token: "constant.language.escape" },
+ { name: "QuotAttrContentChar", token: "string" },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "'{{'", token: "string" },
+ { name: "'}}'", token: "string" },
+ { name: "'{'", token: "text", next: function(stack){ stack.push("start"); } }
+ ],
+ Pragma: [
+ { name: "PragmaContents", token: pragma },
+ { name: "'#'", token: pragma },
+ { name: "'#)'", token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: "CommentContents", token: "comment" },
+ { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } },
+ { name: "':)'", token: "comment", next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: "DocCommentContents", token: "comment.doc" },
+ { name: "DocTag", token: "comment.doc.tag" },
+ { name: "'(:'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } },
+ { name: "':)'", token: "comment.doc", next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: "DirCommentContents", token: xmlcomment },
+ { name: "'-->'", token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: "CDataSectionContents", token: cdata },
+ { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: "DirPIContents", token: pi },
+ { name: "'?'", token: pi },
+ { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: "''''", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "EscapeApos", token: "constant.language.escape" },
+ { name: "AposChar", token: "string" }
+ ],
+ QuotString: [
+ { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } },
+ { name: "PredefinedEntityRef", token: "constant.language.escape" },
+ { name: "CharRef", token: "constant.language.escape" },
+ { name: "EscapeQuot", token: "constant.language.escape" },
+ { name: "QuotChar", token: "string" }
+ ]
+ };
+
+exports.XQueryLexer = function() {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state, row) {
+ state = (state === "start" || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new XQueryTokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+
+ h.tokens = [];
+ tokenizer["parse_" + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === "WS") {
+ tokens.push({
+ type: "text",
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === "EOF") { break; }
+ if(token.value === "") { throw "Encountered empty string lexical rule."; }
+
+ tokens.push({
+ type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: "text", value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(["start"])
+ };
+ } else {
+ throw e;
+ }
+ }
+ }
+
+
+ if(this.tokens[row] !== undefined) {
+ var cachedLine = this.lines[row];
+ var begin = sharedStart([line, cachedLine]);
+ var diff = cachedLine.length - line.length;
+ var idx = 0;
+ var col = 0;
+ for(var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ for(var j = 0; j < this.tokens[row].length; j++) {
+ var semanticToken = this.tokens[row][j];
+ if(
+ ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) ||
+ (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff))
+ ) {
+ idx = i;
+ tokens[i].type = semanticToken.type;
+ }
+ }
+ col += token.value.length;
+ }
+ }
+
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+
+ function sharedStart(A) {
+ var tem1, tem2, s, A = A.slice(0).sort();
+ tem1 = A[0];
+ s = tem1.length;
+ tem2 = A.pop();
+ while(s && tem2.indexOf(tem1) == -1) {
+ tem1 = tem1.substring(0, --s);
+ }
+ return tem1;
+ }
+};
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.ebnf b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.ebnf
new file mode 100644
index 000000000..5e31c9cbc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.ebnf
@@ -0,0 +1,1180 @@
+<?xqlint
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
+{
+ init(string, parsingEventHandler);
+?>
+
+XQuery ::= Module EOF
+Module ::= VersionDecl? ( LibraryModule | MainModule )
+VersionDecl
+ ::= 'xquery' ( 'encoding' StringLiteral | 'version' StringLiteral ( 'encoding' StringLiteral )? ) Separator
+LibraryModule
+ ::= ModuleDecl Prolog
+ModuleDecl
+ ::= 'module' 'namespace' NCName '=' URILiteral Separator
+Prolog ::= ( ( DefaultNamespaceDecl | Setter | NamespaceDecl | Import | FTOptionDecl ) Separator )* ( ( ContextItemDecl | AnnotatedDecl | OptionDecl ) Separator )*
+Separator
+ ::= ';'
+Setter ::= BoundarySpaceDecl
+ | DefaultCollationDecl
+ | BaseURIDecl
+ | ConstructionDecl
+ | OrderingModeDecl
+ | EmptyOrderDecl
+ | RevalidationDecl
+ | CopyNamespacesDecl
+ | DecimalFormatDecl
+BoundarySpaceDecl
+ ::= 'declare' 'boundary-space' ( 'preserve' | 'strip' )
+DefaultCollationDecl
+ ::= 'declare' 'default' 'collation' URILiteral
+BaseURIDecl
+ ::= 'declare' 'base-uri' URILiteral
+ConstructionDecl
+ ::= 'declare' 'construction' ( 'strip' | 'preserve' )
+OrderingModeDecl
+ ::= 'declare' 'ordering' ( 'ordered' | 'unordered' )
+EmptyOrderDecl
+ ::= 'declare' 'default' 'order' 'empty' ( 'greatest' | 'least' )
+CopyNamespacesDecl
+ ::= 'declare' 'copy-namespaces' PreserveMode ',' InheritMode
+PreserveMode
+ ::= 'preserve'
+ | 'no-preserve'
+InheritMode
+ ::= 'inherit'
+ | 'no-inherit'
+DecimalFormatDecl
+ ::= 'declare' ( 'decimal-format' EQName | 'default' 'decimal-format' ) ( DFPropertyName '=' StringLiteral )*
+DFPropertyName
+ ::= 'decimal-separator'
+ | 'grouping-separator'
+ | 'infinity'
+ | 'minus-sign'
+ | 'NaN'
+ | 'percent'
+ | 'per-mille'
+ | 'zero-digit'
+ | 'digit'
+ | 'pattern-separator'
+Import ::= SchemaImport
+ | ModuleImport
+SchemaImport
+ ::= 'import' 'schema' SchemaPrefix? URILiteral ( 'at' URILiteral ( ',' URILiteral )* )?
+SchemaPrefix
+ ::= 'namespace' NCName '='
+ | 'default' 'element' 'namespace'
+ModuleImport
+ ::= 'import' 'module' ( 'namespace' NCName '=' )? URILiteral ( 'at' URILiteral ( ',' URILiteral )* )?
+NamespaceDecl
+ ::= 'declare' 'namespace' NCName '=' URILiteral
+DefaultNamespaceDecl
+ ::= 'declare' 'default' ( 'element' | 'function' ) 'namespace' URILiteral
+FTOptionDecl
+ ::= 'declare' 'ft-option' FTMatchOptions
+AnnotatedDecl
+ ::= 'declare' ( CompatibilityAnnotation | Annotation )* ( VarDecl | FunctionDecl | CollectionDecl | IndexDecl | ICDecl )
+CompatibilityAnnotation
+ ::= 'updating'
+Annotation
+ ::= '%' EQName ( '(' Literal ( ',' Literal )* ')' )?
+VarDecl ::= 'variable' '$' VarName TypeDeclaration? ( ':=' VarValue | 'external' ( ':=' VarDefaultValue )? )
+VarValue ::= ExprSingle
+VarDefaultValue
+ ::= ExprSingle
+ContextItemDecl
+ ::= 'declare' 'context' 'item' ( 'as' ItemType )? ( ':=' VarValue | 'external' ( ':=' VarDefaultValue )? )
+ParamList
+ ::= Param ( ',' Param )*
+Param ::= '$' EQName TypeDeclaration?
+FunctionBody
+ ::= EnclosedExpr
+EnclosedExpr
+ ::= '{' Expr '}'
+OptionDecl
+ ::= 'declare' 'option' EQName StringLiteral
+Expr ::= ExprSingle ( ',' ExprSingle )*
+FLWORExpr
+ ::= InitialClause IntermediateClause* ReturnClause
+InitialClause
+ ::= ForClause
+ | LetClause
+ | WindowClause
+IntermediateClause
+ ::= InitialClause
+ | WhereClause
+ | GroupByClause
+ | OrderByClause
+ | CountClause
+ForClause
+ ::= 'for' ForBinding ( ',' ForBinding )*
+ForBinding
+ ::= '$' VarName TypeDeclaration? AllowingEmpty? PositionalVar? FTScoreVar? 'in' ExprSingle
+AllowingEmpty
+ ::= 'allowing' 'empty'
+PositionalVar
+ ::= 'at' '$' VarName
+FTScoreVar
+ ::= 'score' '$' VarName
+LetClause
+ ::= 'let' LetBinding ( ',' LetBinding )*
+LetBinding
+ ::= ( '$' VarName TypeDeclaration? | FTScoreVar ) ':=' ExprSingle
+WindowClause
+ ::= 'for' ( TumblingWindowClause | SlidingWindowClause )
+TumblingWindowClause
+ ::= 'tumbling' 'window' '$' VarName TypeDeclaration? 'in' ExprSingle WindowStartCondition WindowEndCondition?
+SlidingWindowClause
+ ::= 'sliding' 'window' '$' VarName TypeDeclaration? 'in' ExprSingle WindowStartCondition WindowEndCondition
+WindowStartCondition
+ ::= 'start' WindowVars 'when' ExprSingle
+WindowEndCondition
+ ::= 'only'? 'end' WindowVars 'when' ExprSingle
+WindowVars
+ ::= ( '$' CurrentItem )? PositionalVar? ( 'previous' '$' PreviousItem )? ( 'next' '$' NextItem )?
+CurrentItem
+ ::= EQName
+PreviousItem
+ ::= EQName
+NextItem ::= EQName
+CountClause
+ ::= 'count' '$' VarName
+WhereClause
+ ::= 'where' ExprSingle
+GroupByClause
+ ::= 'group' 'by' GroupingSpecList
+GroupingSpecList
+ ::= GroupingSpec ( ',' GroupingSpec )*
+GroupingSpec
+ ::= GroupingVariable ( TypeDeclaration? ':=' ExprSingle )? ( 'collation' URILiteral )?
+GroupingVariable
+ ::= '$' VarName
+OrderByClause
+ ::= ( 'order' 'by' | 'stable' 'order' 'by' ) OrderSpecList
+OrderSpecList
+ ::= OrderSpec ( ',' OrderSpec )*
+OrderSpec
+ ::= ExprSingle OrderModifier
+OrderModifier
+ ::= ( 'ascending' | 'descending' )? ( 'empty' ( 'greatest' | 'least' ) )? ( 'collation' URILiteral )?
+ReturnClause
+ ::= 'return' ExprSingle
+QuantifiedExpr
+ ::= ( 'some' | 'every' ) '$' VarName TypeDeclaration? 'in' ExprSingle ( ',' '$' VarName TypeDeclaration? 'in' ExprSingle )* 'satisfies' ExprSingle
+SwitchExpr
+ ::= 'switch' '(' Expr ')' SwitchCaseClause+ 'default' 'return' ExprSingle
+SwitchCaseClause
+ ::= ( 'case' SwitchCaseOperand )+ 'return' ExprSingle
+SwitchCaseOperand
+ ::= ExprSingle
+TypeswitchExpr
+ ::= 'typeswitch' '(' Expr ')' CaseClause+ 'default' ( '$' VarName )? 'return' ExprSingle
+CaseClause
+ ::= 'case' ( '$' VarName 'as' )? SequenceTypeUnion 'return' ExprSingle
+SequenceTypeUnion
+ ::= SequenceType ( '|' SequenceType )*
+IfExpr ::= 'if' '(' Expr ')' 'then' ExprSingle 'else' ExprSingle
+TryCatchExpr
+ ::= TryClause CatchClause+
+TryClause
+ ::= 'try' '{' TryTargetExpr '}'
+TryTargetExpr
+ ::= Expr
+CatchClause
+ ::= 'catch' CatchErrorList '{' Expr '}'
+CatchErrorList
+ ::= NameTest ( '|' NameTest )*
+OrExpr ::= AndExpr ( 'or' AndExpr )*
+AndExpr ::= ComparisonExpr ( 'and' ComparisonExpr )*
+ComparisonExpr
+ ::= FTContainsExpr ( ( ValueComp | GeneralComp | NodeComp ) FTContainsExpr )?
+FTContainsExpr
+ ::= StringConcatExpr ( 'contains' 'text' FTSelection FTIgnoreOption? )?
+StringConcatExpr
+ ::= RangeExpr ( '||' RangeExpr )*
+RangeExpr
+ ::= AdditiveExpr ( 'to' AdditiveExpr )?
+AdditiveExpr
+ ::= MultiplicativeExpr ( ( '+' | '-' ) MultiplicativeExpr )*
+MultiplicativeExpr
+ ::= UnionExpr ( ( '*' | 'div' | 'idiv' | 'mod' ) UnionExpr )*
+UnionExpr
+ ::= IntersectExceptExpr ( ( 'union' | '|' ) IntersectExceptExpr )*
+IntersectExceptExpr
+ ::= InstanceofExpr ( ( 'intersect' | 'except' ) InstanceofExpr )*
+InstanceofExpr
+ ::= TreatExpr ( 'instance' 'of' SequenceType )?
+TreatExpr
+ ::= CastableExpr ( 'treat' 'as' SequenceType )?
+CastableExpr
+ ::= CastExpr ( 'castable' 'as' SingleType )?
+CastExpr ::= UnaryExpr ( 'cast' 'as' SingleType )?
+UnaryExpr
+ ::= ( '-' | '+' )* ValueExpr
+ValueExpr
+ ::= ValidateExpr
+ | SimpleMapExpr
+ | ExtensionExpr
+SimpleMapExpr
+ ::= PathExpr ('!' PathExpr)*
+GeneralComp
+ ::= '='
+ | '!='
+ | '<'
+ | '<='
+ | '>'
+ | '>='
+ValueComp
+ ::= 'eq'
+ | 'ne'
+ | 'lt'
+ | 'le'
+ | 'gt'
+ | 'ge'
+NodeComp ::= 'is'
+ | '<<'
+ | '>>'
+ValidateExpr
+ ::= 'validate' ( ValidationMode | 'type' TypeName )? '{' Expr '}'
+ValidationMode
+ ::= 'lax'
+ | 'strict'
+ExtensionExpr
+ ::= Pragma+ '{' Expr? '}'
+Pragma ::= '(#' S? EQName ( S PragmaContents )? '#)'
+ /* ws: explicit */
+PathExpr ::= '/' ( RelativePathExpr / )
+ | '//' RelativePathExpr
+ | RelativePathExpr
+RelativePathExpr
+ ::= StepExpr ( ( '/' | '//' | '!' ) StepExpr )*
+StepExpr ::= PostfixExpr
+ | AxisStep
+AxisStep ::= ( ReverseStep | ForwardStep ) PredicateList
+ForwardStep
+ ::= ForwardAxis NodeTest
+ | AbbrevForwardStep
+ForwardAxis
+ ::= 'child' '::'
+ | 'descendant' '::'
+ | 'attribute' '::'
+ | 'self' '::'
+ | 'descendant-or-self' '::'
+ | 'following-sibling' '::'
+ | 'following' '::'
+AbbrevForwardStep
+ ::= '@'? NodeTest
+ReverseStep
+ ::= ReverseAxis NodeTest
+ | AbbrevReverseStep
+ReverseAxis
+ ::= 'parent' '::'
+ | 'ancestor' '::'
+ | 'preceding-sibling' '::'
+ | 'preceding' '::'
+ | 'ancestor-or-self' '::'
+AbbrevReverseStep
+ ::= '..'
+NodeTest ::= KindTest
+ | NameTest
+NameTest ::= EQName
+ | Wildcard
+PostfixExpr
+ ::= PrimaryExpr ( Predicate | ArgumentList )*
+ArgumentList
+ ::= '(' ( Argument ( ',' Argument )* )? ')'
+PredicateList
+ ::= Predicate*
+Predicate
+ ::= '[' Expr ']'
+Literal ::= NumericLiteral
+ | StringLiteral
+NumericLiteral
+ ::= IntegerLiteral
+ | DecimalLiteral
+ | DoubleLiteral
+VarRef ::= '$' VarName
+VarName ::= EQName
+ParenthesizedExpr
+ ::= '(' Expr? ')'
+ContextItemExpr
+ ::= '.'
+OrderedExpr
+ ::= 'ordered' '{' Expr '}'
+UnorderedExpr
+ ::= 'unordered' '{' Expr '}'
+FunctionCall
+ ::= FunctionName ArgumentList
+Argument ::= ExprSingle
+ | ArgumentPlaceholder
+ArgumentPlaceholder
+ ::= '?'
+Constructor
+ ::= DirectConstructor
+ | ComputedConstructor
+DirectConstructor
+ ::= DirElemConstructor
+ | DirCommentConstructor
+ | DirPIConstructor
+DirElemConstructor
+ ::= '<' QName DirAttributeList ( '/>' | '>' DirElemContent* '</' QName S? '>' )
+ /* ws: explicit */
+DirAttributeList
+ ::= ( S ( QName S? '=' S? DirAttributeValue )? )*
+ /* ws: explicit */
+DirAttributeValue
+ ::= '"' ( EscapeQuot | QuotAttrValueContent )* '"'
+ | "'" ( EscapeApos | AposAttrValueContent )* "'"
+ /* ws: explicit */
+QuotAttrValueContent
+ ::= QuotAttrContentChar
+ | CommonContent
+AposAttrValueContent
+ ::= AposAttrContentChar
+ | CommonContent
+DirElemContent
+ ::= DirectConstructor
+ | CDataSection
+ | CommonContent
+ | ElementContentChar
+DirCommentConstructor
+ ::= '<!--' DirCommentContents '-->'
+ /* ws: explicit */
+DirPIConstructor
+ ::= '<?' PITarget ( S DirPIContents )? '?>'
+ /* ws: explicit */
+ComputedConstructor
+ ::= CompDocConstructor
+ | CompElemConstructor
+ | CompAttrConstructor
+ | CompNamespaceConstructor
+ | CompTextConstructor
+ | CompCommentConstructor
+ | CompPIConstructor
+CompElemConstructor
+ ::= 'element' ( EQName | '{' Expr '}' ) '{' ContentExpr? '}'
+CompNamespaceConstructor
+ ::= 'namespace' ( Prefix | '{' PrefixExpr '}' ) '{' URIExpr '}'
+Prefix ::= NCName
+PrefixExpr
+ ::= Expr
+URIExpr ::= Expr
+FunctionItemExpr
+ ::= NamedFunctionRef
+ | InlineFunctionExpr
+NamedFunctionRef
+ ::= EQName '#' IntegerLiteral
+InlineFunctionExpr
+ ::= Annotation* 'function' '(' ParamList? ')' ( 'as' SequenceType )? FunctionBody
+SingleType
+ ::= SimpleTypeName '?'?
+TypeDeclaration
+ ::= 'as' SequenceType
+SequenceType
+ ::= 'empty-sequence' '(' ')'
+ | ItemType ( OccurrenceIndicator / )
+OccurrenceIndicator
+ ::= '?'
+ | '*'^OccurrenceIndicator
+ | '+'
+ItemType ::= KindTest
+ | 'item' '(' ')'
+ | FunctionTest
+ | AtomicOrUnionType
+ | ParenthesizedItemType
+ | JSONTest
+ | StructuredItemTest
+JSONTest ::=
+ JSONItemTest
+ | JSONObjectTest
+ | JSONArrayTest
+
+StructuredItemTest ::= "structured-item" "(" ")"
+
+JSONItemTest ::= "json-item" "(" ")"
+
+JSONObjectTest ::= "object" "(" ")"
+
+JSONArrayTest ::= "array" "(" ")"
+
+AtomicOrUnionType
+ ::= EQName
+KindTest ::= DocumentTest
+ | ElementTest
+ | AttributeTest
+ | SchemaElementTest
+ | SchemaAttributeTest
+ | PITest
+ | CommentTest
+ | TextTest
+ | NamespaceNodeTest
+ | JSONTest
+ | AnyKindTest
+AnyKindTest
+ ::= 'node' '(' ')'
+DocumentTest
+ ::= 'document-node' '(' ( ElementTest | SchemaElementTest )? ')'
+TextTest ::= 'text' '(' ')'
+CommentTest
+ ::= 'comment' '(' ')'
+NamespaceNodeTest
+ ::= 'namespace-node' '(' ')'
+PITest ::= 'processing-instruction' '(' ( NCName | StringLiteral )? ')'
+AttributeTest
+ ::= 'attribute' '(' ( AttribNameOrWildcard ( ',' TypeName )? )? ')'
+AttribNameOrWildcard
+ ::= AttributeName
+ | '*'
+SchemaAttributeTest
+ ::= 'schema-attribute' '(' AttributeDeclaration ')'
+AttributeDeclaration
+ ::= AttributeName
+ElementTest
+ ::= 'element' '(' ( ElementNameOrWildcard ( ',' TypeName '?'? )? )? ')'
+ElementNameOrWildcard
+ ::= ElementName
+ | '*'
+SchemaElementTest
+ ::= 'schema-element' '(' ElementDeclaration ')'
+ElementDeclaration
+ ::= ElementName
+AttributeName
+ ::= EQName
+ElementName
+ ::= EQName
+SimpleTypeName
+ ::= TypeName
+TypeName ::= EQName
+FunctionTest
+ ::= Annotation* ( AnyFunctionTest | TypedFunctionTest )
+AnyFunctionTest
+ ::= 'function' '(' '*' ')'
+TypedFunctionTest
+ ::= 'function' '(' ( SequenceType ( ',' SequenceType )* )? ')' 'as' SequenceType
+ParenthesizedItemType
+ ::= '(' ItemType ')'
+RevalidationDecl
+ ::= 'declare' 'revalidation' ( 'strict' | 'lax' | 'skip' )
+InsertExprTargetChoice
+ ::= ( 'as' ( 'first' | 'last' ) )? 'into'
+ | 'after'
+ | 'before'
+InsertExpr
+ ::= 'insert' ( 'node' | 'nodes' ) SourceExpr InsertExprTargetChoice TargetExpr
+DeleteExpr
+ ::= 'delete' ( 'node' | 'nodes' ) TargetExpr
+ReplaceExpr
+ ::= 'replace' ( 'value' 'of' )? 'node' TargetExpr 'with' ExprSingle
+RenameExpr
+ ::= 'rename' 'node' TargetExpr 'as' NewNameExpr
+SourceExpr
+ ::= ExprSingle
+TargetExpr
+ ::= ExprSingle
+NewNameExpr
+ ::= ExprSingle
+TransformExpr
+ ::= 'copy' '$' VarName ':=' ExprSingle ( ',' '$' VarName ':=' ExprSingle )* 'modify' ExprSingle 'return' ExprSingle
+FTSelection
+ ::= FTOr FTPosFilter*
+FTWeight ::= 'weight' '{' Expr '}'
+FTOr ::= FTAnd ( 'ftor' FTAnd )*
+FTAnd ::= FTMildNot ( 'ftand' FTMildNot )*
+FTMildNot
+ ::= FTUnaryNot ( 'not' 'in' FTUnaryNot )*
+FTUnaryNot
+ ::= 'ftnot'? FTPrimaryWithOptions
+FTPrimaryWithOptions
+ ::= FTPrimary FTMatchOptions? FTWeight?
+FTPrimary
+ ::= FTWords FTTimes?
+ | '(' FTSelection ')'
+ | FTExtensionSelection
+FTWords ::= FTWordsValue FTAnyallOption?
+FTWordsValue
+ ::= StringLiteral
+ | '{' Expr '}'
+FTExtensionSelection
+ ::= Pragma+ '{' FTSelection? '}'
+FTAnyallOption
+ ::= 'any' 'word'?
+ | 'all' 'words'?
+ | 'phrase'
+FTTimes ::= 'occurs' FTRange 'times'
+FTRange ::= 'exactly' AdditiveExpr
+ | 'at' ( 'least' AdditiveExpr | 'most' AdditiveExpr )
+ | 'from' AdditiveExpr 'to' AdditiveExpr
+FTPosFilter
+ ::= FTOrder
+ | FTWindow
+ | FTDistance
+ | FTScope
+ | FTContent
+FTOrder ::= 'ordered'
+FTWindow ::= 'window' AdditiveExpr FTUnit
+FTDistance
+ ::= 'distance' FTRange FTUnit
+FTUnit ::= 'words'
+ | 'sentences'
+ | 'paragraphs'
+FTScope ::= ( 'same' | 'different' ) FTBigUnit
+FTBigUnit
+ ::= 'sentence'
+ | 'paragraph'
+FTContent
+ ::= 'at' ( 'start' | 'end' )
+ | 'entire' 'content'
+FTMatchOptions
+ ::= ( 'using' FTMatchOption )+
+FTMatchOption
+ ::= FTLanguageOption
+ | FTWildCardOption
+ | FTThesaurusOption
+ | FTStemOption
+ | FTCaseOption
+ | FTDiacriticsOption
+ | FTStopWordOption
+ | FTExtensionOption
+FTCaseOption
+ ::= 'case' ( 'insensitive' | 'sensitive' )
+ | 'lowercase'
+ | 'uppercase'
+FTDiacriticsOption
+ ::= 'diacritics' ( 'insensitive' | 'sensitive' )
+FTStemOption
+ ::= 'stemming'
+ | 'no' 'stemming'
+FTThesaurusOption
+ ::= 'thesaurus' ( FTThesaurusID | 'default' | '(' ( FTThesaurusID | 'default' ) ( ',' FTThesaurusID )* ')' )
+ | 'no' 'thesaurus'
+FTThesaurusID
+ ::= 'at' URILiteral ( 'relationship' StringLiteral )? ( FTLiteralRange 'levels' )?
+FTLiteralRange
+ ::= 'exactly' IntegerLiteral
+ | 'at' ( 'least' IntegerLiteral | 'most' IntegerLiteral )
+ | 'from' IntegerLiteral 'to' IntegerLiteral
+FTStopWordOption
+ ::= 'stop' 'words' ( FTStopWords FTStopWordsInclExcl* | 'default' FTStopWordsInclExcl* )
+ | 'no' 'stop' 'words'
+FTStopWords
+ ::= 'at' URILiteral
+ | '(' StringLiteral ( ',' StringLiteral )* ')'
+FTStopWordsInclExcl
+ ::= ( 'union' | 'except' ) FTStopWords
+FTLanguageOption
+ ::= 'language' StringLiteral
+FTWildCardOption
+ ::= 'wildcards'
+ | 'no' 'wildcards'
+FTExtensionOption
+ ::= 'option' EQName StringLiteral
+FTIgnoreOption
+ ::= 'without' 'content' UnionExpr
+CollectionDecl
+ ::= 'collection' EQName CollectionTypeDecl?
+CollectionTypeDecl
+ ::= 'as' KindTest OccurrenceIndicator?
+IndexName
+ ::= EQName
+IndexDomainExpr
+ ::= PathExpr
+IndexKeySpec
+ ::= IndexKeyExpr IndexKeyTypeDecl? IndexKeyCollation?
+IndexKeyExpr
+ ::= PathExpr
+IndexKeyTypeDecl
+ ::= 'as' AtomicType OccurrenceIndicator?
+AtomicType
+ ::= EQName
+IndexKeyCollation
+ ::= 'collation' URILiteral
+IndexDecl
+ ::= 'index' IndexName 'on' 'nodes' IndexDomainExpr 'by' IndexKeySpec ( ',' IndexKeySpec )*
+ICDecl ::= 'integrity' 'constraint' EQName ( ICCollection | ICForeignKey )
+ICCollection
+ ::= 'on' 'collection' EQName ( ICCollSequence | ICCollSequenceUnique | ICCollNode )
+ICCollSequence
+ ::= VarRef 'check' ExprSingle
+ICCollSequenceUnique
+ ::= 'node' VarRef 'check' 'unique' 'key' PathExpr
+ICCollNode
+ ::= 'foreach' 'node' VarRef 'check' ExprSingle
+ICForeignKey
+ ::= 'foreign' 'key' ICForeignKeySource ICForeignKeyTarget
+ICForeignKeySource
+ ::= 'from' ICForeignKeyValues
+ICForeignKeyTarget
+ ::= 'to' ICForeignKeyValues
+ICForeignKeyValues
+ ::= 'collection' EQName 'node' VarRef 'key' PathExpr
+Comment ::= '(:' ( CommentContents | Comment )* ':)'
+ /* ws: explicit */
+Whitespace
+ ::= S^WS
+ | Comment
+ /* ws: definition */
+EQName ::= FunctionName
+ | 'attribute'
+ | 'comment'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'function'
+ | 'if'
+ | 'item'
+ | 'namespace-node'
+ | 'node'
+ | 'processing-instruction'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'switch'
+ | 'text'
+ | 'typeswitch'
+FunctionName
+ ::= EQName^Token
+ | 'after'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'child'
+ | 'collation'
+ | 'copy'
+ | 'count'
+ | 'declare'
+ | 'default'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'descending'
+ | 'div'
+ | 'document'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'every'
+ | 'except'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'import'
+ | 'insert'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'last'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'module'
+ | 'namespace'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'rename'
+ | 'replace'
+ | 'return'
+ | 'satisfies'
+ | 'self'
+ | 'some'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'try'
+ | 'union'
+ | 'unordered'
+ | 'validate'
+ | 'where'
+ | 'with'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'variable'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+ | 'object'
+ | 'json-item'
+ | 'array'
+NCName ::= NCName^Token
+ | 'after'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'collation'
+ | 'count'
+ | 'default'
+ | 'descending'
+ | 'div'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'except'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'return'
+ | 'satisfies'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'union'
+ | 'where'
+ | 'with'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'attribute'
+ | 'child'
+ | 'comment'
+ | 'copy'
+ | 'declare'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'document'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'every'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'function'
+ | 'if'
+ | 'import'
+ | 'insert'
+ | 'item'
+ | 'last'
+ | 'module'
+ | 'namespace'
+ | 'namespace-node'
+ | 'node'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'processing-instruction'
+ | 'rename'
+ | 'replace'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'self'
+ | 'some'
+ | 'switch'
+ | 'text'
+ | 'try'
+ | 'typeswitch'
+ | 'unordered'
+ | 'validate'
+ | 'variable'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+MainModule
+ ::= Prolog Program
+Program ::= StatementsAndOptionalExpr
+Statements
+ ::= Statement*
+StatementsAndExpr
+ ::= Statements Expr
+StatementsAndOptionalExpr
+ ::= Statements Expr?
+Statement
+ ::= ApplyStatement
+ | AssignStatement
+ | BlockStatement
+ | BreakStatement
+ | ContinueStatement
+ | ExitStatement
+ | FLWORStatement
+ | IfStatement
+ | SwitchStatement
+ | TryCatchStatement
+ | TypeswitchStatement
+ | VarDeclStatement
+ | WhileStatement
+ApplyStatement
+ ::= ExprSimple ';'
+AssignStatement
+ ::= '$' VarName ':=' ExprSingle ';'
+BlockStatement
+ ::= '{' Statements '}'
+BreakStatement
+ ::= 'break' 'loop' ';'
+ContinueStatement
+ ::= 'continue' 'loop' ';'
+ExitStatement
+ ::= 'exit' 'returning' ExprSingle ';'
+FLWORStatement
+ ::= InitialClause IntermediateClause* ReturnStatement
+ReturnStatement
+ ::= 'return' Statement
+IfStatement
+ ::= 'if' '(' Expr ')' 'then' Statement 'else' Statement
+SwitchStatement
+ ::= 'switch' '(' Expr ')' SwitchCaseStatement+ 'default' 'return' Statement
+SwitchCaseStatement
+ ::= ( 'case' SwitchCaseOperand )+ 'return' Statement
+TryCatchStatement
+ ::= 'try' BlockStatement ( 'catch' CatchErrorList BlockStatement )+
+TypeswitchStatement
+ ::= 'typeswitch' '(' Expr ')' CaseStatement+ 'default' ( '$' VarName )? 'return' Statement
+CaseStatement
+ ::= 'case' ( '$' VarName 'as' )? SequenceType 'return' Statement
+VarDeclStatement
+ ::= Annotation* 'variable' '$' VarName TypeDeclaration? ( ':=' ExprSingle )? ( ',' '$' VarName TypeDeclaration? ( ':=' ExprSingle )? )* ';'
+WhileStatement
+ ::= 'while' '(' Expr ')' Statement
+ExprSingle
+ ::= ExprSimple
+ | FLWORExpr
+ | IfExpr
+ | SwitchExpr
+ | TryCatchExpr
+ | TypeswitchExpr
+ExprSimple
+ ::= QuantifiedExpr
+ | OrExpr
+ | InsertExpr
+ | DeleteExpr
+ | RenameExpr
+ | ReplaceExpr
+ | TransformExpr
+ | JSONDeleteExpr
+ | JSONInsertExpr
+ | JSONRenameExpr
+ | JSONReplaceExpr
+ | JSONAppendExpr
+
+JSONDeleteExpr ::= "delete" "json" PostfixExpr
+
+JSONInsertExpr ::= "insert" "json" ExprSingle "into" ExprSingle ("at" "position" ExprSingle)?
+
+JSONRenameExpr ::= "rename" "json" PostfixExpr "as" ExprSingle
+
+JSONReplaceExpr ::= "replace" "json" "value" "of" PostfixExpr "with" ExprSingle
+
+JSONAppendExpr ::= "append" "json" ExprSingle "into" ExprSingle
+
+CommonContent
+ ::= PredefinedEntityRef
+ | CharRef
+ | '{{'
+ | '}}'
+ | BlockExpr
+ContentExpr
+ ::= StatementsAndExpr
+CompDocConstructor
+ ::= 'document' BlockExpr
+CompAttrConstructor
+ ::= 'attribute' ( EQName | '{' Expr '}' ) ( '{' '}' | BlockExpr )
+CompPIConstructor
+ ::= 'processing-instruction' ( NCName | '{' Expr '}' ) ( '{' '}' | BlockExpr )
+CompCommentConstructor
+ ::= 'comment' BlockExpr
+CompTextConstructor
+ ::= 'text' BlockExpr
+PrimaryExpr
+ ::= Literal
+ | VarRef
+ | ParenthesizedExpr
+ | ContextItemExpr
+ | FunctionCall
+ | OrderedExpr
+ | UnorderedExpr
+ | Constructor
+ | FunctionItemExpr
+ | BlockExpr
+ | ObjectConstructor
+ | ArrayConstructor
+ | JSONSimpleObjectUnion
+
+JSONSimpleObjectUnion
+ ::= '{|' Expr? '|}'
+
+
+ObjectConstructor ::= "{" ( PairConstructor ("," PairConstructor)* )? "}"
+
+PairConstructor ::= ExprSingle ":" ExprSingle
+
+ArrayConstructor ::= "[" Expr? "]"
+
+BlockExpr
+ ::= '{' StatementsAndOptionalExpr '}'
+FunctionDecl
+ ::= 'function' EQName '(' ParamList? ')' ( 'as' SequenceType )? ( '{' StatementsAndOptionalExpr '}' | 'external' )
+
+<?TOKENS?>
+
+PragmaContents
+ ::= ( Char* - ( Char* '#)' Char* ) ) &'#'
+DirCommentContents
+ ::= ( ( Char - '-' ) | '-' ( Char - '-' ) )*
+DirPIContents
+ ::= ( Char* - ( Char* '?>' Char* ) ) &'?'
+CDataSection
+ ::= '<![CDATA[' CDataSectionContents ']]>'
+CDataSectionContents
+ ::= Char* - ( Char* ']]>' Char* )
+Wildcard ::= "*"
+ | (NCName ":" "*")
+ | ("*" ":" NCName)
+ | (BracedURILiteral "*")
+EQName ::= QName
+ | URIQualifiedName
+URIQualifiedName
+ ::= BracedURILiteral NCName
+BracedURILiteral
+ ::= 'Q' '{' (PredefinedEntityRef | CharRef | [^&{}] )* '}'
+URILiteral
+ ::= StringLiteral
+IntegerLiteral
+ ::= Digits
+DecimalLiteral
+ ::= '.' Digits
+ | Digits '.' [0-9]*
+ /* ws: explicit */
+DoubleLiteral
+ ::= ( '.' Digits | Digits ( '.' [0-9]* )? ) [Ee] [+#x002D]? Digits
+ /* ws: explicit */
+StringLiteral
+ ::= '"' ( PredefinedEntityRef | CharRef | EscapeQuot | [^"&] )* '"'
+ | "'" ( PredefinedEntityRef | CharRef | EscapeApos | [^&'] )* "'"
+ /* ws: explicit */
+PredefinedEntityRef
+ ::= '&' ( 'lt' | 'gt' | 'amp' | 'quot' | 'apos' ) ';'
+ /* ws: explicit */
+EscapeQuot
+ ::= '""'
+EscapeApos
+ ::= "''"
+ElementContentChar
+ ::= Char - [&<{}]
+QuotAttrContentChar
+ ::= Char - ["&<{}]
+AposAttrContentChar
+ ::= Char - [&'<{}]
+PITarget ::= NCName - ( ( 'X' | 'x' ) ( 'M' | 'm' ) ( 'L' | 'l' ) )
+Name ::= NameStartChar NameChar*
+NameStartChar
+ ::= [:A-Z_a-z#x00C0-#x00D6#x00D8-#x00F6#x00F8-#x02FF#x0370-#x037D#x037F-#x1FFF#x200C-#x200D#x2070-#x218F#x2C00-#x2FEF#x3001-#xD7FF#xF900-#xFDCF#xFDF0-#xFFFD#x10000-#xEFFFF]
+NameChar ::= NameStartChar
+ | [-.0-9#x00B7#x0300-#x036F#x203F-#x2040]
+NCName ::= Name - ( Char* ':' Char* )
+Char ::= [#x0009#x000A#x000D#x0020-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
+QName ::= PrefixedName
+ | UnprefixedName
+PrefixedName
+ ::= Prefix ':' LocalPart
+UnprefixedName
+ ::= LocalPart
+Prefix ::= NCName
+LocalPart
+ ::= NCName
+S ::= [#x0009#x000A#x000D#x0020]+
+CharRef ::= '&#' [0-9]+ ';'
+ | '&#x' [0-9A-Fa-f]+ ';'
+Digits ::= [0-9]+
+CommentContents
+ ::= ( ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) - ( Char* '(' ) ) &':'
+ | ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) &'('
+EOF ::= $
+NonNCNameChar
+ ::= $
+ | ':'
+ | ( Char - NameChar )
+DelimitingChar
+ ::= NonNCNameChar
+ | '-'
+ | '.'
+DelimitingChar
+ \\ IntegerLiteral DecimalLiteral DoubleLiteral
+NonNCNameChar
+ \\ EQName^Token QName NCName^Token 'NaN' 'after' 'all'
+ 'allowing' 'ancestor' 'ancestor-or-self' 'and' 'any'
+ 'append' 'array' 'as' 'ascending' 'at' 'attribute'
+ 'base-uri' 'before' 'boundary-space' 'break' 'by' 'case'
+ 'cast' 'castable' 'catch' 'check' 'child' 'collation'
+ 'collection' 'comment' 'constraint' 'construction'
+ 'contains' 'content' 'context' 'continue' 'copy'
+ 'copy-namespaces' 'count' 'decimal-format'
+ 'decimal-separator' 'declare' 'default' 'delete'
+ 'descendant' 'descendant-or-self' 'descending'
+ 'diacritics' 'different' 'digit' 'distance' 'div'
+ 'document' 'document-node' 'element' 'else' 'empty'
+ 'empty-sequence' 'encoding' 'end' 'entire' 'eq' 'every'
+ 'exactly' 'except' 'exit' 'external' 'first' 'following'
+ 'following-sibling' 'for' 'foreach' 'foreign' 'from'
+ 'ft-option' 'ftand' 'ftnot' 'ftor' 'function' 'ge'
+ 'greatest' 'group' 'grouping-separator' 'gt' 'idiv' 'if'
+ 'import' 'in' 'index' 'infinity' 'inherit' 'insensitive'
+ 'insert' 'instance' 'integrity' 'intersect' 'into' 'is'
+ 'item' 'json' 'json-item' 'key' 'language' 'last' 'lax'
+ 'le' 'least' 'let' 'levels' 'loop' 'lowercase' 'lt'
+ 'minus-sign' 'mod' 'modify' 'module' 'most' 'namespace'
+ 'namespace-node' 'ne' 'next' 'no' 'no-inherit'
+ 'no-preserve' 'node' 'nodes' 'not' 'object' 'occurs'
+ 'of' 'on' 'only' 'option' 'or' 'order' 'ordered'
+ 'ordering' 'paragraph' 'paragraphs' 'parent'
+ 'pattern-separator' 'per-mille' 'percent' 'phrase'
+ 'position' 'preceding' 'preceding-sibling' 'preserve'
+ 'previous' 'processing-instruction' 'relationship'
+ 'rename' 'replace' 'return' 'returning' 'revalidation'
+ 'same' 'satisfies' 'schema' 'schema-attribute'
+ 'schema-element' 'score' 'self' 'sensitive' 'sentence'
+ 'sentences' 'skip' 'sliding' 'some' 'stable' 'start'
+ 'stemming' 'stop' 'strict' 'strip' 'structured-item'
+ 'switch' 'text' 'then' 'thesaurus' 'times' 'to'
+ 'treat' 'try' 'tumbling' 'type' 'typeswitch' 'union'
+ 'unique' 'unordered' 'updating' 'uppercase' 'using'
+ 'validate' 'value' 'variable' 'version' 'weight'
+ 'when' 'where' 'while' 'wildcards' 'window' 'with'
+ 'without' 'word' 'words' 'xquery' 'zero-digit'
+'*' << Wildcard '*'^OccurrenceIndicator
+EQName^Token
+ << 'after' 'ancestor' 'ancestor-or-self' 'and' 'as' 'ascending' 'attribute' 'before' 'case' 'cast' 'castable' 'child' 'collation' 'comment' 'copy' 'count' 'declare' 'default' 'delete' 'descendant' 'descendant-or-self' 'descending' 'div' 'document' 'document-node' 'element' 'else' 'empty' 'empty-sequence' 'end' 'eq' 'every' 'except' 'first' 'following' 'following-sibling' 'for' 'function' 'ge' 'group' 'gt' 'idiv' 'if' 'import' 'insert' 'instance' 'intersect' 'into' 'is' 'item' 'last' 'le' 'let' 'lt' 'mod' 'modify' 'module' 'namespace' 'namespace-node' 'ne' 'node' 'only' 'or' 'order' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'return' 'satisfies' 'schema-attribute' 'schema-element' 'self' 'some' 'stable' 'start' 'switch' 'text' 'to' 'treat' 'try' 'typeswitch' 'union' 'unordered' 'validate' 'where' 'with' 'xquery' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'collection' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'variable' 'version' 'while' 'constraint' 'loop' 'returning' 'append' 'array' 'json-item' 'object' 'structured-item'
+NCName^Token
+ << 'after' 'and' 'as' 'ascending' 'before' 'case' 'cast' 'castable' 'collation' 'count' 'default' 'descending' 'div' 'else' 'empty' 'end' 'eq' 'except' 'for' 'ge' 'group' 'gt' 'idiv' 'instance' 'intersect' 'into' 'is' 'le' 'let' 'lt' 'mod' 'modify' 'ne' 'only' 'or' 'order' 'return' 'satisfies' 'stable' 'start' 'to' 'treat' 'union' 'where' 'with' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'ancestor' 'ancestor-or-self' 'attribute' 'child' 'comment' 'copy' 'declare' 'delete' 'descendant' 'descendant-or-self' 'document' 'document-node' 'element' 'empty-sequence' 'every' 'first' 'following' 'following-sibling' 'function' 'if' 'import' 'insert' 'item' 'last' 'module' 'namespace' 'namespace-node' 'node' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'schema-attribute' 'schema-element' 'self' 'some' 'switch' 'text' 'try' 'typeswitch' 'unordered' 'validate' 'variable' 'xquery' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'version' 'while' 'constraint' 'loop' 'returning'
+
+<?ENCORE?>
+
+<?xqlint
+});
+?>
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.js b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.js
new file mode 100644
index 000000000..5bb39666b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryParser.js
@@ -0,0 +1,33487 @@
+// This file was generated on Sat Feb 16, 2013 21:06 (UTC+01) by REx v5.23 which is Copyright (c) 1979-2013 by Gunther Rademacher <grd@gmx.net>
+// REx command line: XQueryParser.ebnf -ll 2 -backtrack -tree -javascript -a xqlint
+
+ // line 2 "XQueryParser.ebnf"
+ /* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ define(function(require, exports, module){
+ var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ // line 40 "XQueryParser.js"
+ var self = this;
+
+ this.ParseException = function(b, e, s, o, x)
+ {
+ var
+ begin = b,
+ end = e,
+ state = s,
+ offending = o,
+ expected = x;
+
+ this.getBegin = function() {return begin;};
+ this.getEnd = function() {return end;};
+ this.getState = function() {return state;};
+ this.getExpected = function() {return expected;};
+ this.getOffending = function() {return offending;};
+
+ this.getMessage = function()
+ {
+ return offending < 0 ? "lexical analysis failed" : "syntax error";
+ };
+ };
+
+ function init(string, parsingEventHandler)
+ {
+ eventHandler = parsingEventHandler;
+ input = string;
+ size = string.length;
+ reset(0, 0, 0);
+ }
+
+ this.getInput = function()
+ {
+ return input;
+ };
+
+ function reset(l, b, e)
+ {
+ b0 = b; e0 = b;
+ l1 = l; b1 = b; e1 = e;
+ l2 = 0;
+ end = e;
+ ex = -1;
+ memo = {};
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? XQueryParser.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = XQueryParser.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [XQueryParser.TOKEN[e.getExpected()]];
+ }
+ return expected;
+ };
+
+ this.getErrorMessage = function(e)
+ {
+ var tokenSet = this.getExpectedTokenSet(e);
+ var found = this.getOffendingToken(e);
+ var prefix = input.substring(0, e.getBegin());
+ var lines = prefix.split("\n");
+ var line = lines.length;
+ var column = lines[line - 1].length + 1;
+ var size = e.getEnd() - e.getBegin();
+ return e.getMessage()
+ + (found == null ? "" : ", found " + found)
+ + "\nwhile expecting "
+ + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]"))
+ + "\n"
+ + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ")
+ + "at line " + line + ", column " + column + ":\n..."
+ + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64))
+ + "...";
+ };
+
+ this.parse_XQuery = function()
+ {
+ eventHandler.startNonterminal("XQuery", e0);
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Module();
+ shift(25); // EOF
+ eventHandler.endNonterminal("XQuery", e0);
+ };
+
+ function parse_Module()
+ {
+ eventHandler.startNonterminal("Module", e0);
+ switch (l1)
+ {
+ case 274: // 'xquery'
+ lookahead2W(199); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'encoding' | 'eq' | 'except' | 'ge' | 'gt' |
+ // 'idiv' | 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'to' | 'treat' | 'union' | 'version' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 64274 // 'xquery' 'encoding'
+ || lk == 134930) // 'xquery' 'version'
+ {
+ parse_VersionDecl();
+ }
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ switch (l1)
+ {
+ case 182: // 'module'
+ lookahead2W(194); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'namespace' | 'ne' |
+ // 'or' | 'to' | 'treat' | 'union' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 94390: // 'module' 'namespace'
+ whitespace();
+ parse_LibraryModule();
+ break;
+ default:
+ whitespace();
+ parse_MainModule();
+ }
+ eventHandler.endNonterminal("Module", e0);
+ }
+
+ function parse_VersionDecl()
+ {
+ eventHandler.startNonterminal("VersionDecl", e0);
+ shift(274); // 'xquery'
+ lookahead1W(116); // S^WS | '(:' | 'encoding' | 'version'
+ switch (l1)
+ {
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(263); // 'version'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ lookahead1W(109); // S^WS | '(:' | ';' | 'encoding'
+ if (l1 == 125) // 'encoding'
+ {
+ shift(125); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("VersionDecl", e0);
+ }
+
+ function parse_LibraryModule()
+ {
+ eventHandler.startNonterminal("LibraryModule", e0);
+ parse_ModuleDecl();
+ lookahead1W(138); // S^WS | EOF | '(:' | 'declare' | 'import'
+ whitespace();
+ parse_Prolog();
+ eventHandler.endNonterminal("LibraryModule", e0);
+ }
+
+ function parse_ModuleDecl()
+ {
+ eventHandler.startNonterminal("ModuleDecl", e0);
+ shift(182); // 'module'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("ModuleDecl", e0);
+ }
+
+ function parse_Prolog()
+ {
+ eventHandler.startNonterminal("Prolog", e0);
+ for (;;)
+ {
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(213); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' |
+ // 'base-uri' | 'boundary-space' | 'cast' | 'castable' | 'collection' |
+ // 'construction' | 'contains' | 'context' | 'copy-namespaces' | 'decimal-format' |
+ // 'default' | 'div' | 'eq' | 'except' | 'ft-option' | 'function' | 'ge' | 'gt' |
+ // 'idiv' | 'index' | 'instance' | 'integrity' | 'intersect' | 'is' | 'le' | 'lt' |
+ // 'mod' | 'namespace' | 'ne' | 'option' | 'or' | 'ordering' | 'revalidation' |
+ // 'to' | 'treat' | 'union' | 'updating' | 'variable' | '|' | '||'
+ break;
+ case 153: // 'import'
+ lookahead2W(201); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'module' | 'ne' | 'or' |
+ // 'schema' | 'to' | 'treat' | 'union' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 42604 // 'declare' 'base-uri'
+ && lk != 43628 // 'declare' 'boundary-space'
+ && lk != 50284 // 'declare' 'construction'
+ && lk != 53356 // 'declare' 'copy-namespaces'
+ && lk != 54380 // 'declare' 'decimal-format'
+ && lk != 55916 // 'declare' 'default'
+ && lk != 72300 // 'declare' 'ft-option'
+ && lk != 93337 // 'import' 'module'
+ && lk != 94316 // 'declare' 'namespace'
+ && lk != 104044 // 'declare' 'ordering'
+ && lk != 113772 // 'declare' 'revalidation'
+ && lk != 115353) // 'import' 'schema'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(178); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ // 'copy-namespaces' | 'decimal-format' | 'default' | 'ft-option' | 'namespace' |
+ // 'ordering' | 'revalidation'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 55916) // 'declare' 'default'
+ {
+ lk = memoized(0, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultNamespaceDecl();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(0, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_DefaultNamespaceDecl();
+ break;
+ case 94316: // 'declare' 'namespace'
+ whitespace();
+ parse_NamespaceDecl();
+ break;
+ case 153: // 'import'
+ whitespace();
+ parse_Import();
+ break;
+ case 72300: // 'declare' 'ft-option'
+ whitespace();
+ parse_FTOptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_Setter();
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ for (;;)
+ {
+ lookahead1W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '%' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'collection' | 'contains' | 'context' | 'div' | 'eq' | 'except' |
+ // 'function' | 'ge' | 'gt' | 'idiv' | 'index' | 'instance' | 'integrity' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'option' | 'or' | 'to' |
+ // 'treat' | 'union' | 'updating' | 'variable' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 16492 // 'declare' '%'
+ && lk != 48748 // 'declare' 'collection'
+ && lk != 51820 // 'declare' 'context'
+ && lk != 74348 // 'declare' 'function'
+ && lk != 79468 // 'declare' 'index'
+ && lk != 82540 // 'declare' 'integrity'
+ && lk != 101996 // 'declare' 'option'
+ && lk != 131692 // 'declare' 'updating'
+ && lk != 134252) // 'declare' 'variable'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(175); // S^WS | '%' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ // 'integrity' | 'option' | 'updating' | 'variable'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 51820: // 'declare' 'context'
+ whitespace();
+ parse_ContextItemDecl();
+ break;
+ case 101996: // 'declare' 'option'
+ whitespace();
+ parse_OptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_AnnotatedDecl();
+ }
+ lookahead1W(28); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ eventHandler.endNonterminal("Prolog", e0);
+ }
+
+ function parse_Separator()
+ {
+ eventHandler.startNonterminal("Separator", e0);
+ shift(53); // ';'
+ eventHandler.endNonterminal("Separator", e0);
+ }
+
+ function parse_Setter()
+ {
+ eventHandler.startNonterminal("Setter", e0);
+ switch (l1)
+ {
+ case 108: // 'declare'
+ lookahead2W(172); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ // 'copy-namespaces' | 'decimal-format' | 'default' | 'ordering' | 'revalidation'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 55916) // 'declare' 'default'
+ {
+ lk = memoized(1, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_DefaultCollationDecl();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_EmptyOrderDecl();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -9;
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(1, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 43628: // 'declare' 'boundary-space'
+ parse_BoundarySpaceDecl();
+ break;
+ case -2:
+ parse_DefaultCollationDecl();
+ break;
+ case 42604: // 'declare' 'base-uri'
+ parse_BaseURIDecl();
+ break;
+ case 50284: // 'declare' 'construction'
+ parse_ConstructionDecl();
+ break;
+ case 104044: // 'declare' 'ordering'
+ parse_OrderingModeDecl();
+ break;
+ case -6:
+ parse_EmptyOrderDecl();
+ break;
+ case 113772: // 'declare' 'revalidation'
+ parse_RevalidationDecl();
+ break;
+ case 53356: // 'declare' 'copy-namespaces'
+ parse_CopyNamespacesDecl();
+ break;
+ default:
+ parse_DecimalFormatDecl();
+ }
+ eventHandler.endNonterminal("Setter", e0);
+ }
+
+ function parse_BoundarySpaceDecl()
+ {
+ eventHandler.startNonterminal("BoundarySpaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(33); // S^WS | '(:' | 'boundary-space'
+ shift(85); // 'boundary-space'
+ lookahead1W(133); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 214: // 'preserve'
+ shift(214); // 'preserve'
+ break;
+ default:
+ shift(241); // 'strip'
+ }
+ eventHandler.endNonterminal("BoundarySpaceDecl", e0);
+ }
+
+ function parse_DefaultCollationDecl()
+ {
+ eventHandler.startNonterminal("DefaultCollationDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(38); // S^WS | '(:' | 'collation'
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultCollationDecl", e0);
+ }
+
+ function try_DefaultCollationDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(38); // S^WS | '(:' | 'collation'
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_BaseURIDecl()
+ {
+ eventHandler.startNonterminal("BaseURIDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(32); // S^WS | '(:' | 'base-uri'
+ shift(83); // 'base-uri'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("BaseURIDecl", e0);
+ }
+
+ function parse_ConstructionDecl()
+ {
+ eventHandler.startNonterminal("ConstructionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(41); // S^WS | '(:' | 'construction'
+ shift(98); // 'construction'
+ lookahead1W(133); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 241: // 'strip'
+ shift(241); // 'strip'
+ break;
+ default:
+ shift(214); // 'preserve'
+ }
+ eventHandler.endNonterminal("ConstructionDecl", e0);
+ }
+
+ function parse_OrderingModeDecl()
+ {
+ eventHandler.startNonterminal("OrderingModeDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(68); // S^WS | '(:' | 'ordering'
+ shift(203); // 'ordering'
+ lookahead1W(131); // S^WS | '(:' | 'ordered' | 'unordered'
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ default:
+ shift(256); // 'unordered'
+ }
+ eventHandler.endNonterminal("OrderingModeDecl", e0);
+ }
+
+ function parse_EmptyOrderDecl()
+ {
+ eventHandler.startNonterminal("EmptyOrderDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shift(201); // 'order'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shift(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shift(147); // 'greatest'
+ break;
+ default:
+ shift(173); // 'least'
+ }
+ eventHandler.endNonterminal("EmptyOrderDecl", e0);
+ }
+
+ function try_EmptyOrderDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shiftT(201); // 'order'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shiftT(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shiftT(147); // 'greatest'
+ break;
+ default:
+ shiftT(173); // 'least'
+ }
+ }
+
+ function parse_CopyNamespacesDecl()
+ {
+ eventHandler.startNonterminal("CopyNamespacesDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(44); // S^WS | '(:' | 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ lookahead1W(128); // S^WS | '(:' | 'no-preserve' | 'preserve'
+ whitespace();
+ parse_PreserveMode();
+ lookahead1W(25); // S^WS | '(:' | ','
+ shift(41); // ','
+ lookahead1W(123); // S^WS | '(:' | 'inherit' | 'no-inherit'
+ whitespace();
+ parse_InheritMode();
+ eventHandler.endNonterminal("CopyNamespacesDecl", e0);
+ }
+
+ function parse_PreserveMode()
+ {
+ eventHandler.startNonterminal("PreserveMode", e0);
+ switch (l1)
+ {
+ case 214: // 'preserve'
+ shift(214); // 'preserve'
+ break;
+ default:
+ shift(190); // 'no-preserve'
+ }
+ eventHandler.endNonterminal("PreserveMode", e0);
+ }
+
+ function parse_InheritMode()
+ {
+ eventHandler.startNonterminal("InheritMode", e0);
+ switch (l1)
+ {
+ case 157: // 'inherit'
+ shift(157); // 'inherit'
+ break;
+ default:
+ shift(189); // 'no-inherit'
+ }
+ eventHandler.endNonterminal("InheritMode", e0);
+ }
+
+ function parse_DecimalFormatDecl()
+ {
+ eventHandler.startNonterminal("DecimalFormatDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(114); // S^WS | '(:' | 'decimal-format' | 'default'
+ switch (l1)
+ {
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ break;
+ default:
+ shift(109); // 'default'
+ lookahead1W(45); // S^WS | '(:' | 'decimal-format'
+ shift(106); // 'decimal-format'
+ }
+ for (;;)
+ {
+ lookahead1W(180); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
+ // 'grouping-separator' | 'infinity' | 'minus-sign' | 'pattern-separator' |
+ // 'per-mille' | 'percent' | 'zero-digit'
+ if (l1 == 53) // ';'
+ {
+ break;
+ }
+ whitespace();
+ parse_DFPropertyName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ eventHandler.endNonterminal("DecimalFormatDecl", e0);
+ }
+
+ function parse_DFPropertyName()
+ {
+ eventHandler.startNonterminal("DFPropertyName", e0);
+ switch (l1)
+ {
+ case 107: // 'decimal-separator'
+ shift(107); // 'decimal-separator'
+ break;
+ case 149: // 'grouping-separator'
+ shift(149); // 'grouping-separator'
+ break;
+ case 156: // 'infinity'
+ shift(156); // 'infinity'
+ break;
+ case 179: // 'minus-sign'
+ shift(179); // 'minus-sign'
+ break;
+ case 67: // 'NaN'
+ shift(67); // 'NaN'
+ break;
+ case 209: // 'percent'
+ shift(209); // 'percent'
+ break;
+ case 208: // 'per-mille'
+ shift(208); // 'per-mille'
+ break;
+ case 275: // 'zero-digit'
+ shift(275); // 'zero-digit'
+ break;
+ case 116: // 'digit'
+ shift(116); // 'digit'
+ break;
+ default:
+ shift(207); // 'pattern-separator'
+ }
+ eventHandler.endNonterminal("DFPropertyName", e0);
+ }
+
+ function parse_Import()
+ {
+ eventHandler.startNonterminal("Import", e0);
+ switch (l1)
+ {
+ case 153: // 'import'
+ lookahead2W(126); // S^WS | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 115353: // 'import' 'schema'
+ parse_SchemaImport();
+ break;
+ default:
+ parse_ModuleImport();
+ }
+ eventHandler.endNonterminal("Import", e0);
+ }
+
+ function parse_SchemaImport()
+ {
+ eventHandler.startNonterminal("SchemaImport", e0);
+ shift(153); // 'import'
+ lookahead1W(73); // S^WS | '(:' | 'schema'
+ shift(225); // 'schema'
+ lookahead1W(137); // URILiteral | S^WS | '(:' | 'default' | 'namespace'
+ if (l1 != 7) // URILiteral
+ {
+ whitespace();
+ parse_SchemaPrefix();
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(108); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 81) // 'at'
+ {
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("SchemaImport", e0);
+ }
+
+ function parse_SchemaPrefix()
+ {
+ eventHandler.startNonterminal("SchemaPrefix", e0);
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ break;
+ default:
+ shift(109); // 'default'
+ lookahead1W(47); // S^WS | '(:' | 'element'
+ shift(121); // 'element'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ }
+ eventHandler.endNonterminal("SchemaPrefix", e0);
+ }
+
+ function parse_ModuleImport()
+ {
+ eventHandler.startNonterminal("ModuleImport", e0);
+ shift(153); // 'import'
+ lookahead1W(60); // S^WS | '(:' | 'module'
+ shift(182); // 'module'
+ lookahead1W(90); // URILiteral | S^WS | '(:' | 'namespace'
+ if (l1 == 184) // 'namespace'
+ {
+ shift(184); // 'namespace'
+ lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(108); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 81) // 'at'
+ {
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("ModuleImport", e0);
+ }
+
+ function parse_NamespaceDecl()
+ {
+ eventHandler.startNonterminal("NamespaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(247); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ lookahead1W(29); // S^WS | '(:' | '='
+ shift(60); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("NamespaceDecl", e0);
+ }
+
+ function parse_DefaultNamespaceDecl()
+ {
+ eventHandler.startNonterminal("DefaultNamespaceDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shift(109); // 'default'
+ lookahead1W(115); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ default:
+ shift(145); // 'function'
+ }
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shift(184); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultNamespaceDecl", e0);
+ }
+
+ function try_DefaultNamespaceDecl()
+ {
+ shiftT(108); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'default'
+ shiftT(109); // 'default'
+ lookahead1W(115); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ default:
+ shiftT(145); // 'function'
+ }
+ lookahead1W(61); // S^WS | '(:' | 'namespace'
+ shiftT(184); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_FTOptionDecl()
+ {
+ eventHandler.startNonterminal("FTOptionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(52); // S^WS | '(:' | 'ft-option'
+ shift(141); // 'ft-option'
+ lookahead1W(81); // S^WS | '(:' | 'using'
+ whitespace();
+ parse_FTMatchOptions();
+ eventHandler.endNonterminal("FTOptionDecl", e0);
+ }
+
+ function parse_AnnotatedDecl()
+ {
+ eventHandler.startNonterminal("AnnotatedDecl", e0);
+ shift(108); // 'declare'
+ for (;;)
+ {
+ lookahead1W(170); // S^WS | '%' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ // 'updating' | 'variable'
+ if (l1 != 32 // '%'
+ && l1 != 257) // 'updating'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 257: // 'updating'
+ whitespace();
+ parse_CompatibilityAnnotation();
+ break;
+ default:
+ whitespace();
+ parse_Annotation();
+ }
+ }
+ switch (l1)
+ {
+ case 262: // 'variable'
+ whitespace();
+ parse_VarDecl();
+ break;
+ case 145: // 'function'
+ whitespace();
+ parse_FunctionDecl();
+ break;
+ case 95: // 'collection'
+ whitespace();
+ parse_CollectionDecl();
+ break;
+ case 155: // 'index'
+ whitespace();
+ parse_IndexDecl();
+ break;
+ default:
+ whitespace();
+ parse_ICDecl();
+ }
+ eventHandler.endNonterminal("AnnotatedDecl", e0);
+ }
+
+ function parse_CompatibilityAnnotation()
+ {
+ eventHandler.startNonterminal("CompatibilityAnnotation", e0);
+ shift(257); // 'updating'
+ eventHandler.endNonterminal("CompatibilityAnnotation", e0);
+ }
+
+ function parse_Annotation()
+ {
+ eventHandler.startNonterminal("Annotation", e0);
+ shift(32); // '%'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ // 'updating' | 'variable'
+ if (l1 == 34) // '('
+ {
+ shift(34); // '('
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ whitespace();
+ parse_Literal();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ whitespace();
+ parse_Literal();
+ }
+ shift(37); // ')'
+ }
+ eventHandler.endNonterminal("Annotation", e0);
+ }
+
+ function try_Annotation()
+ {
+ shiftT(32); // '%'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_EQName();
+ lookahead1W(171); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ // 'updating' | 'variable'
+ if (l1 == 34) // '('
+ {
+ shiftT(34); // '('
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ try_Literal();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(154); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:'
+ try_Literal();
+ }
+ shiftT(37); // ')'
+ }
+ }
+
+ function parse_VarDecl()
+ {
+ eventHandler.startNonterminal("VarDecl", e0);
+ shift(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(147); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(106); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 52: // ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(133); // 'external'
+ lookahead1W(104); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("VarDecl", e0);
+ }
+
+ function parse_VarValue()
+ {
+ eventHandler.startNonterminal("VarValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarValue", e0);
+ }
+
+ function parse_VarDefaultValue()
+ {
+ eventHandler.startNonterminal("VarDefaultValue", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("VarDefaultValue", e0);
+ }
+
+ function parse_ContextItemDecl()
+ {
+ eventHandler.startNonterminal("ContextItemDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(43); // S^WS | '(:' | 'context'
+ shift(101); // 'context'
+ lookahead1W(55); // S^WS | '(:' | 'item'
+ shift(165); // 'item'
+ lookahead1W(147); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_ItemType();
+ }
+ lookahead1W(106); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 52: // ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(133); // 'external'
+ lookahead1W(104); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("ContextItemDecl", e0);
+ }
+
+ function parse_ParamList()
+ {
+ eventHandler.startNonterminal("ParamList", e0);
+ parse_Param();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_Param();
+ }
+ eventHandler.endNonterminal("ParamList", e0);
+ }
+
+ function try_ParamList()
+ {
+ try_Param();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_Param();
+ }
+ }
+
+ function parse_Param()
+ {
+ eventHandler.startNonterminal("Param", e0);
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ eventHandler.endNonterminal("Param", e0);
+ }
+
+ function try_Param()
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_EQName();
+ lookahead1W(143); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ }
+
+ function parse_FunctionBody()
+ {
+ eventHandler.startNonterminal("FunctionBody", e0);
+ parse_EnclosedExpr();
+ eventHandler.endNonterminal("FunctionBody", e0);
+ }
+
+ function try_FunctionBody()
+ {
+ try_EnclosedExpr();
+ }
+
+ function parse_EnclosedExpr()
+ {
+ eventHandler.startNonterminal("EnclosedExpr", e0);
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("EnclosedExpr", e0);
+ }
+
+ function try_EnclosedExpr()
+ {
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_OptionDecl()
+ {
+ eventHandler.startNonterminal("OptionDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(66); // S^WS | '(:' | 'option'
+ shift(199); // 'option'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("OptionDecl", e0);
+ }
+
+ function parse_Expr()
+ {
+ eventHandler.startNonterminal("Expr", e0);
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Expr", e0);
+ }
+
+ function try_Expr()
+ {
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ }
+
+ function parse_FLWORExpr()
+ {
+ eventHandler.startNonterminal("FLWORExpr", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ // 'where'
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnClause();
+ eventHandler.endNonterminal("FLWORExpr", e0);
+ }
+
+ function try_FLWORExpr()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ // 'where'
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnClause();
+ }
+
+ function parse_InitialClause()
+ {
+ eventHandler.startNonterminal("InitialClause", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(141); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ parse_ForClause();
+ break;
+ case 174: // 'let'
+ parse_LetClause();
+ break;
+ default:
+ parse_WindowClause();
+ }
+ eventHandler.endNonterminal("InitialClause", e0);
+ }
+
+ function try_InitialClause()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(141); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ try_ForClause();
+ break;
+ case 174: // 'let'
+ try_LetClause();
+ break;
+ default:
+ try_WindowClause();
+ }
+ }
+
+ function parse_IntermediateClause()
+ {
+ eventHandler.startNonterminal("IntermediateClause", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ case 174: // 'let'
+ parse_InitialClause();
+ break;
+ case 266: // 'where'
+ parse_WhereClause();
+ break;
+ case 148: // 'group'
+ parse_GroupByClause();
+ break;
+ case 105: // 'count'
+ parse_CountClause();
+ break;
+ default:
+ parse_OrderByClause();
+ }
+ eventHandler.endNonterminal("IntermediateClause", e0);
+ }
+
+ function try_IntermediateClause()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ case 174: // 'let'
+ try_InitialClause();
+ break;
+ case 266: // 'where'
+ try_WhereClause();
+ break;
+ case 148: // 'group'
+ try_GroupByClause();
+ break;
+ case 105: // 'count'
+ try_CountClause();
+ break;
+ default:
+ try_OrderByClause();
+ }
+ }
+
+ function parse_ForClause()
+ {
+ eventHandler.startNonterminal("ForClause", e0);
+ shift(137); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ }
+ eventHandler.endNonterminal("ForClause", e0);
+ }
+
+ function try_ForClause()
+ {
+ shiftT(137); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ }
+ }
+
+ function parse_ForBinding()
+ {
+ eventHandler.startNonterminal("ForBinding", e0);
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(158); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 72) // 'allowing'
+ {
+ whitespace();
+ parse_AllowingEmpty();
+ }
+ lookahead1W(150); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 81) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 228) // 'score'
+ {
+ whitespace();
+ parse_FTScoreVar();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ForBinding", e0);
+ }
+
+ function try_ForBinding()
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(164); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(158); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 72) // 'allowing'
+ {
+ try_AllowingEmpty();
+ }
+ lookahead1W(150); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 81) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 228) // 'score'
+ {
+ try_FTScoreVar();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_AllowingEmpty()
+ {
+ eventHandler.startNonterminal("AllowingEmpty", e0);
+ shift(72); // 'allowing'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shift(123); // 'empty'
+ eventHandler.endNonterminal("AllowingEmpty", e0);
+ }
+
+ function try_AllowingEmpty()
+ {
+ shiftT(72); // 'allowing'
+ lookahead1W(49); // S^WS | '(:' | 'empty'
+ shiftT(123); // 'empty'
+ }
+
+ function parse_PositionalVar()
+ {
+ eventHandler.startNonterminal("PositionalVar", e0);
+ shift(81); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("PositionalVar", e0);
+ }
+
+ function try_PositionalVar()
+ {
+ shiftT(81); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+
+ function parse_FTScoreVar()
+ {
+ eventHandler.startNonterminal("FTScoreVar", e0);
+ shift(228); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("FTScoreVar", e0);
+ }
+
+ function try_FTScoreVar()
+ {
+ shiftT(228); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+
+ function parse_LetClause()
+ {
+ eventHandler.startNonterminal("LetClause", e0);
+ shift(174); // 'let'
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ }
+ eventHandler.endNonterminal("LetClause", e0);
+ }
+
+ function try_LetClause()
+ {
+ shiftT(174); // 'let'
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(96); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ }
+ }
+
+ function parse_LetBinding()
+ {
+ eventHandler.startNonterminal("LetBinding", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ break;
+ default:
+ parse_FTScoreVar();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("LetBinding", e0);
+ }
+
+ function try_LetBinding()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(105); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ break;
+ default:
+ try_FTScoreVar();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_WindowClause()
+ {
+ eventHandler.startNonterminal("WindowClause", e0);
+ shift(137); // 'for'
+ lookahead1W(135); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 251: // 'tumbling'
+ whitespace();
+ parse_TumblingWindowClause();
+ break;
+ default:
+ whitespace();
+ parse_SlidingWindowClause();
+ }
+ eventHandler.endNonterminal("WindowClause", e0);
+ }
+
+ function try_WindowClause()
+ {
+ shiftT(137); // 'for'
+ lookahead1W(135); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 251: // 'tumbling'
+ try_TumblingWindowClause();
+ break;
+ default:
+ try_SlidingWindowClause();
+ }
+ }
+
+ function parse_TumblingWindowClause()
+ {
+ eventHandler.startNonterminal("TumblingWindowClause", e0);
+ shift(251); // 'tumbling'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shift(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ if (l1 == 126 // 'end'
+ || l1 == 198) // 'only'
+ {
+ whitespace();
+ parse_WindowEndCondition();
+ }
+ eventHandler.endNonterminal("TumblingWindowClause", e0);
+ }
+
+ function try_TumblingWindowClause()
+ {
+ shiftT(251); // 'tumbling'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shiftT(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ try_WindowStartCondition();
+ if (l1 == 126 // 'end'
+ || l1 == 198) // 'only'
+ {
+ try_WindowEndCondition();
+ }
+ }
+
+ function parse_SlidingWindowClause()
+ {
+ eventHandler.startNonterminal("SlidingWindowClause", e0);
+ shift(234); // 'sliding'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shift(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ whitespace();
+ parse_WindowEndCondition();
+ eventHandler.endNonterminal("SlidingWindowClause", e0);
+ }
+
+ function try_SlidingWindowClause()
+ {
+ shiftT(234); // 'sliding'
+ lookahead1W(85); // S^WS | '(:' | 'window'
+ shiftT(269); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ try_WindowStartCondition();
+ try_WindowEndCondition();
+ }
+
+ function parse_WindowStartCondition()
+ {
+ eventHandler.startNonterminal("WindowStartCondition", e0);
+ shift(237); // 'start'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shift(265); // 'when'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowStartCondition", e0);
+ }
+
+ function try_WindowStartCondition()
+ {
+ shiftT(237); // 'start'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shiftT(265); // 'when'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_WindowEndCondition()
+ {
+ eventHandler.startNonterminal("WindowEndCondition", e0);
+ if (l1 == 198) // 'only'
+ {
+ shift(198); // 'only'
+ }
+ lookahead1W(50); // S^WS | '(:' | 'end'
+ shift(126); // 'end'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shift(265); // 'when'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowEndCondition", e0);
+ }
+
+ function try_WindowEndCondition()
+ {
+ if (l1 == 198) // 'only'
+ {
+ shiftT(198); // 'only'
+ }
+ lookahead1W(50); // S^WS | '(:' | 'end'
+ shiftT(126); // 'end'
+ lookahead1W(163); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(83); // S^WS | '(:' | 'when'
+ shiftT(265); // 'when'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_WindowVars()
+ {
+ eventHandler.startNonterminal("WindowVars", e0);
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_CurrentItem();
+ }
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 81) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(153); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 215) // 'previous'
+ {
+ shift(215); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_PreviousItem();
+ }
+ lookahead1W(127); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 187) // 'next'
+ {
+ shift(187); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NextItem();
+ }
+ eventHandler.endNonterminal("WindowVars", e0);
+ }
+
+ function try_WindowVars()
+ {
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CurrentItem();
+ }
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 81) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(153); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 215) // 'previous'
+ {
+ shiftT(215); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_PreviousItem();
+ }
+ lookahead1W(127); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 187) // 'next'
+ {
+ shiftT(187); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_NextItem();
+ }
+ }
+
+ function parse_CurrentItem()
+ {
+ eventHandler.startNonterminal("CurrentItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("CurrentItem", e0);
+ }
+
+ function try_CurrentItem()
+ {
+ try_EQName();
+ }
+
+ function parse_PreviousItem()
+ {
+ eventHandler.startNonterminal("PreviousItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("PreviousItem", e0);
+ }
+
+ function try_PreviousItem()
+ {
+ try_EQName();
+ }
+
+ function parse_NextItem()
+ {
+ eventHandler.startNonterminal("NextItem", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("NextItem", e0);
+ }
+
+ function try_NextItem()
+ {
+ try_EQName();
+ }
+
+ function parse_CountClause()
+ {
+ eventHandler.startNonterminal("CountClause", e0);
+ shift(105); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("CountClause", e0);
+ }
+
+ function try_CountClause()
+ {
+ shiftT(105); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+
+ function parse_WhereClause()
+ {
+ eventHandler.startNonterminal("WhereClause", e0);
+ shift(266); // 'where'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WhereClause", e0);
+ }
+
+ function try_WhereClause()
+ {
+ shiftT(266); // 'where'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_GroupByClause()
+ {
+ eventHandler.startNonterminal("GroupByClause", e0);
+ shift(148); // 'group'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_GroupingSpecList();
+ eventHandler.endNonterminal("GroupByClause", e0);
+ }
+
+ function try_GroupByClause()
+ {
+ shiftT(148); // 'group'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_GroupingSpecList();
+ }
+
+ function parse_GroupingSpecList()
+ {
+ eventHandler.startNonterminal("GroupingSpecList", e0);
+ parse_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ // 'stable' | 'where'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_GroupingSpec();
+ }
+ eventHandler.endNonterminal("GroupingSpecList", e0);
+ }
+
+ function try_GroupingSpecList()
+ {
+ try_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ // 'stable' | 'where'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_GroupingSpec();
+ }
+ }
+
+ function parse_GroupingSpec()
+ {
+ eventHandler.startNonterminal("GroupingSpec", e0);
+ parse_GroupingVariable();
+ lookahead1W(182); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ // 'let' | 'order' | 'return' | 'stable' | 'where'
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("GroupingSpec", e0);
+ }
+
+ function try_GroupingSpec()
+ {
+ try_GroupingVariable();
+ lookahead1W(182); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ // 'let' | 'order' | 'return' | 'stable' | 'where'
+ if (l1 == 52 // ':='
+ || l1 == 79) // 'as'
+ {
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_GroupingVariable()
+ {
+ eventHandler.startNonterminal("GroupingVariable", e0);
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("GroupingVariable", e0);
+ }
+
+ function try_GroupingVariable()
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+
+ function parse_OrderByClause()
+ {
+ eventHandler.startNonterminal("OrderByClause", e0);
+ switch (l1)
+ {
+ case 201: // 'order'
+ shift(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ break;
+ default:
+ shift(236); // 'stable'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shift(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shift(87); // 'by'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_OrderSpecList();
+ eventHandler.endNonterminal("OrderByClause", e0);
+ }
+
+ function try_OrderByClause()
+ {
+ switch (l1)
+ {
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ break;
+ default:
+ shiftT(236); // 'stable'
+ lookahead1W(67); // S^WS | '(:' | 'order'
+ shiftT(201); // 'order'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_OrderSpecList();
+ }
+
+ function parse_OrderSpecList()
+ {
+ eventHandler.startNonterminal("OrderSpecList", e0);
+ parse_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ // 'stable' | 'where'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_OrderSpec();
+ }
+ eventHandler.endNonterminal("OrderSpecList", e0);
+ }
+
+ function try_OrderSpecList()
+ {
+ try_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(176); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ // 'stable' | 'where'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_OrderSpec();
+ }
+ }
+
+ function parse_OrderSpec()
+ {
+ eventHandler.startNonterminal("OrderSpec", e0);
+ parse_ExprSingle();
+ whitespace();
+ parse_OrderModifier();
+ eventHandler.endNonterminal("OrderSpec", e0);
+ }
+
+ function try_OrderSpec()
+ {
+ try_ExprSingle();
+ try_OrderModifier();
+ }
+
+ function parse_OrderModifier()
+ {
+ eventHandler.startNonterminal("OrderModifier", e0);
+ if (l1 == 80 // 'ascending'
+ || l1 == 113) // 'descending'
+ {
+ switch (l1)
+ {
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ default:
+ shift(113); // 'descending'
+ }
+ }
+ lookahead1W(179); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ // 'order' | 'return' | 'stable' | 'where'
+ if (l1 == 123) // 'empty'
+ {
+ shift(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shift(147); // 'greatest'
+ break;
+ default:
+ shift(173); // 'least'
+ }
+ }
+ lookahead1W(177); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ // 'return' | 'stable' | 'where'
+ if (l1 == 94) // 'collation'
+ {
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("OrderModifier", e0);
+ }
+
+ function try_OrderModifier()
+ {
+ if (l1 == 80 // 'ascending'
+ || l1 == 113) // 'descending'
+ {
+ switch (l1)
+ {
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ default:
+ shiftT(113); // 'descending'
+ }
+ }
+ lookahead1W(179); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ // 'order' | 'return' | 'stable' | 'where'
+ if (l1 == 123) // 'empty'
+ {
+ shiftT(123); // 'empty'
+ lookahead1W(121); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 147: // 'greatest'
+ shiftT(147); // 'greatest'
+ break;
+ default:
+ shiftT(173); // 'least'
+ }
+ }
+ lookahead1W(177); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ // 'return' | 'stable' | 'where'
+ if (l1 == 94) // 'collation'
+ {
+ shiftT(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_ReturnClause()
+ {
+ eventHandler.startNonterminal("ReturnClause", e0);
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReturnClause", e0);
+ }
+
+ function try_ReturnClause()
+ {
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedExpr()
+ {
+ eventHandler.startNonterminal("QuantifiedExpr", e0);
+ switch (l1)
+ {
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ default:
+ shift(129); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ shift(224); // 'satisfies'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedExpr", e0);
+ }
+
+ function try_QuantifiedExpr()
+ {
+ switch (l1)
+ {
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ default:
+ shiftT(129); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(110); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ shiftT(224); // 'satisfies'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_SwitchExpr()
+ {
+ eventHandler.startNonterminal("SwitchExpr", e0);
+ shift(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchExpr", e0);
+ }
+
+ function try_SwitchExpr()
+ {
+ shiftT(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_SwitchCaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseClause()
+ {
+ eventHandler.startNonterminal("SwitchCaseClause", e0);
+ for (;;)
+ {
+ shift(88); // 'case'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseClause", e0);
+ }
+
+ function try_SwitchCaseClause()
+ {
+ for (;;)
+ {
+ shiftT(88); // 'case'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseOperand()
+ {
+ eventHandler.startNonterminal("SwitchCaseOperand", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseOperand", e0);
+ }
+
+ function try_SwitchCaseOperand()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TypeswitchExpr()
+ {
+ eventHandler.startNonterminal("TypeswitchExpr", e0);
+ shift(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TypeswitchExpr", e0);
+ }
+
+ function try_TypeswitchExpr()
+ {
+ shiftT(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_CaseClause();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_CaseClause()
+ {
+ eventHandler.startNonterminal("CaseClause", e0);
+ shift(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceTypeUnion();
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("CaseClause", e0);
+ }
+
+ function try_CaseClause()
+ {
+ shiftT(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceTypeUnion();
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_SequenceTypeUnion()
+ {
+ eventHandler.startNonterminal("SequenceTypeUnion", e0);
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(134); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shift(279); // '|'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("SequenceTypeUnion", e0);
+ }
+
+ function try_SequenceTypeUnion()
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(134); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shiftT(279); // '|'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+ }
+
+ function parse_IfExpr()
+ {
+ eventHandler.startNonterminal("IfExpr", e0);
+ shift(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shift(245); // 'then'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(122); // 'else'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("IfExpr", e0);
+ }
+
+ function try_IfExpr()
+ {
+ shiftT(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shiftT(245); // 'then'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(122); // 'else'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_TryCatchExpr()
+ {
+ eventHandler.startNonterminal("TryCatchExpr", e0);
+ parse_TryClause();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ whitespace();
+ parse_CatchClause();
+ lookahead1W(184); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'catch' | 'collation' | 'count' | 'default' |
+ // 'descending' | 'else' | 'empty' | 'end' | 'for' | 'group' | 'into' | 'let' |
+ // 'modify' | 'only' | 'order' | 'return' | 'satisfies' | 'stable' | 'start' |
+ // 'where' | 'with' | '|}' | '}'
+ if (l1 != 91) // 'catch'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchExpr", e0);
+ }
+
+ function try_TryCatchExpr()
+ {
+ try_TryClause();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ try_CatchClause();
+ lookahead1W(184); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'catch' | 'collation' | 'count' | 'default' |
+ // 'descending' | 'else' | 'empty' | 'end' | 'for' | 'group' | 'into' | 'let' |
+ // 'modify' | 'only' | 'order' | 'return' | 'satisfies' | 'stable' | 'start' |
+ // 'where' | 'with' | '|}' | '}'
+ if (l1 != 91) // 'catch'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TryClause()
+ {
+ eventHandler.startNonterminal("TryClause", e0);
+ shift(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_TryTargetExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("TryClause", e0);
+ }
+
+ function try_TryClause()
+ {
+ shiftT(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_TryTargetExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_TryTargetExpr()
+ {
+ eventHandler.startNonterminal("TryTargetExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("TryTargetExpr", e0);
+ }
+
+ function try_TryTargetExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_CatchClause()
+ {
+ eventHandler.startNonterminal("CatchClause", e0);
+ shift(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_CatchErrorList();
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("CatchClause", e0);
+ }
+
+ function try_CatchClause()
+ {
+ shiftT(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CatchErrorList();
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_CatchErrorList()
+ {
+ eventHandler.startNonterminal("CatchErrorList", e0);
+ parse_NameTest();
+ for (;;)
+ {
+ lookahead1W(136); // S^WS | '(:' | '{' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shift(279); // '|'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("CatchErrorList", e0);
+ }
+
+ function try_CatchErrorList()
+ {
+ try_NameTest();
+ for (;;)
+ {
+ lookahead1W(136); // S^WS | '(:' | '{' | '|'
+ if (l1 != 279) // '|'
+ {
+ break;
+ }
+ shiftT(279); // '|'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_NameTest();
+ }
+ }
+
+ function parse_OrExpr()
+ {
+ eventHandler.startNonterminal("OrExpr", e0);
+ parse_AndExpr();
+ for (;;)
+ {
+ if (l1 != 200) // 'or'
+ {
+ break;
+ }
+ shift(200); // 'or'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AndExpr();
+ }
+ eventHandler.endNonterminal("OrExpr", e0);
+ }
+
+ function try_OrExpr()
+ {
+ try_AndExpr();
+ for (;;)
+ {
+ if (l1 != 200) // 'or'
+ {
+ break;
+ }
+ shiftT(200); // 'or'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AndExpr();
+ }
+ }
+
+ function parse_AndExpr()
+ {
+ eventHandler.startNonterminal("AndExpr", e0);
+ parse_ComparisonExpr();
+ for (;;)
+ {
+ if (l1 != 75) // 'and'
+ {
+ break;
+ }
+ shift(75); // 'and'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ComparisonExpr();
+ }
+ eventHandler.endNonterminal("AndExpr", e0);
+ }
+
+ function try_AndExpr()
+ {
+ try_ComparisonExpr();
+ for (;;)
+ {
+ if (l1 != 75) // 'and'
+ {
+ break;
+ }
+ shiftT(75); // 'and'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ComparisonExpr();
+ }
+ }
+
+ function parse_ComparisonExpr()
+ {
+ eventHandler.startNonterminal("ComparisonExpr", e0);
+ parse_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 54 // '<'
+ || l1 == 57 // '<<'
+ || l1 == 58 // '<='
+ || l1 == 60 // '='
+ || l1 == 61 // '>'
+ || l1 == 62 // '>='
+ || l1 == 63 // '>>'
+ || l1 == 128 // 'eq'
+ || l1 == 146 // 'ge'
+ || l1 == 150 // 'gt'
+ || l1 == 164 // 'is'
+ || l1 == 172 // 'le'
+ || l1 == 178 // 'lt'
+ || l1 == 186) // 'ne'
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ case 146: // 'ge'
+ case 150: // 'gt'
+ case 172: // 'le'
+ case 178: // 'lt'
+ case 186: // 'ne'
+ whitespace();
+ parse_ValueComp();
+ break;
+ case 57: // '<<'
+ case 63: // '>>'
+ case 164: // 'is'
+ whitespace();
+ parse_NodeComp();
+ break;
+ default:
+ whitespace();
+ parse_GeneralComp();
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_FTContainsExpr();
+ }
+ eventHandler.endNonterminal("ComparisonExpr", e0);
+ }
+
+ function try_ComparisonExpr()
+ {
+ try_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 54 // '<'
+ || l1 == 57 // '<<'
+ || l1 == 58 // '<='
+ || l1 == 60 // '='
+ || l1 == 61 // '>'
+ || l1 == 62 // '>='
+ || l1 == 63 // '>>'
+ || l1 == 128 // 'eq'
+ || l1 == 146 // 'ge'
+ || l1 == 150 // 'gt'
+ || l1 == 164 // 'is'
+ || l1 == 172 // 'le'
+ || l1 == 178 // 'lt'
+ || l1 == 186) // 'ne'
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ case 146: // 'ge'
+ case 150: // 'gt'
+ case 172: // 'le'
+ case 178: // 'lt'
+ case 186: // 'ne'
+ try_ValueComp();
+ break;
+ case 57: // '<<'
+ case 63: // '>>'
+ case 164: // 'is'
+ try_NodeComp();
+ break;
+ default:
+ try_GeneralComp();
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_FTContainsExpr();
+ }
+ }
+
+ function parse_FTContainsExpr()
+ {
+ eventHandler.startNonterminal("FTContainsExpr", e0);
+ parse_StringConcatExpr();
+ if (l1 == 99) // 'contains'
+ {
+ shift(99); // 'contains'
+ lookahead1W(76); // S^WS | '(:' | 'text'
+ shift(244); // 'text'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ if (l1 == 271) // 'without'
+ {
+ whitespace();
+ parse_FTIgnoreOption();
+ }
+ }
+ eventHandler.endNonterminal("FTContainsExpr", e0);
+ }
+
+ function try_FTContainsExpr()
+ {
+ try_StringConcatExpr();
+ if (l1 == 99) // 'contains'
+ {
+ shiftT(99); // 'contains'
+ lookahead1W(76); // S^WS | '(:' | 'text'
+ shiftT(244); // 'text'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ if (l1 == 271) // 'without'
+ {
+ try_FTIgnoreOption();
+ }
+ }
+ }
+
+ function parse_StringConcatExpr()
+ {
+ eventHandler.startNonterminal("StringConcatExpr", e0);
+ parse_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 280) // '||'
+ {
+ break;
+ }
+ shift(280); // '||'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_RangeExpr();
+ }
+ eventHandler.endNonterminal("StringConcatExpr", e0);
+ }
+
+ function try_StringConcatExpr()
+ {
+ try_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 280) // '||'
+ {
+ break;
+ }
+ shiftT(280); // '||'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_RangeExpr();
+ }
+ }
+
+ function parse_RangeExpr()
+ {
+ eventHandler.startNonterminal("RangeExpr", e0);
+ parse_AdditiveExpr();
+ if (l1 == 248) // 'to'
+ {
+ shift(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("RangeExpr", e0);
+ }
+
+ function try_RangeExpr()
+ {
+ try_AdditiveExpr();
+ if (l1 == 248) // 'to'
+ {
+ shiftT(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_AdditiveExpr()
+ {
+ eventHandler.startNonterminal("AdditiveExpr", e0);
+ parse_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 40: // '+'
+ shift(40); // '+'
+ break;
+ default:
+ shift(42); // '-'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_MultiplicativeExpr();
+ }
+ eventHandler.endNonterminal("AdditiveExpr", e0);
+ }
+
+ function try_AdditiveExpr()
+ {
+ try_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 40: // '+'
+ shiftT(40); // '+'
+ break;
+ default:
+ shiftT(42); // '-'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_MultiplicativeExpr();
+ }
+ }
+
+ function parse_MultiplicativeExpr()
+ {
+ eventHandler.startNonterminal("MultiplicativeExpr", e0);
+ parse_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 38 // '*'
+ && l1 != 118 // 'div'
+ && l1 != 151 // 'idiv'
+ && l1 != 180) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ default:
+ shift(180); // 'mod'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_UnionExpr();
+ }
+ eventHandler.endNonterminal("MultiplicativeExpr", e0);
+ }
+
+ function try_MultiplicativeExpr()
+ {
+ try_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 38 // '*'
+ && l1 != 118 // 'div'
+ && l1 != 151 // 'idiv'
+ && l1 != 180) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ default:
+ shiftT(180); // 'mod'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_UnionExpr();
+ }
+ }
+
+ function parse_UnionExpr()
+ {
+ eventHandler.startNonterminal("UnionExpr", e0);
+ parse_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 254 // 'union'
+ && l1 != 279) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ default:
+ shift(279); // '|'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_IntersectExceptExpr();
+ }
+ eventHandler.endNonterminal("UnionExpr", e0);
+ }
+
+ function try_UnionExpr()
+ {
+ try_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 254 // 'union'
+ && l1 != 279) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ default:
+ shiftT(279); // '|'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_IntersectExceptExpr();
+ }
+ }
+
+ function parse_IntersectExceptExpr()
+ {
+ eventHandler.startNonterminal("IntersectExceptExpr", e0);
+ parse_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'intersect' | 'into' | 'is' | 'le' | 'let' |
+ // 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' |
+ // 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 162) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ default:
+ shift(131); // 'except'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_InstanceofExpr();
+ }
+ eventHandler.endNonterminal("IntersectExceptExpr", e0);
+ }
+
+ function try_IntersectExceptExpr()
+ {
+ try_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'intersect' | 'into' | 'is' | 'le' | 'let' |
+ // 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' |
+ // 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 162) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ default:
+ shiftT(131); // 'except'
+ }
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_InstanceofExpr();
+ }
+ }
+
+ function parse_InstanceofExpr()
+ {
+ eventHandler.startNonterminal("InstanceofExpr", e0);
+ parse_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 == 160) // 'instance'
+ {
+ shift(160); // 'instance'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("InstanceofExpr", e0);
+ }
+
+ function try_InstanceofExpr()
+ {
+ try_TreatExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 == 160) // 'instance'
+ {
+ shiftT(160); // 'instance'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+ }
+
+ function parse_TreatExpr()
+ {
+ eventHandler.startNonterminal("TreatExpr", e0);
+ parse_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ if (l1 == 249) // 'treat'
+ {
+ shift(249); // 'treat'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("TreatExpr", e0);
+ }
+
+ function try_TreatExpr()
+ {
+ try_CastableExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ if (l1 == 249) // 'treat'
+ {
+ shiftT(249); // 'treat'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+ }
+
+ function parse_CastableExpr()
+ {
+ eventHandler.startNonterminal("CastableExpr", e0);
+ parse_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'castable' | 'collation' | 'contains' | 'count' |
+ // 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
+ // 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ if (l1 == 90) // 'castable'
+ {
+ shift(90); // 'castable'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastableExpr", e0);
+ }
+
+ function try_CastableExpr()
+ {
+ try_CastExpr();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'castable' | 'collation' | 'contains' | 'count' |
+ // 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' |
+ // 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ if (l1 == 90) // 'castable'
+ {
+ shiftT(90); // 'castable'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_SingleType();
+ }
+ }
+
+ function parse_CastExpr()
+ {
+ eventHandler.startNonterminal("CastExpr", e0);
+ parse_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'cast' | 'castable' | 'collation' | 'contains' |
+ // 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
+ // 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
+ // 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' |
+ // 'order' | 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' |
+ // 'start' | 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' |
+ // '||' | '|}' | '}'
+ if (l1 == 89) // 'cast'
+ {
+ shift(89); // 'cast'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastExpr", e0);
+ }
+
+ function try_CastExpr()
+ {
+ try_UnaryExpr();
+ lookahead1W(227); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'cast' | 'castable' | 'collation' | 'contains' |
+ // 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
+ // 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
+ // 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' |
+ // 'order' | 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' |
+ // 'start' | 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' |
+ // '||' | '|}' | '}'
+ if (l1 == 89) // 'cast'
+ {
+ shiftT(89); // 'cast'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_SingleType();
+ }
+ }
+
+ function parse_UnaryExpr()
+ {
+ eventHandler.startNonterminal("UnaryExpr", e0);
+ for (;;)
+ {
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 42: // '-'
+ shift(42); // '-'
+ break;
+ default:
+ shift(40); // '+'
+ }
+ }
+ whitespace();
+ parse_ValueExpr();
+ eventHandler.endNonterminal("UnaryExpr", e0);
+ }
+
+ function try_UnaryExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 40 // '+'
+ && l1 != 42) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 42: // '-'
+ shiftT(42); // '-'
+ break;
+ default:
+ shiftT(40); // '+'
+ }
+ }
+ try_ValueExpr();
+ }
+
+ function parse_ValueExpr()
+ {
+ eventHandler.startNonterminal("ValueExpr", e0);
+ switch (l1)
+ {
+ case 260: // 'validate'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'lax' | 'le' | 'let' |
+ // 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' |
+ // 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' | 'strict' | 'times' |
+ // 'to' | 'treat' | 'type' | 'union' | 'where' | 'with' | 'words' | '{' | '|' |
+ // '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 87812: // 'validate' 'lax'
+ case 123140: // 'validate' 'strict'
+ case 129284: // 'validate' 'type'
+ case 141572: // 'validate' '{'
+ parse_ValidateExpr();
+ break;
+ case 35: // '(#'
+ parse_ExtensionExpr();
+ break;
+ default:
+ parse_SimpleMapExpr();
+ }
+ eventHandler.endNonterminal("ValueExpr", e0);
+ }
+
+ function try_ValueExpr()
+ {
+ switch (l1)
+ {
+ case 260: // 'validate'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'lax' | 'le' | 'let' |
+ // 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' |
+ // 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' | 'strict' | 'times' |
+ // 'to' | 'treat' | 'type' | 'union' | 'where' | 'with' | 'words' | '{' | '|' |
+ // '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 87812: // 'validate' 'lax'
+ case 123140: // 'validate' 'strict'
+ case 129284: // 'validate' 'type'
+ case 141572: // 'validate' '{'
+ try_ValidateExpr();
+ break;
+ case 35: // '(#'
+ try_ExtensionExpr();
+ break;
+ default:
+ try_SimpleMapExpr();
+ }
+ }
+
+ function parse_SimpleMapExpr()
+ {
+ eventHandler.startNonterminal("SimpleMapExpr", e0);
+ parse_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shift(26); // '!'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PathExpr();
+ }
+ eventHandler.endNonterminal("SimpleMapExpr", e0);
+ }
+
+ function try_SimpleMapExpr()
+ {
+ try_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shiftT(26); // '!'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PathExpr();
+ }
+ }
+
+ function parse_GeneralComp()
+ {
+ eventHandler.startNonterminal("GeneralComp", e0);
+ switch (l1)
+ {
+ case 60: // '='
+ shift(60); // '='
+ break;
+ case 27: // '!='
+ shift(27); // '!='
+ break;
+ case 54: // '<'
+ shift(54); // '<'
+ break;
+ case 58: // '<='
+ shift(58); // '<='
+ break;
+ case 61: // '>'
+ shift(61); // '>'
+ break;
+ default:
+ shift(62); // '>='
+ }
+ eventHandler.endNonterminal("GeneralComp", e0);
+ }
+
+ function try_GeneralComp()
+ {
+ switch (l1)
+ {
+ case 60: // '='
+ shiftT(60); // '='
+ break;
+ case 27: // '!='
+ shiftT(27); // '!='
+ break;
+ case 54: // '<'
+ shiftT(54); // '<'
+ break;
+ case 58: // '<='
+ shiftT(58); // '<='
+ break;
+ case 61: // '>'
+ shiftT(61); // '>'
+ break;
+ default:
+ shiftT(62); // '>='
+ }
+ }
+
+ function parse_ValueComp()
+ {
+ eventHandler.startNonterminal("ValueComp", e0);
+ switch (l1)
+ {
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ default:
+ shift(146); // 'ge'
+ }
+ eventHandler.endNonterminal("ValueComp", e0);
+ }
+
+ function try_ValueComp()
+ {
+ switch (l1)
+ {
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ default:
+ shiftT(146); // 'ge'
+ }
+ }
+
+ function parse_NodeComp()
+ {
+ eventHandler.startNonterminal("NodeComp", e0);
+ switch (l1)
+ {
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 57: // '<<'
+ shift(57); // '<<'
+ break;
+ default:
+ shift(63); // '>>'
+ }
+ eventHandler.endNonterminal("NodeComp", e0);
+ }
+
+ function try_NodeComp()
+ {
+ switch (l1)
+ {
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 57: // '<<'
+ shiftT(57); // '<<'
+ break;
+ default:
+ shiftT(63); // '>>'
+ }
+ }
+
+ function parse_ValidateExpr()
+ {
+ eventHandler.startNonterminal("ValidateExpr", e0);
+ shift(260); // 'validate'
+ lookahead1W(160); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 276) // '{'
+ {
+ switch (l1)
+ {
+ case 252: // 'type'
+ shift(252); // 'type'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_TypeName();
+ break;
+ default:
+ whitespace();
+ parse_ValidationMode();
+ }
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("ValidateExpr", e0);
+ }
+
+ function try_ValidateExpr()
+ {
+ shiftT(260); // 'validate'
+ lookahead1W(160); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 276) // '{'
+ {
+ switch (l1)
+ {
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_TypeName();
+ break;
+ default:
+ try_ValidationMode();
+ }
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_ValidationMode()
+ {
+ eventHandler.startNonterminal("ValidationMode", e0);
+ switch (l1)
+ {
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ default:
+ shift(240); // 'strict'
+ }
+ eventHandler.endNonterminal("ValidationMode", e0);
+ }
+
+ function try_ValidationMode()
+ {
+ switch (l1)
+ {
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ default:
+ shiftT(240); // 'strict'
+ }
+ }
+
+ function parse_ExtensionExpr()
+ {
+ eventHandler.startNonterminal("ExtensionExpr", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("ExtensionExpr", e0);
+ }
+
+ function try_ExtensionExpr()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ try_Expr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_Pragma()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ shift(35); // '(#'
+ lookahead1(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(0); // PragmaContents
+ shift(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shift(30); // '#)'
+ eventHandler.endNonterminal("Pragma", e0);
+ }
+
+ function try_Pragma()
+ {
+ shiftT(35); // '(#'
+ lookahead1(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_EQName();
+ lookahead1(10); // S | '#)'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(0); // PragmaContents
+ shiftT(1); // PragmaContents
+ }
+ lookahead1(5); // '#)'
+ shiftT(30); // '#)'
+ }
+
+ function parse_PathExpr()
+ {
+ eventHandler.startNonterminal("PathExpr", e0);
+ switch (l1)
+ {
+ case 46: // '/'
+ shift(46); // '/'
+ lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '!' | '!=' | '$' | '%' | '(' | '(:' | ')' | '*' |
+ // '+' | ',' | '-' | '.' | '..' | ':' | ';' | '<' | '<!--' | '<<' | '<=' | '<?' |
+ // '=' | '>' | '>=' | '>>' | '@' | '[' | ']' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '{|' | '|' | '||' |
+ // '|}' | '}'
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 37: // ')'
+ case 38: // '*'
+ case 40: // '+'
+ case 41: // ','
+ case 42: // '-'
+ case 49: // ':'
+ case 53: // ';'
+ case 57: // '<<'
+ case 58: // '<='
+ case 60: // '='
+ case 61: // '>'
+ case 62: // '>='
+ case 63: // '>>'
+ case 69: // ']'
+ case 87: // 'by'
+ case 99: // 'contains'
+ case 205: // 'paragraphs'
+ case 232: // 'sentences'
+ case 247: // 'times'
+ case 273: // 'words'
+ case 279: // '|'
+ case 280: // '||'
+ case 281: // '|}'
+ case 282: // '}'
+ break;
+ default:
+ whitespace();
+ parse_RelativePathExpr();
+ }
+ break;
+ case 47: // '//'
+ shift(47); // '//'
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ whitespace();
+ parse_RelativePathExpr();
+ break;
+ default:
+ parse_RelativePathExpr();
+ }
+ eventHandler.endNonterminal("PathExpr", e0);
+ }
+
+ function try_PathExpr()
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ lookahead1W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '!' | '!=' | '$' | '%' | '(' | '(:' | ')' | '*' |
+ // '+' | ',' | '-' | '.' | '..' | ':' | ';' | '<' | '<!--' | '<<' | '<=' | '<?' |
+ // '=' | '>' | '>=' | '>>' | '@' | '[' | ']' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '{|' | '|' | '||' |
+ // '|}' | '}'
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 37: // ')'
+ case 38: // '*'
+ case 40: // '+'
+ case 41: // ','
+ case 42: // '-'
+ case 49: // ':'
+ case 53: // ';'
+ case 57: // '<<'
+ case 58: // '<='
+ case 60: // '='
+ case 61: // '>'
+ case 62: // '>='
+ case 63: // '>>'
+ case 69: // ']'
+ case 87: // 'by'
+ case 99: // 'contains'
+ case 205: // 'paragraphs'
+ case 232: // 'sentences'
+ case 247: // 'times'
+ case 273: // 'words'
+ case 279: // '|'
+ case 280: // '||'
+ case 281: // '|}'
+ case 282: // '}'
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ try_RelativePathExpr();
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ }
+
+ function parse_RelativePathExpr()
+ {
+ eventHandler.startNonterminal("RelativePathExpr", e0);
+ parse_StepExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 37 // ')'
+ && lk != 38 // '*'
+ && lk != 40 // '+'
+ && lk != 41 // ','
+ && lk != 42 // '-'
+ && lk != 46 // '/'
+ && lk != 47 // '//'
+ && lk != 49 // ':'
+ && lk != 53 // ';'
+ && lk != 54 // '<'
+ && lk != 57 // '<<'
+ && lk != 58 // '<='
+ && lk != 60 // '='
+ && lk != 61 // '>'
+ && lk != 62 // '>='
+ && lk != 63 // '>>'
+ && lk != 69 // ']'
+ && lk != 70 // 'after'
+ && lk != 75 // 'and'
+ && lk != 79 // 'as'
+ && lk != 80 // 'ascending'
+ && lk != 81 // 'at'
+ && lk != 84 // 'before'
+ && lk != 87 // 'by'
+ && lk != 88 // 'case'
+ && lk != 89 // 'cast'
+ && lk != 90 // 'castable'
+ && lk != 94 // 'collation'
+ && lk != 99 // 'contains'
+ && lk != 105 // 'count'
+ && lk != 109 // 'default'
+ && lk != 113 // 'descending'
+ && lk != 118 // 'div'
+ && lk != 122 // 'else'
+ && lk != 123 // 'empty'
+ && lk != 126 // 'end'
+ && lk != 128 // 'eq'
+ && lk != 131 // 'except'
+ && lk != 137 // 'for'
+ && lk != 146 // 'ge'
+ && lk != 148 // 'group'
+ && lk != 150 // 'gt'
+ && lk != 151 // 'idiv'
+ && lk != 160 // 'instance'
+ && lk != 162 // 'intersect'
+ && lk != 163 // 'into'
+ && lk != 164 // 'is'
+ && lk != 172 // 'le'
+ && lk != 174 // 'let'
+ && lk != 178 // 'lt'
+ && lk != 180 // 'mod'
+ && lk != 181 // 'modify'
+ && lk != 186 // 'ne'
+ && lk != 198 // 'only'
+ && lk != 200 // 'or'
+ && lk != 201 // 'order'
+ && lk != 205 // 'paragraphs'
+ && lk != 220 // 'return'
+ && lk != 224 // 'satisfies'
+ && lk != 232 // 'sentences'
+ && lk != 236 // 'stable'
+ && lk != 237 // 'start'
+ && lk != 247 // 'times'
+ && lk != 248 // 'to'
+ && lk != 249 // 'treat'
+ && lk != 254 // 'union'
+ && lk != 266 // 'where'
+ && lk != 270 // 'with'
+ && lk != 273 // 'words'
+ && lk != 279 // '|'
+ && lk != 280 // '||'
+ && lk != 281 // '|}'
+ && lk != 282 // '}'
+ && lk != 23578 // '!' '/'
+ && lk != 24090) // '!' '//'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ try_StepExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 46 // '/'
+ && lk != 47) // '//'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 46: // '/'
+ shift(46); // '/'
+ break;
+ case 47: // '//'
+ shift(47); // '//'
+ break;
+ default:
+ shift(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ whitespace();
+ parse_StepExpr();
+ }
+ eventHandler.endNonterminal("RelativePathExpr", e0);
+ }
+
+ function try_RelativePathExpr()
+ {
+ try_StepExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 37 // ')'
+ && lk != 38 // '*'
+ && lk != 40 // '+'
+ && lk != 41 // ','
+ && lk != 42 // '-'
+ && lk != 46 // '/'
+ && lk != 47 // '//'
+ && lk != 49 // ':'
+ && lk != 53 // ';'
+ && lk != 54 // '<'
+ && lk != 57 // '<<'
+ && lk != 58 // '<='
+ && lk != 60 // '='
+ && lk != 61 // '>'
+ && lk != 62 // '>='
+ && lk != 63 // '>>'
+ && lk != 69 // ']'
+ && lk != 70 // 'after'
+ && lk != 75 // 'and'
+ && lk != 79 // 'as'
+ && lk != 80 // 'ascending'
+ && lk != 81 // 'at'
+ && lk != 84 // 'before'
+ && lk != 87 // 'by'
+ && lk != 88 // 'case'
+ && lk != 89 // 'cast'
+ && lk != 90 // 'castable'
+ && lk != 94 // 'collation'
+ && lk != 99 // 'contains'
+ && lk != 105 // 'count'
+ && lk != 109 // 'default'
+ && lk != 113 // 'descending'
+ && lk != 118 // 'div'
+ && lk != 122 // 'else'
+ && lk != 123 // 'empty'
+ && lk != 126 // 'end'
+ && lk != 128 // 'eq'
+ && lk != 131 // 'except'
+ && lk != 137 // 'for'
+ && lk != 146 // 'ge'
+ && lk != 148 // 'group'
+ && lk != 150 // 'gt'
+ && lk != 151 // 'idiv'
+ && lk != 160 // 'instance'
+ && lk != 162 // 'intersect'
+ && lk != 163 // 'into'
+ && lk != 164 // 'is'
+ && lk != 172 // 'le'
+ && lk != 174 // 'let'
+ && lk != 178 // 'lt'
+ && lk != 180 // 'mod'
+ && lk != 181 // 'modify'
+ && lk != 186 // 'ne'
+ && lk != 198 // 'only'
+ && lk != 200 // 'or'
+ && lk != 201 // 'order'
+ && lk != 205 // 'paragraphs'
+ && lk != 220 // 'return'
+ && lk != 224 // 'satisfies'
+ && lk != 232 // 'sentences'
+ && lk != 236 // 'stable'
+ && lk != 237 // 'start'
+ && lk != 247 // 'times'
+ && lk != 248 // 'to'
+ && lk != 249 // 'treat'
+ && lk != 254 // 'union'
+ && lk != 266 // 'where'
+ && lk != 270 // 'with'
+ && lk != 273 // 'words'
+ && lk != 279 // '|'
+ && lk != 280 // '||'
+ && lk != 281 // '|}'
+ && lk != 282 // '}'
+ && lk != 23578 // '!' '/'
+ && lk != 24090) // '!' '//'
+ {
+ lk = memoized(2, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ try_StepExpr();
+ memoize(2, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(2, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 46 // '/'
+ && lk != 47) // '//'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ try_StepExpr();
+ }
+ }
+
+ function parse_StepExpr()
+ {
+ eventHandler.startNonterminal("StepExpr", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' |
+ // '>=' | '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 121: // 'element'
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'catch' | 'child' | 'collation' | 'comment' | 'constraint' | 'construction' |
+ // 'contains' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(279); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'by' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'paragraphs' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sentences' | 'sliding' | 'some' | 'stable' | 'start' |
+ // 'strict' | 'switch' | 'text' | 'times' | 'to' | 'treat' | 'try' | 'tumbling' |
+ // 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' | 'validate' |
+ // 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' | 'words' |
+ // 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' |
+ // 'cast' | 'castable' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17486 // 'array' '('
+ || lk == 17575 // 'json-item' '('
+ || lk == 17602 // 'object' '('
+ || lk == 35922 // 'attribute' 'after'
+ || lk == 35961 // 'element' 'after'
+ || lk == 36024 // 'namespace' 'after'
+ || lk == 36056 // 'processing-instruction' 'after'
+ || lk == 38482 // 'attribute' 'and'
+ || lk == 38521 // 'element' 'and'
+ || lk == 38584 // 'namespace' 'and'
+ || lk == 38616 // 'processing-instruction' 'and'
+ || lk == 40530 // 'attribute' 'as'
+ || lk == 40569 // 'element' 'as'
+ || lk == 40632 // 'namespace' 'as'
+ || lk == 40664 // 'processing-instruction' 'as'
+ || lk == 41042 // 'attribute' 'ascending'
+ || lk == 41081 // 'element' 'ascending'
+ || lk == 41144 // 'namespace' 'ascending'
+ || lk == 41176 // 'processing-instruction' 'ascending'
+ || lk == 41554 // 'attribute' 'at'
+ || lk == 41593 // 'element' 'at'
+ || lk == 41656 // 'namespace' 'at'
+ || lk == 41688 // 'processing-instruction' 'at'
+ || lk == 43090 // 'attribute' 'before'
+ || lk == 43129 // 'element' 'before'
+ || lk == 43192 // 'namespace' 'before'
+ || lk == 43224 // 'processing-instruction' 'before'
+ || lk == 45138 // 'attribute' 'case'
+ || lk == 45177 // 'element' 'case'
+ || lk == 45240 // 'namespace' 'case'
+ || lk == 45272 // 'processing-instruction' 'case'
+ || lk == 45650 // 'attribute' 'cast'
+ || lk == 45689 // 'element' 'cast'
+ || lk == 45752 // 'namespace' 'cast'
+ || lk == 45784 // 'processing-instruction' 'cast'
+ || lk == 46162 // 'attribute' 'castable'
+ || lk == 46201 // 'element' 'castable'
+ || lk == 46264 // 'namespace' 'castable'
+ || lk == 46296 // 'processing-instruction' 'castable'
+ || lk == 48210 // 'attribute' 'collation'
+ || lk == 48249 // 'element' 'collation'
+ || lk == 48312 // 'namespace' 'collation'
+ || lk == 48344 // 'processing-instruction' 'collation'
+ || lk == 53842 // 'attribute' 'count'
+ || lk == 53881 // 'element' 'count'
+ || lk == 53944 // 'namespace' 'count'
+ || lk == 53976 // 'processing-instruction' 'count'
+ || lk == 55890 // 'attribute' 'default'
+ || lk == 55929 // 'element' 'default'
+ || lk == 55992 // 'namespace' 'default'
+ || lk == 56024 // 'processing-instruction' 'default'
+ || lk == 57938 // 'attribute' 'descending'
+ || lk == 57977 // 'element' 'descending'
+ || lk == 58040 // 'namespace' 'descending'
+ || lk == 58072 // 'processing-instruction' 'descending'
+ || lk == 60498 // 'attribute' 'div'
+ || lk == 60537 // 'element' 'div'
+ || lk == 60600 // 'namespace' 'div'
+ || lk == 60632 // 'processing-instruction' 'div'
+ || lk == 62546 // 'attribute' 'else'
+ || lk == 62585 // 'element' 'else'
+ || lk == 62648 // 'namespace' 'else'
+ || lk == 62680 // 'processing-instruction' 'else'
+ || lk == 63058 // 'attribute' 'empty'
+ || lk == 63097 // 'element' 'empty'
+ || lk == 63160 // 'namespace' 'empty'
+ || lk == 63192 // 'processing-instruction' 'empty'
+ || lk == 64594 // 'attribute' 'end'
+ || lk == 64633 // 'element' 'end'
+ || lk == 64696 // 'namespace' 'end'
+ || lk == 64728 // 'processing-instruction' 'end'
+ || lk == 65618 // 'attribute' 'eq'
+ || lk == 65657 // 'element' 'eq'
+ || lk == 65720 // 'namespace' 'eq'
+ || lk == 65752 // 'processing-instruction' 'eq'
+ || lk == 67154 // 'attribute' 'except'
+ || lk == 67193 // 'element' 'except'
+ || lk == 67256 // 'namespace' 'except'
+ || lk == 67288 // 'processing-instruction' 'except'
+ || lk == 70226 // 'attribute' 'for'
+ || lk == 70265 // 'element' 'for'
+ || lk == 70328 // 'namespace' 'for'
+ || lk == 70360 // 'processing-instruction' 'for'
+ || lk == 74834 // 'attribute' 'ge'
+ || lk == 74873 // 'element' 'ge'
+ || lk == 74936 // 'namespace' 'ge'
+ || lk == 74968 // 'processing-instruction' 'ge'
+ || lk == 75858 // 'attribute' 'group'
+ || lk == 75897 // 'element' 'group'
+ || lk == 75960 // 'namespace' 'group'
+ || lk == 75992 // 'processing-instruction' 'group'
+ || lk == 76882 // 'attribute' 'gt'
+ || lk == 76921 // 'element' 'gt'
+ || lk == 76984 // 'namespace' 'gt'
+ || lk == 77016 // 'processing-instruction' 'gt'
+ || lk == 77394 // 'attribute' 'idiv'
+ || lk == 77433 // 'element' 'idiv'
+ || lk == 77496 // 'namespace' 'idiv'
+ || lk == 77528 // 'processing-instruction' 'idiv'
+ || lk == 82002 // 'attribute' 'instance'
+ || lk == 82041 // 'element' 'instance'
+ || lk == 82104 // 'namespace' 'instance'
+ || lk == 82136 // 'processing-instruction' 'instance'
+ || lk == 83026 // 'attribute' 'intersect'
+ || lk == 83065 // 'element' 'intersect'
+ || lk == 83128 // 'namespace' 'intersect'
+ || lk == 83160 // 'processing-instruction' 'intersect'
+ || lk == 83538 // 'attribute' 'into'
+ || lk == 83577 // 'element' 'into'
+ || lk == 83640 // 'namespace' 'into'
+ || lk == 83672 // 'processing-instruction' 'into'
+ || lk == 84050 // 'attribute' 'is'
+ || lk == 84089 // 'element' 'is'
+ || lk == 84152 // 'namespace' 'is'
+ || lk == 84184 // 'processing-instruction' 'is'
+ || lk == 88146 // 'attribute' 'le'
+ || lk == 88185 // 'element' 'le'
+ || lk == 88248 // 'namespace' 'le'
+ || lk == 88280 // 'processing-instruction' 'le'
+ || lk == 89170 // 'attribute' 'let'
+ || lk == 89209 // 'element' 'let'
+ || lk == 89272 // 'namespace' 'let'
+ || lk == 89304 // 'processing-instruction' 'let'
+ || lk == 91218 // 'attribute' 'lt'
+ || lk == 91257 // 'element' 'lt'
+ || lk == 91320 // 'namespace' 'lt'
+ || lk == 91352 // 'processing-instruction' 'lt'
+ || lk == 92242 // 'attribute' 'mod'
+ || lk == 92281 // 'element' 'mod'
+ || lk == 92344 // 'namespace' 'mod'
+ || lk == 92376 // 'processing-instruction' 'mod'
+ || lk == 92754 // 'attribute' 'modify'
+ || lk == 92793 // 'element' 'modify'
+ || lk == 92856 // 'namespace' 'modify'
+ || lk == 92888 // 'processing-instruction' 'modify'
+ || lk == 95314 // 'attribute' 'ne'
+ || lk == 95353 // 'element' 'ne'
+ || lk == 95416 // 'namespace' 'ne'
+ || lk == 95448 // 'processing-instruction' 'ne'
+ || lk == 101458 // 'attribute' 'only'
+ || lk == 101497 // 'element' 'only'
+ || lk == 101560 // 'namespace' 'only'
+ || lk == 101592 // 'processing-instruction' 'only'
+ || lk == 102482 // 'attribute' 'or'
+ || lk == 102521 // 'element' 'or'
+ || lk == 102584 // 'namespace' 'or'
+ || lk == 102616 // 'processing-instruction' 'or'
+ || lk == 102994 // 'attribute' 'order'
+ || lk == 103033 // 'element' 'order'
+ || lk == 103096 // 'namespace' 'order'
+ || lk == 103128 // 'processing-instruction' 'order'
+ || lk == 112722 // 'attribute' 'return'
+ || lk == 112761 // 'element' 'return'
+ || lk == 112824 // 'namespace' 'return'
+ || lk == 112856 // 'processing-instruction' 'return'
+ || lk == 114770 // 'attribute' 'satisfies'
+ || lk == 114809 // 'element' 'satisfies'
+ || lk == 114872 // 'namespace' 'satisfies'
+ || lk == 114904 // 'processing-instruction' 'satisfies'
+ || lk == 120914 // 'attribute' 'stable'
+ || lk == 120953 // 'element' 'stable'
+ || lk == 121016 // 'namespace' 'stable'
+ || lk == 121048 // 'processing-instruction' 'stable'
+ || lk == 121426 // 'attribute' 'start'
+ || lk == 121465 // 'element' 'start'
+ || lk == 121528 // 'namespace' 'start'
+ || lk == 121560 // 'processing-instruction' 'start'
+ || lk == 127058 // 'attribute' 'to'
+ || lk == 127097 // 'element' 'to'
+ || lk == 127160 // 'namespace' 'to'
+ || lk == 127192 // 'processing-instruction' 'to'
+ || lk == 127570 // 'attribute' 'treat'
+ || lk == 127609 // 'element' 'treat'
+ || lk == 127672 // 'namespace' 'treat'
+ || lk == 127704 // 'processing-instruction' 'treat'
+ || lk == 130130 // 'attribute' 'union'
+ || lk == 130169 // 'element' 'union'
+ || lk == 130232 // 'namespace' 'union'
+ || lk == 130264 // 'processing-instruction' 'union'
+ || lk == 136274 // 'attribute' 'where'
+ || lk == 136313 // 'element' 'where'
+ || lk == 136376 // 'namespace' 'where'
+ || lk == 136408 // 'processing-instruction' 'where'
+ || lk == 138322 // 'attribute' 'with'
+ || lk == 138361 // 'element' 'with'
+ || lk == 138424 // 'namespace' 'with'
+ || lk == 138456) // 'processing-instruction' 'with'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '%'
+ case 34: // '('
+ case 44: // '.'
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ case 68: // '['
+ case 276: // '{'
+ case 278: // '{|'
+ case 3154: // 'attribute' EQName^Token
+ case 3193: // 'element' EQName^Token
+ case 9912: // 'namespace' NCName^Token
+ case 9944: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14926: // 'array' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14968: // 'document-node' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14972: // 'empty-sequence' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14993: // 'function' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15000: // 'if' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15013: // 'item' '#'
+ case 15015: // 'json-item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15033: // 'namespace-node' '#'
+ case 15034: // 'ne' '#'
+ case 15039: // 'node' '#'
+ case 15040: // 'nodes' '#'
+ case 15042: // 'object' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15074: // 'schema-attribute' '#'
+ case 15075: // 'schema-element' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15091: // 'switch' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15101: // 'typeswitch' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17553: // 'function' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ case 36946: // 'attribute' 'allowing'
+ case 36985: // 'element' 'allowing'
+ case 37048: // 'namespace' 'allowing'
+ case 37080: // 'processing-instruction' 'allowing'
+ case 37458: // 'attribute' 'ancestor'
+ case 37497: // 'element' 'ancestor'
+ case 37560: // 'namespace' 'ancestor'
+ case 37592: // 'processing-instruction' 'ancestor'
+ case 37970: // 'attribute' 'ancestor-or-self'
+ case 38009: // 'element' 'ancestor-or-self'
+ case 38072: // 'namespace' 'ancestor-or-self'
+ case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 40018: // 'attribute' 'array'
+ case 40057: // 'element' 'array'
+ case 42066: // 'attribute' 'attribute'
+ case 42105: // 'element' 'attribute'
+ case 42168: // 'namespace' 'attribute'
+ case 42200: // 'processing-instruction' 'attribute'
+ case 42578: // 'attribute' 'base-uri'
+ case 42617: // 'element' 'base-uri'
+ case 42680: // 'namespace' 'base-uri'
+ case 42712: // 'processing-instruction' 'base-uri'
+ case 43602: // 'attribute' 'boundary-space'
+ case 43641: // 'element' 'boundary-space'
+ case 43704: // 'namespace' 'boundary-space'
+ case 43736: // 'processing-instruction' 'boundary-space'
+ case 44114: // 'attribute' 'break'
+ case 44153: // 'element' 'break'
+ case 44216: // 'namespace' 'break'
+ case 44248: // 'processing-instruction' 'break'
+ case 46674: // 'attribute' 'catch'
+ case 46713: // 'element' 'catch'
+ case 46776: // 'namespace' 'catch'
+ case 46808: // 'processing-instruction' 'catch'
+ case 47698: // 'attribute' 'child'
+ case 47737: // 'element' 'child'
+ case 47800: // 'namespace' 'child'
+ case 47832: // 'processing-instruction' 'child'
+ case 49234: // 'attribute' 'comment'
+ case 49273: // 'element' 'comment'
+ case 49336: // 'namespace' 'comment'
+ case 49368: // 'processing-instruction' 'comment'
+ case 49746: // 'attribute' 'constraint'
+ case 49785: // 'element' 'constraint'
+ case 49848: // 'namespace' 'constraint'
+ case 49880: // 'processing-instruction' 'constraint'
+ case 50258: // 'attribute' 'construction'
+ case 50297: // 'element' 'construction'
+ case 50360: // 'namespace' 'construction'
+ case 50392: // 'processing-instruction' 'construction'
+ case 51794: // 'attribute' 'context'
+ case 51833: // 'element' 'context'
+ case 51896: // 'namespace' 'context'
+ case 51928: // 'processing-instruction' 'context'
+ case 52306: // 'attribute' 'continue'
+ case 52345: // 'element' 'continue'
+ case 52408: // 'namespace' 'continue'
+ case 52440: // 'processing-instruction' 'continue'
+ case 52818: // 'attribute' 'copy'
+ case 52857: // 'element' 'copy'
+ case 52920: // 'namespace' 'copy'
+ case 52952: // 'processing-instruction' 'copy'
+ case 53330: // 'attribute' 'copy-namespaces'
+ case 53369: // 'element' 'copy-namespaces'
+ case 53432: // 'namespace' 'copy-namespaces'
+ case 53464: // 'processing-instruction' 'copy-namespaces'
+ case 54354: // 'attribute' 'decimal-format'
+ case 54393: // 'element' 'decimal-format'
+ case 54456: // 'namespace' 'decimal-format'
+ case 54488: // 'processing-instruction' 'decimal-format'
+ case 55378: // 'attribute' 'declare'
+ case 55417: // 'element' 'declare'
+ case 55480: // 'namespace' 'declare'
+ case 55512: // 'processing-instruction' 'declare'
+ case 56402: // 'attribute' 'delete'
+ case 56441: // 'element' 'delete'
+ case 56504: // 'namespace' 'delete'
+ case 56536: // 'processing-instruction' 'delete'
+ case 56914: // 'attribute' 'descendant'
+ case 56953: // 'element' 'descendant'
+ case 57016: // 'namespace' 'descendant'
+ case 57048: // 'processing-instruction' 'descendant'
+ case 57426: // 'attribute' 'descendant-or-self'
+ case 57465: // 'element' 'descendant-or-self'
+ case 57528: // 'namespace' 'descendant-or-self'
+ case 57560: // 'processing-instruction' 'descendant-or-self'
+ case 61010: // 'attribute' 'document'
+ case 61049: // 'element' 'document'
+ case 61112: // 'namespace' 'document'
+ case 61144: // 'processing-instruction' 'document'
+ case 61522: // 'attribute' 'document-node'
+ case 61561: // 'element' 'document-node'
+ case 61624: // 'namespace' 'document-node'
+ case 61656: // 'processing-instruction' 'document-node'
+ case 62034: // 'attribute' 'element'
+ case 62073: // 'element' 'element'
+ case 62136: // 'namespace' 'element'
+ case 62168: // 'processing-instruction' 'element'
+ case 63570: // 'attribute' 'empty-sequence'
+ case 63609: // 'element' 'empty-sequence'
+ case 63672: // 'namespace' 'empty-sequence'
+ case 63704: // 'processing-instruction' 'empty-sequence'
+ case 64082: // 'attribute' 'encoding'
+ case 64121: // 'element' 'encoding'
+ case 64184: // 'namespace' 'encoding'
+ case 64216: // 'processing-instruction' 'encoding'
+ case 66130: // 'attribute' 'every'
+ case 66169: // 'element' 'every'
+ case 66232: // 'namespace' 'every'
+ case 66264: // 'processing-instruction' 'every'
+ case 67666: // 'attribute' 'exit'
+ case 67705: // 'element' 'exit'
+ case 67768: // 'namespace' 'exit'
+ case 67800: // 'processing-instruction' 'exit'
+ case 68178: // 'attribute' 'external'
+ case 68217: // 'element' 'external'
+ case 68280: // 'namespace' 'external'
+ case 68312: // 'processing-instruction' 'external'
+ case 68690: // 'attribute' 'first'
+ case 68729: // 'element' 'first'
+ case 68792: // 'namespace' 'first'
+ case 68824: // 'processing-instruction' 'first'
+ case 69202: // 'attribute' 'following'
+ case 69241: // 'element' 'following'
+ case 69304: // 'namespace' 'following'
+ case 69336: // 'processing-instruction' 'following'
+ case 69714: // 'attribute' 'following-sibling'
+ case 69753: // 'element' 'following-sibling'
+ case 69816: // 'namespace' 'following-sibling'
+ case 69848: // 'processing-instruction' 'following-sibling'
+ case 72274: // 'attribute' 'ft-option'
+ case 72313: // 'element' 'ft-option'
+ case 72376: // 'namespace' 'ft-option'
+ case 72408: // 'processing-instruction' 'ft-option'
+ case 74322: // 'attribute' 'function'
+ case 74361: // 'element' 'function'
+ case 74424: // 'namespace' 'function'
+ case 74456: // 'processing-instruction' 'function'
+ case 77906: // 'attribute' 'if'
+ case 77945: // 'element' 'if'
+ case 78008: // 'namespace' 'if'
+ case 78040: // 'processing-instruction' 'if'
+ case 78418: // 'attribute' 'import'
+ case 78457: // 'element' 'import'
+ case 78520: // 'namespace' 'import'
+ case 78552: // 'processing-instruction' 'import'
+ case 78930: // 'attribute' 'in'
+ case 78969: // 'element' 'in'
+ case 79032: // 'namespace' 'in'
+ case 79064: // 'processing-instruction' 'in'
+ case 79442: // 'attribute' 'index'
+ case 79481: // 'element' 'index'
+ case 79544: // 'namespace' 'index'
+ case 79576: // 'processing-instruction' 'index'
+ case 81490: // 'attribute' 'insert'
+ case 81529: // 'element' 'insert'
+ case 81592: // 'namespace' 'insert'
+ case 81624: // 'processing-instruction' 'insert'
+ case 82514: // 'attribute' 'integrity'
+ case 82553: // 'element' 'integrity'
+ case 82616: // 'namespace' 'integrity'
+ case 82648: // 'processing-instruction' 'integrity'
+ case 84562: // 'attribute' 'item'
+ case 84601: // 'element' 'item'
+ case 84664: // 'namespace' 'item'
+ case 84696: // 'processing-instruction' 'item'
+ case 85586: // 'attribute' 'json-item'
+ case 85625: // 'element' 'json-item'
+ case 87122: // 'attribute' 'last'
+ case 87161: // 'element' 'last'
+ case 87224: // 'namespace' 'last'
+ case 87256: // 'processing-instruction' 'last'
+ case 87634: // 'attribute' 'lax'
+ case 87673: // 'element' 'lax'
+ case 87736: // 'namespace' 'lax'
+ case 87768: // 'processing-instruction' 'lax'
+ case 90194: // 'attribute' 'loop'
+ case 90233: // 'element' 'loop'
+ case 90296: // 'namespace' 'loop'
+ case 90328: // 'processing-instruction' 'loop'
+ case 93266: // 'attribute' 'module'
+ case 93305: // 'element' 'module'
+ case 93368: // 'namespace' 'module'
+ case 93400: // 'processing-instruction' 'module'
+ case 94290: // 'attribute' 'namespace'
+ case 94329: // 'element' 'namespace'
+ case 94392: // 'namespace' 'namespace'
+ case 94424: // 'processing-instruction' 'namespace'
+ case 94802: // 'attribute' 'namespace-node'
+ case 94841: // 'element' 'namespace-node'
+ case 94904: // 'namespace' 'namespace-node'
+ case 94936: // 'processing-instruction' 'namespace-node'
+ case 97874: // 'attribute' 'node'
+ case 97913: // 'element' 'node'
+ case 97976: // 'namespace' 'node'
+ case 98008: // 'processing-instruction' 'node'
+ case 98386: // 'attribute' 'nodes'
+ case 98425: // 'element' 'nodes'
+ case 98488: // 'namespace' 'nodes'
+ case 98520: // 'processing-instruction' 'nodes'
+ case 99410: // 'attribute' 'object'
+ case 99449: // 'element' 'object'
+ case 101970: // 'attribute' 'option'
+ case 102009: // 'element' 'option'
+ case 102072: // 'namespace' 'option'
+ case 102104: // 'processing-instruction' 'option'
+ case 103506: // 'attribute' 'ordered'
+ case 103545: // 'element' 'ordered'
+ case 103608: // 'namespace' 'ordered'
+ case 103640: // 'processing-instruction' 'ordered'
+ case 104018: // 'attribute' 'ordering'
+ case 104057: // 'element' 'ordering'
+ case 104120: // 'namespace' 'ordering'
+ case 104152: // 'processing-instruction' 'ordering'
+ case 105554: // 'attribute' 'parent'
+ case 105593: // 'element' 'parent'
+ case 105656: // 'namespace' 'parent'
+ case 105688: // 'processing-instruction' 'parent'
+ case 108626: // 'attribute' 'preceding'
+ case 108665: // 'element' 'preceding'
+ case 108728: // 'namespace' 'preceding'
+ case 108760: // 'processing-instruction' 'preceding'
+ case 109138: // 'attribute' 'preceding-sibling'
+ case 109177: // 'element' 'preceding-sibling'
+ case 109240: // 'namespace' 'preceding-sibling'
+ case 109272: // 'processing-instruction' 'preceding-sibling'
+ case 110674: // 'attribute' 'processing-instruction'
+ case 110713: // 'element' 'processing-instruction'
+ case 110776: // 'namespace' 'processing-instruction'
+ case 110808: // 'processing-instruction' 'processing-instruction'
+ case 111698: // 'attribute' 'rename'
+ case 111737: // 'element' 'rename'
+ case 111800: // 'namespace' 'rename'
+ case 111832: // 'processing-instruction' 'rename'
+ case 112210: // 'attribute' 'replace'
+ case 112249: // 'element' 'replace'
+ case 112312: // 'namespace' 'replace'
+ case 112344: // 'processing-instruction' 'replace'
+ case 113234: // 'attribute' 'returning'
+ case 113273: // 'element' 'returning'
+ case 113336: // 'namespace' 'returning'
+ case 113368: // 'processing-instruction' 'returning'
+ case 113746: // 'attribute' 'revalidation'
+ case 113785: // 'element' 'revalidation'
+ case 113848: // 'namespace' 'revalidation'
+ case 113880: // 'processing-instruction' 'revalidation'
+ case 115282: // 'attribute' 'schema'
+ case 115321: // 'element' 'schema'
+ case 115384: // 'namespace' 'schema'
+ case 115416: // 'processing-instruction' 'schema'
+ case 115794: // 'attribute' 'schema-attribute'
+ case 115833: // 'element' 'schema-attribute'
+ case 115896: // 'namespace' 'schema-attribute'
+ case 115928: // 'processing-instruction' 'schema-attribute'
+ case 116306: // 'attribute' 'schema-element'
+ case 116345: // 'element' 'schema-element'
+ case 116408: // 'namespace' 'schema-element'
+ case 116440: // 'processing-instruction' 'schema-element'
+ case 116818: // 'attribute' 'score'
+ case 116857: // 'element' 'score'
+ case 116920: // 'namespace' 'score'
+ case 116952: // 'processing-instruction' 'score'
+ case 117330: // 'attribute' 'self'
+ case 117369: // 'element' 'self'
+ case 117432: // 'namespace' 'self'
+ case 117464: // 'processing-instruction' 'self'
+ case 119890: // 'attribute' 'sliding'
+ case 119929: // 'element' 'sliding'
+ case 119992: // 'namespace' 'sliding'
+ case 120024: // 'processing-instruction' 'sliding'
+ case 120402: // 'attribute' 'some'
+ case 120441: // 'element' 'some'
+ case 120504: // 'namespace' 'some'
+ case 120536: // 'processing-instruction' 'some'
+ case 122962: // 'attribute' 'strict'
+ case 123001: // 'element' 'strict'
+ case 123064: // 'namespace' 'strict'
+ case 123096: // 'processing-instruction' 'strict'
+ case 124498: // 'attribute' 'switch'
+ case 124537: // 'element' 'switch'
+ case 124600: // 'namespace' 'switch'
+ case 124632: // 'processing-instruction' 'switch'
+ case 125010: // 'attribute' 'text'
+ case 125049: // 'element' 'text'
+ case 125112: // 'namespace' 'text'
+ case 125144: // 'processing-instruction' 'text'
+ case 128082: // 'attribute' 'try'
+ case 128121: // 'element' 'try'
+ case 128184: // 'namespace' 'try'
+ case 128216: // 'processing-instruction' 'try'
+ case 128594: // 'attribute' 'tumbling'
+ case 128633: // 'element' 'tumbling'
+ case 128696: // 'namespace' 'tumbling'
+ case 128728: // 'processing-instruction' 'tumbling'
+ case 129106: // 'attribute' 'type'
+ case 129145: // 'element' 'type'
+ case 129208: // 'namespace' 'type'
+ case 129240: // 'processing-instruction' 'type'
+ case 129618: // 'attribute' 'typeswitch'
+ case 129657: // 'element' 'typeswitch'
+ case 129720: // 'namespace' 'typeswitch'
+ case 129752: // 'processing-instruction' 'typeswitch'
+ case 131154: // 'attribute' 'unordered'
+ case 131193: // 'element' 'unordered'
+ case 131256: // 'namespace' 'unordered'
+ case 131288: // 'processing-instruction' 'unordered'
+ case 131666: // 'attribute' 'updating'
+ case 131705: // 'element' 'updating'
+ case 131768: // 'namespace' 'updating'
+ case 131800: // 'processing-instruction' 'updating'
+ case 133202: // 'attribute' 'validate'
+ case 133241: // 'element' 'validate'
+ case 133304: // 'namespace' 'validate'
+ case 133336: // 'processing-instruction' 'validate'
+ case 133714: // 'attribute' 'value'
+ case 133753: // 'element' 'value'
+ case 133816: // 'namespace' 'value'
+ case 133848: // 'processing-instruction' 'value'
+ case 134226: // 'attribute' 'variable'
+ case 134265: // 'element' 'variable'
+ case 134328: // 'namespace' 'variable'
+ case 134360: // 'processing-instruction' 'variable'
+ case 134738: // 'attribute' 'version'
+ case 134777: // 'element' 'version'
+ case 134840: // 'namespace' 'version'
+ case 134872: // 'processing-instruction' 'version'
+ case 136786: // 'attribute' 'while'
+ case 136825: // 'element' 'while'
+ case 136888: // 'namespace' 'while'
+ case 136920: // 'processing-instruction' 'while'
+ case 140370: // 'attribute' 'xquery'
+ case 140409: // 'element' 'xquery'
+ case 140472: // 'namespace' 'xquery'
+ case 140504: // 'processing-instruction' 'xquery'
+ case 141394: // 'attribute' '{'
+ case 141408: // 'comment' '{'
+ case 141431: // 'document' '{'
+ case 141433: // 'element' '{'
+ case 141496: // 'namespace' '{'
+ case 141514: // 'ordered' '{'
+ case 141528: // 'processing-instruction' '{'
+ case 141556: // 'text' '{'
+ case 141568: // 'unordered' '{'
+ parse_PostfixExpr();
+ break;
+ default:
+ parse_AxisStep();
+ }
+ eventHandler.endNonterminal("StepExpr", e0);
+ }
+
+ function try_StepExpr()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' |
+ // '>=' | '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 121: // 'element'
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'catch' | 'child' | 'collation' | 'comment' | 'constraint' | 'construction' |
+ // 'contains' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'paragraphs' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sentences' |
+ // 'sliding' | 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' |
+ // 'times' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' |
+ // 'unordered' | 'updating' | 'validate' | 'value' | 'variable' | 'version' |
+ // 'where' | 'while' | 'with' | 'words' | 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(279); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ // ',' | '-' | '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | ']' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'by' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'paragraphs' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sentences' | 'sliding' | 'some' | 'stable' | 'start' |
+ // 'strict' | 'switch' | 'text' | 'times' | 'to' | 'treat' | 'try' | 'tumbling' |
+ // 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' | 'validate' |
+ // 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' | 'words' |
+ // 'xquery' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(244); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' |
+ // 'cast' | 'castable' | 'collation' | 'contains' | 'count' | 'default' |
+ // 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' |
+ // 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' | 'start' |
+ // 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(242); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17486 // 'array' '('
+ || lk == 17575 // 'json-item' '('
+ || lk == 17602 // 'object' '('
+ || lk == 35922 // 'attribute' 'after'
+ || lk == 35961 // 'element' 'after'
+ || lk == 36024 // 'namespace' 'after'
+ || lk == 36056 // 'processing-instruction' 'after'
+ || lk == 38482 // 'attribute' 'and'
+ || lk == 38521 // 'element' 'and'
+ || lk == 38584 // 'namespace' 'and'
+ || lk == 38616 // 'processing-instruction' 'and'
+ || lk == 40530 // 'attribute' 'as'
+ || lk == 40569 // 'element' 'as'
+ || lk == 40632 // 'namespace' 'as'
+ || lk == 40664 // 'processing-instruction' 'as'
+ || lk == 41042 // 'attribute' 'ascending'
+ || lk == 41081 // 'element' 'ascending'
+ || lk == 41144 // 'namespace' 'ascending'
+ || lk == 41176 // 'processing-instruction' 'ascending'
+ || lk == 41554 // 'attribute' 'at'
+ || lk == 41593 // 'element' 'at'
+ || lk == 41656 // 'namespace' 'at'
+ || lk == 41688 // 'processing-instruction' 'at'
+ || lk == 43090 // 'attribute' 'before'
+ || lk == 43129 // 'element' 'before'
+ || lk == 43192 // 'namespace' 'before'
+ || lk == 43224 // 'processing-instruction' 'before'
+ || lk == 45138 // 'attribute' 'case'
+ || lk == 45177 // 'element' 'case'
+ || lk == 45240 // 'namespace' 'case'
+ || lk == 45272 // 'processing-instruction' 'case'
+ || lk == 45650 // 'attribute' 'cast'
+ || lk == 45689 // 'element' 'cast'
+ || lk == 45752 // 'namespace' 'cast'
+ || lk == 45784 // 'processing-instruction' 'cast'
+ || lk == 46162 // 'attribute' 'castable'
+ || lk == 46201 // 'element' 'castable'
+ || lk == 46264 // 'namespace' 'castable'
+ || lk == 46296 // 'processing-instruction' 'castable'
+ || lk == 48210 // 'attribute' 'collation'
+ || lk == 48249 // 'element' 'collation'
+ || lk == 48312 // 'namespace' 'collation'
+ || lk == 48344 // 'processing-instruction' 'collation'
+ || lk == 53842 // 'attribute' 'count'
+ || lk == 53881 // 'element' 'count'
+ || lk == 53944 // 'namespace' 'count'
+ || lk == 53976 // 'processing-instruction' 'count'
+ || lk == 55890 // 'attribute' 'default'
+ || lk == 55929 // 'element' 'default'
+ || lk == 55992 // 'namespace' 'default'
+ || lk == 56024 // 'processing-instruction' 'default'
+ || lk == 57938 // 'attribute' 'descending'
+ || lk == 57977 // 'element' 'descending'
+ || lk == 58040 // 'namespace' 'descending'
+ || lk == 58072 // 'processing-instruction' 'descending'
+ || lk == 60498 // 'attribute' 'div'
+ || lk == 60537 // 'element' 'div'
+ || lk == 60600 // 'namespace' 'div'
+ || lk == 60632 // 'processing-instruction' 'div'
+ || lk == 62546 // 'attribute' 'else'
+ || lk == 62585 // 'element' 'else'
+ || lk == 62648 // 'namespace' 'else'
+ || lk == 62680 // 'processing-instruction' 'else'
+ || lk == 63058 // 'attribute' 'empty'
+ || lk == 63097 // 'element' 'empty'
+ || lk == 63160 // 'namespace' 'empty'
+ || lk == 63192 // 'processing-instruction' 'empty'
+ || lk == 64594 // 'attribute' 'end'
+ || lk == 64633 // 'element' 'end'
+ || lk == 64696 // 'namespace' 'end'
+ || lk == 64728 // 'processing-instruction' 'end'
+ || lk == 65618 // 'attribute' 'eq'
+ || lk == 65657 // 'element' 'eq'
+ || lk == 65720 // 'namespace' 'eq'
+ || lk == 65752 // 'processing-instruction' 'eq'
+ || lk == 67154 // 'attribute' 'except'
+ || lk == 67193 // 'element' 'except'
+ || lk == 67256 // 'namespace' 'except'
+ || lk == 67288 // 'processing-instruction' 'except'
+ || lk == 70226 // 'attribute' 'for'
+ || lk == 70265 // 'element' 'for'
+ || lk == 70328 // 'namespace' 'for'
+ || lk == 70360 // 'processing-instruction' 'for'
+ || lk == 74834 // 'attribute' 'ge'
+ || lk == 74873 // 'element' 'ge'
+ || lk == 74936 // 'namespace' 'ge'
+ || lk == 74968 // 'processing-instruction' 'ge'
+ || lk == 75858 // 'attribute' 'group'
+ || lk == 75897 // 'element' 'group'
+ || lk == 75960 // 'namespace' 'group'
+ || lk == 75992 // 'processing-instruction' 'group'
+ || lk == 76882 // 'attribute' 'gt'
+ || lk == 76921 // 'element' 'gt'
+ || lk == 76984 // 'namespace' 'gt'
+ || lk == 77016 // 'processing-instruction' 'gt'
+ || lk == 77394 // 'attribute' 'idiv'
+ || lk == 77433 // 'element' 'idiv'
+ || lk == 77496 // 'namespace' 'idiv'
+ || lk == 77528 // 'processing-instruction' 'idiv'
+ || lk == 82002 // 'attribute' 'instance'
+ || lk == 82041 // 'element' 'instance'
+ || lk == 82104 // 'namespace' 'instance'
+ || lk == 82136 // 'processing-instruction' 'instance'
+ || lk == 83026 // 'attribute' 'intersect'
+ || lk == 83065 // 'element' 'intersect'
+ || lk == 83128 // 'namespace' 'intersect'
+ || lk == 83160 // 'processing-instruction' 'intersect'
+ || lk == 83538 // 'attribute' 'into'
+ || lk == 83577 // 'element' 'into'
+ || lk == 83640 // 'namespace' 'into'
+ || lk == 83672 // 'processing-instruction' 'into'
+ || lk == 84050 // 'attribute' 'is'
+ || lk == 84089 // 'element' 'is'
+ || lk == 84152 // 'namespace' 'is'
+ || lk == 84184 // 'processing-instruction' 'is'
+ || lk == 88146 // 'attribute' 'le'
+ || lk == 88185 // 'element' 'le'
+ || lk == 88248 // 'namespace' 'le'
+ || lk == 88280 // 'processing-instruction' 'le'
+ || lk == 89170 // 'attribute' 'let'
+ || lk == 89209 // 'element' 'let'
+ || lk == 89272 // 'namespace' 'let'
+ || lk == 89304 // 'processing-instruction' 'let'
+ || lk == 91218 // 'attribute' 'lt'
+ || lk == 91257 // 'element' 'lt'
+ || lk == 91320 // 'namespace' 'lt'
+ || lk == 91352 // 'processing-instruction' 'lt'
+ || lk == 92242 // 'attribute' 'mod'
+ || lk == 92281 // 'element' 'mod'
+ || lk == 92344 // 'namespace' 'mod'
+ || lk == 92376 // 'processing-instruction' 'mod'
+ || lk == 92754 // 'attribute' 'modify'
+ || lk == 92793 // 'element' 'modify'
+ || lk == 92856 // 'namespace' 'modify'
+ || lk == 92888 // 'processing-instruction' 'modify'
+ || lk == 95314 // 'attribute' 'ne'
+ || lk == 95353 // 'element' 'ne'
+ || lk == 95416 // 'namespace' 'ne'
+ || lk == 95448 // 'processing-instruction' 'ne'
+ || lk == 101458 // 'attribute' 'only'
+ || lk == 101497 // 'element' 'only'
+ || lk == 101560 // 'namespace' 'only'
+ || lk == 101592 // 'processing-instruction' 'only'
+ || lk == 102482 // 'attribute' 'or'
+ || lk == 102521 // 'element' 'or'
+ || lk == 102584 // 'namespace' 'or'
+ || lk == 102616 // 'processing-instruction' 'or'
+ || lk == 102994 // 'attribute' 'order'
+ || lk == 103033 // 'element' 'order'
+ || lk == 103096 // 'namespace' 'order'
+ || lk == 103128 // 'processing-instruction' 'order'
+ || lk == 112722 // 'attribute' 'return'
+ || lk == 112761 // 'element' 'return'
+ || lk == 112824 // 'namespace' 'return'
+ || lk == 112856 // 'processing-instruction' 'return'
+ || lk == 114770 // 'attribute' 'satisfies'
+ || lk == 114809 // 'element' 'satisfies'
+ || lk == 114872 // 'namespace' 'satisfies'
+ || lk == 114904 // 'processing-instruction' 'satisfies'
+ || lk == 120914 // 'attribute' 'stable'
+ || lk == 120953 // 'element' 'stable'
+ || lk == 121016 // 'namespace' 'stable'
+ || lk == 121048 // 'processing-instruction' 'stable'
+ || lk == 121426 // 'attribute' 'start'
+ || lk == 121465 // 'element' 'start'
+ || lk == 121528 // 'namespace' 'start'
+ || lk == 121560 // 'processing-instruction' 'start'
+ || lk == 127058 // 'attribute' 'to'
+ || lk == 127097 // 'element' 'to'
+ || lk == 127160 // 'namespace' 'to'
+ || lk == 127192 // 'processing-instruction' 'to'
+ || lk == 127570 // 'attribute' 'treat'
+ || lk == 127609 // 'element' 'treat'
+ || lk == 127672 // 'namespace' 'treat'
+ || lk == 127704 // 'processing-instruction' 'treat'
+ || lk == 130130 // 'attribute' 'union'
+ || lk == 130169 // 'element' 'union'
+ || lk == 130232 // 'namespace' 'union'
+ || lk == 130264 // 'processing-instruction' 'union'
+ || lk == 136274 // 'attribute' 'where'
+ || lk == 136313 // 'element' 'where'
+ || lk == 136376 // 'namespace' 'where'
+ || lk == 136408 // 'processing-instruction' 'where'
+ || lk == 138322 // 'attribute' 'with'
+ || lk == 138361 // 'element' 'with'
+ || lk == 138424 // 'namespace' 'with'
+ || lk == 138456) // 'processing-instruction' 'with'
+ {
+ lk = memoized(3, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_PostfixExpr();
+ memoize(3, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(3, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '%'
+ case 34: // '('
+ case 44: // '.'
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ case 68: // '['
+ case 276: // '{'
+ case 278: // '{|'
+ case 3154: // 'attribute' EQName^Token
+ case 3193: // 'element' EQName^Token
+ case 9912: // 'namespace' NCName^Token
+ case 9944: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14926: // 'array' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14968: // 'document-node' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14972: // 'empty-sequence' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14993: // 'function' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15000: // 'if' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15013: // 'item' '#'
+ case 15015: // 'json-item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15033: // 'namespace-node' '#'
+ case 15034: // 'ne' '#'
+ case 15039: // 'node' '#'
+ case 15040: // 'nodes' '#'
+ case 15042: // 'object' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15074: // 'schema-attribute' '#'
+ case 15075: // 'schema-element' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15091: // 'switch' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15101: // 'typeswitch' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17553: // 'function' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ case 36946: // 'attribute' 'allowing'
+ case 36985: // 'element' 'allowing'
+ case 37048: // 'namespace' 'allowing'
+ case 37080: // 'processing-instruction' 'allowing'
+ case 37458: // 'attribute' 'ancestor'
+ case 37497: // 'element' 'ancestor'
+ case 37560: // 'namespace' 'ancestor'
+ case 37592: // 'processing-instruction' 'ancestor'
+ case 37970: // 'attribute' 'ancestor-or-self'
+ case 38009: // 'element' 'ancestor-or-self'
+ case 38072: // 'namespace' 'ancestor-or-self'
+ case 38104: // 'processing-instruction' 'ancestor-or-self'
+ case 40018: // 'attribute' 'array'
+ case 40057: // 'element' 'array'
+ case 42066: // 'attribute' 'attribute'
+ case 42105: // 'element' 'attribute'
+ case 42168: // 'namespace' 'attribute'
+ case 42200: // 'processing-instruction' 'attribute'
+ case 42578: // 'attribute' 'base-uri'
+ case 42617: // 'element' 'base-uri'
+ case 42680: // 'namespace' 'base-uri'
+ case 42712: // 'processing-instruction' 'base-uri'
+ case 43602: // 'attribute' 'boundary-space'
+ case 43641: // 'element' 'boundary-space'
+ case 43704: // 'namespace' 'boundary-space'
+ case 43736: // 'processing-instruction' 'boundary-space'
+ case 44114: // 'attribute' 'break'
+ case 44153: // 'element' 'break'
+ case 44216: // 'namespace' 'break'
+ case 44248: // 'processing-instruction' 'break'
+ case 46674: // 'attribute' 'catch'
+ case 46713: // 'element' 'catch'
+ case 46776: // 'namespace' 'catch'
+ case 46808: // 'processing-instruction' 'catch'
+ case 47698: // 'attribute' 'child'
+ case 47737: // 'element' 'child'
+ case 47800: // 'namespace' 'child'
+ case 47832: // 'processing-instruction' 'child'
+ case 49234: // 'attribute' 'comment'
+ case 49273: // 'element' 'comment'
+ case 49336: // 'namespace' 'comment'
+ case 49368: // 'processing-instruction' 'comment'
+ case 49746: // 'attribute' 'constraint'
+ case 49785: // 'element' 'constraint'
+ case 49848: // 'namespace' 'constraint'
+ case 49880: // 'processing-instruction' 'constraint'
+ case 50258: // 'attribute' 'construction'
+ case 50297: // 'element' 'construction'
+ case 50360: // 'namespace' 'construction'
+ case 50392: // 'processing-instruction' 'construction'
+ case 51794: // 'attribute' 'context'
+ case 51833: // 'element' 'context'
+ case 51896: // 'namespace' 'context'
+ case 51928: // 'processing-instruction' 'context'
+ case 52306: // 'attribute' 'continue'
+ case 52345: // 'element' 'continue'
+ case 52408: // 'namespace' 'continue'
+ case 52440: // 'processing-instruction' 'continue'
+ case 52818: // 'attribute' 'copy'
+ case 52857: // 'element' 'copy'
+ case 52920: // 'namespace' 'copy'
+ case 52952: // 'processing-instruction' 'copy'
+ case 53330: // 'attribute' 'copy-namespaces'
+ case 53369: // 'element' 'copy-namespaces'
+ case 53432: // 'namespace' 'copy-namespaces'
+ case 53464: // 'processing-instruction' 'copy-namespaces'
+ case 54354: // 'attribute' 'decimal-format'
+ case 54393: // 'element' 'decimal-format'
+ case 54456: // 'namespace' 'decimal-format'
+ case 54488: // 'processing-instruction' 'decimal-format'
+ case 55378: // 'attribute' 'declare'
+ case 55417: // 'element' 'declare'
+ case 55480: // 'namespace' 'declare'
+ case 55512: // 'processing-instruction' 'declare'
+ case 56402: // 'attribute' 'delete'
+ case 56441: // 'element' 'delete'
+ case 56504: // 'namespace' 'delete'
+ case 56536: // 'processing-instruction' 'delete'
+ case 56914: // 'attribute' 'descendant'
+ case 56953: // 'element' 'descendant'
+ case 57016: // 'namespace' 'descendant'
+ case 57048: // 'processing-instruction' 'descendant'
+ case 57426: // 'attribute' 'descendant-or-self'
+ case 57465: // 'element' 'descendant-or-self'
+ case 57528: // 'namespace' 'descendant-or-self'
+ case 57560: // 'processing-instruction' 'descendant-or-self'
+ case 61010: // 'attribute' 'document'
+ case 61049: // 'element' 'document'
+ case 61112: // 'namespace' 'document'
+ case 61144: // 'processing-instruction' 'document'
+ case 61522: // 'attribute' 'document-node'
+ case 61561: // 'element' 'document-node'
+ case 61624: // 'namespace' 'document-node'
+ case 61656: // 'processing-instruction' 'document-node'
+ case 62034: // 'attribute' 'element'
+ case 62073: // 'element' 'element'
+ case 62136: // 'namespace' 'element'
+ case 62168: // 'processing-instruction' 'element'
+ case 63570: // 'attribute' 'empty-sequence'
+ case 63609: // 'element' 'empty-sequence'
+ case 63672: // 'namespace' 'empty-sequence'
+ case 63704: // 'processing-instruction' 'empty-sequence'
+ case 64082: // 'attribute' 'encoding'
+ case 64121: // 'element' 'encoding'
+ case 64184: // 'namespace' 'encoding'
+ case 64216: // 'processing-instruction' 'encoding'
+ case 66130: // 'attribute' 'every'
+ case 66169: // 'element' 'every'
+ case 66232: // 'namespace' 'every'
+ case 66264: // 'processing-instruction' 'every'
+ case 67666: // 'attribute' 'exit'
+ case 67705: // 'element' 'exit'
+ case 67768: // 'namespace' 'exit'
+ case 67800: // 'processing-instruction' 'exit'
+ case 68178: // 'attribute' 'external'
+ case 68217: // 'element' 'external'
+ case 68280: // 'namespace' 'external'
+ case 68312: // 'processing-instruction' 'external'
+ case 68690: // 'attribute' 'first'
+ case 68729: // 'element' 'first'
+ case 68792: // 'namespace' 'first'
+ case 68824: // 'processing-instruction' 'first'
+ case 69202: // 'attribute' 'following'
+ case 69241: // 'element' 'following'
+ case 69304: // 'namespace' 'following'
+ case 69336: // 'processing-instruction' 'following'
+ case 69714: // 'attribute' 'following-sibling'
+ case 69753: // 'element' 'following-sibling'
+ case 69816: // 'namespace' 'following-sibling'
+ case 69848: // 'processing-instruction' 'following-sibling'
+ case 72274: // 'attribute' 'ft-option'
+ case 72313: // 'element' 'ft-option'
+ case 72376: // 'namespace' 'ft-option'
+ case 72408: // 'processing-instruction' 'ft-option'
+ case 74322: // 'attribute' 'function'
+ case 74361: // 'element' 'function'
+ case 74424: // 'namespace' 'function'
+ case 74456: // 'processing-instruction' 'function'
+ case 77906: // 'attribute' 'if'
+ case 77945: // 'element' 'if'
+ case 78008: // 'namespace' 'if'
+ case 78040: // 'processing-instruction' 'if'
+ case 78418: // 'attribute' 'import'
+ case 78457: // 'element' 'import'
+ case 78520: // 'namespace' 'import'
+ case 78552: // 'processing-instruction' 'import'
+ case 78930: // 'attribute' 'in'
+ case 78969: // 'element' 'in'
+ case 79032: // 'namespace' 'in'
+ case 79064: // 'processing-instruction' 'in'
+ case 79442: // 'attribute' 'index'
+ case 79481: // 'element' 'index'
+ case 79544: // 'namespace' 'index'
+ case 79576: // 'processing-instruction' 'index'
+ case 81490: // 'attribute' 'insert'
+ case 81529: // 'element' 'insert'
+ case 81592: // 'namespace' 'insert'
+ case 81624: // 'processing-instruction' 'insert'
+ case 82514: // 'attribute' 'integrity'
+ case 82553: // 'element' 'integrity'
+ case 82616: // 'namespace' 'integrity'
+ case 82648: // 'processing-instruction' 'integrity'
+ case 84562: // 'attribute' 'item'
+ case 84601: // 'element' 'item'
+ case 84664: // 'namespace' 'item'
+ case 84696: // 'processing-instruction' 'item'
+ case 85586: // 'attribute' 'json-item'
+ case 85625: // 'element' 'json-item'
+ case 87122: // 'attribute' 'last'
+ case 87161: // 'element' 'last'
+ case 87224: // 'namespace' 'last'
+ case 87256: // 'processing-instruction' 'last'
+ case 87634: // 'attribute' 'lax'
+ case 87673: // 'element' 'lax'
+ case 87736: // 'namespace' 'lax'
+ case 87768: // 'processing-instruction' 'lax'
+ case 90194: // 'attribute' 'loop'
+ case 90233: // 'element' 'loop'
+ case 90296: // 'namespace' 'loop'
+ case 90328: // 'processing-instruction' 'loop'
+ case 93266: // 'attribute' 'module'
+ case 93305: // 'element' 'module'
+ case 93368: // 'namespace' 'module'
+ case 93400: // 'processing-instruction' 'module'
+ case 94290: // 'attribute' 'namespace'
+ case 94329: // 'element' 'namespace'
+ case 94392: // 'namespace' 'namespace'
+ case 94424: // 'processing-instruction' 'namespace'
+ case 94802: // 'attribute' 'namespace-node'
+ case 94841: // 'element' 'namespace-node'
+ case 94904: // 'namespace' 'namespace-node'
+ case 94936: // 'processing-instruction' 'namespace-node'
+ case 97874: // 'attribute' 'node'
+ case 97913: // 'element' 'node'
+ case 97976: // 'namespace' 'node'
+ case 98008: // 'processing-instruction' 'node'
+ case 98386: // 'attribute' 'nodes'
+ case 98425: // 'element' 'nodes'
+ case 98488: // 'namespace' 'nodes'
+ case 98520: // 'processing-instruction' 'nodes'
+ case 99410: // 'attribute' 'object'
+ case 99449: // 'element' 'object'
+ case 101970: // 'attribute' 'option'
+ case 102009: // 'element' 'option'
+ case 102072: // 'namespace' 'option'
+ case 102104: // 'processing-instruction' 'option'
+ case 103506: // 'attribute' 'ordered'
+ case 103545: // 'element' 'ordered'
+ case 103608: // 'namespace' 'ordered'
+ case 103640: // 'processing-instruction' 'ordered'
+ case 104018: // 'attribute' 'ordering'
+ case 104057: // 'element' 'ordering'
+ case 104120: // 'namespace' 'ordering'
+ case 104152: // 'processing-instruction' 'ordering'
+ case 105554: // 'attribute' 'parent'
+ case 105593: // 'element' 'parent'
+ case 105656: // 'namespace' 'parent'
+ case 105688: // 'processing-instruction' 'parent'
+ case 108626: // 'attribute' 'preceding'
+ case 108665: // 'element' 'preceding'
+ case 108728: // 'namespace' 'preceding'
+ case 108760: // 'processing-instruction' 'preceding'
+ case 109138: // 'attribute' 'preceding-sibling'
+ case 109177: // 'element' 'preceding-sibling'
+ case 109240: // 'namespace' 'preceding-sibling'
+ case 109272: // 'processing-instruction' 'preceding-sibling'
+ case 110674: // 'attribute' 'processing-instruction'
+ case 110713: // 'element' 'processing-instruction'
+ case 110776: // 'namespace' 'processing-instruction'
+ case 110808: // 'processing-instruction' 'processing-instruction'
+ case 111698: // 'attribute' 'rename'
+ case 111737: // 'element' 'rename'
+ case 111800: // 'namespace' 'rename'
+ case 111832: // 'processing-instruction' 'rename'
+ case 112210: // 'attribute' 'replace'
+ case 112249: // 'element' 'replace'
+ case 112312: // 'namespace' 'replace'
+ case 112344: // 'processing-instruction' 'replace'
+ case 113234: // 'attribute' 'returning'
+ case 113273: // 'element' 'returning'
+ case 113336: // 'namespace' 'returning'
+ case 113368: // 'processing-instruction' 'returning'
+ case 113746: // 'attribute' 'revalidation'
+ case 113785: // 'element' 'revalidation'
+ case 113848: // 'namespace' 'revalidation'
+ case 113880: // 'processing-instruction' 'revalidation'
+ case 115282: // 'attribute' 'schema'
+ case 115321: // 'element' 'schema'
+ case 115384: // 'namespace' 'schema'
+ case 115416: // 'processing-instruction' 'schema'
+ case 115794: // 'attribute' 'schema-attribute'
+ case 115833: // 'element' 'schema-attribute'
+ case 115896: // 'namespace' 'schema-attribute'
+ case 115928: // 'processing-instruction' 'schema-attribute'
+ case 116306: // 'attribute' 'schema-element'
+ case 116345: // 'element' 'schema-element'
+ case 116408: // 'namespace' 'schema-element'
+ case 116440: // 'processing-instruction' 'schema-element'
+ case 116818: // 'attribute' 'score'
+ case 116857: // 'element' 'score'
+ case 116920: // 'namespace' 'score'
+ case 116952: // 'processing-instruction' 'score'
+ case 117330: // 'attribute' 'self'
+ case 117369: // 'element' 'self'
+ case 117432: // 'namespace' 'self'
+ case 117464: // 'processing-instruction' 'self'
+ case 119890: // 'attribute' 'sliding'
+ case 119929: // 'element' 'sliding'
+ case 119992: // 'namespace' 'sliding'
+ case 120024: // 'processing-instruction' 'sliding'
+ case 120402: // 'attribute' 'some'
+ case 120441: // 'element' 'some'
+ case 120504: // 'namespace' 'some'
+ case 120536: // 'processing-instruction' 'some'
+ case 122962: // 'attribute' 'strict'
+ case 123001: // 'element' 'strict'
+ case 123064: // 'namespace' 'strict'
+ case 123096: // 'processing-instruction' 'strict'
+ case 124498: // 'attribute' 'switch'
+ case 124537: // 'element' 'switch'
+ case 124600: // 'namespace' 'switch'
+ case 124632: // 'processing-instruction' 'switch'
+ case 125010: // 'attribute' 'text'
+ case 125049: // 'element' 'text'
+ case 125112: // 'namespace' 'text'
+ case 125144: // 'processing-instruction' 'text'
+ case 128082: // 'attribute' 'try'
+ case 128121: // 'element' 'try'
+ case 128184: // 'namespace' 'try'
+ case 128216: // 'processing-instruction' 'try'
+ case 128594: // 'attribute' 'tumbling'
+ case 128633: // 'element' 'tumbling'
+ case 128696: // 'namespace' 'tumbling'
+ case 128728: // 'processing-instruction' 'tumbling'
+ case 129106: // 'attribute' 'type'
+ case 129145: // 'element' 'type'
+ case 129208: // 'namespace' 'type'
+ case 129240: // 'processing-instruction' 'type'
+ case 129618: // 'attribute' 'typeswitch'
+ case 129657: // 'element' 'typeswitch'
+ case 129720: // 'namespace' 'typeswitch'
+ case 129752: // 'processing-instruction' 'typeswitch'
+ case 131154: // 'attribute' 'unordered'
+ case 131193: // 'element' 'unordered'
+ case 131256: // 'namespace' 'unordered'
+ case 131288: // 'processing-instruction' 'unordered'
+ case 131666: // 'attribute' 'updating'
+ case 131705: // 'element' 'updating'
+ case 131768: // 'namespace' 'updating'
+ case 131800: // 'processing-instruction' 'updating'
+ case 133202: // 'attribute' 'validate'
+ case 133241: // 'element' 'validate'
+ case 133304: // 'namespace' 'validate'
+ case 133336: // 'processing-instruction' 'validate'
+ case 133714: // 'attribute' 'value'
+ case 133753: // 'element' 'value'
+ case 133816: // 'namespace' 'value'
+ case 133848: // 'processing-instruction' 'value'
+ case 134226: // 'attribute' 'variable'
+ case 134265: // 'element' 'variable'
+ case 134328: // 'namespace' 'variable'
+ case 134360: // 'processing-instruction' 'variable'
+ case 134738: // 'attribute' 'version'
+ case 134777: // 'element' 'version'
+ case 134840: // 'namespace' 'version'
+ case 134872: // 'processing-instruction' 'version'
+ case 136786: // 'attribute' 'while'
+ case 136825: // 'element' 'while'
+ case 136888: // 'namespace' 'while'
+ case 136920: // 'processing-instruction' 'while'
+ case 140370: // 'attribute' 'xquery'
+ case 140409: // 'element' 'xquery'
+ case 140472: // 'namespace' 'xquery'
+ case 140504: // 'processing-instruction' 'xquery'
+ case 141394: // 'attribute' '{'
+ case 141408: // 'comment' '{'
+ case 141431: // 'document' '{'
+ case 141433: // 'element' '{'
+ case 141496: // 'namespace' '{'
+ case 141514: // 'ordered' '{'
+ case 141528: // 'processing-instruction' '{'
+ case 141556: // 'text' '{'
+ case 141568: // 'unordered' '{'
+ try_PostfixExpr();
+ break;
+ case -3:
+ break;
+ default:
+ try_AxisStep();
+ }
+ }
+
+ function parse_AxisStep()
+ {
+ eventHandler.startNonterminal("AxisStep", e0);
+ switch (l1)
+ {
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 45: // '..'
+ case 26185: // 'ancestor' '::'
+ case 26186: // 'ancestor-or-self' '::'
+ case 26318: // 'parent' '::'
+ case 26324: // 'preceding' '::'
+ case 26325: // 'preceding-sibling' '::'
+ parse_ReverseStep();
+ break;
+ default:
+ parse_ForwardStep();
+ }
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' | 'and' |
+ // 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ whitespace();
+ parse_PredicateList();
+ eventHandler.endNonterminal("AxisStep", e0);
+ }
+
+ function try_AxisStep()
+ {
+ switch (l1)
+ {
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 45: // '..'
+ case 26185: // 'ancestor' '::'
+ case 26186: // 'ancestor-or-self' '::'
+ case 26318: // 'parent' '::'
+ case 26324: // 'preceding' '::'
+ case 26325: // 'preceding-sibling' '::'
+ try_ReverseStep();
+ break;
+ default:
+ try_ForwardStep();
+ }
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' | 'and' |
+ // 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ try_PredicateList();
+ }
+
+ function parse_ForwardStep()
+ {
+ eventHandler.startNonterminal("ForwardStep", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 229: // 'self'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26194: // 'attribute' '::'
+ case 26205: // 'child' '::'
+ case 26223: // 'descendant' '::'
+ case 26224: // 'descendant-or-self' '::'
+ case 26247: // 'following' '::'
+ case 26248: // 'following-sibling' '::'
+ case 26341: // 'self' '::'
+ parse_ForwardAxis();
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NodeTest();
+ break;
+ default:
+ parse_AbbrevForwardStep();
+ }
+ eventHandler.endNonterminal("ForwardStep", e0);
+ }
+
+ function try_ForwardStep()
+ {
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(243); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 229: // 'self'
+ lookahead2W(240); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26194: // 'attribute' '::'
+ case 26205: // 'child' '::'
+ case 26223: // 'descendant' '::'
+ case 26224: // 'descendant-or-self' '::'
+ case 26247: // 'following' '::'
+ case 26248: // 'following-sibling' '::'
+ case 26341: // 'self' '::'
+ try_ForwardAxis();
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_NodeTest();
+ break;
+ default:
+ try_AbbrevForwardStep();
+ }
+ }
+
+ function parse_ForwardAxis()
+ {
+ eventHandler.startNonterminal("ForwardAxis", e0);
+ switch (l1)
+ {
+ case 93: // 'child'
+ shift(93); // 'child'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ default:
+ shift(135); // 'following'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ }
+ eventHandler.endNonterminal("ForwardAxis", e0);
+ }
+
+ function try_ForwardAxis()
+ {
+ switch (l1)
+ {
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ default:
+ shiftT(135); // 'following'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ }
+ }
+
+ function parse_AbbrevForwardStep()
+ {
+ eventHandler.startNonterminal("AbbrevForwardStep", e0);
+ if (l1 == 66) // '@'
+ {
+ shift(66); // '@'
+ }
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NodeTest();
+ eventHandler.endNonterminal("AbbrevForwardStep", e0);
+ }
+
+ function try_AbbrevForwardStep()
+ {
+ if (l1 == 66) // '@'
+ {
+ shiftT(66); // '@'
+ }
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_NodeTest();
+ }
+
+ function parse_ReverseStep()
+ {
+ eventHandler.startNonterminal("ReverseStep", e0);
+ switch (l1)
+ {
+ case 45: // '..'
+ parse_AbbrevReverseStep();
+ break;
+ default:
+ parse_ReverseAxis();
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NodeTest();
+ }
+ eventHandler.endNonterminal("ReverseStep", e0);
+ }
+
+ function try_ReverseStep()
+ {
+ switch (l1)
+ {
+ case 45: // '..'
+ try_AbbrevReverseStep();
+ break;
+ default:
+ try_ReverseAxis();
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_NodeTest();
+ }
+ }
+
+ function parse_ReverseAxis()
+ {
+ eventHandler.startNonterminal("ReverseAxis", e0);
+ switch (l1)
+ {
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ break;
+ default:
+ shift(74); // 'ancestor-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shift(51); // '::'
+ }
+ eventHandler.endNonterminal("ReverseAxis", e0);
+ }
+
+ function try_ReverseAxis()
+ {
+ switch (l1)
+ {
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ break;
+ default:
+ shiftT(74); // 'ancestor-or-self'
+ lookahead1W(26); // S^WS | '(:' | '::'
+ shiftT(51); // '::'
+ }
+ }
+
+ function parse_AbbrevReverseStep()
+ {
+ eventHandler.startNonterminal("AbbrevReverseStep", e0);
+ shift(45); // '..'
+ eventHandler.endNonterminal("AbbrevReverseStep", e0);
+ }
+
+ function try_AbbrevReverseStep()
+ {
+ shiftT(45); // '..'
+ }
+
+ function parse_NodeTest()
+ {
+ eventHandler.startNonterminal("NodeTest", e0);
+ switch (l1)
+ {
+ case 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17486: // 'array' '('
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17575: // 'json-item' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17602: // 'object' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ parse_KindTest();
+ break;
+ default:
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("NodeTest", e0);
+ }
+
+ function try_NodeTest()
+ {
+ switch (l1)
+ {
+ case 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17486: // 'array' '('
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17575: // 'json-item' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17602: // 'object' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ try_KindTest();
+ break;
+ default:
+ try_NameTest();
+ }
+ }
+
+ function parse_NameTest()
+ {
+ eventHandler.startNonterminal("NameTest", e0);
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shift(5); // Wildcard
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("NameTest", e0);
+ }
+
+ function try_NameTest()
+ {
+ switch (l1)
+ {
+ case 5: // Wildcard
+ shiftT(5); // Wildcard
+ break;
+ default:
+ try_EQName();
+ }
+ }
+
+ function parse_PostfixExpr()
+ {
+ eventHandler.startNonterminal("PostfixExpr", e0);
+ parse_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 34 // '('
+ && l1 != 68) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 68: // '['
+ whitespace();
+ parse_Predicate();
+ break;
+ default:
+ whitespace();
+ parse_ArgumentList();
+ }
+ }
+ eventHandler.endNonterminal("PostfixExpr", e0);
+ }
+
+ function try_PostfixExpr()
+ {
+ try_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(239); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 34 // '('
+ && l1 != 68) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 68: // '['
+ try_Predicate();
+ break;
+ default:
+ try_ArgumentList();
+ }
+ }
+ }
+
+ function parse_ArgumentList()
+ {
+ eventHandler.startNonterminal("ArgumentList", e0);
+ shift(34); // '('
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' |
+ // 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Argument();
+ }
+ }
+ shift(37); // ')'
+ eventHandler.endNonterminal("ArgumentList", e0);
+ }
+
+ function try_ArgumentList()
+ {
+ shiftT(34); // '('
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' |
+ // 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ if (l1 != 37) // ')'
+ {
+ try_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Argument();
+ }
+ }
+ shiftT(37); // ')'
+ }
+
+ function parse_PredicateList()
+ {
+ eventHandler.startNonterminal("PredicateList", e0);
+ for (;;)
+ {
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' | 'and' |
+ // 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 68) // '['
+ {
+ break;
+ }
+ whitespace();
+ parse_Predicate();
+ }
+ eventHandler.endNonterminal("PredicateList", e0);
+ }
+
+ function try_PredicateList()
+ {
+ for (;;)
+ {
+ lookahead1W(236); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' | 'after' | 'and' |
+ // 'as' | 'ascending' | 'at' | 'before' | 'by' | 'case' | 'cast' | 'castable' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'sentences' | 'stable' | 'start' | 'times' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | 'words' | '|' | '||' | '|}' | '}'
+ if (l1 != 68) // '['
+ {
+ break;
+ }
+ try_Predicate();
+ }
+ }
+
+ function parse_Predicate()
+ {
+ eventHandler.startNonterminal("Predicate", e0);
+ shift(68); // '['
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(69); // ']'
+ eventHandler.endNonterminal("Predicate", e0);
+ }
+
+ function try_Predicate()
+ {
+ shiftT(68); // '['
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(69); // ']'
+ }
+
+ function parse_Literal()
+ {
+ eventHandler.startNonterminal("Literal", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ parse_NumericLiteral();
+ }
+ eventHandler.endNonterminal("Literal", e0);
+ }
+
+ function try_Literal()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NumericLiteral();
+ }
+ }
+
+ function parse_NumericLiteral()
+ {
+ eventHandler.startNonterminal("NumericLiteral", e0);
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shift(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shift(9); // DecimalLiteral
+ break;
+ default:
+ shift(10); // DoubleLiteral
+ }
+ eventHandler.endNonterminal("NumericLiteral", e0);
+ }
+
+ function try_NumericLiteral()
+ {
+ switch (l1)
+ {
+ case 8: // IntegerLiteral
+ shiftT(8); // IntegerLiteral
+ break;
+ case 9: // DecimalLiteral
+ shiftT(9); // DecimalLiteral
+ break;
+ default:
+ shiftT(10); // DoubleLiteral
+ }
+ }
+
+ function parse_VarRef()
+ {
+ eventHandler.startNonterminal("VarRef", e0);
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("VarRef", e0);
+ }
+
+ function try_VarRef()
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+
+ function parse_VarName()
+ {
+ eventHandler.startNonterminal("VarName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("VarName", e0);
+ }
+
+ function try_VarName()
+ {
+ try_EQName();
+ }
+
+ function parse_ParenthesizedExpr()
+ {
+ eventHandler.startNonterminal("ParenthesizedExpr", e0);
+ shift(34); // '('
+ lookahead1W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(37); // ')'
+ eventHandler.endNonterminal("ParenthesizedExpr", e0);
+ }
+
+ function try_ParenthesizedExpr()
+ {
+ shiftT(34); // '('
+ lookahead1W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 37) // ')'
+ {
+ try_Expr();
+ }
+ shiftT(37); // ')'
+ }
+
+ function parse_ContextItemExpr()
+ {
+ eventHandler.startNonterminal("ContextItemExpr", e0);
+ shift(44); // '.'
+ eventHandler.endNonterminal("ContextItemExpr", e0);
+ }
+
+ function try_ContextItemExpr()
+ {
+ shiftT(44); // '.'
+ }
+
+ function parse_OrderedExpr()
+ {
+ eventHandler.startNonterminal("OrderedExpr", e0);
+ shift(202); // 'ordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("OrderedExpr", e0);
+ }
+
+ function try_OrderedExpr()
+ {
+ shiftT(202); // 'ordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_UnorderedExpr()
+ {
+ eventHandler.startNonterminal("UnorderedExpr", e0);
+ shift(256); // 'unordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("UnorderedExpr", e0);
+ }
+
+ function try_UnorderedExpr()
+ {
+ shiftT(256); // 'unordered'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FunctionCall()
+ {
+ eventHandler.startNonterminal("FunctionCall", e0);
+ parse_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ whitespace();
+ parse_ArgumentList();
+ eventHandler.endNonterminal("FunctionCall", e0);
+ }
+
+ function try_FunctionCall()
+ {
+ try_FunctionName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ try_ArgumentList();
+ }
+
+ function parse_Argument()
+ {
+ eventHandler.startNonterminal("Argument", e0);
+ switch (l1)
+ {
+ case 64: // '?'
+ parse_ArgumentPlaceholder();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Argument", e0);
+ }
+
+ function try_Argument()
+ {
+ switch (l1)
+ {
+ case 64: // '?'
+ try_ArgumentPlaceholder();
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_ArgumentPlaceholder()
+ {
+ eventHandler.startNonterminal("ArgumentPlaceholder", e0);
+ shift(64); // '?'
+ eventHandler.endNonterminal("ArgumentPlaceholder", e0);
+ }
+
+ function try_ArgumentPlaceholder()
+ {
+ shiftT(64); // '?'
+ }
+
+ function parse_Constructor()
+ {
+ eventHandler.startNonterminal("Constructor", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ parse_DirectConstructor();
+ break;
+ default:
+ parse_ComputedConstructor();
+ }
+ eventHandler.endNonterminal("Constructor", e0);
+ }
+
+ function try_Constructor()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ try_DirectConstructor();
+ break;
+ default:
+ try_ComputedConstructor();
+ }
+ }
+
+ function parse_DirectConstructor()
+ {
+ eventHandler.startNonterminal("DirectConstructor", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ parse_DirElemConstructor();
+ break;
+ case 55: // '<!--'
+ parse_DirCommentConstructor();
+ break;
+ default:
+ parse_DirPIConstructor();
+ }
+ eventHandler.endNonterminal("DirectConstructor", e0);
+ }
+
+ function try_DirectConstructor()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ try_DirElemConstructor();
+ break;
+ case 55: // '<!--'
+ try_DirCommentConstructor();
+ break;
+ default:
+ try_DirPIConstructor();
+ }
+ }
+
+ function parse_DirElemConstructor()
+ {
+ eventHandler.startNonterminal("DirElemConstructor", e0);
+ shift(54); // '<'
+ lookahead1(4); // QName
+ shift(20); // QName
+ parse_DirAttributeList();
+ switch (l1)
+ {
+ case 48: // '/>'
+ shift(48); // '/>'
+ break;
+ default:
+ shift(61); // '>'
+ for (;;)
+ {
+ lookahead1(174); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ // '<!--' | '</' | '<?' | '{' | '{{' | '}}'
+ if (l1 == 56) // '</'
+ {
+ break;
+ }
+ parse_DirElemContent();
+ }
+ shift(56); // '</'
+ lookahead1(4); // QName
+ shift(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(8); // '>'
+ shift(61); // '>'
+ }
+ eventHandler.endNonterminal("DirElemConstructor", e0);
+ }
+
+ function try_DirElemConstructor()
+ {
+ shiftT(54); // '<'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ try_DirAttributeList();
+ switch (l1)
+ {
+ case 48: // '/>'
+ shiftT(48); // '/>'
+ break;
+ default:
+ shiftT(61); // '>'
+ for (;;)
+ {
+ lookahead1(174); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ // '<!--' | '</' | '<?' | '{' | '{{' | '}}'
+ if (l1 == 56) // '</'
+ {
+ break;
+ }
+ try_DirElemContent();
+ }
+ shiftT(56); // '</'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(8); // '>'
+ shiftT(61); // '>'
+ }
+ }
+
+ function parse_DirAttributeList()
+ {
+ eventHandler.startNonterminal("DirAttributeList", e0);
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shift(21); // S
+ lookahead1(91); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shift(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(7); // '='
+ shift(60); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ parse_DirAttributeValue();
+ }
+ }
+ eventHandler.endNonterminal("DirAttributeList", e0);
+ }
+
+ function try_DirAttributeList()
+ {
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shiftT(21); // S
+ lookahead1(91); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shiftT(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(7); // '='
+ shiftT(60); // '='
+ lookahead1(18); // S | '"' | "'"
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ try_DirAttributeValue();
+ }
+ }
+ }
+
+ function parse_DirAttributeValue()
+ {
+ eventHandler.startNonterminal("DirAttributeValue", e0);
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shift(28); // '"'
+ for (;;)
+ {
+ lookahead1(167); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ // '{{' | '}}'
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shift(13); // EscapeQuot
+ break;
+ default:
+ parse_QuotAttrValueContent();
+ }
+ }
+ shift(28); // '"'
+ break;
+ default:
+ shift(33); // "'"
+ for (;;)
+ {
+ lookahead1(168); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ // '{{' | '}}'
+ if (l1 == 33) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shift(14); // EscapeApos
+ break;
+ default:
+ parse_AposAttrValueContent();
+ }
+ }
+ shift(33); // "'"
+ }
+ eventHandler.endNonterminal("DirAttributeValue", e0);
+ }
+
+ function try_DirAttributeValue()
+ {
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shiftT(28); // '"'
+ for (;;)
+ {
+ lookahead1(167); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | '"' | '{' |
+ // '{{' | '}}'
+ if (l1 == 28) // '"'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 13: // EscapeQuot
+ shiftT(13); // EscapeQuot
+ break;
+ default:
+ try_QuotAttrValueContent();
+ }
+ }
+ shiftT(28); // '"'
+ break;
+ default:
+ shiftT(33); // "'"
+ for (;;)
+ {
+ lookahead1(168); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ // '{{' | '}}'
+ if (l1 == 33) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shiftT(14); // EscapeApos
+ break;
+ default:
+ try_AposAttrValueContent();
+ }
+ }
+ shiftT(33); // "'"
+ }
+ }
+
+ function parse_QuotAttrValueContent()
+ {
+ eventHandler.startNonterminal("QuotAttrValueContent", e0);
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shift(16); // QuotAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("QuotAttrValueContent", e0);
+ }
+
+ function try_QuotAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 16: // QuotAttrContentChar
+ shiftT(16); // QuotAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_AposAttrValueContent()
+ {
+ eventHandler.startNonterminal("AposAttrValueContent", e0);
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shift(17); // AposAttrContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("AposAttrValueContent", e0);
+ }
+
+ function try_AposAttrValueContent()
+ {
+ switch (l1)
+ {
+ case 17: // AposAttrContentChar
+ shiftT(17); // AposAttrContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirElemContent()
+ {
+ eventHandler.startNonterminal("DirElemContent", e0);
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ parse_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shift(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shift(15); // ElementContentChar
+ break;
+ default:
+ parse_CommonContent();
+ }
+ eventHandler.endNonterminal("DirElemContent", e0);
+ }
+
+ function try_DirElemContent()
+ {
+ switch (l1)
+ {
+ case 54: // '<'
+ case 55: // '<!--'
+ case 59: // '<?'
+ try_DirectConstructor();
+ break;
+ case 4: // CDataSection
+ shiftT(4); // CDataSection
+ break;
+ case 15: // ElementContentChar
+ shiftT(15); // ElementContentChar
+ break;
+ default:
+ try_CommonContent();
+ }
+ }
+
+ function parse_DirCommentConstructor()
+ {
+ eventHandler.startNonterminal("DirCommentConstructor", e0);
+ shift(55); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shift(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shift(43); // '-->'
+ eventHandler.endNonterminal("DirCommentConstructor", e0);
+ }
+
+ function try_DirCommentConstructor()
+ {
+ shiftT(55); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shiftT(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shiftT(43); // '-->'
+ }
+
+ function parse_DirPIConstructor()
+ {
+ eventHandler.startNonterminal("DirPIConstructor", e0);
+ shift(59); // '<?'
+ lookahead1(3); // PITarget
+ shift(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ lookahead1(2); // DirPIContents
+ shift(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shift(65); // '?>'
+ eventHandler.endNonterminal("DirPIConstructor", e0);
+ }
+
+ function try_DirPIConstructor()
+ {
+ shiftT(59); // '<?'
+ lookahead1(3); // PITarget
+ shiftT(18); // PITarget
+ lookahead1(13); // S | '?>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ lookahead1(2); // DirPIContents
+ shiftT(3); // DirPIContents
+ }
+ lookahead1(9); // '?>'
+ shiftT(65); // '?>'
+ }
+
+ function parse_ComputedConstructor()
+ {
+ eventHandler.startNonterminal("ComputedConstructor", e0);
+ switch (l1)
+ {
+ case 119: // 'document'
+ parse_CompDocConstructor();
+ break;
+ case 121: // 'element'
+ parse_CompElemConstructor();
+ break;
+ case 82: // 'attribute'
+ parse_CompAttrConstructor();
+ break;
+ case 184: // 'namespace'
+ parse_CompNamespaceConstructor();
+ break;
+ case 244: // 'text'
+ parse_CompTextConstructor();
+ break;
+ case 96: // 'comment'
+ parse_CompCommentConstructor();
+ break;
+ default:
+ parse_CompPIConstructor();
+ }
+ eventHandler.endNonterminal("ComputedConstructor", e0);
+ }
+
+ function try_ComputedConstructor()
+ {
+ switch (l1)
+ {
+ case 119: // 'document'
+ try_CompDocConstructor();
+ break;
+ case 121: // 'element'
+ try_CompElemConstructor();
+ break;
+ case 82: // 'attribute'
+ try_CompAttrConstructor();
+ break;
+ case 184: // 'namespace'
+ try_CompNamespaceConstructor();
+ break;
+ case 244: // 'text'
+ try_CompTextConstructor();
+ break;
+ case 96: // 'comment'
+ try_CompCommentConstructor();
+ break;
+ default:
+ try_CompPIConstructor();
+ }
+ }
+
+ function parse_CompElemConstructor()
+ {
+ eventHandler.startNonterminal("CompElemConstructor", e0);
+ shift(121); // 'element'
+ lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_ContentExpr();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("CompElemConstructor", e0);
+ }
+
+ function try_CompElemConstructor()
+ {
+ shiftT(121); // 'element'
+ lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ try_ContentExpr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_CompNamespaceConstructor()
+ {
+ eventHandler.startNonterminal("CompNamespaceConstructor", e0);
+ shift(184); // 'namespace'
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PrefixExpr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_Prefix();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_URIExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("CompNamespaceConstructor", e0);
+ }
+
+ function try_CompNamespaceConstructor()
+ {
+ shiftT(184); // 'namespace'
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PrefixExpr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_Prefix();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_URIExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_Prefix()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ }
+
+ function try_Prefix()
+ {
+ try_NCName();
+ }
+
+ function parse_PrefixExpr()
+ {
+ eventHandler.startNonterminal("PrefixExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("PrefixExpr", e0);
+ }
+
+ function try_PrefixExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_URIExpr()
+ {
+ eventHandler.startNonterminal("URIExpr", e0);
+ parse_Expr();
+ eventHandler.endNonterminal("URIExpr", e0);
+ }
+
+ function try_URIExpr()
+ {
+ try_Expr();
+ }
+
+ function parse_FunctionItemExpr()
+ {
+ eventHandler.startNonterminal("FunctionItemExpr", e0);
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 32: // '%'
+ case 17553: // 'function' '('
+ parse_InlineFunctionExpr();
+ break;
+ default:
+ parse_NamedFunctionRef();
+ }
+ eventHandler.endNonterminal("FunctionItemExpr", e0);
+ }
+
+ function try_FunctionItemExpr()
+ {
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 32: // '%'
+ case 17553: // 'function' '('
+ try_InlineFunctionExpr();
+ break;
+ default:
+ try_NamedFunctionRef();
+ }
+ }
+
+ function parse_NamedFunctionRef()
+ {
+ eventHandler.startNonterminal("NamedFunctionRef", e0);
+ parse_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shift(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ eventHandler.endNonterminal("NamedFunctionRef", e0);
+ }
+
+ function try_NamedFunctionRef()
+ {
+ try_EQName();
+ lookahead1W(20); // S^WS | '#' | '(:'
+ shiftT(29); // '#'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+
+ function parse_InlineFunctionExpr()
+ {
+ eventHandler.startNonterminal("InlineFunctionExpr", e0);
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(37); // ')'
+ lookahead1W(111); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_FunctionBody();
+ eventHandler.endNonterminal("InlineFunctionExpr", e0);
+ }
+
+ function try_InlineFunctionExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ try_ParamList();
+ }
+ shiftT(37); // ')'
+ lookahead1W(111); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_FunctionBody();
+ }
+
+ function parse_SingleType()
+ {
+ eventHandler.startNonterminal("SingleType", e0);
+ parse_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' | 'and' | 'as' |
+ // 'ascending' | 'at' | 'before' | 'case' | 'castable' | 'collation' | 'contains' |
+ // 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
+ // 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
+ // 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' |
+ // 'order' | 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' |
+ // 'start' | 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' |
+ // '||' | '|}' | '}'
+ if (l1 == 64) // '?'
+ {
+ shift(64); // '?'
+ }
+ eventHandler.endNonterminal("SingleType", e0);
+ }
+
+ function try_SingleType()
+ {
+ try_SimpleTypeName();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ // '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' | 'and' | 'as' |
+ // 'ascending' | 'at' | 'before' | 'case' | 'castable' | 'collation' | 'contains' |
+ // 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' | 'end' | 'eq' |
+ // 'except' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' | 'instance' | 'intersect' |
+ // 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'only' | 'or' |
+ // 'order' | 'paragraphs' | 'return' | 'satisfies' | 'sentences' | 'stable' |
+ // 'start' | 'times' | 'to' | 'treat' | 'union' | 'where' | 'with' | 'words' | '|' |
+ // '||' | '|}' | '}'
+ if (l1 == 64) // '?'
+ {
+ shiftT(64); // '?'
+ }
+ }
+
+ function parse_TypeDeclaration()
+ {
+ eventHandler.startNonterminal("TypeDeclaration", e0);
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypeDeclaration", e0);
+ }
+
+ function try_TypeDeclaration()
+ {
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+
+ function parse_SequenceType()
+ {
+ eventHandler.startNonterminal("SequenceType", e0);
+ switch (l1)
+ {
+ case 124: // 'empty-sequence'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' |
+ // 'allowing' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17532: // 'empty-sequence' '('
+ shift(124); // 'empty-sequence'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ break;
+ default:
+ parse_ItemType();
+ lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' | 'allowing' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'collation' |
+ // 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' |
+ // 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ switch (l1)
+ {
+ case 39: // '*'
+ case 40: // '+'
+ case 64: // '?'
+ whitespace();
+ parse_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ eventHandler.endNonterminal("SequenceType", e0);
+ }
+
+ function try_SequenceType()
+ {
+ switch (l1)
+ {
+ case 124: // 'empty-sequence'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' |
+ // 'allowing' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 17532: // 'empty-sequence' '('
+ shiftT(124); // 'empty-sequence'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ break;
+ default:
+ try_ItemType();
+ lookahead1W(237); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' | 'allowing' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'collation' |
+ // 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' | 'empty' |
+ // 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' | 'idiv' |
+ // 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'mod' |
+ // 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ switch (l1)
+ {
+ case 39: // '*'
+ case 40: // '+'
+ case 64: // '?'
+ try_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ function parse_OccurrenceIndicator()
+ {
+ eventHandler.startNonterminal("OccurrenceIndicator", e0);
+ switch (l1)
+ {
+ case 64: // '?'
+ shift(64); // '?'
+ break;
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ shift(40); // '+'
+ }
+ eventHandler.endNonterminal("OccurrenceIndicator", e0);
+ }
+
+ function try_OccurrenceIndicator()
+ {
+ switch (l1)
+ {
+ case 64: // '?'
+ shiftT(64); // '?'
+ break;
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ shiftT(40); // '+'
+ }
+ }
+
+ function parse_ItemType()
+ {
+ eventHandler.startNonterminal("ItemType", e0);
+ switch (l1)
+ {
+ case 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' |
+ // 'allowing' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17486 // 'array' '('
+ || lk == 17575 // 'json-item' '('
+ || lk == 17602) // 'object' '('
+ {
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_KindTest();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -6;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ parse_KindTest();
+ break;
+ case 17573: // 'item' '('
+ shift(165); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ break;
+ case 32: // '%'
+ case 17553: // 'function' '('
+ parse_FunctionTest();
+ break;
+ case 34: // '('
+ parse_ParenthesizedItemType();
+ break;
+ case -6:
+ parse_JSONTest();
+ break;
+ case 242: // 'structured-item'
+ parse_StructuredItemTest();
+ break;
+ default:
+ parse_AtomicOrUnionType();
+ }
+ eventHandler.endNonterminal("ItemType", e0);
+ }
+
+ function try_ItemType()
+ {
+ switch (l1)
+ {
+ case 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 244: // 'text'
+ lookahead2W(241); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '?' | ']' | 'after' |
+ // 'allowing' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' |
+ // 'collation' | 'contains' | 'count' | 'default' | 'descending' | 'div' | 'else' |
+ // 'empty' | 'end' | 'eq' | 'except' | 'external' | 'for' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'in' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'paragraphs' | 'return' |
+ // 'satisfies' | 'score' | 'sentences' | 'stable' | 'start' | 'times' | 'to' |
+ // 'union' | 'where' | 'with' | 'words' | '{' | '|' | '||' | '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17486 // 'array' '('
+ || lk == 17575 // 'json-item' '('
+ || lk == 17602) // 'object' '('
+ {
+ lk = memoized(4, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_KindTest();
+ memoize(4, e0A, -1);
+ lk = -8;
+ }
+ catch (p1A)
+ {
+ lk = -6;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(4, e0A, -6);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 17490: // 'attribute' '('
+ case 17504: // 'comment' '('
+ case 17528: // 'document-node' '('
+ case 17529: // 'element' '('
+ case 17593: // 'namespace-node' '('
+ case 17599: // 'node' '('
+ case 17624: // 'processing-instruction' '('
+ case 17634: // 'schema-attribute' '('
+ case 17635: // 'schema-element' '('
+ case 17652: // 'text' '('
+ try_KindTest();
+ break;
+ case 17573: // 'item' '('
+ shiftT(165); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ break;
+ case 32: // '%'
+ case 17553: // 'function' '('
+ try_FunctionTest();
+ break;
+ case 34: // '('
+ try_ParenthesizedItemType();
+ break;
+ case -6:
+ try_JSONTest();
+ break;
+ case 242: // 'structured-item'
+ try_StructuredItemTest();
+ break;
+ case -8:
+ break;
+ default:
+ try_AtomicOrUnionType();
+ }
+ }
+
+ function parse_JSONTest()
+ {
+ eventHandler.startNonterminal("JSONTest", e0);
+ switch (l1)
+ {
+ case 167: // 'json-item'
+ parse_JSONItemTest();
+ break;
+ case 194: // 'object'
+ parse_JSONObjectTest();
+ break;
+ default:
+ parse_JSONArrayTest();
+ }
+ eventHandler.endNonterminal("JSONTest", e0);
+ }
+
+ function try_JSONTest()
+ {
+ switch (l1)
+ {
+ case 167: // 'json-item'
+ try_JSONItemTest();
+ break;
+ case 194: // 'object'
+ try_JSONObjectTest();
+ break;
+ default:
+ try_JSONArrayTest();
+ }
+ }
+
+ function parse_StructuredItemTest()
+ {
+ eventHandler.startNonterminal("StructuredItemTest", e0);
+ shift(242); // 'structured-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("StructuredItemTest", e0);
+ }
+
+ function try_StructuredItemTest()
+ {
+ shiftT(242); // 'structured-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONItemTest()
+ {
+ eventHandler.startNonterminal("JSONItemTest", e0);
+ shift(167); // 'json-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONItemTest", e0);
+ }
+
+ function try_JSONItemTest()
+ {
+ shiftT(167); // 'json-item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONObjectTest()
+ {
+ eventHandler.startNonterminal("JSONObjectTest", e0);
+ shift(194); // 'object'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONObjectTest", e0);
+ }
+
+ function try_JSONObjectTest()
+ {
+ shiftT(194); // 'object'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_JSONArrayTest()
+ {
+ eventHandler.startNonterminal("JSONArrayTest", e0);
+ shift(78); // 'array'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("JSONArrayTest", e0);
+ }
+
+ function try_JSONArrayTest()
+ {
+ shiftT(78); // 'array'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AtomicOrUnionType()
+ {
+ eventHandler.startNonterminal("AtomicOrUnionType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicOrUnionType", e0);
+ }
+
+ function try_AtomicOrUnionType()
+ {
+ try_EQName();
+ }
+
+ function parse_KindTest()
+ {
+ eventHandler.startNonterminal("KindTest", e0);
+ switch (l1)
+ {
+ case 120: // 'document-node'
+ parse_DocumentTest();
+ break;
+ case 121: // 'element'
+ parse_ElementTest();
+ break;
+ case 82: // 'attribute'
+ parse_AttributeTest();
+ break;
+ case 227: // 'schema-element'
+ parse_SchemaElementTest();
+ break;
+ case 226: // 'schema-attribute'
+ parse_SchemaAttributeTest();
+ break;
+ case 216: // 'processing-instruction'
+ parse_PITest();
+ break;
+ case 96: // 'comment'
+ parse_CommentTest();
+ break;
+ case 244: // 'text'
+ parse_TextTest();
+ break;
+ case 185: // 'namespace-node'
+ parse_NamespaceNodeTest();
+ break;
+ case 191: // 'node'
+ parse_AnyKindTest();
+ break;
+ default:
+ parse_JSONTest();
+ }
+ eventHandler.endNonterminal("KindTest", e0);
+ }
+
+ function try_KindTest()
+ {
+ switch (l1)
+ {
+ case 120: // 'document-node'
+ try_DocumentTest();
+ break;
+ case 121: // 'element'
+ try_ElementTest();
+ break;
+ case 82: // 'attribute'
+ try_AttributeTest();
+ break;
+ case 227: // 'schema-element'
+ try_SchemaElementTest();
+ break;
+ case 226: // 'schema-attribute'
+ try_SchemaAttributeTest();
+ break;
+ case 216: // 'processing-instruction'
+ try_PITest();
+ break;
+ case 96: // 'comment'
+ try_CommentTest();
+ break;
+ case 244: // 'text'
+ try_TextTest();
+ break;
+ case 185: // 'namespace-node'
+ try_NamespaceNodeTest();
+ break;
+ case 191: // 'node'
+ try_AnyKindTest();
+ break;
+ default:
+ try_JSONTest();
+ }
+ }
+
+ function parse_AnyKindTest()
+ {
+ eventHandler.startNonterminal("AnyKindTest", e0);
+ shift(191); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AnyKindTest", e0);
+ }
+
+ function try_AnyKindTest()
+ {
+ shiftT(191); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_DocumentTest()
+ {
+ eventHandler.startNonterminal("DocumentTest", e0);
+ shift(120); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 121: // 'element'
+ whitespace();
+ parse_ElementTest();
+ break;
+ default:
+ whitespace();
+ parse_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("DocumentTest", e0);
+ }
+
+ function try_DocumentTest()
+ {
+ shiftT(120); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(144); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 121: // 'element'
+ try_ElementTest();
+ break;
+ default:
+ try_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_TextTest()
+ {
+ eventHandler.startNonterminal("TextTest", e0);
+ shift(244); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("TextTest", e0);
+ }
+
+ function try_TextTest()
+ {
+ shiftT(244); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_CommentTest()
+ {
+ eventHandler.startNonterminal("CommentTest", e0);
+ shift(96); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("CommentTest", e0);
+ }
+
+ function try_CommentTest()
+ {
+ shiftT(96); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_NamespaceNodeTest()
+ {
+ eventHandler.startNonterminal("NamespaceNodeTest", e0);
+ shift(185); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("NamespaceNodeTest", e0);
+ }
+
+ function try_NamespaceNodeTest()
+ {
+ shiftT(185); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_PITest()
+ {
+ eventHandler.startNonterminal("PITest", e0);
+ shift(216); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("PITest", e0);
+ }
+
+ function try_PITest()
+ {
+ shiftT(216); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(251); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttributeTest()
+ {
+ eventHandler.startNonterminal("AttributeTest", e0);
+ shift(82); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AttributeTest", e0);
+ }
+
+ function try_AttributeTest()
+ {
+ shiftT(82); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ try_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttribNameOrWildcard()
+ {
+ eventHandler.startNonterminal("AttribNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ default:
+ parse_AttributeName();
+ }
+ eventHandler.endNonterminal("AttribNameOrWildcard", e0);
+ }
+
+ function try_AttribNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ default:
+ try_AttributeName();
+ }
+ }
+
+ function parse_SchemaAttributeTest()
+ {
+ eventHandler.startNonterminal("SchemaAttributeTest", e0);
+ shift(226); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("SchemaAttributeTest", e0);
+ }
+
+ function try_SchemaAttributeTest()
+ {
+ shiftT(226); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_AttributeDeclaration()
+ {
+ eventHandler.startNonterminal("AttributeDeclaration", e0);
+ parse_AttributeName();
+ eventHandler.endNonterminal("AttributeDeclaration", e0);
+ }
+
+ function try_AttributeDeclaration()
+ {
+ try_AttributeName();
+ }
+
+ function parse_ElementTest()
+ {
+ eventHandler.startNonterminal("ElementTest", e0);
+ shift(121); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_TypeName();
+ lookahead1W(102); // S^WS | '(:' | ')' | '?'
+ if (l1 == 64) // '?'
+ {
+ shift(64); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("ElementTest", e0);
+ }
+
+ function try_ElementTest()
+ {
+ shiftT(121); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ if (l1 != 37) // ')'
+ {
+ try_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_TypeName();
+ lookahead1W(102); // S^WS | '(:' | ')' | '?'
+ if (l1 == 64) // '?'
+ {
+ shiftT(64); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_ElementNameOrWildcard()
+ {
+ eventHandler.startNonterminal("ElementNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 38: // '*'
+ shift(38); // '*'
+ break;
+ default:
+ parse_ElementName();
+ }
+ eventHandler.endNonterminal("ElementNameOrWildcard", e0);
+ }
+
+ function try_ElementNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 38: // '*'
+ shiftT(38); // '*'
+ break;
+ default:
+ try_ElementName();
+ }
+ }
+
+ function parse_SchemaElementTest()
+ {
+ eventHandler.startNonterminal("SchemaElementTest", e0);
+ shift(227); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("SchemaElementTest", e0);
+ }
+
+ function try_SchemaElementTest()
+ {
+ shiftT(227); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_ElementDeclaration()
+ {
+ eventHandler.startNonterminal("ElementDeclaration", e0);
+ parse_ElementName();
+ eventHandler.endNonterminal("ElementDeclaration", e0);
+ }
+
+ function try_ElementDeclaration()
+ {
+ try_ElementName();
+ }
+
+ function parse_AttributeName()
+ {
+ eventHandler.startNonterminal("AttributeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AttributeName", e0);
+ }
+
+ function try_AttributeName()
+ {
+ try_EQName();
+ }
+
+ function parse_ElementName()
+ {
+ eventHandler.startNonterminal("ElementName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("ElementName", e0);
+ }
+
+ function try_ElementName()
+ {
+ try_EQName();
+ }
+
+ function parse_SimpleTypeName()
+ {
+ eventHandler.startNonterminal("SimpleTypeName", e0);
+ parse_TypeName();
+ eventHandler.endNonterminal("SimpleTypeName", e0);
+ }
+
+ function try_SimpleTypeName()
+ {
+ try_TypeName();
+ }
+
+ function parse_TypeName()
+ {
+ eventHandler.startNonterminal("TypeName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("TypeName", e0);
+ }
+
+ function try_TypeName()
+ {
+ try_EQName();
+ }
+
+ function parse_FunctionTest()
+ {
+ eventHandler.startNonterminal("FunctionTest", e0);
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_AnyFunctionTest();
+ break;
+ default:
+ whitespace();
+ parse_TypedFunctionTest();
+ }
+ eventHandler.endNonterminal("FunctionTest", e0);
+ }
+
+ function try_FunctionTest()
+ {
+ for (;;)
+ {
+ lookahead1W(97); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ switch (l1)
+ {
+ case 145: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ lk = memoized(5, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_AnyFunctionTest();
+ memoize(5, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(5, e0A, -2);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_AnyFunctionTest();
+ break;
+ case -3:
+ break;
+ default:
+ try_TypedFunctionTest();
+ }
+ }
+
+ function parse_AnyFunctionTest()
+ {
+ eventHandler.startNonterminal("AnyFunctionTest", e0);
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shift(38); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("AnyFunctionTest", e0);
+ }
+
+ function try_AnyFunctionTest()
+ {
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shiftT(38); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_TypedFunctionTest()
+ {
+ eventHandler.startNonterminal("TypedFunctionTest", e0);
+ shift(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ }
+ shift(37); // ')'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypedFunctionTest", e0);
+ }
+
+ function try_TypedFunctionTest()
+ {
+ shiftT(145); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(261); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 != 37) // ')'
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+ }
+ shiftT(37); // ')'
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ }
+
+ function parse_ParenthesizedItemType()
+ {
+ eventHandler.startNonterminal("ParenthesizedItemType", e0);
+ shift(34); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(37); // ')'
+ eventHandler.endNonterminal("ParenthesizedItemType", e0);
+ }
+
+ function try_ParenthesizedItemType()
+ {
+ shiftT(34); // '('
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(37); // ')'
+ }
+
+ function parse_RevalidationDecl()
+ {
+ eventHandler.startNonterminal("RevalidationDecl", e0);
+ shift(108); // 'declare'
+ lookahead1W(72); // S^WS | '(:' | 'revalidation'
+ shift(222); // 'revalidation'
+ lookahead1W(152); // S^WS | '(:' | 'lax' | 'skip' | 'strict'
+ switch (l1)
+ {
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ default:
+ shift(233); // 'skip'
+ }
+ eventHandler.endNonterminal("RevalidationDecl", e0);
+ }
+
+ function parse_InsertExprTargetChoice()
+ {
+ eventHandler.startNonterminal("InsertExprTargetChoice", e0);
+ switch (l1)
+ {
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ default:
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(119); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ default:
+ shift(170); // 'last'
+ }
+ }
+ lookahead1W(54); // S^WS | '(:' | 'into'
+ shift(163); // 'into'
+ }
+ eventHandler.endNonterminal("InsertExprTargetChoice", e0);
+ }
+
+ function try_InsertExprTargetChoice()
+ {
+ switch (l1)
+ {
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ default:
+ if (l1 == 79) // 'as'
+ {
+ shiftT(79); // 'as'
+ lookahead1W(119); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ default:
+ shiftT(170); // 'last'
+ }
+ }
+ lookahead1W(54); // S^WS | '(:' | 'into'
+ shiftT(163); // 'into'
+ }
+ }
+
+ function parse_InsertExpr()
+ {
+ eventHandler.startNonterminal("InsertExpr", e0);
+ shift(159); // 'insert'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ default:
+ shift(192); // 'nodes'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_SourceExpr();
+ whitespace();
+ parse_InsertExprTargetChoice();
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("InsertExpr", e0);
+ }
+
+ function try_InsertExpr()
+ {
+ shiftT(159); // 'insert'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ default:
+ shiftT(192); // 'nodes'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_SourceExpr();
+ try_InsertExprTargetChoice();
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_TargetExpr();
+ }
+
+ function parse_DeleteExpr()
+ {
+ eventHandler.startNonterminal("DeleteExpr", e0);
+ shift(110); // 'delete'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ default:
+ shift(192); // 'nodes'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("DeleteExpr", e0);
+ }
+
+ function try_DeleteExpr()
+ {
+ shiftT(110); // 'delete'
+ lookahead1W(129); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ default:
+ shiftT(192); // 'nodes'
+ }
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_TargetExpr();
+ }
+
+ function parse_ReplaceExpr()
+ {
+ eventHandler.startNonterminal("ReplaceExpr", e0);
+ shift(219); // 'replace'
+ lookahead1W(130); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 261) // 'value'
+ {
+ shift(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ }
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_TargetExpr();
+ shift(270); // 'with'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReplaceExpr", e0);
+ }
+
+ function try_ReplaceExpr()
+ {
+ shiftT(219); // 'replace'
+ lookahead1W(130); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 261) // 'value'
+ {
+ shiftT(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ }
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shiftT(191); // 'node'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_TargetExpr();
+ shiftT(270); // 'with'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_RenameExpr()
+ {
+ eventHandler.startNonterminal("RenameExpr", e0);
+ shift(218); // 'rename'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_TargetExpr();
+ shift(79); // 'as'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_NewNameExpr();
+ eventHandler.endNonterminal("RenameExpr", e0);
+ }
+
+ function try_RenameExpr()
+ {
+ shiftT(218); // 'rename'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shiftT(191); // 'node'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_TargetExpr();
+ shiftT(79); // 'as'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_NewNameExpr();
+ }
+
+ function parse_SourceExpr()
+ {
+ eventHandler.startNonterminal("SourceExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SourceExpr", e0);
+ }
+
+ function try_SourceExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TargetExpr()
+ {
+ eventHandler.startNonterminal("TargetExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TargetExpr", e0);
+ }
+
+ function try_TargetExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_NewNameExpr()
+ {
+ eventHandler.startNonterminal("NewNameExpr", e0);
+ parse_ExprSingle();
+ eventHandler.endNonterminal("NewNameExpr", e0);
+ }
+
+ function try_NewNameExpr()
+ {
+ try_ExprSingle();
+ }
+
+ function parse_TransformExpr()
+ {
+ eventHandler.startNonterminal("TransformExpr", e0);
+ shift(103); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ shift(181); // 'modify'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformExpr", e0);
+ }
+
+ function try_TransformExpr()
+ {
+ shiftT(103); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ shiftT(181); // 'modify'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_FTSelection()
+ {
+ eventHandler.startNonterminal("FTSelection", e0);
+ parse_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' |
+ // 'only' | 'or' | 'order' | 'ordered' | 'return' | 'same' | 'satisfies' |
+ // 'stable' | 'start' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 115 // 'different'
+ && lk != 117 // 'distance'
+ && lk != 127 // 'entire'
+ && lk != 202 // 'ordered'
+ && lk != 223 // 'same'
+ && lk != 269 // 'window'
+ && lk != 64593 // 'at' 'end'
+ && lk != 121425) // 'at' 'start'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTPosFilter();
+ }
+ eventHandler.endNonterminal("FTSelection", e0);
+ }
+
+ function try_FTSelection()
+ {
+ try_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' |
+ // 'only' | 'or' | 'order' | 'ordered' | 'return' | 'same' | 'satisfies' |
+ // 'stable' | 'start' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(151); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 115 // 'different'
+ && lk != 117 // 'distance'
+ && lk != 127 // 'entire'
+ && lk != 202 // 'ordered'
+ && lk != 223 // 'same'
+ && lk != 269 // 'window'
+ && lk != 64593 // 'at' 'end'
+ && lk != 121425) // 'at' 'start'
+ {
+ break;
+ }
+ try_FTPosFilter();
+ }
+ }
+
+ function parse_FTWeight()
+ {
+ eventHandler.startNonterminal("FTWeight", e0);
+ shift(264); // 'weight'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("FTWeight", e0);
+ }
+
+ function try_FTWeight()
+ {
+ shiftT(264); // 'weight'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FTOr()
+ {
+ eventHandler.startNonterminal("FTOr", e0);
+ parse_FTAnd();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftor'
+ {
+ break;
+ }
+ shift(144); // 'ftor'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTAnd();
+ }
+ eventHandler.endNonterminal("FTOr", e0);
+ }
+
+ function try_FTOr()
+ {
+ try_FTAnd();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftor'
+ {
+ break;
+ }
+ shiftT(144); // 'ftor'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTAnd();
+ }
+ }
+
+ function parse_FTAnd()
+ {
+ eventHandler.startNonterminal("FTAnd", e0);
+ parse_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 142) // 'ftand'
+ {
+ break;
+ }
+ shift(142); // 'ftand'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTMildNot();
+ }
+ eventHandler.endNonterminal("FTAnd", e0);
+ }
+
+ function try_FTAnd()
+ {
+ try_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 142) // 'ftand'
+ {
+ break;
+ }
+ shiftT(142); // 'ftand'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTMildNot();
+ }
+ }
+
+ function parse_FTMildNot()
+ {
+ eventHandler.startNonterminal("FTMildNot", e0);
+ parse_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'where' | 'window' | 'with' |
+ // 'without' | '|}' | '}'
+ if (l1 != 193) // 'not'
+ {
+ break;
+ }
+ shift(193); // 'not'
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shift(154); // 'in'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTUnaryNot();
+ }
+ eventHandler.endNonterminal("FTMildNot", e0);
+ }
+
+ function try_FTMildNot()
+ {
+ try_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'where' | 'window' | 'with' |
+ // 'without' | '|}' | '}'
+ if (l1 != 193) // 'not'
+ {
+ break;
+ }
+ shiftT(193); // 'not'
+ lookahead1W(53); // S^WS | '(:' | 'in'
+ shiftT(154); // 'in'
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTUnaryNot();
+ }
+ }
+
+ function parse_FTUnaryNot()
+ {
+ eventHandler.startNonterminal("FTUnaryNot", e0);
+ if (l1 == 143) // 'ftnot'
+ {
+ shift(143); // 'ftnot'
+ }
+ lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ whitespace();
+ parse_FTPrimaryWithOptions();
+ eventHandler.endNonterminal("FTUnaryNot", e0);
+ }
+
+ function try_FTUnaryNot()
+ {
+ if (l1 == 143) // 'ftnot'
+ {
+ shiftT(143); // 'ftnot'
+ }
+ lookahead1W(155); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ try_FTPrimaryWithOptions();
+ }
+
+ function parse_FTPrimaryWithOptions()
+ {
+ eventHandler.startNonterminal("FTPrimaryWithOptions", e0);
+ parse_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' | 'where' |
+ // 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 259) // 'using'
+ {
+ whitespace();
+ parse_FTMatchOptions();
+ }
+ if (l1 == 264) // 'weight'
+ {
+ whitespace();
+ parse_FTWeight();
+ }
+ eventHandler.endNonterminal("FTPrimaryWithOptions", e0);
+ }
+
+ function try_FTPrimaryWithOptions()
+ {
+ try_FTPrimary();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' | 'where' |
+ // 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 259) // 'using'
+ {
+ try_FTMatchOptions();
+ }
+ if (l1 == 264) // 'weight'
+ {
+ try_FTWeight();
+ }
+ }
+
+ function parse_FTPrimary()
+ {
+ eventHandler.startNonterminal("FTPrimary", e0);
+ switch (l1)
+ {
+ case 34: // '('
+ shift(34); // '('
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ shift(37); // ')'
+ break;
+ case 35: // '(#'
+ parse_FTExtensionSelection();
+ break;
+ default:
+ parse_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 195) // 'occurs'
+ {
+ whitespace();
+ parse_FTTimes();
+ }
+ }
+ eventHandler.endNonterminal("FTPrimary", e0);
+ }
+
+ function try_FTPrimary()
+ {
+ switch (l1)
+ {
+ case 34: // '('
+ shiftT(34); // '('
+ lookahead1W(162); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ shiftT(37); // ')'
+ break;
+ case 35: // '(#'
+ try_FTExtensionSelection();
+ break;
+ default:
+ try_FTWords();
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 195) // 'occurs'
+ {
+ try_FTTimes();
+ }
+ }
+ }
+
+ function parse_FTWords()
+ {
+ eventHandler.startNonterminal("FTWords", e0);
+ parse_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'all' | 'and' | 'any' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'phrase' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' |
+ // 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 71 // 'all'
+ || l1 == 76 // 'any'
+ || l1 == 210) // 'phrase'
+ {
+ whitespace();
+ parse_FTAnyallOption();
+ }
+ eventHandler.endNonterminal("FTWords", e0);
+ }
+
+ function try_FTWords()
+ {
+ try_FTWordsValue();
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'all' | 'and' | 'any' | 'as' | 'ascending' |
+ // 'at' | 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'phrase' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' |
+ // 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 == 71 // 'all'
+ || l1 == 76 // 'any'
+ || l1 == 210) // 'phrase'
+ {
+ try_FTAnyallOption();
+ }
+ }
+
+ function parse_FTWordsValue()
+ {
+ eventHandler.startNonterminal("FTWordsValue", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ }
+ eventHandler.endNonterminal("FTWordsValue", e0);
+ }
+
+ function try_FTWordsValue()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ }
+ }
+
+ function parse_FTExtensionSelection()
+ {
+ eventHandler.startNonterminal("FTExtensionSelection", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shift(276); // '{'
+ lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_FTSelection();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("FTExtensionSelection", e0);
+ }
+
+ function try_FTExtensionSelection()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(100); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 35) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(276); // '{'
+ lookahead1W(166); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 282) // '}'
+ {
+ try_FTSelection();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_FTAnyallOption()
+ {
+ eventHandler.startNonterminal("FTAnyallOption", e0);
+ switch (l1)
+ {
+ case 76: // 'any'
+ shift(76); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | 'word' | '|}' | '}'
+ if (l1 == 272) // 'word'
+ {
+ shift(272); // 'word'
+ }
+ break;
+ case 71: // 'all'
+ shift(71); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | 'words' | '|}' | '}'
+ if (l1 == 273) // 'words'
+ {
+ shift(273); // 'words'
+ }
+ break;
+ default:
+ shift(210); // 'phrase'
+ }
+ eventHandler.endNonterminal("FTAnyallOption", e0);
+ }
+
+ function try_FTAnyallOption()
+ {
+ switch (l1)
+ {
+ case 76: // 'any'
+ shiftT(76); // 'any'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | 'word' | '|}' | '}'
+ if (l1 == 272) // 'word'
+ {
+ shiftT(272); // 'word'
+ }
+ break;
+ case 71: // 'all'
+ shiftT(71); // 'all'
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'occurs' | 'only' | 'or' | 'order' | 'ordered' |
+ // 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' |
+ // 'where' | 'window' | 'with' | 'without' | 'words' | '|}' | '}'
+ if (l1 == 273) // 'words'
+ {
+ shiftT(273); // 'words'
+ }
+ break;
+ default:
+ shiftT(210); // 'phrase'
+ }
+ }
+
+ function parse_FTTimes()
+ {
+ eventHandler.startNonterminal("FTTimes", e0);
+ shift(195); // 'occurs'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ shift(247); // 'times'
+ eventHandler.endNonterminal("FTTimes", e0);
+ }
+
+ function try_FTTimes()
+ {
+ shiftT(195); // 'occurs'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ shiftT(247); // 'times'
+ }
+
+ function parse_FTRange()
+ {
+ eventHandler.startNonterminal("FTRange", e0);
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shift(130); // 'exactly'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shift(173); // 'least'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ default:
+ shift(183); // 'most'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ break;
+ default:
+ shift(140); // 'from'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ shift(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("FTRange", e0);
+ }
+
+ function try_FTRange()
+ {
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shiftT(130); // 'exactly'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shiftT(173); // 'least'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ break;
+ default:
+ shiftT(183); // 'most'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ }
+ break;
+ default:
+ shiftT(140); // 'from'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ shiftT(248); // 'to'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_FTPosFilter()
+ {
+ eventHandler.startNonterminal("FTPosFilter", e0);
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ parse_FTOrder();
+ break;
+ case 269: // 'window'
+ parse_FTWindow();
+ break;
+ case 117: // 'distance'
+ parse_FTDistance();
+ break;
+ case 115: // 'different'
+ case 223: // 'same'
+ parse_FTScope();
+ break;
+ default:
+ parse_FTContent();
+ }
+ eventHandler.endNonterminal("FTPosFilter", e0);
+ }
+
+ function try_FTPosFilter()
+ {
+ switch (l1)
+ {
+ case 202: // 'ordered'
+ try_FTOrder();
+ break;
+ case 269: // 'window'
+ try_FTWindow();
+ break;
+ case 117: // 'distance'
+ try_FTDistance();
+ break;
+ case 115: // 'different'
+ case 223: // 'same'
+ try_FTScope();
+ break;
+ default:
+ try_FTContent();
+ }
+ }
+
+ function parse_FTOrder()
+ {
+ eventHandler.startNonterminal("FTOrder", e0);
+ shift(202); // 'ordered'
+ eventHandler.endNonterminal("FTOrder", e0);
+ }
+
+ function try_FTOrder()
+ {
+ shiftT(202); // 'ordered'
+ }
+
+ function parse_FTWindow()
+ {
+ eventHandler.startNonterminal("FTWindow", e0);
+ shift(269); // 'window'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_AdditiveExpr();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTWindow", e0);
+ }
+
+ function try_FTWindow()
+ {
+ shiftT(269); // 'window'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_AdditiveExpr();
+ try_FTUnit();
+ }
+
+ function parse_FTDistance()
+ {
+ eventHandler.startNonterminal("FTDistance", e0);
+ shift(117); // 'distance'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTDistance", e0);
+ }
+
+ function try_FTDistance()
+ {
+ shiftT(117); // 'distance'
+ lookahead1W(149); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ try_FTUnit();
+ }
+
+ function parse_FTUnit()
+ {
+ eventHandler.startNonterminal("FTUnit", e0);
+ switch (l1)
+ {
+ case 273: // 'words'
+ shift(273); // 'words'
+ break;
+ case 232: // 'sentences'
+ shift(232); // 'sentences'
+ break;
+ default:
+ shift(205); // 'paragraphs'
+ }
+ eventHandler.endNonterminal("FTUnit", e0);
+ }
+
+ function try_FTUnit()
+ {
+ switch (l1)
+ {
+ case 273: // 'words'
+ shiftT(273); // 'words'
+ break;
+ case 232: // 'sentences'
+ shiftT(232); // 'sentences'
+ break;
+ default:
+ shiftT(205); // 'paragraphs'
+ }
+ }
+
+ function parse_FTScope()
+ {
+ eventHandler.startNonterminal("FTScope", e0);
+ switch (l1)
+ {
+ case 223: // 'same'
+ shift(223); // 'same'
+ break;
+ default:
+ shift(115); // 'different'
+ }
+ lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence'
+ whitespace();
+ parse_FTBigUnit();
+ eventHandler.endNonterminal("FTScope", e0);
+ }
+
+ function try_FTScope()
+ {
+ switch (l1)
+ {
+ case 223: // 'same'
+ shiftT(223); // 'same'
+ break;
+ default:
+ shiftT(115); // 'different'
+ }
+ lookahead1W(132); // S^WS | '(:' | 'paragraph' | 'sentence'
+ try_FTBigUnit();
+ }
+
+ function parse_FTBigUnit()
+ {
+ eventHandler.startNonterminal("FTBigUnit", e0);
+ switch (l1)
+ {
+ case 231: // 'sentence'
+ shift(231); // 'sentence'
+ break;
+ default:
+ shift(204); // 'paragraph'
+ }
+ eventHandler.endNonterminal("FTBigUnit", e0);
+ }
+
+ function try_FTBigUnit()
+ {
+ switch (l1)
+ {
+ case 231: // 'sentence'
+ shiftT(231); // 'sentence'
+ break;
+ default:
+ shiftT(204); // 'paragraph'
+ }
+ }
+
+ function parse_FTContent()
+ {
+ eventHandler.startNonterminal("FTContent", e0);
+ switch (l1)
+ {
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(117); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ default:
+ shift(126); // 'end'
+ }
+ break;
+ default:
+ shift(127); // 'entire'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shift(100); // 'content'
+ }
+ eventHandler.endNonterminal("FTContent", e0);
+ }
+
+ function try_FTContent()
+ {
+ switch (l1)
+ {
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(117); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ default:
+ shiftT(126); // 'end'
+ }
+ break;
+ default:
+ shiftT(127); // 'entire'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shiftT(100); // 'content'
+ }
+ }
+
+ function parse_FTMatchOptions()
+ {
+ eventHandler.startNonterminal("FTMatchOptions", e0);
+ for (;;)
+ {
+ shift(259); // 'using'
+ lookahead1W(181); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ // 'option' | 'stemming' | 'stop' | 'thesaurus' | 'uppercase' | 'wildcards'
+ whitespace();
+ parse_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' | 'where' |
+ // 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 259) // 'using'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("FTMatchOptions", e0);
+ }
+
+ function try_FTMatchOptions()
+ {
+ for (;;)
+ {
+ shiftT(259); // 'using'
+ lookahead1W(181); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ // 'option' | 'stemming' | 'stop' | 'thesaurus' | 'uppercase' | 'wildcards'
+ try_FTMatchOption();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' | 'for' |
+ // 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' | 'ordered' | 'return' |
+ // 'same' | 'satisfies' | 'stable' | 'start' | 'using' | 'weight' | 'where' |
+ // 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 259) // 'using'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_FTMatchOption()
+ {
+ eventHandler.startNonterminal("FTMatchOption", e0);
+ switch (l1)
+ {
+ case 188: // 'no'
+ lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 169: // 'language'
+ parse_FTLanguageOption();
+ break;
+ case 268: // 'wildcards'
+ case 137404: // 'no' 'wildcards'
+ parse_FTWildCardOption();
+ break;
+ case 246: // 'thesaurus'
+ case 126140: // 'no' 'thesaurus'
+ parse_FTThesaurusOption();
+ break;
+ case 238: // 'stemming'
+ case 122044: // 'no' 'stemming'
+ parse_FTStemOption();
+ break;
+ case 114: // 'diacritics'
+ parse_FTDiacriticsOption();
+ break;
+ case 239: // 'stop'
+ case 122556: // 'no' 'stop'
+ parse_FTStopWordOption();
+ break;
+ case 199: // 'option'
+ parse_FTExtensionOption();
+ break;
+ default:
+ parse_FTCaseOption();
+ }
+ eventHandler.endNonterminal("FTMatchOption", e0);
+ }
+
+ function try_FTMatchOption()
+ {
+ switch (l1)
+ {
+ case 188: // 'no'
+ lookahead2W(161); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 169: // 'language'
+ try_FTLanguageOption();
+ break;
+ case 268: // 'wildcards'
+ case 137404: // 'no' 'wildcards'
+ try_FTWildCardOption();
+ break;
+ case 246: // 'thesaurus'
+ case 126140: // 'no' 'thesaurus'
+ try_FTThesaurusOption();
+ break;
+ case 238: // 'stemming'
+ case 122044: // 'no' 'stemming'
+ try_FTStemOption();
+ break;
+ case 114: // 'diacritics'
+ try_FTDiacriticsOption();
+ break;
+ case 239: // 'stop'
+ case 122556: // 'no' 'stop'
+ try_FTStopWordOption();
+ break;
+ case 199: // 'option'
+ try_FTExtensionOption();
+ break;
+ default:
+ try_FTCaseOption();
+ }
+ }
+
+ function parse_FTCaseOption()
+ {
+ eventHandler.startNonterminal("FTCaseOption", e0);
+ switch (l1)
+ {
+ case 88: // 'case'
+ shift(88); // 'case'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shift(158); // 'insensitive'
+ break;
+ default:
+ shift(230); // 'sensitive'
+ }
+ break;
+ case 177: // 'lowercase'
+ shift(177); // 'lowercase'
+ break;
+ default:
+ shift(258); // 'uppercase'
+ }
+ eventHandler.endNonterminal("FTCaseOption", e0);
+ }
+
+ function try_FTCaseOption()
+ {
+ switch (l1)
+ {
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shiftT(158); // 'insensitive'
+ break;
+ default:
+ shiftT(230); // 'sensitive'
+ }
+ break;
+ case 177: // 'lowercase'
+ shiftT(177); // 'lowercase'
+ break;
+ default:
+ shiftT(258); // 'uppercase'
+ }
+ }
+
+ function parse_FTDiacriticsOption()
+ {
+ eventHandler.startNonterminal("FTDiacriticsOption", e0);
+ shift(114); // 'diacritics'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shift(158); // 'insensitive'
+ break;
+ default:
+ shift(230); // 'sensitive'
+ }
+ eventHandler.endNonterminal("FTDiacriticsOption", e0);
+ }
+
+ function try_FTDiacriticsOption()
+ {
+ shiftT(114); // 'diacritics'
+ lookahead1W(124); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 158: // 'insensitive'
+ shiftT(158); // 'insensitive'
+ break;
+ default:
+ shiftT(230); // 'sensitive'
+ }
+ }
+
+ function parse_FTStemOption()
+ {
+ eventHandler.startNonterminal("FTStemOption", e0);
+ switch (l1)
+ {
+ case 238: // 'stemming'
+ shift(238); // 'stemming'
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(74); // S^WS | '(:' | 'stemming'
+ shift(238); // 'stemming'
+ }
+ eventHandler.endNonterminal("FTStemOption", e0);
+ }
+
+ function try_FTStemOption()
+ {
+ switch (l1)
+ {
+ case 238: // 'stemming'
+ shiftT(238); // 'stemming'
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(74); // S^WS | '(:' | 'stemming'
+ shiftT(238); // 'stemming'
+ }
+ }
+
+ function parse_FTThesaurusOption()
+ {
+ eventHandler.startNonterminal("FTThesaurusOption", e0);
+ switch (l1)
+ {
+ case 246: // 'thesaurus'
+ shift(246); // 'thesaurus'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ default:
+ shift(34); // '('
+ lookahead1W(112); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ default:
+ shift(109); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(31); // S^WS | '(:' | 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ }
+ shift(37); // ')'
+ }
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'thesaurus'
+ shift(246); // 'thesaurus'
+ }
+ eventHandler.endNonterminal("FTThesaurusOption", e0);
+ }
+
+ function try_FTThesaurusOption()
+ {
+ switch (l1)
+ {
+ case 246: // 'thesaurus'
+ shiftT(246); // 'thesaurus'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ try_FTThesaurusID();
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ default:
+ shiftT(34); // '('
+ lookahead1W(112); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 81: // 'at'
+ try_FTThesaurusID();
+ break;
+ default:
+ shiftT(109); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(31); // S^WS | '(:' | 'at'
+ try_FTThesaurusID();
+ }
+ shiftT(37); // ')'
+ }
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'thesaurus'
+ shiftT(246); // 'thesaurus'
+ }
+ }
+
+ function parse_FTThesaurusID()
+ {
+ eventHandler.startNonterminal("FTThesaurusID", e0);
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'exactly' | 'for' | 'from' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'relationship' | 'return' | 'same' | 'satisfies' | 'stable' |
+ // 'start' | 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' |
+ // '}'
+ if (l1 == 217) // 'relationship'
+ {
+ shift(217); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'exactly' | 'for' | 'from' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' |
+ // 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 130 // 'exactly'
+ || lk == 140 // 'from'
+ || lk == 88657 // 'at' 'least'
+ || lk == 93777) // 'at' 'most'
+ {
+ whitespace();
+ parse_FTLiteralRange();
+ lookahead1W(58); // S^WS | '(:' | 'levels'
+ shift(175); // 'levels'
+ }
+ eventHandler.endNonterminal("FTThesaurusID", e0);
+ }
+
+ function try_FTThesaurusID()
+ {
+ shiftT(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'exactly' | 'for' | 'from' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'relationship' | 'return' | 'same' | 'satisfies' | 'stable' |
+ // 'start' | 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' |
+ // '}'
+ if (l1 == 217) // 'relationship'
+ {
+ shiftT(217); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'exactly' | 'for' | 'from' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' |
+ // 'is' | 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'using' |
+ // 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(165); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 130 // 'exactly'
+ || lk == 140 // 'from'
+ || lk == 88657 // 'at' 'least'
+ || lk == 93777) // 'at' 'most'
+ {
+ try_FTLiteralRange();
+ lookahead1W(58); // S^WS | '(:' | 'levels'
+ shiftT(175); // 'levels'
+ }
+ }
+
+ function parse_FTLiteralRange()
+ {
+ eventHandler.startNonterminal("FTLiteralRange", e0);
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shift(130); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shift(173); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ default:
+ shift(183); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shift(140); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ lookahead1W(79); // S^WS | '(:' | 'to'
+ shift(248); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ eventHandler.endNonterminal("FTLiteralRange", e0);
+ }
+
+ function try_FTLiteralRange()
+ {
+ switch (l1)
+ {
+ case 130: // 'exactly'
+ shiftT(130); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(125); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 173: // 'least'
+ shiftT(173); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ default:
+ shiftT(183); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shiftT(140); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ lookahead1W(79); // S^WS | '(:' | 'to'
+ shiftT(248); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ }
+
+ function parse_FTStopWordOption()
+ {
+ eventHandler.startNonterminal("FTStopWordOption", e0);
+ switch (l1)
+ {
+ case 239: // 'stop'
+ shift(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shift(273); // 'words'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 109: // 'default'
+ shift(109); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'except' | 'for' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'union' |
+ // 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ whitespace();
+ parse_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'except' | 'for' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'union' |
+ // 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(75); // S^WS | '(:' | 'stop'
+ shift(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shift(273); // 'words'
+ }
+ eventHandler.endNonterminal("FTStopWordOption", e0);
+ }
+
+ function try_FTStopWordOption()
+ {
+ switch (l1)
+ {
+ case 239: // 'stop'
+ shiftT(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shiftT(273); // 'words'
+ lookahead1W(142); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'except' | 'for' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'union' |
+ // 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ try_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ // '>' | '>=' | '>>' | ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' |
+ // 'before' | 'case' | 'collation' | 'count' | 'default' | 'descending' |
+ // 'different' | 'distance' | 'else' | 'empty' | 'end' | 'entire' | 'eq' |
+ // 'except' | 'for' | 'ftand' | 'ftor' | 'ge' | 'group' | 'gt' | 'into' | 'is' |
+ // 'le' | 'let' | 'lt' | 'modify' | 'ne' | 'not' | 'only' | 'or' | 'order' |
+ // 'ordered' | 'return' | 'same' | 'satisfies' | 'stable' | 'start' | 'union' |
+ // 'using' | 'weight' | 'where' | 'window' | 'with' | 'without' | '|}' | '}'
+ if (l1 != 131 // 'except'
+ && l1 != 254) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(75); // S^WS | '(:' | 'stop'
+ shiftT(239); // 'stop'
+ lookahead1W(86); // S^WS | '(:' | 'words'
+ shiftT(273); // 'words'
+ }
+ }
+
+ function parse_FTStopWords()
+ {
+ eventHandler.startNonterminal("FTStopWords", e0);
+ switch (l1)
+ {
+ case 81: // 'at'
+ shift(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ break;
+ default:
+ shift(34); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ shift(37); // ')'
+ }
+ eventHandler.endNonterminal("FTStopWords", e0);
+ }
+
+ function try_FTStopWords()
+ {
+ switch (l1)
+ {
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ break;
+ default:
+ shiftT(34); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ shiftT(37); // ')'
+ }
+ }
+
+ function parse_FTStopWordsInclExcl()
+ {
+ eventHandler.startNonterminal("FTStopWordsInclExcl", e0);
+ switch (l1)
+ {
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ default:
+ shift(131); // 'except'
+ }
+ lookahead1W(99); // S^WS | '(' | '(:' | 'at'
+ whitespace();
+ parse_FTStopWords();
+ eventHandler.endNonterminal("FTStopWordsInclExcl", e0);
+ }
+
+ function try_FTStopWordsInclExcl()
+ {
+ switch (l1)
+ {
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ default:
+ shiftT(131); // 'except'
+ }
+ lookahead1W(99); // S^WS | '(' | '(:' | 'at'
+ try_FTStopWords();
+ }
+
+ function parse_FTLanguageOption()
+ {
+ eventHandler.startNonterminal("FTLanguageOption", e0);
+ shift(169); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTLanguageOption", e0);
+ }
+
+ function try_FTLanguageOption()
+ {
+ shiftT(169); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTWildCardOption()
+ {
+ eventHandler.startNonterminal("FTWildCardOption", e0);
+ switch (l1)
+ {
+ case 268: // 'wildcards'
+ shift(268); // 'wildcards'
+ break;
+ default:
+ shift(188); // 'no'
+ lookahead1W(84); // S^WS | '(:' | 'wildcards'
+ shift(268); // 'wildcards'
+ }
+ eventHandler.endNonterminal("FTWildCardOption", e0);
+ }
+
+ function try_FTWildCardOption()
+ {
+ switch (l1)
+ {
+ case 268: // 'wildcards'
+ shiftT(268); // 'wildcards'
+ break;
+ default:
+ shiftT(188); // 'no'
+ lookahead1W(84); // S^WS | '(:' | 'wildcards'
+ shiftT(268); // 'wildcards'
+ }
+ }
+
+ function parse_FTExtensionOption()
+ {
+ eventHandler.startNonterminal("FTExtensionOption", e0);
+ shift(199); // 'option'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTExtensionOption", e0);
+ }
+
+ function try_FTExtensionOption()
+ {
+ shiftT(199); // 'option'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_EQName();
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTIgnoreOption()
+ {
+ eventHandler.startNonterminal("FTIgnoreOption", e0);
+ shift(271); // 'without'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shift(100); // 'content'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_UnionExpr();
+ eventHandler.endNonterminal("FTIgnoreOption", e0);
+ }
+
+ function try_FTIgnoreOption()
+ {
+ shiftT(271); // 'without'
+ lookahead1W(42); // S^WS | '(:' | 'content'
+ shiftT(100); // 'content'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_UnionExpr();
+ }
+
+ function parse_CollectionDecl()
+ {
+ eventHandler.startNonterminal("CollectionDecl", e0);
+ shift(95); // 'collection'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(107); // S^WS | '(:' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_CollectionTypeDecl();
+ }
+ eventHandler.endNonterminal("CollectionDecl", e0);
+ }
+
+ function parse_CollectionTypeDecl()
+ {
+ eventHandler.startNonterminal("CollectionTypeDecl", e0);
+ shift(79); // 'as'
+ lookahead1W(183); // S^WS | '(:' | 'array' | 'attribute' | 'comment' | 'document-node' | 'element' |
+ // 'json-item' | 'namespace-node' | 'node' | 'object' | 'processing-instruction' |
+ // 'schema-attribute' | 'schema-element' | 'text'
+ whitespace();
+ parse_KindTest();
+ lookahead1W(156); // S^WS | '(:' | '*' | '+' | ';' | '?'
+ if (l1 != 53) // ';'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("CollectionTypeDecl", e0);
+ }
+
+ function parse_IndexName()
+ {
+ eventHandler.startNonterminal("IndexName", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("IndexName", e0);
+ }
+
+ function parse_IndexDomainExpr()
+ {
+ eventHandler.startNonterminal("IndexDomainExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexDomainExpr", e0);
+ }
+
+ function parse_IndexKeySpec()
+ {
+ eventHandler.startNonterminal("IndexKeySpec", e0);
+ parse_IndexKeyExpr();
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_IndexKeyTypeDecl();
+ }
+ lookahead1W(146); // S^WS | '(:' | ',' | ';' | 'collation'
+ if (l1 == 94) // 'collation'
+ {
+ whitespace();
+ parse_IndexKeyCollation();
+ }
+ eventHandler.endNonterminal("IndexKeySpec", e0);
+ }
+
+ function parse_IndexKeyExpr()
+ {
+ eventHandler.startNonterminal("IndexKeyExpr", e0);
+ parse_PathExpr();
+ eventHandler.endNonterminal("IndexKeyExpr", e0);
+ }
+
+ function parse_IndexKeyTypeDecl()
+ {
+ eventHandler.startNonterminal("IndexKeyTypeDecl", e0);
+ shift(79); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_AtomicType();
+ lookahead1W(169); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation'
+ if (l1 == 39 // '*'
+ || l1 == 40 // '+'
+ || l1 == 64) // '?'
+ {
+ whitespace();
+ parse_OccurrenceIndicator();
+ }
+ eventHandler.endNonterminal("IndexKeyTypeDecl", e0);
+ }
+
+ function parse_AtomicType()
+ {
+ eventHandler.startNonterminal("AtomicType", e0);
+ parse_EQName();
+ eventHandler.endNonterminal("AtomicType", e0);
+ }
+
+ function parse_IndexKeyCollation()
+ {
+ eventHandler.startNonterminal("IndexKeyCollation", e0);
+ shift(94); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("IndexKeyCollation", e0);
+ }
+
+ function parse_IndexDecl()
+ {
+ eventHandler.startNonterminal("IndexDecl", e0);
+ shift(155); // 'index'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_IndexName();
+ lookahead1W(65); // S^WS | '(:' | 'on'
+ shift(197); // 'on'
+ lookahead1W(63); // S^WS | '(:' | 'nodes'
+ shift(192); // 'nodes'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_IndexDomainExpr();
+ shift(87); // 'by'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_IndexKeySpec();
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_IndexKeySpec();
+ }
+ eventHandler.endNonterminal("IndexDecl", e0);
+ }
+
+ function parse_ICDecl()
+ {
+ eventHandler.startNonterminal("ICDecl", e0);
+ shift(161); // 'integrity'
+ lookahead1W(40); // S^WS | '(:' | 'constraint'
+ shift(97); // 'constraint'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(120); // S^WS | '(:' | 'foreign' | 'on'
+ switch (l1)
+ {
+ case 197: // 'on'
+ whitespace();
+ parse_ICCollection();
+ break;
+ default:
+ whitespace();
+ parse_ICForeignKey();
+ }
+ eventHandler.endNonterminal("ICDecl", e0);
+ }
+
+ function parse_ICCollection()
+ {
+ eventHandler.startNonterminal("ICCollection", e0);
+ shift(197); // 'on'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ shift(95); // 'collection'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(140); // S^WS | '$' | '(:' | 'foreach' | 'node'
+ switch (l1)
+ {
+ case 31: // '$'
+ whitespace();
+ parse_ICCollSequence();
+ break;
+ case 191: // 'node'
+ whitespace();
+ parse_ICCollSequenceUnique();
+ break;
+ default:
+ whitespace();
+ parse_ICCollNode();
+ }
+ eventHandler.endNonterminal("ICCollection", e0);
+ }
+
+ function parse_ICCollSequence()
+ {
+ eventHandler.startNonterminal("ICCollSequence", e0);
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollSequence", e0);
+ }
+
+ function parse_ICCollSequenceUnique()
+ {
+ eventHandler.startNonterminal("ICCollSequenceUnique", e0);
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(80); // S^WS | '(:' | 'unique'
+ shift(255); // 'unique'
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICCollSequenceUnique", e0);
+ }
+
+ function parse_ICCollNode()
+ {
+ eventHandler.startNonterminal("ICCollNode", e0);
+ shift(138); // 'foreach'
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(37); // S^WS | '(:' | 'check'
+ shift(92); // 'check'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollNode", e0);
+ }
+
+ function parse_ICForeignKey()
+ {
+ eventHandler.startNonterminal("ICForeignKey", e0);
+ shift(139); // 'foreign'
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(51); // S^WS | '(:' | 'from'
+ whitespace();
+ parse_ICForeignKeySource();
+ whitespace();
+ parse_ICForeignKeyTarget();
+ eventHandler.endNonterminal("ICForeignKey", e0);
+ }
+
+ function parse_ICForeignKeySource()
+ {
+ eventHandler.startNonterminal("ICForeignKeySource", e0);
+ shift(140); // 'from'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeySource", e0);
+ }
+
+ function parse_ICForeignKeyTarget()
+ {
+ eventHandler.startNonterminal("ICForeignKeyTarget", e0);
+ shift(248); // 'to'
+ lookahead1W(39); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeyTarget", e0);
+ }
+
+ function parse_ICForeignKeyValues()
+ {
+ eventHandler.startNonterminal("ICForeignKeyValues", e0);
+ shift(95); // 'collection'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(62); // S^WS | '(:' | 'node'
+ shift(191); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(57); // S^WS | '(:' | 'key'
+ shift(168); // 'key'
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '/' | '//' | '<' |
+ // '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICForeignKeyValues", e0);
+ }
+
+ function try_Comment()
+ {
+ shiftT(36); // '(:'
+ for (;;)
+ {
+ lookahead1(89); // CommentContents | '(:' | ':)'
+ if (l1 == 50) // ':)'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 24: // CommentContents
+ shiftT(24); // CommentContents
+ break;
+ default:
+ try_Comment();
+ }
+ }
+ shiftT(50); // ':)'
+ }
+
+ function try_Whitespace()
+ {
+ switch (l1)
+ {
+ case 22: // S^WS
+ shiftT(22); // S^WS
+ break;
+ default:
+ try_Comment();
+ }
+ }
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ lookahead1(248); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ // 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ break;
+ case 96: // 'comment'
+ shift(96); // 'comment'
+ break;
+ case 120: // 'document-node'
+ shift(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shift(124); // 'empty-sequence'
+ break;
+ case 145: // 'function'
+ shift(145); // 'function'
+ break;
+ case 152: // 'if'
+ shift(152); // 'if'
+ break;
+ case 165: // 'item'
+ shift(165); // 'item'
+ break;
+ case 185: // 'namespace-node'
+ shift(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ case 216: // 'processing-instruction'
+ shift(216); // 'processing-instruction'
+ break;
+ case 226: // 'schema-attribute'
+ shift(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shift(227); // 'schema-element'
+ break;
+ case 243: // 'switch'
+ shift(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shift(244); // 'text'
+ break;
+ case 253: // 'typeswitch'
+ shift(253); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function try_EQName()
+ {
+ lookahead1(248); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ // 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ break;
+ case 96: // 'comment'
+ shiftT(96); // 'comment'
+ break;
+ case 120: // 'document-node'
+ shiftT(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shiftT(124); // 'empty-sequence'
+ break;
+ case 145: // 'function'
+ shiftT(145); // 'function'
+ break;
+ case 152: // 'if'
+ shiftT(152); // 'if'
+ break;
+ case 165: // 'item'
+ shiftT(165); // 'item'
+ break;
+ case 185: // 'namespace-node'
+ shiftT(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ case 216: // 'processing-instruction'
+ shiftT(216); // 'processing-instruction'
+ break;
+ case 226: // 'schema-attribute'
+ shiftT(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shiftT(227); // 'schema-element'
+ break;
+ case 243: // 'switch'
+ shiftT(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shiftT(244); // 'text'
+ break;
+ case 253: // 'typeswitch'
+ shiftT(253); // 'typeswitch'
+ break;
+ default:
+ try_FunctionName();
+ }
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shift(6); // EQName^Token
+ break;
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shift(74); // 'ancestor-or-self'
+ break;
+ case 75: // 'and'
+ shift(75); // 'and'
+ break;
+ case 79: // 'as'
+ shift(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ case 88: // 'case'
+ shift(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shift(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shift(90); // 'castable'
+ break;
+ case 93: // 'child'
+ shift(93); // 'child'
+ break;
+ case 94: // 'collation'
+ shift(94); // 'collation'
+ break;
+ case 103: // 'copy'
+ shift(103); // 'copy'
+ break;
+ case 105: // 'count'
+ shift(105); // 'count'
+ break;
+ case 108: // 'declare'
+ shift(108); // 'declare'
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ case 110: // 'delete'
+ shift(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ break;
+ case 113: // 'descending'
+ shift(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 119: // 'document'
+ shift(119); // 'document'
+ break;
+ case 122: // 'else'
+ shift(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shift(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shift(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 129: // 'every'
+ shift(129); // 'every'
+ break;
+ case 131: // 'except'
+ shift(131); // 'except'
+ break;
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ case 135: // 'following'
+ shift(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ break;
+ case 137: // 'for'
+ shift(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shift(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shift(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ case 153: // 'import'
+ shift(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shift(159); // 'insert'
+ break;
+ case 160: // 'instance'
+ shift(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shift(163); // 'into'
+ break;
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 170: // 'last'
+ shift(170); // 'last'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 174: // 'let'
+ shift(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shift(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shift(181); // 'modify'
+ break;
+ case 182: // 'module'
+ shift(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shift(198); // 'only'
+ break;
+ case 200: // 'or'
+ shift(200); // 'or'
+ break;
+ case 201: // 'order'
+ shift(201); // 'order'
+ break;
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ break;
+ case 218: // 'rename'
+ shift(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shift(219); // 'replace'
+ break;
+ case 220: // 'return'
+ shift(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shift(224); // 'satisfies'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ break;
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ case 236: // 'stable'
+ shift(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ case 248: // 'to'
+ shift(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shift(249); // 'treat'
+ break;
+ case 250: // 'try'
+ shift(250); // 'try'
+ break;
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ case 256: // 'unordered'
+ shift(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shift(260); // 'validate'
+ break;
+ case 266: // 'where'
+ shift(266); // 'where'
+ break;
+ case 270: // 'with'
+ shift(270); // 'with'
+ break;
+ case 274: // 'xquery'
+ shift(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shift(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shift(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shift(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shift(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shift(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shift(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shift(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shift(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shift(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shift(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shift(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shift(154); // 'in'
+ break;
+ case 155: // 'index'
+ shift(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shift(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shift(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shift(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shift(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shift(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shift(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shift(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shift(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shift(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shift(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shift(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shift(261); // 'value'
+ break;
+ case 262: // 'variable'
+ shift(262); // 'variable'
+ break;
+ case 263: // 'version'
+ shift(263); // 'version'
+ break;
+ case 267: // 'while'
+ shift(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shift(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shift(176); // 'loop'
+ break;
+ case 221: // 'returning'
+ shift(221); // 'returning'
+ break;
+ case 194: // 'object'
+ shift(194); // 'object'
+ break;
+ case 167: // 'json-item'
+ shift(167); // 'json-item'
+ break;
+ default:
+ shift(78); // 'array'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function try_FunctionName()
+ {
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shiftT(6); // EQName^Token
+ break;
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shiftT(74); // 'ancestor-or-self'
+ break;
+ case 75: // 'and'
+ shiftT(75); // 'and'
+ break;
+ case 79: // 'as'
+ shiftT(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shiftT(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shiftT(90); // 'castable'
+ break;
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ break;
+ case 94: // 'collation'
+ shiftT(94); // 'collation'
+ break;
+ case 103: // 'copy'
+ shiftT(103); // 'copy'
+ break;
+ case 105: // 'count'
+ shiftT(105); // 'count'
+ break;
+ case 108: // 'declare'
+ shiftT(108); // 'declare'
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ case 110: // 'delete'
+ shiftT(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ break;
+ case 113: // 'descending'
+ shiftT(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 119: // 'document'
+ shiftT(119); // 'document'
+ break;
+ case 122: // 'else'
+ shiftT(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shiftT(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shiftT(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 129: // 'every'
+ shiftT(129); // 'every'
+ break;
+ case 131: // 'except'
+ shiftT(131); // 'except'
+ break;
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ case 135: // 'following'
+ shiftT(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ break;
+ case 137: // 'for'
+ shiftT(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shiftT(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shiftT(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ case 153: // 'import'
+ shiftT(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shiftT(159); // 'insert'
+ break;
+ case 160: // 'instance'
+ shiftT(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shiftT(163); // 'into'
+ break;
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 170: // 'last'
+ shiftT(170); // 'last'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 174: // 'let'
+ shiftT(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shiftT(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shiftT(181); // 'modify'
+ break;
+ case 182: // 'module'
+ shiftT(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shiftT(184); // 'namespace'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shiftT(198); // 'only'
+ break;
+ case 200: // 'or'
+ shiftT(200); // 'or'
+ break;
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ break;
+ case 202: // 'ordered'
+ shiftT(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ break;
+ case 218: // 'rename'
+ shiftT(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shiftT(219); // 'replace'
+ break;
+ case 220: // 'return'
+ shiftT(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shiftT(224); // 'satisfies'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ break;
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ case 236: // 'stable'
+ shiftT(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ case 248: // 'to'
+ shiftT(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shiftT(249); // 'treat'
+ break;
+ case 250: // 'try'
+ shiftT(250); // 'try'
+ break;
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ case 256: // 'unordered'
+ shiftT(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shiftT(260); // 'validate'
+ break;
+ case 266: // 'where'
+ shiftT(266); // 'where'
+ break;
+ case 270: // 'with'
+ shiftT(270); // 'with'
+ break;
+ case 274: // 'xquery'
+ shiftT(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shiftT(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shiftT(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shiftT(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shiftT(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shiftT(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shiftT(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shiftT(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shiftT(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shiftT(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shiftT(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shiftT(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shiftT(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shiftT(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shiftT(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shiftT(154); // 'in'
+ break;
+ case 155: // 'index'
+ shiftT(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shiftT(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shiftT(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shiftT(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shiftT(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shiftT(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shiftT(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shiftT(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shiftT(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shiftT(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shiftT(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shiftT(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shiftT(261); // 'value'
+ break;
+ case 262: // 'variable'
+ shiftT(262); // 'variable'
+ break;
+ case 263: // 'version'
+ shiftT(263); // 'version'
+ break;
+ case 267: // 'while'
+ shiftT(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shiftT(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shiftT(176); // 'loop'
+ break;
+ case 221: // 'returning'
+ shiftT(221); // 'returning'
+ break;
+ case 194: // 'object'
+ shiftT(194); // 'object'
+ break;
+ case 167: // 'json-item'
+ shiftT(167); // 'json-item'
+ break;
+ default:
+ shiftT(78); // 'array'
+ }
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shift(19); // NCName^Token
+ break;
+ case 70: // 'after'
+ shift(70); // 'after'
+ break;
+ case 75: // 'and'
+ shift(75); // 'and'
+ break;
+ case 79: // 'as'
+ shift(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shift(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shift(84); // 'before'
+ break;
+ case 88: // 'case'
+ shift(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shift(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shift(90); // 'castable'
+ break;
+ case 94: // 'collation'
+ shift(94); // 'collation'
+ break;
+ case 105: // 'count'
+ shift(105); // 'count'
+ break;
+ case 109: // 'default'
+ shift(109); // 'default'
+ break;
+ case 113: // 'descending'
+ shift(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shift(118); // 'div'
+ break;
+ case 122: // 'else'
+ shift(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shift(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shift(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shift(128); // 'eq'
+ break;
+ case 131: // 'except'
+ shift(131); // 'except'
+ break;
+ case 137: // 'for'
+ shift(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shift(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shift(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shift(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shift(151); // 'idiv'
+ break;
+ case 160: // 'instance'
+ shift(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shift(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shift(163); // 'into'
+ break;
+ case 164: // 'is'
+ shift(164); // 'is'
+ break;
+ case 172: // 'le'
+ shift(172); // 'le'
+ break;
+ case 174: // 'let'
+ shift(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shift(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shift(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shift(181); // 'modify'
+ break;
+ case 186: // 'ne'
+ shift(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shift(198); // 'only'
+ break;
+ case 200: // 'or'
+ shift(200); // 'or'
+ break;
+ case 201: // 'order'
+ shift(201); // 'order'
+ break;
+ case 220: // 'return'
+ shift(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shift(224); // 'satisfies'
+ break;
+ case 236: // 'stable'
+ shift(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shift(237); // 'start'
+ break;
+ case 248: // 'to'
+ shift(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shift(249); // 'treat'
+ break;
+ case 254: // 'union'
+ shift(254); // 'union'
+ break;
+ case 266: // 'where'
+ shift(266); // 'where'
+ break;
+ case 270: // 'with'
+ shift(270); // 'with'
+ break;
+ case 73: // 'ancestor'
+ shift(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shift(74); // 'ancestor-or-self'
+ break;
+ case 82: // 'attribute'
+ shift(82); // 'attribute'
+ break;
+ case 93: // 'child'
+ shift(93); // 'child'
+ break;
+ case 96: // 'comment'
+ shift(96); // 'comment'
+ break;
+ case 103: // 'copy'
+ shift(103); // 'copy'
+ break;
+ case 108: // 'declare'
+ shift(108); // 'declare'
+ break;
+ case 110: // 'delete'
+ shift(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shift(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shift(112); // 'descendant-or-self'
+ break;
+ case 119: // 'document'
+ shift(119); // 'document'
+ break;
+ case 120: // 'document-node'
+ shift(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shift(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shift(124); // 'empty-sequence'
+ break;
+ case 129: // 'every'
+ shift(129); // 'every'
+ break;
+ case 134: // 'first'
+ shift(134); // 'first'
+ break;
+ case 135: // 'following'
+ shift(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shift(136); // 'following-sibling'
+ break;
+ case 145: // 'function'
+ shift(145); // 'function'
+ break;
+ case 152: // 'if'
+ shift(152); // 'if'
+ break;
+ case 153: // 'import'
+ shift(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shift(159); // 'insert'
+ break;
+ case 165: // 'item'
+ shift(165); // 'item'
+ break;
+ case 170: // 'last'
+ shift(170); // 'last'
+ break;
+ case 182: // 'module'
+ shift(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shift(184); // 'namespace'
+ break;
+ case 185: // 'namespace-node'
+ shift(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shift(191); // 'node'
+ break;
+ case 202: // 'ordered'
+ shift(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shift(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shift(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shift(213); // 'preceding-sibling'
+ break;
+ case 216: // 'processing-instruction'
+ shift(216); // 'processing-instruction'
+ break;
+ case 218: // 'rename'
+ shift(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shift(219); // 'replace'
+ break;
+ case 226: // 'schema-attribute'
+ shift(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shift(227); // 'schema-element'
+ break;
+ case 229: // 'self'
+ shift(229); // 'self'
+ break;
+ case 235: // 'some'
+ shift(235); // 'some'
+ break;
+ case 243: // 'switch'
+ shift(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shift(244); // 'text'
+ break;
+ case 250: // 'try'
+ shift(250); // 'try'
+ break;
+ case 253: // 'typeswitch'
+ shift(253); // 'typeswitch'
+ break;
+ case 256: // 'unordered'
+ shift(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shift(260); // 'validate'
+ break;
+ case 262: // 'variable'
+ shift(262); // 'variable'
+ break;
+ case 274: // 'xquery'
+ shift(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shift(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shift(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shift(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shift(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shift(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shift(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shift(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shift(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shift(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shift(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shift(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shift(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shift(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shift(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shift(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shift(154); // 'in'
+ break;
+ case 155: // 'index'
+ shift(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shift(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shift(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shift(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shift(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shift(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shift(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shift(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shift(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shift(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shift(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shift(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shift(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shift(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shift(261); // 'value'
+ break;
+ case 263: // 'version'
+ shift(263); // 'version'
+ break;
+ case 267: // 'while'
+ shift(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shift(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shift(176); // 'loop'
+ break;
+ default:
+ shift(221); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function try_NCName()
+ {
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shiftT(19); // NCName^Token
+ break;
+ case 70: // 'after'
+ shiftT(70); // 'after'
+ break;
+ case 75: // 'and'
+ shiftT(75); // 'and'
+ break;
+ case 79: // 'as'
+ shiftT(79); // 'as'
+ break;
+ case 80: // 'ascending'
+ shiftT(80); // 'ascending'
+ break;
+ case 84: // 'before'
+ shiftT(84); // 'before'
+ break;
+ case 88: // 'case'
+ shiftT(88); // 'case'
+ break;
+ case 89: // 'cast'
+ shiftT(89); // 'cast'
+ break;
+ case 90: // 'castable'
+ shiftT(90); // 'castable'
+ break;
+ case 94: // 'collation'
+ shiftT(94); // 'collation'
+ break;
+ case 105: // 'count'
+ shiftT(105); // 'count'
+ break;
+ case 109: // 'default'
+ shiftT(109); // 'default'
+ break;
+ case 113: // 'descending'
+ shiftT(113); // 'descending'
+ break;
+ case 118: // 'div'
+ shiftT(118); // 'div'
+ break;
+ case 122: // 'else'
+ shiftT(122); // 'else'
+ break;
+ case 123: // 'empty'
+ shiftT(123); // 'empty'
+ break;
+ case 126: // 'end'
+ shiftT(126); // 'end'
+ break;
+ case 128: // 'eq'
+ shiftT(128); // 'eq'
+ break;
+ case 131: // 'except'
+ shiftT(131); // 'except'
+ break;
+ case 137: // 'for'
+ shiftT(137); // 'for'
+ break;
+ case 146: // 'ge'
+ shiftT(146); // 'ge'
+ break;
+ case 148: // 'group'
+ shiftT(148); // 'group'
+ break;
+ case 150: // 'gt'
+ shiftT(150); // 'gt'
+ break;
+ case 151: // 'idiv'
+ shiftT(151); // 'idiv'
+ break;
+ case 160: // 'instance'
+ shiftT(160); // 'instance'
+ break;
+ case 162: // 'intersect'
+ shiftT(162); // 'intersect'
+ break;
+ case 163: // 'into'
+ shiftT(163); // 'into'
+ break;
+ case 164: // 'is'
+ shiftT(164); // 'is'
+ break;
+ case 172: // 'le'
+ shiftT(172); // 'le'
+ break;
+ case 174: // 'let'
+ shiftT(174); // 'let'
+ break;
+ case 178: // 'lt'
+ shiftT(178); // 'lt'
+ break;
+ case 180: // 'mod'
+ shiftT(180); // 'mod'
+ break;
+ case 181: // 'modify'
+ shiftT(181); // 'modify'
+ break;
+ case 186: // 'ne'
+ shiftT(186); // 'ne'
+ break;
+ case 198: // 'only'
+ shiftT(198); // 'only'
+ break;
+ case 200: // 'or'
+ shiftT(200); // 'or'
+ break;
+ case 201: // 'order'
+ shiftT(201); // 'order'
+ break;
+ case 220: // 'return'
+ shiftT(220); // 'return'
+ break;
+ case 224: // 'satisfies'
+ shiftT(224); // 'satisfies'
+ break;
+ case 236: // 'stable'
+ shiftT(236); // 'stable'
+ break;
+ case 237: // 'start'
+ shiftT(237); // 'start'
+ break;
+ case 248: // 'to'
+ shiftT(248); // 'to'
+ break;
+ case 249: // 'treat'
+ shiftT(249); // 'treat'
+ break;
+ case 254: // 'union'
+ shiftT(254); // 'union'
+ break;
+ case 266: // 'where'
+ shiftT(266); // 'where'
+ break;
+ case 270: // 'with'
+ shiftT(270); // 'with'
+ break;
+ case 73: // 'ancestor'
+ shiftT(73); // 'ancestor'
+ break;
+ case 74: // 'ancestor-or-self'
+ shiftT(74); // 'ancestor-or-self'
+ break;
+ case 82: // 'attribute'
+ shiftT(82); // 'attribute'
+ break;
+ case 93: // 'child'
+ shiftT(93); // 'child'
+ break;
+ case 96: // 'comment'
+ shiftT(96); // 'comment'
+ break;
+ case 103: // 'copy'
+ shiftT(103); // 'copy'
+ break;
+ case 108: // 'declare'
+ shiftT(108); // 'declare'
+ break;
+ case 110: // 'delete'
+ shiftT(110); // 'delete'
+ break;
+ case 111: // 'descendant'
+ shiftT(111); // 'descendant'
+ break;
+ case 112: // 'descendant-or-self'
+ shiftT(112); // 'descendant-or-self'
+ break;
+ case 119: // 'document'
+ shiftT(119); // 'document'
+ break;
+ case 120: // 'document-node'
+ shiftT(120); // 'document-node'
+ break;
+ case 121: // 'element'
+ shiftT(121); // 'element'
+ break;
+ case 124: // 'empty-sequence'
+ shiftT(124); // 'empty-sequence'
+ break;
+ case 129: // 'every'
+ shiftT(129); // 'every'
+ break;
+ case 134: // 'first'
+ shiftT(134); // 'first'
+ break;
+ case 135: // 'following'
+ shiftT(135); // 'following'
+ break;
+ case 136: // 'following-sibling'
+ shiftT(136); // 'following-sibling'
+ break;
+ case 145: // 'function'
+ shiftT(145); // 'function'
+ break;
+ case 152: // 'if'
+ shiftT(152); // 'if'
+ break;
+ case 153: // 'import'
+ shiftT(153); // 'import'
+ break;
+ case 159: // 'insert'
+ shiftT(159); // 'insert'
+ break;
+ case 165: // 'item'
+ shiftT(165); // 'item'
+ break;
+ case 170: // 'last'
+ shiftT(170); // 'last'
+ break;
+ case 182: // 'module'
+ shiftT(182); // 'module'
+ break;
+ case 184: // 'namespace'
+ shiftT(184); // 'namespace'
+ break;
+ case 185: // 'namespace-node'
+ shiftT(185); // 'namespace-node'
+ break;
+ case 191: // 'node'
+ shiftT(191); // 'node'
+ break;
+ case 202: // 'ordered'
+ shiftT(202); // 'ordered'
+ break;
+ case 206: // 'parent'
+ shiftT(206); // 'parent'
+ break;
+ case 212: // 'preceding'
+ shiftT(212); // 'preceding'
+ break;
+ case 213: // 'preceding-sibling'
+ shiftT(213); // 'preceding-sibling'
+ break;
+ case 216: // 'processing-instruction'
+ shiftT(216); // 'processing-instruction'
+ break;
+ case 218: // 'rename'
+ shiftT(218); // 'rename'
+ break;
+ case 219: // 'replace'
+ shiftT(219); // 'replace'
+ break;
+ case 226: // 'schema-attribute'
+ shiftT(226); // 'schema-attribute'
+ break;
+ case 227: // 'schema-element'
+ shiftT(227); // 'schema-element'
+ break;
+ case 229: // 'self'
+ shiftT(229); // 'self'
+ break;
+ case 235: // 'some'
+ shiftT(235); // 'some'
+ break;
+ case 243: // 'switch'
+ shiftT(243); // 'switch'
+ break;
+ case 244: // 'text'
+ shiftT(244); // 'text'
+ break;
+ case 250: // 'try'
+ shiftT(250); // 'try'
+ break;
+ case 253: // 'typeswitch'
+ shiftT(253); // 'typeswitch'
+ break;
+ case 256: // 'unordered'
+ shiftT(256); // 'unordered'
+ break;
+ case 260: // 'validate'
+ shiftT(260); // 'validate'
+ break;
+ case 262: // 'variable'
+ shiftT(262); // 'variable'
+ break;
+ case 274: // 'xquery'
+ shiftT(274); // 'xquery'
+ break;
+ case 72: // 'allowing'
+ shiftT(72); // 'allowing'
+ break;
+ case 81: // 'at'
+ shiftT(81); // 'at'
+ break;
+ case 83: // 'base-uri'
+ shiftT(83); // 'base-uri'
+ break;
+ case 85: // 'boundary-space'
+ shiftT(85); // 'boundary-space'
+ break;
+ case 86: // 'break'
+ shiftT(86); // 'break'
+ break;
+ case 91: // 'catch'
+ shiftT(91); // 'catch'
+ break;
+ case 98: // 'construction'
+ shiftT(98); // 'construction'
+ break;
+ case 101: // 'context'
+ shiftT(101); // 'context'
+ break;
+ case 102: // 'continue'
+ shiftT(102); // 'continue'
+ break;
+ case 104: // 'copy-namespaces'
+ shiftT(104); // 'copy-namespaces'
+ break;
+ case 106: // 'decimal-format'
+ shiftT(106); // 'decimal-format'
+ break;
+ case 125: // 'encoding'
+ shiftT(125); // 'encoding'
+ break;
+ case 132: // 'exit'
+ shiftT(132); // 'exit'
+ break;
+ case 133: // 'external'
+ shiftT(133); // 'external'
+ break;
+ case 141: // 'ft-option'
+ shiftT(141); // 'ft-option'
+ break;
+ case 154: // 'in'
+ shiftT(154); // 'in'
+ break;
+ case 155: // 'index'
+ shiftT(155); // 'index'
+ break;
+ case 161: // 'integrity'
+ shiftT(161); // 'integrity'
+ break;
+ case 171: // 'lax'
+ shiftT(171); // 'lax'
+ break;
+ case 192: // 'nodes'
+ shiftT(192); // 'nodes'
+ break;
+ case 199: // 'option'
+ shiftT(199); // 'option'
+ break;
+ case 203: // 'ordering'
+ shiftT(203); // 'ordering'
+ break;
+ case 222: // 'revalidation'
+ shiftT(222); // 'revalidation'
+ break;
+ case 225: // 'schema'
+ shiftT(225); // 'schema'
+ break;
+ case 228: // 'score'
+ shiftT(228); // 'score'
+ break;
+ case 234: // 'sliding'
+ shiftT(234); // 'sliding'
+ break;
+ case 240: // 'strict'
+ shiftT(240); // 'strict'
+ break;
+ case 251: // 'tumbling'
+ shiftT(251); // 'tumbling'
+ break;
+ case 252: // 'type'
+ shiftT(252); // 'type'
+ break;
+ case 257: // 'updating'
+ shiftT(257); // 'updating'
+ break;
+ case 261: // 'value'
+ shiftT(261); // 'value'
+ break;
+ case 263: // 'version'
+ shiftT(263); // 'version'
+ break;
+ case 267: // 'while'
+ shiftT(267); // 'while'
+ break;
+ case 97: // 'constraint'
+ shiftT(97); // 'constraint'
+ break;
+ case 176: // 'loop'
+ shiftT(176); // 'loop'
+ break;
+ default:
+ shiftT(221); // 'returning'
+ }
+ }
+
+ function parse_MainModule()
+ {
+ eventHandler.startNonterminal("MainModule", e0);
+ parse_Prolog();
+ whitespace();
+ parse_Program();
+ eventHandler.endNonterminal("MainModule", e0);
+ }
+
+ function parse_Program()
+ {
+ eventHandler.startNonterminal("Program", e0);
+ parse_StatementsAndOptionalExpr();
+ eventHandler.endNonterminal("Program", e0);
+ }
+
+ function parse_Statements()
+ {
+ eventHandler.startNonterminal("Statements", e0);
+ for (;;)
+ {
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 35: // '(#'
+ lookahead2(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ break;
+ case 46: // '/'
+ lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '!' | '!=' | '$' | '%' | '(' | '(:' | '*' | '+' |
+ // ',' | '-' | '.' | '..' | ';' | '<' | '<!--' | '<<' | '<=' | '<?' | '=' | '>' |
+ // '>=' | '>>' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|' | '||' | '}'
+ break;
+ case 47: // '//'
+ lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ break;
+ case 54: // '<'
+ lookahead2(4); // QName
+ break;
+ case 55: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 59: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 66: // '@'
+ lookahead2W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 68: // '['
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | ']' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 77: // 'append'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ case 82: // 'attribute'
+ lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
+ // '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' |
+ // 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 121: // 'element'
+ lookahead2W(277); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'contains' | 'context' | 'continue' |
+ // 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'returning' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 137: // 'for'
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'sliding' |
+ // 'to' | 'treat' | 'tumbling' | 'union' | '|' | '||' | '}'
+ break;
+ case 174: // 'let'
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'score' |
+ // 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 218: // 'rename'
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'or' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 219: // 'replace'
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'or' | 'to' | 'treat' | 'union' | 'value' | '|' | '||' | '}'
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'lax' | 'le' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'strict' | 'to' | 'treat' | 'type' | 'union' | '{' | '|' | '||' | '}'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 278: // '{|'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|}'
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(186); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'loop' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'nodes' | 'or' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(266); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'contains' | 'context' | 'continue' |
+ // 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(197); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 250: // 'try'
+ case 256: // 'unordered'
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '{' | '|' | '||' | '}'
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(198); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 131: // 'except'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 152: // 'if'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 243: // 'switch'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 253: // 'typeswitch'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 261: // 'value'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(195); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 282 // '}'
+ && lk != 12805 // Wildcard EOF
+ && lk != 12806 // EQName^Token EOF
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12844 // '.' EOF
+ && lk != 12845 // '..' EOF
+ && lk != 12846 // '/' EOF
+ && lk != 12870 // 'after' EOF
+ && lk != 12872 // 'allowing' EOF
+ && lk != 12873 // 'ancestor' EOF
+ && lk != 12874 // 'ancestor-or-self' EOF
+ && lk != 12875 // 'and' EOF
+ && lk != 12878 // 'array' EOF
+ && lk != 12879 // 'as' EOF
+ && lk != 12880 // 'ascending' EOF
+ && lk != 12881 // 'at' EOF
+ && lk != 12882 // 'attribute' EOF
+ && lk != 12883 // 'base-uri' EOF
+ && lk != 12884 // 'before' EOF
+ && lk != 12885 // 'boundary-space' EOF
+ && lk != 12886 // 'break' EOF
+ && lk != 12888 // 'case' EOF
+ && lk != 12889 // 'cast' EOF
+ && lk != 12890 // 'castable' EOF
+ && lk != 12891 // 'catch' EOF
+ && lk != 12893 // 'child' EOF
+ && lk != 12894 // 'collation' EOF
+ && lk != 12896 // 'comment' EOF
+ && lk != 12897 // 'constraint' EOF
+ && lk != 12898 // 'construction' EOF
+ && lk != 12901 // 'context' EOF
+ && lk != 12902 // 'continue' EOF
+ && lk != 12903 // 'copy' EOF
+ && lk != 12904 // 'copy-namespaces' EOF
+ && lk != 12905 // 'count' EOF
+ && lk != 12906 // 'decimal-format' EOF
+ && lk != 12908 // 'declare' EOF
+ && lk != 12909 // 'default' EOF
+ && lk != 12910 // 'delete' EOF
+ && lk != 12911 // 'descendant' EOF
+ && lk != 12912 // 'descendant-or-self' EOF
+ && lk != 12913 // 'descending' EOF
+ && lk != 12918 // 'div' EOF
+ && lk != 12919 // 'document' EOF
+ && lk != 12920 // 'document-node' EOF
+ && lk != 12921 // 'element' EOF
+ && lk != 12922 // 'else' EOF
+ && lk != 12923 // 'empty' EOF
+ && lk != 12924 // 'empty-sequence' EOF
+ && lk != 12925 // 'encoding' EOF
+ && lk != 12926 // 'end' EOF
+ && lk != 12928 // 'eq' EOF
+ && lk != 12929 // 'every' EOF
+ && lk != 12931 // 'except' EOF
+ && lk != 12932 // 'exit' EOF
+ && lk != 12933 // 'external' EOF
+ && lk != 12934 // 'first' EOF
+ && lk != 12935 // 'following' EOF
+ && lk != 12936 // 'following-sibling' EOF
+ && lk != 12937 // 'for' EOF
+ && lk != 12941 // 'ft-option' EOF
+ && lk != 12945 // 'function' EOF
+ && lk != 12946 // 'ge' EOF
+ && lk != 12948 // 'group' EOF
+ && lk != 12950 // 'gt' EOF
+ && lk != 12951 // 'idiv' EOF
+ && lk != 12952 // 'if' EOF
+ && lk != 12953 // 'import' EOF
+ && lk != 12954 // 'in' EOF
+ && lk != 12955 // 'index' EOF
+ && lk != 12959 // 'insert' EOF
+ && lk != 12960 // 'instance' EOF
+ && lk != 12961 // 'integrity' EOF
+ && lk != 12962 // 'intersect' EOF
+ && lk != 12963 // 'into' EOF
+ && lk != 12964 // 'is' EOF
+ && lk != 12965 // 'item' EOF
+ && lk != 12967 // 'json-item' EOF
+ && lk != 12970 // 'last' EOF
+ && lk != 12971 // 'lax' EOF
+ && lk != 12972 // 'le' EOF
+ && lk != 12974 // 'let' EOF
+ && lk != 12976 // 'loop' EOF
+ && lk != 12978 // 'lt' EOF
+ && lk != 12980 // 'mod' EOF
+ && lk != 12981 // 'modify' EOF
+ && lk != 12982 // 'module' EOF
+ && lk != 12984 // 'namespace' EOF
+ && lk != 12985 // 'namespace-node' EOF
+ && lk != 12986 // 'ne' EOF
+ && lk != 12991 // 'node' EOF
+ && lk != 12992 // 'nodes' EOF
+ && lk != 12994 // 'object' EOF
+ && lk != 12998 // 'only' EOF
+ && lk != 12999 // 'option' EOF
+ && lk != 13000 // 'or' EOF
+ && lk != 13001 // 'order' EOF
+ && lk != 13002 // 'ordered' EOF
+ && lk != 13003 // 'ordering' EOF
+ && lk != 13006 // 'parent' EOF
+ && lk != 13012 // 'preceding' EOF
+ && lk != 13013 // 'preceding-sibling' EOF
+ && lk != 13016 // 'processing-instruction' EOF
+ && lk != 13018 // 'rename' EOF
+ && lk != 13019 // 'replace' EOF
+ && lk != 13020 // 'return' EOF
+ && lk != 13021 // 'returning' EOF
+ && lk != 13022 // 'revalidation' EOF
+ && lk != 13024 // 'satisfies' EOF
+ && lk != 13025 // 'schema' EOF
+ && lk != 13026 // 'schema-attribute' EOF
+ && lk != 13027 // 'schema-element' EOF
+ && lk != 13028 // 'score' EOF
+ && lk != 13029 // 'self' EOF
+ && lk != 13034 // 'sliding' EOF
+ && lk != 13035 // 'some' EOF
+ && lk != 13036 // 'stable' EOF
+ && lk != 13037 // 'start' EOF
+ && lk != 13040 // 'strict' EOF
+ && lk != 13043 // 'switch' EOF
+ && lk != 13044 // 'text' EOF
+ && lk != 13048 // 'to' EOF
+ && lk != 13049 // 'treat' EOF
+ && lk != 13050 // 'try' EOF
+ && lk != 13051 // 'tumbling' EOF
+ && lk != 13052 // 'type' EOF
+ && lk != 13053 // 'typeswitch' EOF
+ && lk != 13054 // 'union' EOF
+ && lk != 13056 // 'unordered' EOF
+ && lk != 13057 // 'updating' EOF
+ && lk != 13060 // 'validate' EOF
+ && lk != 13061 // 'value' EOF
+ && lk != 13062 // 'variable' EOF
+ && lk != 13063 // 'version' EOF
+ && lk != 13066 // 'where' EOF
+ && lk != 13067 // 'while' EOF
+ && lk != 13070 // 'with' EOF
+ && lk != 13074 // 'xquery' EOF
+ && lk != 16134 // 'variable' '$'
+ && lk != 20997 // Wildcard ','
+ && lk != 20998 // EQName^Token ','
+ && lk != 21000 // IntegerLiteral ','
+ && lk != 21001 // DecimalLiteral ','
+ && lk != 21002 // DoubleLiteral ','
+ && lk != 21003 // StringLiteral ','
+ && lk != 21036 // '.' ','
+ && lk != 21037 // '..' ','
+ && lk != 21038 // '/' ','
+ && lk != 21062 // 'after' ','
+ && lk != 21064 // 'allowing' ','
+ && lk != 21065 // 'ancestor' ','
+ && lk != 21066 // 'ancestor-or-self' ','
+ && lk != 21067 // 'and' ','
+ && lk != 21070 // 'array' ','
+ && lk != 21071 // 'as' ','
+ && lk != 21072 // 'ascending' ','
+ && lk != 21073 // 'at' ','
+ && lk != 21074 // 'attribute' ','
+ && lk != 21075 // 'base-uri' ','
+ && lk != 21076 // 'before' ','
+ && lk != 21077 // 'boundary-space' ','
+ && lk != 21078 // 'break' ','
+ && lk != 21080 // 'case' ','
+ && lk != 21081 // 'cast' ','
+ && lk != 21082 // 'castable' ','
+ && lk != 21083 // 'catch' ','
+ && lk != 21085 // 'child' ','
+ && lk != 21086 // 'collation' ','
+ && lk != 21088 // 'comment' ','
+ && lk != 21089 // 'constraint' ','
+ && lk != 21090 // 'construction' ','
+ && lk != 21093 // 'context' ','
+ && lk != 21094 // 'continue' ','
+ && lk != 21095 // 'copy' ','
+ && lk != 21096 // 'copy-namespaces' ','
+ && lk != 21097 // 'count' ','
+ && lk != 21098 // 'decimal-format' ','
+ && lk != 21100 // 'declare' ','
+ && lk != 21101 // 'default' ','
+ && lk != 21102 // 'delete' ','
+ && lk != 21103 // 'descendant' ','
+ && lk != 21104 // 'descendant-or-self' ','
+ && lk != 21105 // 'descending' ','
+ && lk != 21110 // 'div' ','
+ && lk != 21111 // 'document' ','
+ && lk != 21112 // 'document-node' ','
+ && lk != 21113 // 'element' ','
+ && lk != 21114 // 'else' ','
+ && lk != 21115 // 'empty' ','
+ && lk != 21116 // 'empty-sequence' ','
+ && lk != 21117 // 'encoding' ','
+ && lk != 21118 // 'end' ','
+ && lk != 21120 // 'eq' ','
+ && lk != 21121 // 'every' ','
+ && lk != 21123 // 'except' ','
+ && lk != 21124 // 'exit' ','
+ && lk != 21125 // 'external' ','
+ && lk != 21126 // 'first' ','
+ && lk != 21127 // 'following' ','
+ && lk != 21128 // 'following-sibling' ','
+ && lk != 21129 // 'for' ','
+ && lk != 21133 // 'ft-option' ','
+ && lk != 21137 // 'function' ','
+ && lk != 21138 // 'ge' ','
+ && lk != 21140 // 'group' ','
+ && lk != 21142 // 'gt' ','
+ && lk != 21143 // 'idiv' ','
+ && lk != 21144 // 'if' ','
+ && lk != 21145 // 'import' ','
+ && lk != 21146 // 'in' ','
+ && lk != 21147 // 'index' ','
+ && lk != 21151 // 'insert' ','
+ && lk != 21152 // 'instance' ','
+ && lk != 21153 // 'integrity' ','
+ && lk != 21154 // 'intersect' ','
+ && lk != 21155 // 'into' ','
+ && lk != 21156 // 'is' ','
+ && lk != 21157 // 'item' ','
+ && lk != 21159 // 'json-item' ','
+ && lk != 21162 // 'last' ','
+ && lk != 21163 // 'lax' ','
+ && lk != 21164 // 'le' ','
+ && lk != 21166 // 'let' ','
+ && lk != 21168 // 'loop' ','
+ && lk != 21170 // 'lt' ','
+ && lk != 21172 // 'mod' ','
+ && lk != 21173 // 'modify' ','
+ && lk != 21174 // 'module' ','
+ && lk != 21176 // 'namespace' ','
+ && lk != 21177 // 'namespace-node' ','
+ && lk != 21178 // 'ne' ','
+ && lk != 21183 // 'node' ','
+ && lk != 21184 // 'nodes' ','
+ && lk != 21186 // 'object' ','
+ && lk != 21190 // 'only' ','
+ && lk != 21191 // 'option' ','
+ && lk != 21192 // 'or' ','
+ && lk != 21193 // 'order' ','
+ && lk != 21194 // 'ordered' ','
+ && lk != 21195 // 'ordering' ','
+ && lk != 21198 // 'parent' ','
+ && lk != 21204 // 'preceding' ','
+ && lk != 21205 // 'preceding-sibling' ','
+ && lk != 21208 // 'processing-instruction' ','
+ && lk != 21210 // 'rename' ','
+ && lk != 21211 // 'replace' ','
+ && lk != 21212 // 'return' ','
+ && lk != 21213 // 'returning' ','
+ && lk != 21214 // 'revalidation' ','
+ && lk != 21216 // 'satisfies' ','
+ && lk != 21217 // 'schema' ','
+ && lk != 21218 // 'schema-attribute' ','
+ && lk != 21219 // 'schema-element' ','
+ && lk != 21220 // 'score' ','
+ && lk != 21221 // 'self' ','
+ && lk != 21226 // 'sliding' ','
+ && lk != 21227 // 'some' ','
+ && lk != 21228 // 'stable' ','
+ && lk != 21229 // 'start' ','
+ && lk != 21232 // 'strict' ','
+ && lk != 21235 // 'switch' ','
+ && lk != 21236 // 'text' ','
+ && lk != 21240 // 'to' ','
+ && lk != 21241 // 'treat' ','
+ && lk != 21242 // 'try' ','
+ && lk != 21243 // 'tumbling' ','
+ && lk != 21244 // 'type' ','
+ && lk != 21245 // 'typeswitch' ','
+ && lk != 21246 // 'union' ','
+ && lk != 21248 // 'unordered' ','
+ && lk != 21249 // 'updating' ','
+ && lk != 21252 // 'validate' ','
+ && lk != 21253 // 'value' ','
+ && lk != 21254 // 'variable' ','
+ && lk != 21255 // 'version' ','
+ && lk != 21258 // 'where' ','
+ && lk != 21259 // 'while' ','
+ && lk != 21262 // 'with' ','
+ && lk != 21266 // 'xquery' ','
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27214 // 'array' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27303 // 'json-item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27330 // 'object' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284 // 'exit' 'returning'
+ && lk != 144389 // Wildcard '}'
+ && lk != 144390 // EQName^Token '}'
+ && lk != 144392 // IntegerLiteral '}'
+ && lk != 144393 // DecimalLiteral '}'
+ && lk != 144394 // DoubleLiteral '}'
+ && lk != 144395 // StringLiteral '}'
+ && lk != 144428 // '.' '}'
+ && lk != 144429 // '..' '}'
+ && lk != 144430 // '/' '}'
+ && lk != 144454 // 'after' '}'
+ && lk != 144456 // 'allowing' '}'
+ && lk != 144457 // 'ancestor' '}'
+ && lk != 144458 // 'ancestor-or-self' '}'
+ && lk != 144459 // 'and' '}'
+ && lk != 144462 // 'array' '}'
+ && lk != 144463 // 'as' '}'
+ && lk != 144464 // 'ascending' '}'
+ && lk != 144465 // 'at' '}'
+ && lk != 144466 // 'attribute' '}'
+ && lk != 144467 // 'base-uri' '}'
+ && lk != 144468 // 'before' '}'
+ && lk != 144469 // 'boundary-space' '}'
+ && lk != 144470 // 'break' '}'
+ && lk != 144472 // 'case' '}'
+ && lk != 144473 // 'cast' '}'
+ && lk != 144474 // 'castable' '}'
+ && lk != 144475 // 'catch' '}'
+ && lk != 144477 // 'child' '}'
+ && lk != 144478 // 'collation' '}'
+ && lk != 144480 // 'comment' '}'
+ && lk != 144481 // 'constraint' '}'
+ && lk != 144482 // 'construction' '}'
+ && lk != 144485 // 'context' '}'
+ && lk != 144486 // 'continue' '}'
+ && lk != 144487 // 'copy' '}'
+ && lk != 144488 // 'copy-namespaces' '}'
+ && lk != 144489 // 'count' '}'
+ && lk != 144490 // 'decimal-format' '}'
+ && lk != 144492 // 'declare' '}'
+ && lk != 144493 // 'default' '}'
+ && lk != 144494 // 'delete' '}'
+ && lk != 144495 // 'descendant' '}'
+ && lk != 144496 // 'descendant-or-self' '}'
+ && lk != 144497 // 'descending' '}'
+ && lk != 144502 // 'div' '}'
+ && lk != 144503 // 'document' '}'
+ && lk != 144504 // 'document-node' '}'
+ && lk != 144505 // 'element' '}'
+ && lk != 144506 // 'else' '}'
+ && lk != 144507 // 'empty' '}'
+ && lk != 144508 // 'empty-sequence' '}'
+ && lk != 144509 // 'encoding' '}'
+ && lk != 144510 // 'end' '}'
+ && lk != 144512 // 'eq' '}'
+ && lk != 144513 // 'every' '}'
+ && lk != 144515 // 'except' '}'
+ && lk != 144516 // 'exit' '}'
+ && lk != 144517 // 'external' '}'
+ && lk != 144518 // 'first' '}'
+ && lk != 144519 // 'following' '}'
+ && lk != 144520 // 'following-sibling' '}'
+ && lk != 144521 // 'for' '}'
+ && lk != 144525 // 'ft-option' '}'
+ && lk != 144529 // 'function' '}'
+ && lk != 144530 // 'ge' '}'
+ && lk != 144532 // 'group' '}'
+ && lk != 144534 // 'gt' '}'
+ && lk != 144535 // 'idiv' '}'
+ && lk != 144536 // 'if' '}'
+ && lk != 144537 // 'import' '}'
+ && lk != 144538 // 'in' '}'
+ && lk != 144539 // 'index' '}'
+ && lk != 144543 // 'insert' '}'
+ && lk != 144544 // 'instance' '}'
+ && lk != 144545 // 'integrity' '}'
+ && lk != 144546 // 'intersect' '}'
+ && lk != 144547 // 'into' '}'
+ && lk != 144548 // 'is' '}'
+ && lk != 144549 // 'item' '}'
+ && lk != 144551 // 'json-item' '}'
+ && lk != 144554 // 'last' '}'
+ && lk != 144555 // 'lax' '}'
+ && lk != 144556 // 'le' '}'
+ && lk != 144558 // 'let' '}'
+ && lk != 144560 // 'loop' '}'
+ && lk != 144562 // 'lt' '}'
+ && lk != 144564 // 'mod' '}'
+ && lk != 144565 // 'modify' '}'
+ && lk != 144566 // 'module' '}'
+ && lk != 144568 // 'namespace' '}'
+ && lk != 144569 // 'namespace-node' '}'
+ && lk != 144570 // 'ne' '}'
+ && lk != 144575 // 'node' '}'
+ && lk != 144576 // 'nodes' '}'
+ && lk != 144578 // 'object' '}'
+ && lk != 144582 // 'only' '}'
+ && lk != 144583 // 'option' '}'
+ && lk != 144584 // 'or' '}'
+ && lk != 144585 // 'order' '}'
+ && lk != 144586 // 'ordered' '}'
+ && lk != 144587 // 'ordering' '}'
+ && lk != 144590 // 'parent' '}'
+ && lk != 144596 // 'preceding' '}'
+ && lk != 144597 // 'preceding-sibling' '}'
+ && lk != 144600 // 'processing-instruction' '}'
+ && lk != 144602 // 'rename' '}'
+ && lk != 144603 // 'replace' '}'
+ && lk != 144604 // 'return' '}'
+ && lk != 144605 // 'returning' '}'
+ && lk != 144606 // 'revalidation' '}'
+ && lk != 144608 // 'satisfies' '}'
+ && lk != 144609 // 'schema' '}'
+ && lk != 144610 // 'schema-attribute' '}'
+ && lk != 144611 // 'schema-element' '}'
+ && lk != 144612 // 'score' '}'
+ && lk != 144613 // 'self' '}'
+ && lk != 144618 // 'sliding' '}'
+ && lk != 144619 // 'some' '}'
+ && lk != 144620 // 'stable' '}'
+ && lk != 144621 // 'start' '}'
+ && lk != 144624 // 'strict' '}'
+ && lk != 144627 // 'switch' '}'
+ && lk != 144628 // 'text' '}'
+ && lk != 144632 // 'to' '}'
+ && lk != 144633 // 'treat' '}'
+ && lk != 144634 // 'try' '}'
+ && lk != 144635 // 'tumbling' '}'
+ && lk != 144636 // 'type' '}'
+ && lk != 144637 // 'typeswitch' '}'
+ && lk != 144638 // 'union' '}'
+ && lk != 144640 // 'unordered' '}'
+ && lk != 144641 // 'updating' '}'
+ && lk != 144644 // 'validate' '}'
+ && lk != 144645 // 'value' '}'
+ && lk != 144646 // 'variable' '}'
+ && lk != 144647 // 'version' '}'
+ && lk != 144650 // 'where' '}'
+ && lk != 144651 // 'while' '}'
+ && lk != 144654 // 'with' '}'
+ && lk != 144658) // 'xquery' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 16134 // 'variable' '$'
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27214 // 'array' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27303 // 'json-item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27330 // 'object' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284) // 'exit' 'returning'
+ {
+ break;
+ }
+ whitespace();
+ parse_Statement();
+ }
+ eventHandler.endNonterminal("Statements", e0);
+ }
+
+ function try_Statements()
+ {
+ for (;;)
+ {
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | ')' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 35: // '(#'
+ lookahead2(250); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery'
+ break;
+ case 46: // '/'
+ lookahead2W(281); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '!' | '!=' | '$' | '%' | '(' | '(:' | '*' | '+' |
+ // ',' | '-' | '.' | '..' | ';' | '<' | '<!--' | '<<' | '<=' | '<?' | '=' | '>' |
+ // '>=' | '>>' | '@' | '[' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'contains' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|' | '||' | '}'
+ break;
+ case 47: // '//'
+ lookahead2W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(:' | '.' | '..' | '<' | '<!--' |
+ // '<?' | '@' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' |
+ // 'before' | 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' |
+ // 'child' | 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' |
+ // 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' |
+ // 'nodes' | 'object' | 'only' | 'option' | 'or' | 'order' | 'ordered' |
+ // 'ordering' | 'parent' | 'preceding' | 'preceding-sibling' |
+ // 'processing-instruction' | 'rename' | 'replace' | 'return' | 'returning' |
+ // 'revalidation' | 'satisfies' | 'schema' | 'schema-attribute' | 'schema-element' |
+ // 'score' | 'self' | 'sliding' | 'some' | 'stable' | 'start' | 'strict' |
+ // 'switch' | 'text' | 'to' | 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' |
+ // 'union' | 'unordered' | 'updating' | 'validate' | 'value' | 'variable' |
+ // 'version' | 'where' | 'while' | 'with' | 'xquery' | '{' | '{|'
+ break;
+ case 54: // '<'
+ lookahead2(4); // QName
+ break;
+ case 55: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 59: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 66: // '@'
+ lookahead2W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 68: // '['
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | ']' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 77: // 'append'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ case 82: // 'attribute'
+ lookahead2W(278); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' |
+ // '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' |
+ // 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 121: // 'element'
+ lookahead2W(277); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'contains' | 'context' | 'continue' |
+ // 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'returning' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 137: // 'for'
+ lookahead2W(206); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'sliding' |
+ // 'to' | 'treat' | 'tumbling' | 'union' | '|' | '||' | '}'
+ break;
+ case 174: // 'let'
+ lookahead2W(204); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'score' |
+ // 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 218: // 'rename'
+ lookahead2W(205); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'or' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 219: // 'replace'
+ lookahead2W(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'or' | 'to' | 'treat' | 'union' | 'value' | '|' | '||' | '}'
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'lax' | 'le' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'strict' | 'to' | 'treat' | 'type' | 'union' | '{' | '|' | '||' | '}'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 278: // '{|'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|}'
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(186); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(200); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'loop' | 'lt' | 'mod' | 'ne' | 'or' |
+ // 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(207); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'json' | 'le' | 'lt' | 'mod' | 'ne' | 'node' |
+ // 'nodes' | 'or' | 'to' | 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '#' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(266); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ // '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'contains' | 'context' | 'continue' |
+ // 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '||' | '}'
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(197); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(192); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||' | '}'
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 250: // 'try'
+ case 256: // 'unordered'
+ lookahead2W(203); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '{' | '|' | '||' | '}'
+ break;
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 93: // 'child'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 229: // 'self'
+ lookahead2W(198); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // '::' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 120: // 'document-node'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 131: // 'except'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 141: // 'ft-option'
+ case 145: // 'function'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 152: // 'if'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 185: // 'namespace-node'
+ case 186: // 'ne'
+ case 191: // 'node'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 228: // 'score'
+ case 234: // 'sliding'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 243: // 'switch'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 253: // 'typeswitch'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 261: // 'value'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(195); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ // ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' |
+ // 'castable' | 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' |
+ // 'instance' | 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 282 // '}'
+ && lk != 12805 // Wildcard EOF
+ && lk != 12806 // EQName^Token EOF
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12844 // '.' EOF
+ && lk != 12845 // '..' EOF
+ && lk != 12846 // '/' EOF
+ && lk != 12870 // 'after' EOF
+ && lk != 12872 // 'allowing' EOF
+ && lk != 12873 // 'ancestor' EOF
+ && lk != 12874 // 'ancestor-or-self' EOF
+ && lk != 12875 // 'and' EOF
+ && lk != 12878 // 'array' EOF
+ && lk != 12879 // 'as' EOF
+ && lk != 12880 // 'ascending' EOF
+ && lk != 12881 // 'at' EOF
+ && lk != 12882 // 'attribute' EOF
+ && lk != 12883 // 'base-uri' EOF
+ && lk != 12884 // 'before' EOF
+ && lk != 12885 // 'boundary-space' EOF
+ && lk != 12886 // 'break' EOF
+ && lk != 12888 // 'case' EOF
+ && lk != 12889 // 'cast' EOF
+ && lk != 12890 // 'castable' EOF
+ && lk != 12891 // 'catch' EOF
+ && lk != 12893 // 'child' EOF
+ && lk != 12894 // 'collation' EOF
+ && lk != 12896 // 'comment' EOF
+ && lk != 12897 // 'constraint' EOF
+ && lk != 12898 // 'construction' EOF
+ && lk != 12901 // 'context' EOF
+ && lk != 12902 // 'continue' EOF
+ && lk != 12903 // 'copy' EOF
+ && lk != 12904 // 'copy-namespaces' EOF
+ && lk != 12905 // 'count' EOF
+ && lk != 12906 // 'decimal-format' EOF
+ && lk != 12908 // 'declare' EOF
+ && lk != 12909 // 'default' EOF
+ && lk != 12910 // 'delete' EOF
+ && lk != 12911 // 'descendant' EOF
+ && lk != 12912 // 'descendant-or-self' EOF
+ && lk != 12913 // 'descending' EOF
+ && lk != 12918 // 'div' EOF
+ && lk != 12919 // 'document' EOF
+ && lk != 12920 // 'document-node' EOF
+ && lk != 12921 // 'element' EOF
+ && lk != 12922 // 'else' EOF
+ && lk != 12923 // 'empty' EOF
+ && lk != 12924 // 'empty-sequence' EOF
+ && lk != 12925 // 'encoding' EOF
+ && lk != 12926 // 'end' EOF
+ && lk != 12928 // 'eq' EOF
+ && lk != 12929 // 'every' EOF
+ && lk != 12931 // 'except' EOF
+ && lk != 12932 // 'exit' EOF
+ && lk != 12933 // 'external' EOF
+ && lk != 12934 // 'first' EOF
+ && lk != 12935 // 'following' EOF
+ && lk != 12936 // 'following-sibling' EOF
+ && lk != 12937 // 'for' EOF
+ && lk != 12941 // 'ft-option' EOF
+ && lk != 12945 // 'function' EOF
+ && lk != 12946 // 'ge' EOF
+ && lk != 12948 // 'group' EOF
+ && lk != 12950 // 'gt' EOF
+ && lk != 12951 // 'idiv' EOF
+ && lk != 12952 // 'if' EOF
+ && lk != 12953 // 'import' EOF
+ && lk != 12954 // 'in' EOF
+ && lk != 12955 // 'index' EOF
+ && lk != 12959 // 'insert' EOF
+ && lk != 12960 // 'instance' EOF
+ && lk != 12961 // 'integrity' EOF
+ && lk != 12962 // 'intersect' EOF
+ && lk != 12963 // 'into' EOF
+ && lk != 12964 // 'is' EOF
+ && lk != 12965 // 'item' EOF
+ && lk != 12967 // 'json-item' EOF
+ && lk != 12970 // 'last' EOF
+ && lk != 12971 // 'lax' EOF
+ && lk != 12972 // 'le' EOF
+ && lk != 12974 // 'let' EOF
+ && lk != 12976 // 'loop' EOF
+ && lk != 12978 // 'lt' EOF
+ && lk != 12980 // 'mod' EOF
+ && lk != 12981 // 'modify' EOF
+ && lk != 12982 // 'module' EOF
+ && lk != 12984 // 'namespace' EOF
+ && lk != 12985 // 'namespace-node' EOF
+ && lk != 12986 // 'ne' EOF
+ && lk != 12991 // 'node' EOF
+ && lk != 12992 // 'nodes' EOF
+ && lk != 12994 // 'object' EOF
+ && lk != 12998 // 'only' EOF
+ && lk != 12999 // 'option' EOF
+ && lk != 13000 // 'or' EOF
+ && lk != 13001 // 'order' EOF
+ && lk != 13002 // 'ordered' EOF
+ && lk != 13003 // 'ordering' EOF
+ && lk != 13006 // 'parent' EOF
+ && lk != 13012 // 'preceding' EOF
+ && lk != 13013 // 'preceding-sibling' EOF
+ && lk != 13016 // 'processing-instruction' EOF
+ && lk != 13018 // 'rename' EOF
+ && lk != 13019 // 'replace' EOF
+ && lk != 13020 // 'return' EOF
+ && lk != 13021 // 'returning' EOF
+ && lk != 13022 // 'revalidation' EOF
+ && lk != 13024 // 'satisfies' EOF
+ && lk != 13025 // 'schema' EOF
+ && lk != 13026 // 'schema-attribute' EOF
+ && lk != 13027 // 'schema-element' EOF
+ && lk != 13028 // 'score' EOF
+ && lk != 13029 // 'self' EOF
+ && lk != 13034 // 'sliding' EOF
+ && lk != 13035 // 'some' EOF
+ && lk != 13036 // 'stable' EOF
+ && lk != 13037 // 'start' EOF
+ && lk != 13040 // 'strict' EOF
+ && lk != 13043 // 'switch' EOF
+ && lk != 13044 // 'text' EOF
+ && lk != 13048 // 'to' EOF
+ && lk != 13049 // 'treat' EOF
+ && lk != 13050 // 'try' EOF
+ && lk != 13051 // 'tumbling' EOF
+ && lk != 13052 // 'type' EOF
+ && lk != 13053 // 'typeswitch' EOF
+ && lk != 13054 // 'union' EOF
+ && lk != 13056 // 'unordered' EOF
+ && lk != 13057 // 'updating' EOF
+ && lk != 13060 // 'validate' EOF
+ && lk != 13061 // 'value' EOF
+ && lk != 13062 // 'variable' EOF
+ && lk != 13063 // 'version' EOF
+ && lk != 13066 // 'where' EOF
+ && lk != 13067 // 'while' EOF
+ && lk != 13070 // 'with' EOF
+ && lk != 13074 // 'xquery' EOF
+ && lk != 16134 // 'variable' '$'
+ && lk != 20997 // Wildcard ','
+ && lk != 20998 // EQName^Token ','
+ && lk != 21000 // IntegerLiteral ','
+ && lk != 21001 // DecimalLiteral ','
+ && lk != 21002 // DoubleLiteral ','
+ && lk != 21003 // StringLiteral ','
+ && lk != 21036 // '.' ','
+ && lk != 21037 // '..' ','
+ && lk != 21038 // '/' ','
+ && lk != 21062 // 'after' ','
+ && lk != 21064 // 'allowing' ','
+ && lk != 21065 // 'ancestor' ','
+ && lk != 21066 // 'ancestor-or-self' ','
+ && lk != 21067 // 'and' ','
+ && lk != 21070 // 'array' ','
+ && lk != 21071 // 'as' ','
+ && lk != 21072 // 'ascending' ','
+ && lk != 21073 // 'at' ','
+ && lk != 21074 // 'attribute' ','
+ && lk != 21075 // 'base-uri' ','
+ && lk != 21076 // 'before' ','
+ && lk != 21077 // 'boundary-space' ','
+ && lk != 21078 // 'break' ','
+ && lk != 21080 // 'case' ','
+ && lk != 21081 // 'cast' ','
+ && lk != 21082 // 'castable' ','
+ && lk != 21083 // 'catch' ','
+ && lk != 21085 // 'child' ','
+ && lk != 21086 // 'collation' ','
+ && lk != 21088 // 'comment' ','
+ && lk != 21089 // 'constraint' ','
+ && lk != 21090 // 'construction' ','
+ && lk != 21093 // 'context' ','
+ && lk != 21094 // 'continue' ','
+ && lk != 21095 // 'copy' ','
+ && lk != 21096 // 'copy-namespaces' ','
+ && lk != 21097 // 'count' ','
+ && lk != 21098 // 'decimal-format' ','
+ && lk != 21100 // 'declare' ','
+ && lk != 21101 // 'default' ','
+ && lk != 21102 // 'delete' ','
+ && lk != 21103 // 'descendant' ','
+ && lk != 21104 // 'descendant-or-self' ','
+ && lk != 21105 // 'descending' ','
+ && lk != 21110 // 'div' ','
+ && lk != 21111 // 'document' ','
+ && lk != 21112 // 'document-node' ','
+ && lk != 21113 // 'element' ','
+ && lk != 21114 // 'else' ','
+ && lk != 21115 // 'empty' ','
+ && lk != 21116 // 'empty-sequence' ','
+ && lk != 21117 // 'encoding' ','
+ && lk != 21118 // 'end' ','
+ && lk != 21120 // 'eq' ','
+ && lk != 21121 // 'every' ','
+ && lk != 21123 // 'except' ','
+ && lk != 21124 // 'exit' ','
+ && lk != 21125 // 'external' ','
+ && lk != 21126 // 'first' ','
+ && lk != 21127 // 'following' ','
+ && lk != 21128 // 'following-sibling' ','
+ && lk != 21129 // 'for' ','
+ && lk != 21133 // 'ft-option' ','
+ && lk != 21137 // 'function' ','
+ && lk != 21138 // 'ge' ','
+ && lk != 21140 // 'group' ','
+ && lk != 21142 // 'gt' ','
+ && lk != 21143 // 'idiv' ','
+ && lk != 21144 // 'if' ','
+ && lk != 21145 // 'import' ','
+ && lk != 21146 // 'in' ','
+ && lk != 21147 // 'index' ','
+ && lk != 21151 // 'insert' ','
+ && lk != 21152 // 'instance' ','
+ && lk != 21153 // 'integrity' ','
+ && lk != 21154 // 'intersect' ','
+ && lk != 21155 // 'into' ','
+ && lk != 21156 // 'is' ','
+ && lk != 21157 // 'item' ','
+ && lk != 21159 // 'json-item' ','
+ && lk != 21162 // 'last' ','
+ && lk != 21163 // 'lax' ','
+ && lk != 21164 // 'le' ','
+ && lk != 21166 // 'let' ','
+ && lk != 21168 // 'loop' ','
+ && lk != 21170 // 'lt' ','
+ && lk != 21172 // 'mod' ','
+ && lk != 21173 // 'modify' ','
+ && lk != 21174 // 'module' ','
+ && lk != 21176 // 'namespace' ','
+ && lk != 21177 // 'namespace-node' ','
+ && lk != 21178 // 'ne' ','
+ && lk != 21183 // 'node' ','
+ && lk != 21184 // 'nodes' ','
+ && lk != 21186 // 'object' ','
+ && lk != 21190 // 'only' ','
+ && lk != 21191 // 'option' ','
+ && lk != 21192 // 'or' ','
+ && lk != 21193 // 'order' ','
+ && lk != 21194 // 'ordered' ','
+ && lk != 21195 // 'ordering' ','
+ && lk != 21198 // 'parent' ','
+ && lk != 21204 // 'preceding' ','
+ && lk != 21205 // 'preceding-sibling' ','
+ && lk != 21208 // 'processing-instruction' ','
+ && lk != 21210 // 'rename' ','
+ && lk != 21211 // 'replace' ','
+ && lk != 21212 // 'return' ','
+ && lk != 21213 // 'returning' ','
+ && lk != 21214 // 'revalidation' ','
+ && lk != 21216 // 'satisfies' ','
+ && lk != 21217 // 'schema' ','
+ && lk != 21218 // 'schema-attribute' ','
+ && lk != 21219 // 'schema-element' ','
+ && lk != 21220 // 'score' ','
+ && lk != 21221 // 'self' ','
+ && lk != 21226 // 'sliding' ','
+ && lk != 21227 // 'some' ','
+ && lk != 21228 // 'stable' ','
+ && lk != 21229 // 'start' ','
+ && lk != 21232 // 'strict' ','
+ && lk != 21235 // 'switch' ','
+ && lk != 21236 // 'text' ','
+ && lk != 21240 // 'to' ','
+ && lk != 21241 // 'treat' ','
+ && lk != 21242 // 'try' ','
+ && lk != 21243 // 'tumbling' ','
+ && lk != 21244 // 'type' ','
+ && lk != 21245 // 'typeswitch' ','
+ && lk != 21246 // 'union' ','
+ && lk != 21248 // 'unordered' ','
+ && lk != 21249 // 'updating' ','
+ && lk != 21252 // 'validate' ','
+ && lk != 21253 // 'value' ','
+ && lk != 21254 // 'variable' ','
+ && lk != 21255 // 'version' ','
+ && lk != 21258 // 'where' ','
+ && lk != 21259 // 'while' ','
+ && lk != 21262 // 'with' ','
+ && lk != 21266 // 'xquery' ','
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27214 // 'array' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27303 // 'json-item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27330 // 'object' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284 // 'exit' 'returning'
+ && lk != 144389 // Wildcard '}'
+ && lk != 144390 // EQName^Token '}'
+ && lk != 144392 // IntegerLiteral '}'
+ && lk != 144393 // DecimalLiteral '}'
+ && lk != 144394 // DoubleLiteral '}'
+ && lk != 144395 // StringLiteral '}'
+ && lk != 144428 // '.' '}'
+ && lk != 144429 // '..' '}'
+ && lk != 144430 // '/' '}'
+ && lk != 144454 // 'after' '}'
+ && lk != 144456 // 'allowing' '}'
+ && lk != 144457 // 'ancestor' '}'
+ && lk != 144458 // 'ancestor-or-self' '}'
+ && lk != 144459 // 'and' '}'
+ && lk != 144462 // 'array' '}'
+ && lk != 144463 // 'as' '}'
+ && lk != 144464 // 'ascending' '}'
+ && lk != 144465 // 'at' '}'
+ && lk != 144466 // 'attribute' '}'
+ && lk != 144467 // 'base-uri' '}'
+ && lk != 144468 // 'before' '}'
+ && lk != 144469 // 'boundary-space' '}'
+ && lk != 144470 // 'break' '}'
+ && lk != 144472 // 'case' '}'
+ && lk != 144473 // 'cast' '}'
+ && lk != 144474 // 'castable' '}'
+ && lk != 144475 // 'catch' '}'
+ && lk != 144477 // 'child' '}'
+ && lk != 144478 // 'collation' '}'
+ && lk != 144480 // 'comment' '}'
+ && lk != 144481 // 'constraint' '}'
+ && lk != 144482 // 'construction' '}'
+ && lk != 144485 // 'context' '}'
+ && lk != 144486 // 'continue' '}'
+ && lk != 144487 // 'copy' '}'
+ && lk != 144488 // 'copy-namespaces' '}'
+ && lk != 144489 // 'count' '}'
+ && lk != 144490 // 'decimal-format' '}'
+ && lk != 144492 // 'declare' '}'
+ && lk != 144493 // 'default' '}'
+ && lk != 144494 // 'delete' '}'
+ && lk != 144495 // 'descendant' '}'
+ && lk != 144496 // 'descendant-or-self' '}'
+ && lk != 144497 // 'descending' '}'
+ && lk != 144502 // 'div' '}'
+ && lk != 144503 // 'document' '}'
+ && lk != 144504 // 'document-node' '}'
+ && lk != 144505 // 'element' '}'
+ && lk != 144506 // 'else' '}'
+ && lk != 144507 // 'empty' '}'
+ && lk != 144508 // 'empty-sequence' '}'
+ && lk != 144509 // 'encoding' '}'
+ && lk != 144510 // 'end' '}'
+ && lk != 144512 // 'eq' '}'
+ && lk != 144513 // 'every' '}'
+ && lk != 144515 // 'except' '}'
+ && lk != 144516 // 'exit' '}'
+ && lk != 144517 // 'external' '}'
+ && lk != 144518 // 'first' '}'
+ && lk != 144519 // 'following' '}'
+ && lk != 144520 // 'following-sibling' '}'
+ && lk != 144521 // 'for' '}'
+ && lk != 144525 // 'ft-option' '}'
+ && lk != 144529 // 'function' '}'
+ && lk != 144530 // 'ge' '}'
+ && lk != 144532 // 'group' '}'
+ && lk != 144534 // 'gt' '}'
+ && lk != 144535 // 'idiv' '}'
+ && lk != 144536 // 'if' '}'
+ && lk != 144537 // 'import' '}'
+ && lk != 144538 // 'in' '}'
+ && lk != 144539 // 'index' '}'
+ && lk != 144543 // 'insert' '}'
+ && lk != 144544 // 'instance' '}'
+ && lk != 144545 // 'integrity' '}'
+ && lk != 144546 // 'intersect' '}'
+ && lk != 144547 // 'into' '}'
+ && lk != 144548 // 'is' '}'
+ && lk != 144549 // 'item' '}'
+ && lk != 144551 // 'json-item' '}'
+ && lk != 144554 // 'last' '}'
+ && lk != 144555 // 'lax' '}'
+ && lk != 144556 // 'le' '}'
+ && lk != 144558 // 'let' '}'
+ && lk != 144560 // 'loop' '}'
+ && lk != 144562 // 'lt' '}'
+ && lk != 144564 // 'mod' '}'
+ && lk != 144565 // 'modify' '}'
+ && lk != 144566 // 'module' '}'
+ && lk != 144568 // 'namespace' '}'
+ && lk != 144569 // 'namespace-node' '}'
+ && lk != 144570 // 'ne' '}'
+ && lk != 144575 // 'node' '}'
+ && lk != 144576 // 'nodes' '}'
+ && lk != 144578 // 'object' '}'
+ && lk != 144582 // 'only' '}'
+ && lk != 144583 // 'option' '}'
+ && lk != 144584 // 'or' '}'
+ && lk != 144585 // 'order' '}'
+ && lk != 144586 // 'ordered' '}'
+ && lk != 144587 // 'ordering' '}'
+ && lk != 144590 // 'parent' '}'
+ && lk != 144596 // 'preceding' '}'
+ && lk != 144597 // 'preceding-sibling' '}'
+ && lk != 144600 // 'processing-instruction' '}'
+ && lk != 144602 // 'rename' '}'
+ && lk != 144603 // 'replace' '}'
+ && lk != 144604 // 'return' '}'
+ && lk != 144605 // 'returning' '}'
+ && lk != 144606 // 'revalidation' '}'
+ && lk != 144608 // 'satisfies' '}'
+ && lk != 144609 // 'schema' '}'
+ && lk != 144610 // 'schema-attribute' '}'
+ && lk != 144611 // 'schema-element' '}'
+ && lk != 144612 // 'score' '}'
+ && lk != 144613 // 'self' '}'
+ && lk != 144618 // 'sliding' '}'
+ && lk != 144619 // 'some' '}'
+ && lk != 144620 // 'stable' '}'
+ && lk != 144621 // 'start' '}'
+ && lk != 144624 // 'strict' '}'
+ && lk != 144627 // 'switch' '}'
+ && lk != 144628 // 'text' '}'
+ && lk != 144632 // 'to' '}'
+ && lk != 144633 // 'treat' '}'
+ && lk != 144634 // 'try' '}'
+ && lk != 144635 // 'tumbling' '}'
+ && lk != 144636 // 'type' '}'
+ && lk != 144637 // 'typeswitch' '}'
+ && lk != 144638 // 'union' '}'
+ && lk != 144640 // 'unordered' '}'
+ && lk != 144641 // 'updating' '}'
+ && lk != 144644 // 'validate' '}'
+ && lk != 144645 // 'value' '}'
+ && lk != 144646 // 'variable' '}'
+ && lk != 144647 // 'version' '}'
+ && lk != 144650 // 'where' '}'
+ && lk != 144651 // 'while' '}'
+ && lk != 144654 // 'with' '}'
+ && lk != 144658) // 'xquery' '}'
+ {
+ lk = memoized(6, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_Statement();
+ memoize(6, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(6, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 16134 // 'variable' '$'
+ && lk != 27141 // Wildcard ';'
+ && lk != 27142 // EQName^Token ';'
+ && lk != 27144 // IntegerLiteral ';'
+ && lk != 27145 // DecimalLiteral ';'
+ && lk != 27146 // DoubleLiteral ';'
+ && lk != 27147 // StringLiteral ';'
+ && lk != 27180 // '.' ';'
+ && lk != 27181 // '..' ';'
+ && lk != 27182 // '/' ';'
+ && lk != 27206 // 'after' ';'
+ && lk != 27208 // 'allowing' ';'
+ && lk != 27209 // 'ancestor' ';'
+ && lk != 27210 // 'ancestor-or-self' ';'
+ && lk != 27211 // 'and' ';'
+ && lk != 27214 // 'array' ';'
+ && lk != 27215 // 'as' ';'
+ && lk != 27216 // 'ascending' ';'
+ && lk != 27217 // 'at' ';'
+ && lk != 27218 // 'attribute' ';'
+ && lk != 27219 // 'base-uri' ';'
+ && lk != 27220 // 'before' ';'
+ && lk != 27221 // 'boundary-space' ';'
+ && lk != 27222 // 'break' ';'
+ && lk != 27224 // 'case' ';'
+ && lk != 27225 // 'cast' ';'
+ && lk != 27226 // 'castable' ';'
+ && lk != 27227 // 'catch' ';'
+ && lk != 27229 // 'child' ';'
+ && lk != 27230 // 'collation' ';'
+ && lk != 27232 // 'comment' ';'
+ && lk != 27233 // 'constraint' ';'
+ && lk != 27234 // 'construction' ';'
+ && lk != 27237 // 'context' ';'
+ && lk != 27238 // 'continue' ';'
+ && lk != 27239 // 'copy' ';'
+ && lk != 27240 // 'copy-namespaces' ';'
+ && lk != 27241 // 'count' ';'
+ && lk != 27242 // 'decimal-format' ';'
+ && lk != 27244 // 'declare' ';'
+ && lk != 27245 // 'default' ';'
+ && lk != 27246 // 'delete' ';'
+ && lk != 27247 // 'descendant' ';'
+ && lk != 27248 // 'descendant-or-self' ';'
+ && lk != 27249 // 'descending' ';'
+ && lk != 27254 // 'div' ';'
+ && lk != 27255 // 'document' ';'
+ && lk != 27256 // 'document-node' ';'
+ && lk != 27257 // 'element' ';'
+ && lk != 27258 // 'else' ';'
+ && lk != 27259 // 'empty' ';'
+ && lk != 27260 // 'empty-sequence' ';'
+ && lk != 27261 // 'encoding' ';'
+ && lk != 27262 // 'end' ';'
+ && lk != 27264 // 'eq' ';'
+ && lk != 27265 // 'every' ';'
+ && lk != 27267 // 'except' ';'
+ && lk != 27268 // 'exit' ';'
+ && lk != 27269 // 'external' ';'
+ && lk != 27270 // 'first' ';'
+ && lk != 27271 // 'following' ';'
+ && lk != 27272 // 'following-sibling' ';'
+ && lk != 27273 // 'for' ';'
+ && lk != 27277 // 'ft-option' ';'
+ && lk != 27281 // 'function' ';'
+ && lk != 27282 // 'ge' ';'
+ && lk != 27284 // 'group' ';'
+ && lk != 27286 // 'gt' ';'
+ && lk != 27287 // 'idiv' ';'
+ && lk != 27288 // 'if' ';'
+ && lk != 27289 // 'import' ';'
+ && lk != 27290 // 'in' ';'
+ && lk != 27291 // 'index' ';'
+ && lk != 27295 // 'insert' ';'
+ && lk != 27296 // 'instance' ';'
+ && lk != 27297 // 'integrity' ';'
+ && lk != 27298 // 'intersect' ';'
+ && lk != 27299 // 'into' ';'
+ && lk != 27300 // 'is' ';'
+ && lk != 27301 // 'item' ';'
+ && lk != 27303 // 'json-item' ';'
+ && lk != 27306 // 'last' ';'
+ && lk != 27307 // 'lax' ';'
+ && lk != 27308 // 'le' ';'
+ && lk != 27310 // 'let' ';'
+ && lk != 27312 // 'loop' ';'
+ && lk != 27314 // 'lt' ';'
+ && lk != 27316 // 'mod' ';'
+ && lk != 27317 // 'modify' ';'
+ && lk != 27318 // 'module' ';'
+ && lk != 27320 // 'namespace' ';'
+ && lk != 27321 // 'namespace-node' ';'
+ && lk != 27322 // 'ne' ';'
+ && lk != 27327 // 'node' ';'
+ && lk != 27328 // 'nodes' ';'
+ && lk != 27330 // 'object' ';'
+ && lk != 27334 // 'only' ';'
+ && lk != 27335 // 'option' ';'
+ && lk != 27336 // 'or' ';'
+ && lk != 27337 // 'order' ';'
+ && lk != 27338 // 'ordered' ';'
+ && lk != 27339 // 'ordering' ';'
+ && lk != 27342 // 'parent' ';'
+ && lk != 27348 // 'preceding' ';'
+ && lk != 27349 // 'preceding-sibling' ';'
+ && lk != 27352 // 'processing-instruction' ';'
+ && lk != 27354 // 'rename' ';'
+ && lk != 27355 // 'replace' ';'
+ && lk != 27356 // 'return' ';'
+ && lk != 27357 // 'returning' ';'
+ && lk != 27358 // 'revalidation' ';'
+ && lk != 27360 // 'satisfies' ';'
+ && lk != 27361 // 'schema' ';'
+ && lk != 27362 // 'schema-attribute' ';'
+ && lk != 27363 // 'schema-element' ';'
+ && lk != 27364 // 'score' ';'
+ && lk != 27365 // 'self' ';'
+ && lk != 27370 // 'sliding' ';'
+ && lk != 27371 // 'some' ';'
+ && lk != 27372 // 'stable' ';'
+ && lk != 27373 // 'start' ';'
+ && lk != 27376 // 'strict' ';'
+ && lk != 27379 // 'switch' ';'
+ && lk != 27380 // 'text' ';'
+ && lk != 27384 // 'to' ';'
+ && lk != 27385 // 'treat' ';'
+ && lk != 27386 // 'try' ';'
+ && lk != 27387 // 'tumbling' ';'
+ && lk != 27388 // 'type' ';'
+ && lk != 27389 // 'typeswitch' ';'
+ && lk != 27390 // 'union' ';'
+ && lk != 27392 // 'unordered' ';'
+ && lk != 27393 // 'updating' ';'
+ && lk != 27396 // 'validate' ';'
+ && lk != 27397 // 'value' ';'
+ && lk != 27398 // 'variable' ';'
+ && lk != 27399 // 'version' ';'
+ && lk != 27402 // 'where' ';'
+ && lk != 27403 // 'while' ';'
+ && lk != 27406 // 'with' ';'
+ && lk != 27410 // 'xquery' ';'
+ && lk != 90198 // 'break' 'loop'
+ && lk != 90214 // 'continue' 'loop'
+ && lk != 113284) // 'exit' 'returning'
+ {
+ break;
+ }
+ try_Statement();
+ }
+ }
+
+ function parse_StatementsAndExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndExpr", e0);
+ parse_Statements();
+ whitespace();
+ parse_Expr();
+ eventHandler.endNonterminal("StatementsAndExpr", e0);
+ }
+
+ function try_StatementsAndExpr()
+ {
+ try_Statements();
+ try_Expr();
+ }
+
+ function parse_StatementsAndOptionalExpr()
+ {
+ eventHandler.startNonterminal("StatementsAndOptionalExpr", e0);
+ parse_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 282) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ eventHandler.endNonterminal("StatementsAndOptionalExpr", e0);
+ }
+
+ function try_StatementsAndOptionalExpr()
+ {
+ try_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 282) // '}'
+ {
+ try_Expr();
+ }
+ }
+
+ function parse_Statement()
+ {
+ eventHandler.startNonterminal("Statement", e0);
+ switch (l1)
+ {
+ case 132: // 'exit'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'returning' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 137: // 'for'
+ lookahead2W(196); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'sliding' | 'to' |
+ // 'treat' | 'tumbling' | 'union' | '|' | '||'
+ break;
+ case 174: // 'let'
+ lookahead2W(193); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'score' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 250: // 'try'
+ lookahead2W(190); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '{' | '|' | '||'
+ break;
+ case 262: // 'variable'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'loop' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(185); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3103 // '$' EQName^Token
+ || lk == 3104 // '%' EQName^Token
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17675 // 'while' '('
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 35871 // '$' 'after'
+ || lk == 35872 // '%' 'after'
+ || lk == 36116 // '{' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 36896 // '%' 'allowing'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37408 // '%' 'ancestor'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 37920 // '%' 'ancestor-or-self'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 38432 // '%' 'and'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 39968 // '%' 'array'
+ || lk == 40212 // '{' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40480 // '%' 'as'
+ || lk == 40724 // '{' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 40992 // '%' 'ascending'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 41504 // '%' 'at'
+ || lk == 41748 // '{' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42016 // '%' 'attribute'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 42528 // '%' 'base-uri'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43040 // '%' 'before'
+ || lk == 43284 // '{' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 43552 // '%' 'boundary-space'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 44064 // '%' 'break'
+ || lk == 44308 // '{' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45088 // '%' 'case'
+ || lk == 45332 // '{' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 45600 // '%' 'cast'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46112 // '%' 'castable'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 46624 // '%' 'catch'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 47648 // '%' 'child'
+ || lk == 47892 // '{' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 48160 // '%' 'collation'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49184 // '%' 'comment'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 49696 // '%' 'constraint'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 50208 // '%' 'construction'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 51744 // '%' 'context'
+ || lk == 51988 // '{' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52256 // '%' 'continue'
+ || lk == 52500 // '{' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 52768 // '%' 'copy'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53280 // '%' 'copy-namespaces'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 53792 // '%' 'count'
+ || lk == 54036 // '{' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 54304 // '%' 'decimal-format'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55328 // '%' 'declare'
+ || lk == 55572 // '{' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 55840 // '%' 'default'
+ || lk == 56084 // '{' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56352 // '%' 'delete'
+ || lk == 56596 // '{' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 56864 // '%' 'descendant'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57376 // '%' 'descendant-or-self'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 57888 // '%' 'descending'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60448 // '%' 'div'
+ || lk == 60692 // '{' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 60960 // '%' 'document'
+ || lk == 61204 // '{' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61472 // '%' 'document-node'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 61984 // '%' 'element'
+ || lk == 62228 // '{' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 62496 // '%' 'else'
+ || lk == 62740 // '{' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63008 // '%' 'empty'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 63520 // '%' 'empty-sequence'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64032 // '%' 'encoding'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 64544 // '%' 'end'
+ || lk == 64788 // '{' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 65568 // '%' 'eq'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 66080 // '%' 'every'
+ || lk == 66324 // '{' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67104 // '%' 'except'
+ || lk == 67348 // '{' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 67616 // '%' 'exit'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68128 // '%' 'external'
+ || lk == 68372 // '{' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 68640 // '%' 'first'
+ || lk == 68884 // '{' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69152 // '%' 'following'
+ || lk == 69396 // '{' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 69664 // '%' 'following-sibling'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 70176 // '%' 'for'
+ || lk == 70420 // '{' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 72224 // '%' 'ft-option'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74272 // '%' 'function'
+ || lk == 74516 // '{' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 74784 // '%' 'ge'
+ || lk == 75028 // '{' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 75808 // '%' 'group'
+ || lk == 76052 // '{' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 76832 // '%' 'gt'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77344 // '%' 'idiv'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 77856 // '%' 'if'
+ || lk == 78100 // '{' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78368 // '%' 'import'
+ || lk == 78612 // '{' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 78880 // '%' 'in'
+ || lk == 79124 // '{' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 79392 // '%' 'index'
+ || lk == 79636 // '{' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81440 // '%' 'insert'
+ || lk == 81684 // '{' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 81952 // '%' 'instance'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82464 // '%' 'integrity'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 82976 // '%' 'intersect'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83488 // '%' 'into'
+ || lk == 83732 // '{' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84000 // '%' 'is'
+ || lk == 84244 // '{' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 84512 // '%' 'item'
+ || lk == 84756 // '{' 'item'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 85536 // '%' 'json-item'
+ || lk == 85780 // '{' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87072 // '%' 'last'
+ || lk == 87316 // '{' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 87584 // '%' 'lax'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 88096 // '%' 'le'
+ || lk == 88340 // '{' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 89120 // '%' 'let'
+ || lk == 89364 // '{' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 90144 // '%' 'loop'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 91168 // '%' 'lt'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92192 // '%' 'mod'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 92704 // '%' 'modify'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 93216 // '%' 'module'
+ || lk == 93460 // '{' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94240 // '%' 'namespace'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 94752 // '%' 'namespace-node'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 95264 // '%' 'ne'
+ || lk == 95508 // '{' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 97824 // '%' 'node'
+ || lk == 98068 // '{' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 98336 // '%' 'nodes'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 99360 // '%' 'object'
+ || lk == 99604 // '{' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101408 // '%' 'only'
+ || lk == 101652 // '{' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 101920 // '%' 'option'
+ || lk == 102164 // '{' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102432 // '%' 'or'
+ || lk == 102676 // '{' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 102944 // '%' 'order'
+ || lk == 103188 // '{' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103456 // '%' 'ordered'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 103968 // '%' 'ordering'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 105504 // '%' 'parent'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 108576 // '%' 'preceding'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 109088 // '%' 'preceding-sibling'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 110624 // '%' 'processing-instruction'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 111648 // '%' 'rename'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112160 // '%' 'replace'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 112672 // '%' 'return'
+ || lk == 112916 // '{' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113184 // '%' 'returning'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 113696 // '%' 'revalidation'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 114720 // '%' 'satisfies'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115232 // '%' 'schema'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 115744 // '%' 'schema-attribute'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116256 // '%' 'schema-element'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 116768 // '%' 'score'
+ || lk == 117012 // '{' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 117280 // '%' 'self'
+ || lk == 117524 // '{' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 119840 // '%' 'sliding'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120352 // '%' 'some'
+ || lk == 120596 // '{' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 120864 // '%' 'stable'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 121376 // '%' 'start'
+ || lk == 121620 // '{' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 122912 // '%' 'strict'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124448 // '%' 'switch'
+ || lk == 124692 // '{' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 124960 // '%' 'text'
+ || lk == 125204 // '{' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127008 // '%' 'to'
+ || lk == 127252 // '{' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 127520 // '%' 'treat'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128032 // '%' 'try'
+ || lk == 128276 // '{' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 128544 // '%' 'tumbling'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129056 // '%' 'type'
+ || lk == 129300 // '{' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 129568 // '%' 'typeswitch'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 130080 // '%' 'union'
+ || lk == 130324 // '{' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131104 // '%' 'unordered'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 131616 // '%' 'updating'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133152 // '%' 'validate'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 133664 // '%' 'value'
+ || lk == 133908 // '{' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134176 // '%' 'variable'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 134688 // '%' 'version'
+ || lk == 134932 // '{' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136224 // '%' 'where'
+ || lk == 136468 // '{' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 136736 // '%' 'while'
+ || lk == 136980 // '{' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 138272 // '%' 'with'
+ || lk == 138516 // '{' 'with'
+ || lk == 140319 // '$' 'xquery'
+ || lk == 140320 // '%' 'xquery'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ lk = -2;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ lk = -3;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ lk = -12;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ }
+ }
+ }
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ parse_AssignStatement();
+ break;
+ case -3:
+ parse_BlockStatement();
+ break;
+ case 90198: // 'break' 'loop'
+ parse_BreakStatement();
+ break;
+ case 90214: // 'continue' 'loop'
+ parse_ContinueStatement();
+ break;
+ case 113284: // 'exit' 'returning'
+ parse_ExitStatement();
+ break;
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ parse_FLWORStatement();
+ break;
+ case 17560: // 'if' '('
+ parse_IfStatement();
+ break;
+ case 17651: // 'switch' '('
+ parse_SwitchStatement();
+ break;
+ case 141562: // 'try' '{'
+ parse_TryCatchStatement();
+ break;
+ case 17661: // 'typeswitch' '('
+ parse_TypeswitchStatement();
+ break;
+ case -12:
+ case 16134: // 'variable' '$'
+ parse_VarDeclStatement();
+ break;
+ case -13:
+ parse_WhileStatement();
+ break;
+ default:
+ parse_ApplyStatement();
+ }
+ eventHandler.endNonterminal("Statement", e0);
+ }
+
+ function try_Statement()
+ {
+ switch (l1)
+ {
+ case 132: // 'exit'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'returning' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 137: // 'for'
+ lookahead2W(196); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'sliding' | 'to' |
+ // 'treat' | 'tumbling' | 'union' | '|' | '||'
+ break;
+ case 174: // 'let'
+ lookahead2W(193); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'score' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 250: // 'try'
+ lookahead2W(190); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '{' | '|' | '||'
+ break;
+ case 262: // 'variable'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ // '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'loop' | 'lt' | 'mod' | 'ne' | 'or' | 'to' |
+ // 'treat' | 'union' | '|' | '||'
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(185); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ // '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | 'and' | 'cast' | 'castable' |
+ // 'contains' | 'div' | 'eq' | 'except' | 'ge' | 'gt' | 'idiv' | 'instance' |
+ // 'intersect' | 'is' | 'le' | 'lt' | 'mod' | 'ne' | 'or' | 'to' | 'treat' |
+ // 'union' | '|' | '||'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3103 // '$' EQName^Token
+ || lk == 3104 // '%' EQName^Token
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17675 // 'while' '('
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 35871 // '$' 'after'
+ || lk == 35872 // '%' 'after'
+ || lk == 36116 // '{' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 36896 // '%' 'allowing'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37408 // '%' 'ancestor'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 37920 // '%' 'ancestor-or-self'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 38432 // '%' 'and'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 39968 // '%' 'array'
+ || lk == 40212 // '{' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40480 // '%' 'as'
+ || lk == 40724 // '{' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 40992 // '%' 'ascending'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 41504 // '%' 'at'
+ || lk == 41748 // '{' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42016 // '%' 'attribute'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 42528 // '%' 'base-uri'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43040 // '%' 'before'
+ || lk == 43284 // '{' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 43552 // '%' 'boundary-space'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 44064 // '%' 'break'
+ || lk == 44308 // '{' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45088 // '%' 'case'
+ || lk == 45332 // '{' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 45600 // '%' 'cast'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46112 // '%' 'castable'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 46624 // '%' 'catch'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 47648 // '%' 'child'
+ || lk == 47892 // '{' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 48160 // '%' 'collation'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49184 // '%' 'comment'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 49696 // '%' 'constraint'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 50208 // '%' 'construction'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 51744 // '%' 'context'
+ || lk == 51988 // '{' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52256 // '%' 'continue'
+ || lk == 52500 // '{' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 52768 // '%' 'copy'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53280 // '%' 'copy-namespaces'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 53792 // '%' 'count'
+ || lk == 54036 // '{' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 54304 // '%' 'decimal-format'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55328 // '%' 'declare'
+ || lk == 55572 // '{' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 55840 // '%' 'default'
+ || lk == 56084 // '{' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56352 // '%' 'delete'
+ || lk == 56596 // '{' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 56864 // '%' 'descendant'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57376 // '%' 'descendant-or-self'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 57888 // '%' 'descending'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60448 // '%' 'div'
+ || lk == 60692 // '{' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 60960 // '%' 'document'
+ || lk == 61204 // '{' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61472 // '%' 'document-node'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 61984 // '%' 'element'
+ || lk == 62228 // '{' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 62496 // '%' 'else'
+ || lk == 62740 // '{' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63008 // '%' 'empty'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 63520 // '%' 'empty-sequence'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64032 // '%' 'encoding'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 64544 // '%' 'end'
+ || lk == 64788 // '{' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 65568 // '%' 'eq'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 66080 // '%' 'every'
+ || lk == 66324 // '{' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67104 // '%' 'except'
+ || lk == 67348 // '{' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 67616 // '%' 'exit'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68128 // '%' 'external'
+ || lk == 68372 // '{' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 68640 // '%' 'first'
+ || lk == 68884 // '{' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69152 // '%' 'following'
+ || lk == 69396 // '{' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 69664 // '%' 'following-sibling'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 70176 // '%' 'for'
+ || lk == 70420 // '{' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 72224 // '%' 'ft-option'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74272 // '%' 'function'
+ || lk == 74516 // '{' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 74784 // '%' 'ge'
+ || lk == 75028 // '{' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 75808 // '%' 'group'
+ || lk == 76052 // '{' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 76832 // '%' 'gt'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77344 // '%' 'idiv'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 77856 // '%' 'if'
+ || lk == 78100 // '{' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78368 // '%' 'import'
+ || lk == 78612 // '{' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 78880 // '%' 'in'
+ || lk == 79124 // '{' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 79392 // '%' 'index'
+ || lk == 79636 // '{' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81440 // '%' 'insert'
+ || lk == 81684 // '{' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 81952 // '%' 'instance'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82464 // '%' 'integrity'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 82976 // '%' 'intersect'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83488 // '%' 'into'
+ || lk == 83732 // '{' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84000 // '%' 'is'
+ || lk == 84244 // '{' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 84512 // '%' 'item'
+ || lk == 84756 // '{' 'item'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 85536 // '%' 'json-item'
+ || lk == 85780 // '{' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87072 // '%' 'last'
+ || lk == 87316 // '{' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 87584 // '%' 'lax'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 88096 // '%' 'le'
+ || lk == 88340 // '{' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 89120 // '%' 'let'
+ || lk == 89364 // '{' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 90144 // '%' 'loop'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 91168 // '%' 'lt'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92192 // '%' 'mod'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 92704 // '%' 'modify'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 93216 // '%' 'module'
+ || lk == 93460 // '{' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94240 // '%' 'namespace'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 94752 // '%' 'namespace-node'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 95264 // '%' 'ne'
+ || lk == 95508 // '{' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 97824 // '%' 'node'
+ || lk == 98068 // '{' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 98336 // '%' 'nodes'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 99360 // '%' 'object'
+ || lk == 99604 // '{' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101408 // '%' 'only'
+ || lk == 101652 // '{' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 101920 // '%' 'option'
+ || lk == 102164 // '{' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102432 // '%' 'or'
+ || lk == 102676 // '{' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 102944 // '%' 'order'
+ || lk == 103188 // '{' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103456 // '%' 'ordered'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 103968 // '%' 'ordering'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 105504 // '%' 'parent'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 108576 // '%' 'preceding'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 109088 // '%' 'preceding-sibling'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 110624 // '%' 'processing-instruction'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 111648 // '%' 'rename'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112160 // '%' 'replace'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 112672 // '%' 'return'
+ || lk == 112916 // '{' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113184 // '%' 'returning'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 113696 // '%' 'revalidation'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 114720 // '%' 'satisfies'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115232 // '%' 'schema'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 115744 // '%' 'schema-attribute'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116256 // '%' 'schema-element'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 116768 // '%' 'score'
+ || lk == 117012 // '{' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 117280 // '%' 'self'
+ || lk == 117524 // '{' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 119840 // '%' 'sliding'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120352 // '%' 'some'
+ || lk == 120596 // '{' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 120864 // '%' 'stable'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 121376 // '%' 'start'
+ || lk == 121620 // '{' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 122912 // '%' 'strict'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124448 // '%' 'switch'
+ || lk == 124692 // '{' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 124960 // '%' 'text'
+ || lk == 125204 // '{' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127008 // '%' 'to'
+ || lk == 127252 // '{' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 127520 // '%' 'treat'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128032 // '%' 'try'
+ || lk == 128276 // '{' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 128544 // '%' 'tumbling'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129056 // '%' 'type'
+ || lk == 129300 // '{' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 129568 // '%' 'typeswitch'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 130080 // '%' 'union'
+ || lk == 130324 // '{' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131104 // '%' 'unordered'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 131616 // '%' 'updating'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133152 // '%' 'validate'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 133664 // '%' 'value'
+ || lk == 133908 // '{' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134176 // '%' 'variable'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 134688 // '%' 'version'
+ || lk == 134932 // '{' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136224 // '%' 'where'
+ || lk == 136468 // '{' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 136736 // '%' 'while'
+ || lk == 136980 // '{' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 138272 // '%' 'with'
+ || lk == 138516 // '{' 'with'
+ || lk == 140319 // '$' 'xquery'
+ || lk == 140320 // '%' 'xquery'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(7, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_ApplyStatement();
+ memoize(7, e0A, -1);
+ lk = -14;
+ }
+ catch (p1A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_AssignStatement();
+ memoize(7, e0A, -2);
+ lk = -14;
+ }
+ catch (p2A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_BlockStatement();
+ memoize(7, e0A, -3);
+ lk = -14;
+ }
+ catch (p3A)
+ {
+ try
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ try_VarDeclStatement();
+ memoize(7, e0A, -12);
+ lk = -14;
+ }
+ catch (p12A)
+ {
+ lk = -13;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(7, e0A, -13);
+ }
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ try_AssignStatement();
+ break;
+ case -3:
+ try_BlockStatement();
+ break;
+ case 90198: // 'break' 'loop'
+ try_BreakStatement();
+ break;
+ case 90214: // 'continue' 'loop'
+ try_ContinueStatement();
+ break;
+ case 113284: // 'exit' 'returning'
+ try_ExitStatement();
+ break;
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ try_FLWORStatement();
+ break;
+ case 17560: // 'if' '('
+ try_IfStatement();
+ break;
+ case 17651: // 'switch' '('
+ try_SwitchStatement();
+ break;
+ case 141562: // 'try' '{'
+ try_TryCatchStatement();
+ break;
+ case 17661: // 'typeswitch' '('
+ try_TypeswitchStatement();
+ break;
+ case -12:
+ case 16134: // 'variable' '$'
+ try_VarDeclStatement();
+ break;
+ case -13:
+ try_WhileStatement();
+ break;
+ case -14:
+ break;
+ default:
+ try_ApplyStatement();
+ }
+ }
+
+ function parse_ApplyStatement()
+ {
+ eventHandler.startNonterminal("ApplyStatement", e0);
+ parse_ExprSimple();
+ shift(53); // ';'
+ eventHandler.endNonterminal("ApplyStatement", e0);
+ }
+
+ function try_ApplyStatement()
+ {
+ try_ExprSimple();
+ shiftT(53); // ';'
+ }
+
+ function parse_AssignStatement()
+ {
+ eventHandler.startNonterminal("AssignStatement", e0);
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(53); // ';'
+ eventHandler.endNonterminal("AssignStatement", e0);
+ }
+
+ function try_AssignStatement()
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(27); // S^WS | '(:' | ':='
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(53); // ';'
+ }
+
+ function parse_BlockStatement()
+ {
+ eventHandler.startNonterminal("BlockStatement", e0);
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ whitespace();
+ parse_Statements();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockStatement", e0);
+ }
+
+ function try_BlockStatement()
+ {
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ try_Statements();
+ shiftT(282); // '}'
+ }
+
+ function parse_BreakStatement()
+ {
+ eventHandler.startNonterminal("BreakStatement", e0);
+ shift(86); // 'break'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shift(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shift(53); // ';'
+ eventHandler.endNonterminal("BreakStatement", e0);
+ }
+
+ function try_BreakStatement()
+ {
+ shiftT(86); // 'break'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shiftT(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shiftT(53); // ';'
+ }
+
+ function parse_ContinueStatement()
+ {
+ eventHandler.startNonterminal("ContinueStatement", e0);
+ shift(102); // 'continue'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shift(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shift(53); // ';'
+ eventHandler.endNonterminal("ContinueStatement", e0);
+ }
+
+ function try_ContinueStatement()
+ {
+ shiftT(102); // 'continue'
+ lookahead1W(59); // S^WS | '(:' | 'loop'
+ shiftT(176); // 'loop'
+ lookahead1W(28); // S^WS | '(:' | ';'
+ shiftT(53); // ';'
+ }
+
+ function parse_ExitStatement()
+ {
+ eventHandler.startNonterminal("ExitStatement", e0);
+ shift(132); // 'exit'
+ lookahead1W(71); // S^WS | '(:' | 'returning'
+ shift(221); // 'returning'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(53); // ';'
+ eventHandler.endNonterminal("ExitStatement", e0);
+ }
+
+ function try_ExitStatement()
+ {
+ shiftT(132); // 'exit'
+ lookahead1W(71); // S^WS | '(:' | 'returning'
+ shiftT(221); // 'returning'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(53); // ';'
+ }
+
+ function parse_FLWORStatement()
+ {
+ eventHandler.startNonterminal("FLWORStatement", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ // 'where'
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnStatement();
+ eventHandler.endNonterminal("FLWORStatement", e0);
+ }
+
+ function try_FLWORStatement()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(173); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ // 'where'
+ if (l1 == 220) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnStatement();
+ }
+
+ function parse_ReturnStatement()
+ {
+ eventHandler.startNonterminal("ReturnStatement", e0);
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("ReturnStatement", e0);
+ }
+
+ function try_ReturnStatement()
+ {
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_IfStatement()
+ {
+ eventHandler.startNonterminal("IfStatement", e0);
+ shift(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shift(245); // 'then'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shift(122); // 'else'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("IfStatement", e0);
+ }
+
+ function try_IfStatement()
+ {
+ shiftT(152); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(77); // S^WS | '(:' | 'then'
+ shiftT(245); // 'then'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shiftT(122); // 'else'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_SwitchStatement()
+ {
+ eventHandler.startNonterminal("SwitchStatement", e0);
+ shift(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchStatement", e0);
+ }
+
+ function try_SwitchStatement()
+ {
+ shiftT(243); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_SwitchCaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_SwitchCaseStatement()
+ {
+ eventHandler.startNonterminal("SwitchCaseStatement", e0);
+ for (;;)
+ {
+ shift(88); // 'case'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchCaseStatement", e0);
+ }
+
+ function try_SwitchCaseStatement()
+ {
+ for (;;)
+ {
+ shiftT(88); // 'case'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_SwitchCaseOperand();
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_TryCatchStatement()
+ {
+ eventHandler.startNonterminal("TryCatchStatement", e0);
+ shift(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shift(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_CatchErrorList();
+ whitespace();
+ parse_BlockStatement();
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(276); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ // '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ // 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '|' | '||' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 38491 // 'catch' 'and'
+ || lk == 45659 // 'catch' 'cast'
+ || lk == 46171 // 'catch' 'castable'
+ || lk == 60507 // 'catch' 'div'
+ || lk == 65627 // 'catch' 'eq'
+ || lk == 67163 // 'catch' 'except'
+ || lk == 74843 // 'catch' 'ge'
+ || lk == 76891 // 'catch' 'gt'
+ || lk == 77403 // 'catch' 'idiv'
+ || lk == 82011 // 'catch' 'instance'
+ || lk == 83035 // 'catch' 'intersect'
+ || lk == 84059 // 'catch' 'is'
+ || lk == 88155 // 'catch' 'le'
+ || lk == 91227 // 'catch' 'lt'
+ || lk == 92251 // 'catch' 'mod'
+ || lk == 95323 // 'catch' 'ne'
+ || lk == 102491 // 'catch' 'or'
+ || lk == 127067 // 'catch' 'to'
+ || lk == 127579 // 'catch' 'treat'
+ || lk == 130139) // 'catch' 'union'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CatchErrorList();
+ try_BlockStatement();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 2651 // 'catch' Wildcard
+ && lk != 3163 // 'catch' EQName^Token
+ && lk != 35931 // 'catch' 'after'
+ && lk != 36955 // 'catch' 'allowing'
+ && lk != 37467 // 'catch' 'ancestor'
+ && lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 40027 // 'catch' 'array'
+ && lk != 40539 // 'catch' 'as'
+ && lk != 41051 // 'catch' 'ascending'
+ && lk != 41563 // 'catch' 'at'
+ && lk != 42075 // 'catch' 'attribute'
+ && lk != 42587 // 'catch' 'base-uri'
+ && lk != 43099 // 'catch' 'before'
+ && lk != 43611 // 'catch' 'boundary-space'
+ && lk != 44123 // 'catch' 'break'
+ && lk != 45147 // 'catch' 'case'
+ && lk != 46683 // 'catch' 'catch'
+ && lk != 47707 // 'catch' 'child'
+ && lk != 48219 // 'catch' 'collation'
+ && lk != 49243 // 'catch' 'comment'
+ && lk != 49755 // 'catch' 'constraint'
+ && lk != 50267 // 'catch' 'construction'
+ && lk != 51803 // 'catch' 'context'
+ && lk != 52315 // 'catch' 'continue'
+ && lk != 52827 // 'catch' 'copy'
+ && lk != 53339 // 'catch' 'copy-namespaces'
+ && lk != 53851 // 'catch' 'count'
+ && lk != 54363 // 'catch' 'decimal-format'
+ && lk != 55387 // 'catch' 'declare'
+ && lk != 55899 // 'catch' 'default'
+ && lk != 56411 // 'catch' 'delete'
+ && lk != 56923 // 'catch' 'descendant'
+ && lk != 57435 // 'catch' 'descendant-or-self'
+ && lk != 57947 // 'catch' 'descending'
+ && lk != 61019 // 'catch' 'document'
+ && lk != 61531 // 'catch' 'document-node'
+ && lk != 62043 // 'catch' 'element'
+ && lk != 62555 // 'catch' 'else'
+ && lk != 63067 // 'catch' 'empty'
+ && lk != 63579 // 'catch' 'empty-sequence'
+ && lk != 64091 // 'catch' 'encoding'
+ && lk != 64603 // 'catch' 'end'
+ && lk != 66139 // 'catch' 'every'
+ && lk != 67675 // 'catch' 'exit'
+ && lk != 68187 // 'catch' 'external'
+ && lk != 68699 // 'catch' 'first'
+ && lk != 69211 // 'catch' 'following'
+ && lk != 69723 // 'catch' 'following-sibling'
+ && lk != 70235 // 'catch' 'for'
+ && lk != 72283 // 'catch' 'ft-option'
+ && lk != 74331 // 'catch' 'function'
+ && lk != 75867 // 'catch' 'group'
+ && lk != 77915 // 'catch' 'if'
+ && lk != 78427 // 'catch' 'import'
+ && lk != 78939 // 'catch' 'in'
+ && lk != 79451 // 'catch' 'index'
+ && lk != 81499 // 'catch' 'insert'
+ && lk != 82523 // 'catch' 'integrity'
+ && lk != 83547 // 'catch' 'into'
+ && lk != 84571 // 'catch' 'item'
+ && lk != 85595 // 'catch' 'json-item'
+ && lk != 87131 // 'catch' 'last'
+ && lk != 87643 // 'catch' 'lax'
+ && lk != 89179 // 'catch' 'let'
+ && lk != 90203 // 'catch' 'loop'
+ && lk != 92763 // 'catch' 'modify'
+ && lk != 93275 // 'catch' 'module'
+ && lk != 94299 // 'catch' 'namespace'
+ && lk != 94811 // 'catch' 'namespace-node'
+ && lk != 97883 // 'catch' 'node'
+ && lk != 98395 // 'catch' 'nodes'
+ && lk != 99419 // 'catch' 'object'
+ && lk != 101467 // 'catch' 'only'
+ && lk != 101979 // 'catch' 'option'
+ && lk != 103003 // 'catch' 'order'
+ && lk != 103515 // 'catch' 'ordered'
+ && lk != 104027 // 'catch' 'ordering'
+ && lk != 105563 // 'catch' 'parent'
+ && lk != 108635 // 'catch' 'preceding'
+ && lk != 109147 // 'catch' 'preceding-sibling'
+ && lk != 110683 // 'catch' 'processing-instruction'
+ && lk != 111707 // 'catch' 'rename'
+ && lk != 112219 // 'catch' 'replace'
+ && lk != 112731 // 'catch' 'return'
+ && lk != 113243 // 'catch' 'returning'
+ && lk != 113755 // 'catch' 'revalidation'
+ && lk != 114779 // 'catch' 'satisfies'
+ && lk != 115291 // 'catch' 'schema'
+ && lk != 115803 // 'catch' 'schema-attribute'
+ && lk != 116315 // 'catch' 'schema-element'
+ && lk != 116827 // 'catch' 'score'
+ && lk != 117339 // 'catch' 'self'
+ && lk != 119899 // 'catch' 'sliding'
+ && lk != 120411 // 'catch' 'some'
+ && lk != 120923 // 'catch' 'stable'
+ && lk != 121435 // 'catch' 'start'
+ && lk != 122971 // 'catch' 'strict'
+ && lk != 124507 // 'catch' 'switch'
+ && lk != 125019 // 'catch' 'text'
+ && lk != 128091 // 'catch' 'try'
+ && lk != 128603 // 'catch' 'tumbling'
+ && lk != 129115 // 'catch' 'type'
+ && lk != 129627 // 'catch' 'typeswitch'
+ && lk != 131163 // 'catch' 'unordered'
+ && lk != 131675 // 'catch' 'updating'
+ && lk != 133211 // 'catch' 'validate'
+ && lk != 133723 // 'catch' 'value'
+ && lk != 134235 // 'catch' 'variable'
+ && lk != 134747 // 'catch' 'version'
+ && lk != 136283 // 'catch' 'where'
+ && lk != 136795 // 'catch' 'while'
+ && lk != 138331 // 'catch' 'with'
+ && lk != 140379) // 'catch' 'xquery'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchStatement", e0);
+ }
+
+ function try_TryCatchStatement()
+ {
+ shiftT(250); // 'try'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockStatement();
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CatchErrorList();
+ try_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | EOF | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' |
+ // '..' | '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(276); // Wildcard | EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' |
+ // '+' | ',' | '-' | '/' | '//' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' |
+ // '>>' | '[' | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ // 'array' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'contains' |
+ // 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '|' | '||' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 38491 // 'catch' 'and'
+ || lk == 45659 // 'catch' 'cast'
+ || lk == 46171 // 'catch' 'castable'
+ || lk == 60507 // 'catch' 'div'
+ || lk == 65627 // 'catch' 'eq'
+ || lk == 67163 // 'catch' 'except'
+ || lk == 74843 // 'catch' 'ge'
+ || lk == 76891 // 'catch' 'gt'
+ || lk == 77403 // 'catch' 'idiv'
+ || lk == 82011 // 'catch' 'instance'
+ || lk == 83035 // 'catch' 'intersect'
+ || lk == 84059 // 'catch' 'is'
+ || lk == 88155 // 'catch' 'le'
+ || lk == 91227 // 'catch' 'lt'
+ || lk == 92251 // 'catch' 'mod'
+ || lk == 95323 // 'catch' 'ne'
+ || lk == 102491 // 'catch' 'or'
+ || lk == 127067 // 'catch' 'to'
+ || lk == 127579 // 'catch' 'treat'
+ || lk == 130139) // 'catch' 'union'
+ {
+ lk = memoized(8, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CatchErrorList();
+ try_BlockStatement();
+ memoize(8, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(8, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 2651 // 'catch' Wildcard
+ && lk != 3163 // 'catch' EQName^Token
+ && lk != 35931 // 'catch' 'after'
+ && lk != 36955 // 'catch' 'allowing'
+ && lk != 37467 // 'catch' 'ancestor'
+ && lk != 37979 // 'catch' 'ancestor-or-self'
+ && lk != 40027 // 'catch' 'array'
+ && lk != 40539 // 'catch' 'as'
+ && lk != 41051 // 'catch' 'ascending'
+ && lk != 41563 // 'catch' 'at'
+ && lk != 42075 // 'catch' 'attribute'
+ && lk != 42587 // 'catch' 'base-uri'
+ && lk != 43099 // 'catch' 'before'
+ && lk != 43611 // 'catch' 'boundary-space'
+ && lk != 44123 // 'catch' 'break'
+ && lk != 45147 // 'catch' 'case'
+ && lk != 46683 // 'catch' 'catch'
+ && lk != 47707 // 'catch' 'child'
+ && lk != 48219 // 'catch' 'collation'
+ && lk != 49243 // 'catch' 'comment'
+ && lk != 49755 // 'catch' 'constraint'
+ && lk != 50267 // 'catch' 'construction'
+ && lk != 51803 // 'catch' 'context'
+ && lk != 52315 // 'catch' 'continue'
+ && lk != 52827 // 'catch' 'copy'
+ && lk != 53339 // 'catch' 'copy-namespaces'
+ && lk != 53851 // 'catch' 'count'
+ && lk != 54363 // 'catch' 'decimal-format'
+ && lk != 55387 // 'catch' 'declare'
+ && lk != 55899 // 'catch' 'default'
+ && lk != 56411 // 'catch' 'delete'
+ && lk != 56923 // 'catch' 'descendant'
+ && lk != 57435 // 'catch' 'descendant-or-self'
+ && lk != 57947 // 'catch' 'descending'
+ && lk != 61019 // 'catch' 'document'
+ && lk != 61531 // 'catch' 'document-node'
+ && lk != 62043 // 'catch' 'element'
+ && lk != 62555 // 'catch' 'else'
+ && lk != 63067 // 'catch' 'empty'
+ && lk != 63579 // 'catch' 'empty-sequence'
+ && lk != 64091 // 'catch' 'encoding'
+ && lk != 64603 // 'catch' 'end'
+ && lk != 66139 // 'catch' 'every'
+ && lk != 67675 // 'catch' 'exit'
+ && lk != 68187 // 'catch' 'external'
+ && lk != 68699 // 'catch' 'first'
+ && lk != 69211 // 'catch' 'following'
+ && lk != 69723 // 'catch' 'following-sibling'
+ && lk != 70235 // 'catch' 'for'
+ && lk != 72283 // 'catch' 'ft-option'
+ && lk != 74331 // 'catch' 'function'
+ && lk != 75867 // 'catch' 'group'
+ && lk != 77915 // 'catch' 'if'
+ && lk != 78427 // 'catch' 'import'
+ && lk != 78939 // 'catch' 'in'
+ && lk != 79451 // 'catch' 'index'
+ && lk != 81499 // 'catch' 'insert'
+ && lk != 82523 // 'catch' 'integrity'
+ && lk != 83547 // 'catch' 'into'
+ && lk != 84571 // 'catch' 'item'
+ && lk != 85595 // 'catch' 'json-item'
+ && lk != 87131 // 'catch' 'last'
+ && lk != 87643 // 'catch' 'lax'
+ && lk != 89179 // 'catch' 'let'
+ && lk != 90203 // 'catch' 'loop'
+ && lk != 92763 // 'catch' 'modify'
+ && lk != 93275 // 'catch' 'module'
+ && lk != 94299 // 'catch' 'namespace'
+ && lk != 94811 // 'catch' 'namespace-node'
+ && lk != 97883 // 'catch' 'node'
+ && lk != 98395 // 'catch' 'nodes'
+ && lk != 99419 // 'catch' 'object'
+ && lk != 101467 // 'catch' 'only'
+ && lk != 101979 // 'catch' 'option'
+ && lk != 103003 // 'catch' 'order'
+ && lk != 103515 // 'catch' 'ordered'
+ && lk != 104027 // 'catch' 'ordering'
+ && lk != 105563 // 'catch' 'parent'
+ && lk != 108635 // 'catch' 'preceding'
+ && lk != 109147 // 'catch' 'preceding-sibling'
+ && lk != 110683 // 'catch' 'processing-instruction'
+ && lk != 111707 // 'catch' 'rename'
+ && lk != 112219 // 'catch' 'replace'
+ && lk != 112731 // 'catch' 'return'
+ && lk != 113243 // 'catch' 'returning'
+ && lk != 113755 // 'catch' 'revalidation'
+ && lk != 114779 // 'catch' 'satisfies'
+ && lk != 115291 // 'catch' 'schema'
+ && lk != 115803 // 'catch' 'schema-attribute'
+ && lk != 116315 // 'catch' 'schema-element'
+ && lk != 116827 // 'catch' 'score'
+ && lk != 117339 // 'catch' 'self'
+ && lk != 119899 // 'catch' 'sliding'
+ && lk != 120411 // 'catch' 'some'
+ && lk != 120923 // 'catch' 'stable'
+ && lk != 121435 // 'catch' 'start'
+ && lk != 122971 // 'catch' 'strict'
+ && lk != 124507 // 'catch' 'switch'
+ && lk != 125019 // 'catch' 'text'
+ && lk != 128091 // 'catch' 'try'
+ && lk != 128603 // 'catch' 'tumbling'
+ && lk != 129115 // 'catch' 'type'
+ && lk != 129627 // 'catch' 'typeswitch'
+ && lk != 131163 // 'catch' 'unordered'
+ && lk != 131675 // 'catch' 'updating'
+ && lk != 133211 // 'catch' 'validate'
+ && lk != 133723 // 'catch' 'value'
+ && lk != 134235 // 'catch' 'variable'
+ && lk != 134747 // 'catch' 'version'
+ && lk != 136283 // 'catch' 'where'
+ && lk != 136795 // 'catch' 'while'
+ && lk != 138331 // 'catch' 'with'
+ && lk != 140379) // 'catch' 'xquery'
+ {
+ break;
+ }
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(255); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_CatchErrorList();
+ try_BlockStatement();
+ }
+ }
+
+ function parse_TypeswitchStatement()
+ {
+ eventHandler.startNonterminal("TypeswitchStatement", e0);
+ shift(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shift(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("TypeswitchStatement", e0);
+ }
+
+ function try_TypeswitchStatement()
+ {
+ shiftT(253); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ for (;;)
+ {
+ lookahead1W(35); // S^WS | '(:' | 'case'
+ try_CaseStatement();
+ lookahead1W(113); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 88) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(109); // 'default'
+ lookahead1W(95); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_CaseStatement()
+ {
+ eventHandler.startNonterminal("CaseStatement", e0);
+ shift(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shift(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("CaseStatement", e0);
+ }
+
+ function try_CaseStatement()
+ {
+ shiftT(88); // 'case'
+ lookahead1W(260); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' |
+ // 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' |
+ // 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(30); // S^WS | '(:' | 'as'
+ shiftT(79); // 'as'
+ }
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ try_SequenceType();
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_VarDeclStatement()
+ {
+ eventHandler.startNonterminal("VarDeclStatement", e0);
+ for (;;)
+ {
+ lookahead1W(98); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shift(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ }
+ shift(53); // ';'
+ eventHandler.endNonterminal("VarDeclStatement", e0);
+ }
+
+ function try_VarDeclStatement()
+ {
+ for (;;)
+ {
+ lookahead1W(98); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 32) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(262); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ try_VarName();
+ lookahead1W(157); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 79) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(145); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 52) // ':='
+ {
+ shiftT(52); // ':='
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ }
+ shiftT(53); // ';'
+ }
+
+ function parse_WhileStatement()
+ {
+ eventHandler.startNonterminal("WhileStatement", e0);
+ shift(267); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(37); // ')'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("WhileStatement", e0);
+ }
+
+ function try_WhileStatement()
+ {
+ shiftT(267); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(34); // '('
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(37); // ')'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Statement();
+ }
+
+ function parse_ExprSingle()
+ {
+ eventHandler.startNonterminal("ExprSingle", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'sliding' | 'stable' | 'start' | 'to' | 'treat' | 'tumbling' | 'union' |
+ // 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 174: // 'let'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'score' | 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' |
+ // '|' | '||' | '|}' | '}'
+ break;
+ case 250: // 'try'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '{' | '|' |
+ // '||' | '|}' | '}'
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ parse_FLWORExpr();
+ break;
+ case 17560: // 'if' '('
+ parse_IfExpr();
+ break;
+ case 17651: // 'switch' '('
+ parse_SwitchExpr();
+ break;
+ case 141562: // 'try' '{'
+ parse_TryCatchExpr();
+ break;
+ case 17661: // 'typeswitch' '('
+ parse_TypeswitchExpr();
+ break;
+ default:
+ parse_ExprSimple();
+ }
+ eventHandler.endNonterminal("ExprSingle", e0);
+ }
+
+ function try_ExprSingle()
+ {
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'sliding' | 'stable' | 'start' | 'to' | 'treat' | 'tumbling' | 'union' |
+ // 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 174: // 'let'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'score' | 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' |
+ // '|' | '||' | '|}' | '}'
+ break;
+ case 250: // 'try'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '{' | '|' |
+ // '||' | '|}' | '}'
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(228); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16009: // 'for' '$'
+ case 16046: // 'let' '$'
+ case 116910: // 'let' 'score'
+ case 119945: // 'for' 'sliding'
+ case 128649: // 'for' 'tumbling'
+ try_FLWORExpr();
+ break;
+ case 17560: // 'if' '('
+ try_IfExpr();
+ break;
+ case 17651: // 'switch' '('
+ try_SwitchExpr();
+ break;
+ case 141562: // 'try' '{'
+ try_TryCatchExpr();
+ break;
+ case 17661: // 'typeswitch' '('
+ try_TypeswitchExpr();
+ break;
+ default:
+ try_ExprSimple();
+ }
+ }
+
+ function parse_ExprSimple()
+ {
+ eventHandler.startNonterminal("ExprSimple", e0);
+ switch (l1)
+ {
+ case 218: // 'rename'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'only' | 'or' | 'order' |
+ // 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' | 'union' |
+ // 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 219: // 'replace'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'only' | 'or' | 'order' |
+ // 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' | 'union' |
+ // 'value' | 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'nodes' | 'only' | 'or' |
+ // 'order' | 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16001: // 'every' '$'
+ case 16107: // 'some' '$'
+ parse_QuantifiedExpr();
+ break;
+ case 97951: // 'insert' 'node'
+ case 98463: // 'insert' 'nodes'
+ parse_InsertExpr();
+ break;
+ case 97902: // 'delete' 'node'
+ case 98414: // 'delete' 'nodes'
+ parse_DeleteExpr();
+ break;
+ case 98010: // 'rename' 'node'
+ parse_RenameExpr();
+ break;
+ case 98011: // 'replace' 'node'
+ case 133851: // 'replace' 'value'
+ parse_ReplaceExpr();
+ break;
+ case 15975: // 'copy' '$'
+ parse_TransformExpr();
+ break;
+ case 85102: // 'delete' 'json'
+ parse_JSONDeleteExpr();
+ break;
+ case 85151: // 'insert' 'json'
+ parse_JSONInsertExpr();
+ break;
+ case 85210: // 'rename' 'json'
+ parse_JSONRenameExpr();
+ break;
+ case 85211: // 'replace' 'json'
+ parse_JSONReplaceExpr();
+ break;
+ case 77: // 'append'
+ parse_JSONAppendExpr();
+ break;
+ default:
+ parse_OrExpr();
+ }
+ eventHandler.endNonterminal("ExprSimple", e0);
+ }
+
+ function try_ExprSimple()
+ {
+ switch (l1)
+ {
+ case 218: // 'rename'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'only' | 'or' | 'order' |
+ // 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' | 'union' |
+ // 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 219: // 'replace'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'only' | 'or' | 'order' |
+ // 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' | 'union' |
+ // 'value' | 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ // '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' | ']' |
+ // 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'json' | 'le' |
+ // 'let' | 'lt' | 'mod' | 'modify' | 'ne' | 'node' | 'nodes' | 'only' | 'or' |
+ // 'order' | 'return' | 'satisfies' | 'stable' | 'start' | 'to' | 'treat' |
+ // 'union' | 'where' | 'with' | '|' | '||' | '|}' | '}'
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ // '/' | '//' | ':' | ';' | '<' | '<<' | '<=' | '=' | '>' | '>=' | '>>' | '[' |
+ // ']' | 'after' | 'and' | 'as' | 'ascending' | 'at' | 'before' | 'case' | 'cast' |
+ // 'castable' | 'collation' | 'contains' | 'count' | 'default' | 'descending' |
+ // 'div' | 'else' | 'empty' | 'end' | 'eq' | 'except' | 'for' | 'ge' | 'group' |
+ // 'gt' | 'idiv' | 'instance' | 'intersect' | 'into' | 'is' | 'le' | 'let' | 'lt' |
+ // 'mod' | 'modify' | 'ne' | 'only' | 'or' | 'order' | 'return' | 'satisfies' |
+ // 'stable' | 'start' | 'to' | 'treat' | 'union' | 'where' | 'with' | '|' | '||' |
+ // '|}' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16001: // 'every' '$'
+ case 16107: // 'some' '$'
+ try_QuantifiedExpr();
+ break;
+ case 97951: // 'insert' 'node'
+ case 98463: // 'insert' 'nodes'
+ try_InsertExpr();
+ break;
+ case 97902: // 'delete' 'node'
+ case 98414: // 'delete' 'nodes'
+ try_DeleteExpr();
+ break;
+ case 98010: // 'rename' 'node'
+ try_RenameExpr();
+ break;
+ case 98011: // 'replace' 'node'
+ case 133851: // 'replace' 'value'
+ try_ReplaceExpr();
+ break;
+ case 15975: // 'copy' '$'
+ try_TransformExpr();
+ break;
+ case 85102: // 'delete' 'json'
+ try_JSONDeleteExpr();
+ break;
+ case 85151: // 'insert' 'json'
+ try_JSONInsertExpr();
+ break;
+ case 85210: // 'rename' 'json'
+ try_JSONRenameExpr();
+ break;
+ case 85211: // 'replace' 'json'
+ try_JSONReplaceExpr();
+ break;
+ case 77: // 'append'
+ try_JSONAppendExpr();
+ break;
+ default:
+ try_OrExpr();
+ }
+ }
+
+ function parse_JSONDeleteExpr()
+ {
+ eventHandler.startNonterminal("JSONDeleteExpr", e0);
+ shift(110); // 'delete'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PostfixExpr();
+ eventHandler.endNonterminal("JSONDeleteExpr", e0);
+ }
+
+ function try_JSONDeleteExpr()
+ {
+ shiftT(110); // 'delete'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PostfixExpr();
+ }
+
+ function parse_JSONInsertExpr()
+ {
+ eventHandler.startNonterminal("JSONInsertExpr", e0);
+ shift(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shift(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shift(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("JSONInsertExpr", e0);
+ }
+
+ function try_JSONInsertExpr()
+ {
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 81: // 'at'
+ lookahead2W(69); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 108113) // 'at' 'position'
+ {
+ lk = memoized(9, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ memoize(9, e0A, -1);
+ }
+ catch (p1A)
+ {
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(9, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+ }
+
+ function parse_JSONRenameExpr()
+ {
+ eventHandler.startNonterminal("JSONRenameExpr", e0);
+ shift(218); // 'rename'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PostfixExpr();
+ shift(79); // 'as'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONRenameExpr", e0);
+ }
+
+ function try_JSONRenameExpr()
+ {
+ shiftT(218); // 'rename'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PostfixExpr();
+ shiftT(79); // 'as'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_JSONReplaceExpr()
+ {
+ eventHandler.startNonterminal("JSONReplaceExpr", e0);
+ shift(219); // 'replace'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(82); // S^WS | '(:' | 'value'
+ shift(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PostfixExpr();
+ shift(270); // 'with'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONReplaceExpr", e0);
+ }
+
+ function try_JSONReplaceExpr()
+ {
+ shiftT(219); // 'replace'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(82); // S^WS | '(:' | 'value'
+ shiftT(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ // S^WS | '$' | '%' | '(' | '(:' | '.' | '<' | '<!--' | '<?' | '[' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PostfixExpr();
+ shiftT(270); // 'with'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_JSONAppendExpr()
+ {
+ eventHandler.startNonterminal("JSONAppendExpr", e0);
+ shift(77); // 'append'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ shift(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONAppendExpr", e0);
+ }
+
+ function try_JSONAppendExpr()
+ {
+ shiftT(77); // 'append'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ shiftT(163); // 'into'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_CommonContent()
+ {
+ eventHandler.startNonterminal("CommonContent", e0);
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shift(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shift(23); // CharRef
+ break;
+ case 277: // '{{'
+ shift(277); // '{{'
+ break;
+ case 283: // '}}'
+ shift(283); // '}}'
+ break;
+ default:
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CommonContent", e0);
+ }
+
+ function try_CommonContent()
+ {
+ switch (l1)
+ {
+ case 12: // PredefinedEntityRef
+ shiftT(12); // PredefinedEntityRef
+ break;
+ case 23: // CharRef
+ shiftT(23); // CharRef
+ break;
+ case 277: // '{{'
+ shiftT(277); // '{{'
+ break;
+ case 283: // '}}'
+ shiftT(283); // '}}'
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_ContentExpr()
+ {
+ eventHandler.startNonterminal("ContentExpr", e0);
+ parse_StatementsAndExpr();
+ eventHandler.endNonterminal("ContentExpr", e0);
+ }
+
+ function try_ContentExpr()
+ {
+ try_StatementsAndExpr();
+ }
+
+ function parse_CompDocConstructor()
+ {
+ eventHandler.startNonterminal("CompDocConstructor", e0);
+ shift(119); // 'document'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompDocConstructor", e0);
+ }
+
+ function try_CompDocConstructor()
+ {
+ shiftT(119); // 'document'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompAttrConstructor()
+ {
+ eventHandler.startNonterminal("CompAttrConstructor", e0);
+ shift(82); // 'attribute'
+ lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompAttrConstructor", e0);
+ }
+
+ function try_CompAttrConstructor()
+ {
+ shiftT(82); // 'attribute'
+ lookahead1W(256); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(10, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ memoize(10, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(10, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompPIConstructor()
+ {
+ eventHandler.startNonterminal("CompPIConstructor", e0);
+ shift(216); // 'processing-instruction'
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_Expr();
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shift(282); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompPIConstructor", e0);
+ }
+
+ function try_CompPIConstructor()
+ {
+ shiftT(216); // 'processing-instruction'
+ lookahead1W(249); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shiftT(276); // '{'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_Expr();
+ shiftT(282); // '}'
+ break;
+ default:
+ try_NCName();
+ }
+ lookahead1W(87); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(11, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ memoize(11, e0A, -1);
+ lk = -3;
+ }
+ catch (p1A)
+ {
+ lk = -2;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(11, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompCommentConstructor()
+ {
+ eventHandler.startNonterminal("CompCommentConstructor", e0);
+ shift(96); // 'comment'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompCommentConstructor", e0);
+ }
+
+ function try_CompCommentConstructor()
+ {
+ shiftT(96); // 'comment'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompTextConstructor()
+ {
+ eventHandler.startNonterminal("CompTextConstructor", e0);
+ shift(244); // 'text'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompTextConstructor", e0);
+ }
+
+ function try_CompTextConstructor()
+ {
+ shiftT(244); // 'text'
+ lookahead1W(87); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_PrimaryExpr()
+ {
+ eventHandler.startNonterminal("PrimaryExpr", e0);
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ lookahead2W(254); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(252); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 96: // 'comment'
+ case 244: // 'text'
+ lookahead2W(93); // S^WS | '#' | '(:' | '{'
+ break;
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 256: // 'unordered'
+ lookahead2W(139); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 93: // 'child'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 186: // 'ne'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 228: // 'score'
+ case 229: // 'self'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 36116 // '{' 'after'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40212 // '{' 'array'
+ || lk == 40724 // '{' 'as'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41748 // '{' 'at'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43284 // '{' 'before'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44308 // '{' 'break'
+ || lk == 45332 // '{' 'case'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47892 // '{' 'child'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51988 // '{' 'context'
+ || lk == 52500 // '{' 'continue'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 54036 // '{' 'count'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55572 // '{' 'declare'
+ || lk == 56084 // '{' 'default'
+ || lk == 56596 // '{' 'delete'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60692 // '{' 'div'
+ || lk == 61204 // '{' 'document'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 62228 // '{' 'element'
+ || lk == 62740 // '{' 'else'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64788 // '{' 'end'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66324 // '{' 'every'
+ || lk == 67348 // '{' 'except'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68372 // '{' 'external'
+ || lk == 68884 // '{' 'first'
+ || lk == 69396 // '{' 'following'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70420 // '{' 'for'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74516 // '{' 'function'
+ || lk == 75028 // '{' 'ge'
+ || lk == 76052 // '{' 'group'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 78100 // '{' 'if'
+ || lk == 78612 // '{' 'import'
+ || lk == 79124 // '{' 'in'
+ || lk == 79636 // '{' 'index'
+ || lk == 81684 // '{' 'insert'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83732 // '{' 'into'
+ || lk == 84244 // '{' 'is'
+ || lk == 84756 // '{' 'item'
+ || lk == 85780 // '{' 'json-item'
+ || lk == 87316 // '{' 'last'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88340 // '{' 'le'
+ || lk == 89364 // '{' 'let'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93460 // '{' 'module'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95508 // '{' 'ne'
+ || lk == 98068 // '{' 'node'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 99604 // '{' 'object'
+ || lk == 101652 // '{' 'only'
+ || lk == 102164 // '{' 'option'
+ || lk == 102676 // '{' 'or'
+ || lk == 103188 // '{' 'order'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112916 // '{' 'return'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 117012 // '{' 'score'
+ || lk == 117524 // '{' 'self'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120596 // '{' 'some'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121620 // '{' 'start'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124692 // '{' 'switch'
+ || lk == 125204 // '{' 'text'
+ || lk == 127252 // '{' 'to'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128276 // '{' 'try'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129300 // '{' 'type'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130324 // '{' 'union'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133908 // '{' 'value'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134932 // '{' 'version'
+ || lk == 136468 // '{' 'where'
+ || lk == 136980 // '{' 'while'
+ || lk == 138516 // '{' 'with'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(12, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_BlockExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ }
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(12, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ parse_Literal();
+ break;
+ case 31: // '$'
+ parse_VarRef();
+ break;
+ case 34: // '('
+ parse_ParenthesizedExpr();
+ break;
+ case 44: // '.'
+ parse_ContextItemExpr();
+ break;
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17486: // 'array' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17575: // 'json-item' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17602: // 'object' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ parse_FunctionCall();
+ break;
+ case 141514: // 'ordered' '{'
+ parse_OrderedExpr();
+ break;
+ case 141568: // 'unordered' '{'
+ parse_UnorderedExpr();
+ break;
+ case 32: // '%'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14926: // 'array' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15015: // 'json-item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15034: // 'ne' '#'
+ case 15040: // 'nodes' '#'
+ case 15042: // 'object' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ parse_FunctionItemExpr();
+ break;
+ case -10:
+ parse_BlockExpr();
+ break;
+ case -11:
+ parse_ObjectConstructor();
+ break;
+ case 68: // '['
+ parse_ArrayConstructor();
+ break;
+ case 278: // '{|'
+ parse_JSONSimpleObjectUnion();
+ break;
+ default:
+ parse_Constructor();
+ }
+ eventHandler.endNonterminal("PrimaryExpr", e0);
+ }
+
+ function try_PrimaryExpr()
+ {
+ switch (l1)
+ {
+ case 184: // 'namespace'
+ lookahead2W(254); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(252); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' |
+ // 'lt' | 'mod' | 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' |
+ // 'node' | 'nodes' | 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' |
+ // 'parent' | 'preceding' | 'preceding-sibling' | 'processing-instruction' |
+ // 'rename' | 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' |
+ // 'schema' | 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' |
+ // 'some' | 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' |
+ // 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 276: // '{'
+ lookahead2W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(257); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{'
+ break;
+ case 96: // 'comment'
+ case 244: // 'text'
+ lookahead2W(93); // S^WS | '#' | '(:' | '{'
+ break;
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 256: // 'unordered'
+ lookahead2W(139); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 73: // 'ancestor'
+ case 74: // 'ancestor-or-self'
+ case 75: // 'and'
+ case 78: // 'array'
+ case 79: // 'as'
+ case 80: // 'ascending'
+ case 81: // 'at'
+ case 83: // 'base-uri'
+ case 84: // 'before'
+ case 85: // 'boundary-space'
+ case 86: // 'break'
+ case 88: // 'case'
+ case 89: // 'cast'
+ case 90: // 'castable'
+ case 91: // 'catch'
+ case 93: // 'child'
+ case 94: // 'collation'
+ case 97: // 'constraint'
+ case 98: // 'construction'
+ case 101: // 'context'
+ case 102: // 'continue'
+ case 103: // 'copy'
+ case 104: // 'copy-namespaces'
+ case 105: // 'count'
+ case 106: // 'decimal-format'
+ case 108: // 'declare'
+ case 109: // 'default'
+ case 110: // 'delete'
+ case 111: // 'descendant'
+ case 112: // 'descendant-or-self'
+ case 113: // 'descending'
+ case 118: // 'div'
+ case 122: // 'else'
+ case 123: // 'empty'
+ case 125: // 'encoding'
+ case 126: // 'end'
+ case 128: // 'eq'
+ case 129: // 'every'
+ case 131: // 'except'
+ case 132: // 'exit'
+ case 133: // 'external'
+ case 134: // 'first'
+ case 135: // 'following'
+ case 136: // 'following-sibling'
+ case 137: // 'for'
+ case 141: // 'ft-option'
+ case 146: // 'ge'
+ case 148: // 'group'
+ case 150: // 'gt'
+ case 151: // 'idiv'
+ case 153: // 'import'
+ case 154: // 'in'
+ case 155: // 'index'
+ case 159: // 'insert'
+ case 160: // 'instance'
+ case 161: // 'integrity'
+ case 162: // 'intersect'
+ case 163: // 'into'
+ case 164: // 'is'
+ case 167: // 'json-item'
+ case 170: // 'last'
+ case 171: // 'lax'
+ case 172: // 'le'
+ case 174: // 'let'
+ case 176: // 'loop'
+ case 178: // 'lt'
+ case 180: // 'mod'
+ case 181: // 'modify'
+ case 182: // 'module'
+ case 186: // 'ne'
+ case 192: // 'nodes'
+ case 194: // 'object'
+ case 198: // 'only'
+ case 199: // 'option'
+ case 200: // 'or'
+ case 201: // 'order'
+ case 203: // 'ordering'
+ case 206: // 'parent'
+ case 212: // 'preceding'
+ case 213: // 'preceding-sibling'
+ case 218: // 'rename'
+ case 219: // 'replace'
+ case 220: // 'return'
+ case 221: // 'returning'
+ case 222: // 'revalidation'
+ case 224: // 'satisfies'
+ case 225: // 'schema'
+ case 228: // 'score'
+ case 229: // 'self'
+ case 234: // 'sliding'
+ case 235: // 'some'
+ case 236: // 'stable'
+ case 237: // 'start'
+ case 240: // 'strict'
+ case 248: // 'to'
+ case 249: // 'treat'
+ case 250: // 'try'
+ case 251: // 'tumbling'
+ case 252: // 'type'
+ case 254: // 'union'
+ case 257: // 'updating'
+ case 260: // 'validate'
+ case 261: // 'value'
+ case 262: // 'variable'
+ case 263: // 'version'
+ case 266: // 'where'
+ case 267: // 'while'
+ case 270: // 'with'
+ case 274: // 'xquery'
+ lookahead2W(92); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 2836 // '{' Wildcard
+ || lk == 3348 // '{' EQName^Token
+ || lk == 4372 // '{' IntegerLiteral
+ || lk == 4884 // '{' DecimalLiteral
+ || lk == 5396 // '{' DoubleLiteral
+ || lk == 5908 // '{' StringLiteral
+ || lk == 16148 // '{' '$'
+ || lk == 16660 // '{' '%'
+ || lk == 17684 // '{' '('
+ || lk == 18196 // '{' '(#'
+ || lk == 20756 // '{' '+'
+ || lk == 21780 // '{' '-'
+ || lk == 22804 // '{' '.'
+ || lk == 23316 // '{' '..'
+ || lk == 23828 // '{' '/'
+ || lk == 24340 // '{' '//'
+ || lk == 27924 // '{' '<'
+ || lk == 28436 // '{' '<!--'
+ || lk == 30484 // '{' '<?'
+ || lk == 34068 // '{' '@'
+ || lk == 35092 // '{' '['
+ || lk == 36116 // '{' 'after'
+ || lk == 37140 // '{' 'allowing'
+ || lk == 37652 // '{' 'ancestor'
+ || lk == 38164 // '{' 'ancestor-or-self'
+ || lk == 38676 // '{' 'and'
+ || lk == 39700 // '{' 'append'
+ || lk == 40212 // '{' 'array'
+ || lk == 40724 // '{' 'as'
+ || lk == 41236 // '{' 'ascending'
+ || lk == 41748 // '{' 'at'
+ || lk == 42260 // '{' 'attribute'
+ || lk == 42772 // '{' 'base-uri'
+ || lk == 43284 // '{' 'before'
+ || lk == 43796 // '{' 'boundary-space'
+ || lk == 44308 // '{' 'break'
+ || lk == 45332 // '{' 'case'
+ || lk == 45844 // '{' 'cast'
+ || lk == 46356 // '{' 'castable'
+ || lk == 46868 // '{' 'catch'
+ || lk == 47892 // '{' 'child'
+ || lk == 48404 // '{' 'collation'
+ || lk == 49428 // '{' 'comment'
+ || lk == 49940 // '{' 'constraint'
+ || lk == 50452 // '{' 'construction'
+ || lk == 51988 // '{' 'context'
+ || lk == 52500 // '{' 'continue'
+ || lk == 53012 // '{' 'copy'
+ || lk == 53524 // '{' 'copy-namespaces'
+ || lk == 54036 // '{' 'count'
+ || lk == 54548 // '{' 'decimal-format'
+ || lk == 55572 // '{' 'declare'
+ || lk == 56084 // '{' 'default'
+ || lk == 56596 // '{' 'delete'
+ || lk == 57108 // '{' 'descendant'
+ || lk == 57620 // '{' 'descendant-or-self'
+ || lk == 58132 // '{' 'descending'
+ || lk == 60692 // '{' 'div'
+ || lk == 61204 // '{' 'document'
+ || lk == 61716 // '{' 'document-node'
+ || lk == 62228 // '{' 'element'
+ || lk == 62740 // '{' 'else'
+ || lk == 63252 // '{' 'empty'
+ || lk == 63764 // '{' 'empty-sequence'
+ || lk == 64276 // '{' 'encoding'
+ || lk == 64788 // '{' 'end'
+ || lk == 65812 // '{' 'eq'
+ || lk == 66324 // '{' 'every'
+ || lk == 67348 // '{' 'except'
+ || lk == 67860 // '{' 'exit'
+ || lk == 68372 // '{' 'external'
+ || lk == 68884 // '{' 'first'
+ || lk == 69396 // '{' 'following'
+ || lk == 69908 // '{' 'following-sibling'
+ || lk == 70420 // '{' 'for'
+ || lk == 72468 // '{' 'ft-option'
+ || lk == 74516 // '{' 'function'
+ || lk == 75028 // '{' 'ge'
+ || lk == 76052 // '{' 'group'
+ || lk == 77076 // '{' 'gt'
+ || lk == 77588 // '{' 'idiv'
+ || lk == 78100 // '{' 'if'
+ || lk == 78612 // '{' 'import'
+ || lk == 79124 // '{' 'in'
+ || lk == 79636 // '{' 'index'
+ || lk == 81684 // '{' 'insert'
+ || lk == 82196 // '{' 'instance'
+ || lk == 82708 // '{' 'integrity'
+ || lk == 83220 // '{' 'intersect'
+ || lk == 83732 // '{' 'into'
+ || lk == 84244 // '{' 'is'
+ || lk == 84756 // '{' 'item'
+ || lk == 85780 // '{' 'json-item'
+ || lk == 87316 // '{' 'last'
+ || lk == 87828 // '{' 'lax'
+ || lk == 88340 // '{' 'le'
+ || lk == 89364 // '{' 'let'
+ || lk == 90388 // '{' 'loop'
+ || lk == 91412 // '{' 'lt'
+ || lk == 92436 // '{' 'mod'
+ || lk == 92948 // '{' 'modify'
+ || lk == 93460 // '{' 'module'
+ || lk == 94484 // '{' 'namespace'
+ || lk == 94996 // '{' 'namespace-node'
+ || lk == 95508 // '{' 'ne'
+ || lk == 98068 // '{' 'node'
+ || lk == 98580 // '{' 'nodes'
+ || lk == 99604 // '{' 'object'
+ || lk == 101652 // '{' 'only'
+ || lk == 102164 // '{' 'option'
+ || lk == 102676 // '{' 'or'
+ || lk == 103188 // '{' 'order'
+ || lk == 103700 // '{' 'ordered'
+ || lk == 104212 // '{' 'ordering'
+ || lk == 105748 // '{' 'parent'
+ || lk == 108820 // '{' 'preceding'
+ || lk == 109332 // '{' 'preceding-sibling'
+ || lk == 110868 // '{' 'processing-instruction'
+ || lk == 111892 // '{' 'rename'
+ || lk == 112404 // '{' 'replace'
+ || lk == 112916 // '{' 'return'
+ || lk == 113428 // '{' 'returning'
+ || lk == 113940 // '{' 'revalidation'
+ || lk == 114964 // '{' 'satisfies'
+ || lk == 115476 // '{' 'schema'
+ || lk == 115988 // '{' 'schema-attribute'
+ || lk == 116500 // '{' 'schema-element'
+ || lk == 117012 // '{' 'score'
+ || lk == 117524 // '{' 'self'
+ || lk == 120084 // '{' 'sliding'
+ || lk == 120596 // '{' 'some'
+ || lk == 121108 // '{' 'stable'
+ || lk == 121620 // '{' 'start'
+ || lk == 123156 // '{' 'strict'
+ || lk == 124692 // '{' 'switch'
+ || lk == 125204 // '{' 'text'
+ || lk == 127252 // '{' 'to'
+ || lk == 127764 // '{' 'treat'
+ || lk == 128276 // '{' 'try'
+ || lk == 128788 // '{' 'tumbling'
+ || lk == 129300 // '{' 'type'
+ || lk == 129812 // '{' 'typeswitch'
+ || lk == 130324 // '{' 'union'
+ || lk == 131348 // '{' 'unordered'
+ || lk == 131860 // '{' 'updating'
+ || lk == 133396 // '{' 'validate'
+ || lk == 133908 // '{' 'value'
+ || lk == 134420 // '{' 'variable'
+ || lk == 134932 // '{' 'version'
+ || lk == 136468 // '{' 'where'
+ || lk == 136980 // '{' 'while'
+ || lk == 138516 // '{' 'with'
+ || lk == 140564 // '{' 'xquery'
+ || lk == 141588 // '{' '{'
+ || lk == 142612 // '{' '{|'
+ || lk == 144660) // '{' '}'
+ {
+ lk = memoized(12, e0);
+ if (lk == 0)
+ {
+ var b0A = b0; var e0A = e0; var l1A = l1;
+ var b1A = b1; var e1A = e1; var l2A = l2;
+ var b2A = b2; var e2A = e2;
+ try
+ {
+ try_BlockExpr();
+ memoize(12, e0A, -10);
+ lk = -14;
+ }
+ catch (p10A)
+ {
+ lk = -11;
+ b0 = b0A; e0 = e0A; l1 = l1A; if (l1 == 0) {end = e0A;} else {
+ b1 = b1A; e1 = e1A; l2 = l2A; if (l2 == 0) {end = e1A;} else {
+ b2 = b2A; e2 = e2A; end = e2A; }}
+ memoize(12, e0A, -11);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ try_Literal();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 34: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 44: // '.'
+ try_ContextItemExpr();
+ break;
+ case 17414: // EQName^Token '('
+ case 17478: // 'after' '('
+ case 17480: // 'allowing' '('
+ case 17481: // 'ancestor' '('
+ case 17482: // 'ancestor-or-self' '('
+ case 17483: // 'and' '('
+ case 17486: // 'array' '('
+ case 17487: // 'as' '('
+ case 17488: // 'ascending' '('
+ case 17489: // 'at' '('
+ case 17491: // 'base-uri' '('
+ case 17492: // 'before' '('
+ case 17493: // 'boundary-space' '('
+ case 17494: // 'break' '('
+ case 17496: // 'case' '('
+ case 17497: // 'cast' '('
+ case 17498: // 'castable' '('
+ case 17499: // 'catch' '('
+ case 17501: // 'child' '('
+ case 17502: // 'collation' '('
+ case 17505: // 'constraint' '('
+ case 17506: // 'construction' '('
+ case 17509: // 'context' '('
+ case 17510: // 'continue' '('
+ case 17511: // 'copy' '('
+ case 17512: // 'copy-namespaces' '('
+ case 17513: // 'count' '('
+ case 17514: // 'decimal-format' '('
+ case 17516: // 'declare' '('
+ case 17517: // 'default' '('
+ case 17518: // 'delete' '('
+ case 17519: // 'descendant' '('
+ case 17520: // 'descendant-or-self' '('
+ case 17521: // 'descending' '('
+ case 17526: // 'div' '('
+ case 17527: // 'document' '('
+ case 17530: // 'else' '('
+ case 17531: // 'empty' '('
+ case 17533: // 'encoding' '('
+ case 17534: // 'end' '('
+ case 17536: // 'eq' '('
+ case 17537: // 'every' '('
+ case 17539: // 'except' '('
+ case 17540: // 'exit' '('
+ case 17541: // 'external' '('
+ case 17542: // 'first' '('
+ case 17543: // 'following' '('
+ case 17544: // 'following-sibling' '('
+ case 17545: // 'for' '('
+ case 17549: // 'ft-option' '('
+ case 17554: // 'ge' '('
+ case 17556: // 'group' '('
+ case 17558: // 'gt' '('
+ case 17559: // 'idiv' '('
+ case 17561: // 'import' '('
+ case 17562: // 'in' '('
+ case 17563: // 'index' '('
+ case 17567: // 'insert' '('
+ case 17568: // 'instance' '('
+ case 17569: // 'integrity' '('
+ case 17570: // 'intersect' '('
+ case 17571: // 'into' '('
+ case 17572: // 'is' '('
+ case 17575: // 'json-item' '('
+ case 17578: // 'last' '('
+ case 17579: // 'lax' '('
+ case 17580: // 'le' '('
+ case 17582: // 'let' '('
+ case 17584: // 'loop' '('
+ case 17586: // 'lt' '('
+ case 17588: // 'mod' '('
+ case 17589: // 'modify' '('
+ case 17590: // 'module' '('
+ case 17592: // 'namespace' '('
+ case 17594: // 'ne' '('
+ case 17600: // 'nodes' '('
+ case 17602: // 'object' '('
+ case 17606: // 'only' '('
+ case 17607: // 'option' '('
+ case 17608: // 'or' '('
+ case 17609: // 'order' '('
+ case 17610: // 'ordered' '('
+ case 17611: // 'ordering' '('
+ case 17614: // 'parent' '('
+ case 17620: // 'preceding' '('
+ case 17621: // 'preceding-sibling' '('
+ case 17626: // 'rename' '('
+ case 17627: // 'replace' '('
+ case 17628: // 'return' '('
+ case 17629: // 'returning' '('
+ case 17630: // 'revalidation' '('
+ case 17632: // 'satisfies' '('
+ case 17633: // 'schema' '('
+ case 17636: // 'score' '('
+ case 17637: // 'self' '('
+ case 17642: // 'sliding' '('
+ case 17643: // 'some' '('
+ case 17644: // 'stable' '('
+ case 17645: // 'start' '('
+ case 17648: // 'strict' '('
+ case 17656: // 'to' '('
+ case 17657: // 'treat' '('
+ case 17658: // 'try' '('
+ case 17659: // 'tumbling' '('
+ case 17660: // 'type' '('
+ case 17662: // 'union' '('
+ case 17664: // 'unordered' '('
+ case 17665: // 'updating' '('
+ case 17668: // 'validate' '('
+ case 17669: // 'value' '('
+ case 17670: // 'variable' '('
+ case 17671: // 'version' '('
+ case 17674: // 'where' '('
+ case 17675: // 'while' '('
+ case 17678: // 'with' '('
+ case 17682: // 'xquery' '('
+ try_FunctionCall();
+ break;
+ case 141514: // 'ordered' '{'
+ try_OrderedExpr();
+ break;
+ case 141568: // 'unordered' '{'
+ try_UnorderedExpr();
+ break;
+ case 32: // '%'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14918: // 'after' '#'
+ case 14920: // 'allowing' '#'
+ case 14921: // 'ancestor' '#'
+ case 14922: // 'ancestor-or-self' '#'
+ case 14923: // 'and' '#'
+ case 14926: // 'array' '#'
+ case 14927: // 'as' '#'
+ case 14928: // 'ascending' '#'
+ case 14929: // 'at' '#'
+ case 14930: // 'attribute' '#'
+ case 14931: // 'base-uri' '#'
+ case 14932: // 'before' '#'
+ case 14933: // 'boundary-space' '#'
+ case 14934: // 'break' '#'
+ case 14936: // 'case' '#'
+ case 14937: // 'cast' '#'
+ case 14938: // 'castable' '#'
+ case 14939: // 'catch' '#'
+ case 14941: // 'child' '#'
+ case 14942: // 'collation' '#'
+ case 14944: // 'comment' '#'
+ case 14945: // 'constraint' '#'
+ case 14946: // 'construction' '#'
+ case 14949: // 'context' '#'
+ case 14950: // 'continue' '#'
+ case 14951: // 'copy' '#'
+ case 14952: // 'copy-namespaces' '#'
+ case 14953: // 'count' '#'
+ case 14954: // 'decimal-format' '#'
+ case 14956: // 'declare' '#'
+ case 14957: // 'default' '#'
+ case 14958: // 'delete' '#'
+ case 14959: // 'descendant' '#'
+ case 14960: // 'descendant-or-self' '#'
+ case 14961: // 'descending' '#'
+ case 14966: // 'div' '#'
+ case 14967: // 'document' '#'
+ case 14969: // 'element' '#'
+ case 14970: // 'else' '#'
+ case 14971: // 'empty' '#'
+ case 14973: // 'encoding' '#'
+ case 14974: // 'end' '#'
+ case 14976: // 'eq' '#'
+ case 14977: // 'every' '#'
+ case 14979: // 'except' '#'
+ case 14980: // 'exit' '#'
+ case 14981: // 'external' '#'
+ case 14982: // 'first' '#'
+ case 14983: // 'following' '#'
+ case 14984: // 'following-sibling' '#'
+ case 14985: // 'for' '#'
+ case 14989: // 'ft-option' '#'
+ case 14994: // 'ge' '#'
+ case 14996: // 'group' '#'
+ case 14998: // 'gt' '#'
+ case 14999: // 'idiv' '#'
+ case 15001: // 'import' '#'
+ case 15002: // 'in' '#'
+ case 15003: // 'index' '#'
+ case 15007: // 'insert' '#'
+ case 15008: // 'instance' '#'
+ case 15009: // 'integrity' '#'
+ case 15010: // 'intersect' '#'
+ case 15011: // 'into' '#'
+ case 15012: // 'is' '#'
+ case 15015: // 'json-item' '#'
+ case 15018: // 'last' '#'
+ case 15019: // 'lax' '#'
+ case 15020: // 'le' '#'
+ case 15022: // 'let' '#'
+ case 15024: // 'loop' '#'
+ case 15026: // 'lt' '#'
+ case 15028: // 'mod' '#'
+ case 15029: // 'modify' '#'
+ case 15030: // 'module' '#'
+ case 15032: // 'namespace' '#'
+ case 15034: // 'ne' '#'
+ case 15040: // 'nodes' '#'
+ case 15042: // 'object' '#'
+ case 15046: // 'only' '#'
+ case 15047: // 'option' '#'
+ case 15048: // 'or' '#'
+ case 15049: // 'order' '#'
+ case 15050: // 'ordered' '#'
+ case 15051: // 'ordering' '#'
+ case 15054: // 'parent' '#'
+ case 15060: // 'preceding' '#'
+ case 15061: // 'preceding-sibling' '#'
+ case 15064: // 'processing-instruction' '#'
+ case 15066: // 'rename' '#'
+ case 15067: // 'replace' '#'
+ case 15068: // 'return' '#'
+ case 15069: // 'returning' '#'
+ case 15070: // 'revalidation' '#'
+ case 15072: // 'satisfies' '#'
+ case 15073: // 'schema' '#'
+ case 15076: // 'score' '#'
+ case 15077: // 'self' '#'
+ case 15082: // 'sliding' '#'
+ case 15083: // 'some' '#'
+ case 15084: // 'stable' '#'
+ case 15085: // 'start' '#'
+ case 15088: // 'strict' '#'
+ case 15092: // 'text' '#'
+ case 15096: // 'to' '#'
+ case 15097: // 'treat' '#'
+ case 15098: // 'try' '#'
+ case 15099: // 'tumbling' '#'
+ case 15100: // 'type' '#'
+ case 15102: // 'union' '#'
+ case 15104: // 'unordered' '#'
+ case 15105: // 'updating' '#'
+ case 15108: // 'validate' '#'
+ case 15109: // 'value' '#'
+ case 15110: // 'variable' '#'
+ case 15111: // 'version' '#'
+ case 15114: // 'where' '#'
+ case 15115: // 'while' '#'
+ case 15118: // 'with' '#'
+ case 15122: // 'xquery' '#'
+ try_FunctionItemExpr();
+ break;
+ case -10:
+ try_BlockExpr();
+ break;
+ case -11:
+ try_ObjectConstructor();
+ break;
+ case 68: // '['
+ try_ArrayConstructor();
+ break;
+ case 278: // '{|'
+ try_JSONSimpleObjectUnion();
+ break;
+ case -14:
+ break;
+ default:
+ try_Constructor();
+ }
+ }
+
+ function parse_JSONSimpleObjectUnion()
+ {
+ eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
+ shift(278); // '{|'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|}'
+ if (l1 != 281) // '|}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(281); // '|}'
+ eventHandler.endNonterminal("JSONSimpleObjectUnion", e0);
+ }
+
+ function try_JSONSimpleObjectUnion()
+ {
+ shiftT(278); // '{|'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '|}'
+ if (l1 != 281) // '|}'
+ {
+ try_Expr();
+ }
+ shiftT(281); // '|}'
+ }
+
+ function parse_ObjectConstructor()
+ {
+ eventHandler.startNonterminal("ObjectConstructor", e0);
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_PairConstructor();
+ }
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("ObjectConstructor", e0);
+ }
+
+ function try_ObjectConstructor()
+ {
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ if (l1 != 282) // '}'
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_PairConstructor();
+ }
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_PairConstructor()
+ {
+ eventHandler.startNonterminal("PairConstructor", e0);
+ parse_ExprSingle();
+ shift(49); // ':'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("PairConstructor", e0);
+ }
+
+ function try_PairConstructor()
+ {
+ try_ExprSingle();
+ shiftT(49); // ':'
+ lookahead1W(267); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ try_ExprSingle();
+ }
+
+ function parse_ArrayConstructor()
+ {
+ eventHandler.startNonterminal("ArrayConstructor", e0);
+ shift(68); // '['
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | ']' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 69) // ']'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(69); // ']'
+ eventHandler.endNonterminal("ArrayConstructor", e0);
+ }
+
+ function try_ArrayConstructor()
+ {
+ shiftT(68); // '['
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | ']' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|'
+ if (l1 != 69) // ']'
+ {
+ try_Expr();
+ }
+ shiftT(69); // ']'
+ }
+
+ function parse_BlockExpr()
+ {
+ eventHandler.startNonterminal("BlockExpr", e0);
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockExpr", e0);
+ }
+
+ function try_BlockExpr()
+ {
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ try_StatementsAndOptionalExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FunctionDecl()
+ {
+ eventHandler.startNonterminal("FunctionDecl", e0);
+ shift(145); // 'function'
+ lookahead1W(253); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(34); // '('
+ lookahead1W(94); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(37); // ')'
+ lookahead1W(148); // S^WS | '(:' | 'as' | 'external' | '{'
+ if (l1 == 79) // 'as'
+ {
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ // 'ancestor-or-self' | 'and' | 'array' | 'as' | 'ascending' | 'at' | 'attribute' |
+ // 'base-uri' | 'before' | 'boundary-space' | 'break' | 'case' | 'cast' |
+ // 'castable' | 'catch' | 'child' | 'collation' | 'comment' | 'constraint' |
+ // 'construction' | 'context' | 'continue' | 'copy' | 'copy-namespaces' | 'count' |
+ // 'decimal-format' | 'declare' | 'default' | 'delete' | 'descendant' |
+ // 'descendant-or-self' | 'descending' | 'div' | 'document' | 'document-node' |
+ // 'element' | 'else' | 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' |
+ // 'every' | 'except' | 'exit' | 'external' | 'first' | 'following' |
+ // 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' | 'group' | 'gt' |
+ // 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' | 'instance' | 'integrity' |
+ // 'intersect' | 'into' | 'is' | 'item' | 'json-item' | 'last' | 'lax' | 'le' |
+ // 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' | 'namespace' |
+ // 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'structured-item' | 'switch' | 'text' | 'to' |
+ // 'treat' | 'try' | 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' |
+ // 'updating' | 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' |
+ // 'with' | 'xquery'
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(118); // S^WS | '(:' | 'external' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // StringLiteral | S^WS | '$' | '%' | '(' | '(#' | '(:' | '+' | '-' | '.' | '..' |
+ // '/' | '//' | '<' | '<!--' | '<?' | '@' | '[' | 'after' | 'allowing' |
+ // 'ancestor' | 'ancestor-or-self' | 'and' | 'append' | 'array' | 'as' |
+ // 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' |
+ // 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' |
+ // 'comment' | 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'json-item' |
+ // 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'object' | 'only' |
+ // 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '{|' | '}'
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ break;
+ default:
+ shift(133); // 'external'
+ }
+ eventHandler.endNonterminal("FunctionDecl", e0);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var eventHandler;
+ var memo;
+
+ function memoize(i, e, v)
+ {
+ memo[(e << 4) + i] = v;
+ }
+
+ function memoized(i, e)
+ {
+ var v = memo[(e << 4) + i];
+ return typeof v != "undefined" ? v : 0;
+ }
+
+ function error(b, e, s, l, t)
+ {
+ if (e > ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new self.ParseException(bx, ex, sx, lx, tx);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(XQueryParser.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function shiftT(t)
+ {
+ if (l1 == t)
+ {
+ b0 = b1; e0 = e1; l1 = l2; if (l1 != 0) {
+ b1 = b2; e1 = e2; l2 = 0; }
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function skip(code)
+ {
+ var b0W = b0; var e0W = e0; var l1W = l1;
+ var b1W = b1; var e1W = e1;
+
+ l1 = code; b1 = begin; e1 = end;
+ l2 = 0;
+
+ try_Whitespace();
+
+ b0 = b0W; e0 = e0W; l1 = l1W; if (l1 != 0) {
+ b1 = b1W; e1 = e1W; }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 22) // S^WS
+ {
+ if (code != 36) // '(:'
+ {
+ break;
+ }
+ skip(code);
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2W(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = matchW(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead2(set)
+ {
+ if (l2 == 0)
+ {
+ l2 = match(set);
+ b2 = begin;
+ e2 = end;
+ }
+ lk = (l2 << 9) | l1;
+ }
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryParser.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = XQueryParser.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = XQueryParser.MAP1[(c0 & 15) + XQueryParser.MAP1[(c1 & 31) + XQueryParser.MAP1[c1 >> 5]]];
+ }
+ else
+ {
+ if (c0 < 0xdc00)
+ {
+ var c1 = current < size ? input.charCodeAt(current) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000)
+ {
+ ++current;
+ c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000;
+ nonbmp = true;
+ }
+ }
+ var lo = 0, hi = 5;
+ for (var m = 3; ; m = (hi + lo) >> 1)
+ {
+ if (XQueryParser.MAP2[m] > c0) hi = m - 1;
+ else if (XQueryParser.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = XQueryParser.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = XQueryParser.TRANSITION[(i0 & 15) + XQueryParser.TRANSITION[i0 >> 4]];
+
+ if (code > 4095)
+ {
+ result = code;
+ code &= 4095;
+ end = current;
+ }
+ }
+
+ result >>= 12;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ return error(begin, end, state, -1, -1);
+ }
+
+ if (nonbmp)
+ {
+ for (var i = result >> 9; i > 0; --i)
+ {
+ --end;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ }
+ }
+ else
+ {
+ end -= result >> 9;
+ }
+
+ return (result & 511) - 1;
+ }
+}
+
+XQueryParser.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 284; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 3684 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = XQueryParser.EXPECTED[(i0 & 3) + XQueryParser.EXPECTED[(i1 & 3) + XQueryParser.EXPECTED[(i2 & 7) + XQueryParser.EXPECTED[i2 >> 3]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(XQueryParser.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+XQueryParser.MAP0 =
+[
+ /* 0 */ 70, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4,
+ /* 36 */ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23,
+ /* 64 */ 24, 25, 26, 27, 28, 29, 26, 30, 30, 30, 30, 30, 31, 32, 33, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30,
+ /* 91 */ 37, 38, 39, 38, 30, 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ /* 118 */ 61, 62, 63, 64, 65, 66, 67, 68, 38, 38
+];
+
+XQueryParser.MAP1 =
+[
+ /* 0 */ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181,
+ /* 21 */ 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 42 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 63 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 84 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 105 */ 214, 214, 214, 247, 261, 277, 293, 309, 355, 371, 387, 423, 423, 423, 415, 339, 331, 339, 331, 339, 339,
+ /* 126 */ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 440, 440, 440, 440, 440, 440, 440,
+ /* 147 */ 324, 339, 339, 339, 339, 339, 339, 339, 339, 401, 423, 423, 424, 422, 423, 423, 339, 339, 339, 339, 339,
+ /* 168 */ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 423, 423, 423, 423, 423, 423, 423,
+ /* 189 */ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423,
+ /* 210 */ 423, 423, 423, 338, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339,
+ /* 231 */ 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 339, 423, 70, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 256 */ 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ /* 290 */ 14, 15, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 26, 30,
+ /* 317 */ 30, 30, 30, 30, 31, 32, 33, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 38, 30, 30, 30, 30, 30,
+ /* 344 */ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 34, 30, 30, 35, 30, 30, 30, 36, 30, 30, 37, 38, 39, 38, 30,
+ /* 371 */ 38, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ /* 398 */ 66, 67, 68, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 30, 30, 38, 38, 38, 38, 38, 38, 38, 69, 38, 38,
+ /* 425 */ 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
+ /* 452 */ 69, 69, 69, 69
+];
+
+XQueryParser.MAP2 =
+[
+ /* 0 */ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 38, 30, 38, 30, 30,
+ /* 17 */ 38
+];
+
+XQueryParser.INITIAL =
+[
+ /* 0 */ 1, 12290, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
+ /* 28 */ 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ /* 55 */ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82,
+ /* 82 */ 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
+ /* 107 */ 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+ /* 128 */ 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
+ /* 149 */ 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170,
+ /* 170 */ 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ /* 191 */ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ /* 212 */ 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
+ /* 233 */ 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
+ /* 254 */ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275,
+ /* 275 */ 276, 277, 278, 279, 280, 281, 282, 283, 284
+];
+
+XQueryParser.TRANSITION =
+[
+ /* 0 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 30 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 45 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 60 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 75 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 90 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 105 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 120 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 135 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 150 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 165 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 180 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 195 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 210 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 225 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 240 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 255 */ 23546, 22007, 18176, 18196, 18196, 18196, 18203, 18196, 18196, 18196, 18196, 18230, 18196, 18196, 18196,
+ /* 270 */ 18196, 18219, 18196, 18180, 18246, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546,
+ /* 285 */ 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327,
+ /* 300 */ 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544,
+ /* 315 */ 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582,
+ /* 330 */ 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766,
+ /* 345 */ 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814,
+ /* 360 */ 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127,
+ /* 375 */ 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150,
+ /* 390 */ 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749,
+ /* 405 */ 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692,
+ /* 420 */ 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825,
+ /* 435 */ 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113,
+ /* 450 */ 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127,
+ /* 465 */ 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632,
+ /* 480 */ 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 495 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 510 */ 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 18411, 20907,
+ /* 525 */ 20920, 20932, 20944, 22539, 18416, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 37625, 23546,
+ /* 540 */ 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 21008, 21032, 18282, 18849, 18305,
+ /* 555 */ 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521,
+ /* 570 */ 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546,
+ /* 585 */ 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745,
+ /* 600 */ 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628,
+ /* 615 */ 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090,
+ /* 630 */ 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278,
+ /* 645 */ 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472,
+ /* 660 */ 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452,
+ /* 675 */ 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798,
+ /* 690 */ 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090,
+ /* 705 */ 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392,
+ /* 720 */ 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616,
+ /* 735 */ 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 750 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 765 */ 23546, 23546, 23546, 21632, 21055, 23546, 23546, 23546, 21178, 23546, 23546, 23916, 42362, 21241, 23546,
+ /* 780 */ 23546, 23546, 23546, 19298, 47203, 21077, 21110, 23546, 23546, 23546, 35799, 23546, 23546, 21194, 23546,
+ /* 795 */ 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 21229, 18282, 18849,
+ /* 810 */ 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670,
+ /* 825 */ 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546,
+ /* 840 */ 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048,
+ /* 855 */ 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830,
+ /* 870 */ 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072,
+ /* 885 */ 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246,
+ /* 900 */ 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716,
+ /* 915 */ 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402,
+ /* 930 */ 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201,
+ /* 945 */ 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067,
+ /* 960 */ 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376,
+ /* 975 */ 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577,
+ /* 990 */ 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 1005 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 1020 */ 23546, 23546, 23546, 23546, 21358, 21323, 23546, 23546, 23546, 26152, 23546, 23546, 27593, 23546, 21369,
+ /* 1035 */ 29482, 21257, 21282, 21273, 21304, 21317, 21346, 20967, 23546, 23546, 23546, 28947, 23546, 23546, 21385,
+ /* 1050 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 20711, 21423,
+ /* 1065 */ 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495,
+ /* 1080 */ 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546,
+ /* 1095 */ 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 21446,
+ /* 1110 */ 26048, 18745, 18766, 18771, 20561, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808,
+ /* 1125 */ 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054,
+ /* 1140 */ 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225,
+ /* 1155 */ 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451,
+ /* 1170 */ 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797,
+ /* 1185 */ 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942,
+ /* 1200 */ 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042,
+ /* 1215 */ 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301,
+ /* 1230 */ 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555,
+ /* 1245 */ 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546,
+ /* 1260 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 1275 */ 23546, 23546, 23546, 23546, 23546, 21089, 23540, 23546, 23546, 23546, 25880, 23545, 23546, 31245, 23546,
+ /* 1290 */ 21468, 23534, 21504, 23546, 21511, 23546, 21527, 21539, 20967, 23546, 23546, 23546, 35799, 23546, 23546,
+ /* 1305 */ 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723,
+ /* 1320 */ 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968,
+ /* 1335 */ 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606,
+ /* 1350 */ 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377,
+ /* 1365 */ 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792,
+ /* 1380 */ 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036,
+ /* 1395 */ 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171,
+ /* 1410 */ 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498,
+ /* 1425 */ 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190,
+ /* 1440 */ 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782,
+ /* 1455 */ 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827,
+ /* 1470 */ 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143,
+ /* 1485 */ 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641,
+ /* 1500 */ 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546,
+ /* 1515 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 1530 */ 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 21567, 23546, 23546,
+ /* 1545 */ 23546, 31874, 23546, 23546, 21586, 23546, 23546, 21608, 21620, 20967, 23546, 23546, 23546, 35799, 23546,
+ /* 1560 */ 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660,
+ /* 1575 */ 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479,
+ /* 1590 */ 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546,
+ /* 1605 */ 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208,
+ /* 1620 */ 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546,
+ /* 1635 */ 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984,
+ /* 1650 */ 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137,
+ /* 1665 */ 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754,
+ /* 1680 */ 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657,
+ /* 1695 */ 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094,
+ /* 1710 */ 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679,
+ /* 1725 */ 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274,
+ /* 1740 */ 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515,
+ /* 1755 */ 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546,
+ /* 1770 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 1785 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546,
+ /* 1800 */ 23546, 23546, 35211, 23546, 23546, 23546, 23546, 23546, 23546, 23424, 21648, 23546, 23546, 23546, 35799,
+ /* 1815 */ 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639,
+ /* 1830 */ 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463,
+ /* 1845 */ 18479, 18968, 18495, 19670, 21681, 18544, 18567, 18590, 50977, 18528, 18551, 18574, 18597, 20868, 18620,
+ /* 1860 */ 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505,
+ /* 1875 */ 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674,
+ /* 1890 */ 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051,
+ /* 1905 */ 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396,
+ /* 1920 */ 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477,
+ /* 1935 */ 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632,
+ /* 1950 */ 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746,
+ /* 1965 */ 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016,
+ /* 1980 */ 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139,
+ /* 1995 */ 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489,
+ /* 2010 */ 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546,
+ /* 2025 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 2040 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21736, 21705, 23546, 23546, 23546, 44539, 23546,
+ /* 2055 */ 23546, 24265, 25689, 25607, 23546, 23546, 23546, 23546, 26450, 47502, 21724, 21752, 23546, 23546, 23546,
+ /* 2070 */ 35799, 23546, 23546, 21783, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926,
+ /* 2085 */ 50639, 20660, 20237, 21819, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458,
+ /* 2100 */ 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868,
+ /* 2115 */ 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024,
+ /* 2130 */ 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839,
+ /* 2145 */ 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011,
+ /* 2160 */ 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668,
+ /* 2175 */ 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721,
+ /* 2190 */ 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592,
+ /* 2205 */ 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492,
+ /* 2220 */ 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842,
+ /* 2235 */ 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222,
+ /* 2250 */ 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037,
+ /* 2265 */ 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546,
+ /* 2280 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 2295 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21551, 21857, 21913, 21913, 21913, 21864,
+ /* 2310 */ 21908, 21913, 21918, 21967, 21842, 21949, 21880, 21961, 21896, 21934, 21983, 21995, 20967, 23546, 23546,
+ /* 2325 */ 23546, 26225, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639,
+ /* 2340 */ 19926, 50639, 20660, 19723, 18282, 18849, 18305, 22023, 23546, 23546, 18368, 23546, 18915, 18388, 18432,
+ /* 2355 */ 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597,
+ /* 2370 */ 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209,
+ /* 2385 */ 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776,
+ /* 2400 */ 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812,
+ /* 2415 */ 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604,
+ /* 2430 */ 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456,
+ /* 2445 */ 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574,
+ /* 2460 */ 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853,
+ /* 2475 */ 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977,
+ /* 2490 */ 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206,
+ /* 2505 */ 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258,
+ /* 2520 */ 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884,
+ /* 2535 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 2550 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 28636, 23546, 23546, 23546,
+ /* 2565 */ 25912, 50946, 23546, 50080, 50952, 21369, 28635, 23546, 22054, 22060, 22076, 22111, 22121, 22137, 23546,
+ /* 2580 */ 23546, 23546, 30755, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208,
+ /* 2595 */ 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 22183, 23546, 23546, 18368, 23546, 18915, 18388,
+ /* 2610 */ 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574,
+ /* 2625 */ 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695,
+ /* 2640 */ 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639,
+ /* 2655 */ 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958,
+ /* 2670 */ 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129,
+ /* 2685 */ 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422,
+ /* 2700 */ 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717,
+ /* 2715 */ 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432,
+ /* 2730 */ 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980,
+ /* 2745 */ 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175,
+ /* 2760 */ 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729,
+ /* 2775 */ 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858,
+ /* 2790 */ 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 2805 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 27655, 23546, 23546,
+ /* 2820 */ 23546, 25841, 23546, 23546, 23546, 51066, 39748, 22869, 22242, 22228, 22245, 22261, 22277, 22288, 20967,
+ /* 2835 */ 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629,
+ /* 2850 */ 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915,
+ /* 2865 */ 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 20285, 18528, 18551,
+ /* 2880 */ 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036,
+ /* 2895 */ 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750,
+ /* 2910 */ 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937,
+ /* 2925 */ 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092,
+ /* 2940 */ 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380,
+ /* 2955 */ 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554,
+ /* 2970 */ 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708,
+ /* 2985 */ 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905,
+ /* 3000 */ 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159,
+ /* 3015 */ 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639,
+ /* 3030 */ 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782,
+ /* 3045 */ 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3060 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546,
+ /* 3075 */ 23546, 23546, 25841, 23546, 23546, 23546, 18648, 40763, 24585, 22304, 22324, 22304, 22338, 24585, 22308,
+ /* 3090 */ 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3105 */ 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 22361, 23546,
+ /* 3120 */ 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528,
+ /* 3135 */ 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664,
+ /* 3150 */ 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053,
+ /* 3165 */ 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885,
+ /* 3180 */ 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074,
+ /* 3195 */ 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186,
+ /* 3210 */ 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900,
+ /* 3225 */ 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692,
+ /* 3240 */ 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883,
+ /* 3255 */ 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446,
+ /* 3270 */ 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380,
+ /* 3285 */ 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743,
+ /* 3300 */ 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3315 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 22386,
+ /* 3330 */ 23546, 23546, 23546, 25841, 18403, 23546, 19576, 22382, 44281, 22402, 22429, 22434, 22434, 22450, 22385,
+ /* 3345 */ 22413, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3360 */ 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368,
+ /* 3375 */ 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663,
+ /* 3390 */ 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546,
+ /* 3405 */ 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639,
+ /* 3420 */ 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195,
+ /* 3435 */ 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056,
+ /* 3450 */ 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667,
+ /* 3465 */ 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530,
+ /* 3480 */ 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452,
+ /* 3495 */ 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950,
+ /* 3510 */ 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129,
+ /* 3525 */ 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462,
+ /* 3540 */ 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727,
+ /* 3555 */ 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3570 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22473,
+ /* 3585 */ 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546, 21369, 25653, 22498, 22518, 22498, 22532,
+ /* 3600 */ 25653, 22502, 22555, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546,
+ /* 3615 */ 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27132, 23546, 42897, 23546, 44844, 38626, 22584,
+ /* 3630 */ 22361, 37471, 23546, 23546, 23546, 23546, 22587, 47563, 46856, 47563, 47563, 22603, 35356, 22824, 22824,
+ /* 3645 */ 34828, 22804, 22621, 22804, 22804, 33187, 36943, 23546, 23546, 23546, 23546, 23546, 26071, 23546, 22641,
+ /* 3660 */ 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439,
+ /* 3675 */ 22804, 22804, 22804, 22804, 22804, 29885, 33201, 43701, 32739, 23546, 23546, 23546, 23546, 23546, 29474,
+ /* 3690 */ 22702, 23546, 33124, 44563, 47563, 47563, 47563, 47564, 22719, 35350, 22824, 22764, 22824, 22767, 35689,
+ /* 3705 */ 22783, 22804, 22803, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 27587, 23546, 23546, 47562,
+ /* 3720 */ 46826, 47563, 47563, 27195, 22821, 42846, 22824, 22824, 22824, 30376, 22804, 22841, 22804, 22804, 29883,
+ /* 3735 */ 33199, 23546, 23546, 21430, 23546, 49502, 48973, 47563, 47563, 36153, 45209, 22824, 22824, 39816, 27834,
+ /* 3750 */ 22804, 22804, 43796, 30403, 39964, 23546, 23546, 22861, 23546, 47560, 22885, 47563, 23113, 22903, 22824,
+ /* 3765 */ 33078, 22920, 22804, 38116, 23546, 23546, 22937, 29174, 22980, 47563, 34384, 42527, 22825, 23019, 22804,
+ /* 3780 */ 31964, 47447, 46606, 23083, 36624, 23105, 32340, 30673, 23131, 36549, 23164, 40907, 43074, 23200, 23229,
+ /* 3795 */ 23275, 36645, 36686, 33550, 48975, 23107, 30672, 23141, 39417, 23313, 23334, 47559, 33030, 33552, 39426,
+ /* 3810 */ 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3825 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3840 */ 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 24855, 21369, 23546, 23546, 23546, 23546,
+ /* 3855 */ 23546, 20980, 20992, 23383, 23546, 23546, 23546, 35799, 23546, 23546, 23420, 23546, 23546, 23546, 23546,
+ /* 3870 */ 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 23440, 27132, 23546, 23546, 23546, 44844, 23546,
+ /* 3885 */ 23546, 18368, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 22603, 22824, 22824,
+ /* 3900 */ 22824, 34828, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 26071, 23546,
+ /* 3915 */ 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824,
+ /* 3930 */ 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3945 */ 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767,
+ /* 3960 */ 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 3975 */ 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804,
+ /* 3990 */ 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824,
+ /* 4005 */ 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824,
+ /* 4020 */ 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804,
+ /* 4035 */ 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673,
+ /* 4050 */ 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552,
+ /* 4065 */ 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4080 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4095 */ 23546, 21089, 23485, 23546, 23546, 23546, 26606, 23546, 23546, 23546, 23546, 21369, 28080, 23505, 23528,
+ /* 4110 */ 23563, 23575, 28081, 23512, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042, 30821, 23546, 37478,
+ /* 4125 */ 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327,
+ /* 4140 */ 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544,
+ /* 4155 */ 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582,
+ /* 4170 */ 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766,
+ /* 4185 */ 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814,
+ /* 4200 */ 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127,
+ /* 4215 */ 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150,
+ /* 4230 */ 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749,
+ /* 4245 */ 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692,
+ /* 4260 */ 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825,
+ /* 4275 */ 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113,
+ /* 4290 */ 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127,
+ /* 4305 */ 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632,
+ /* 4320 */ 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4335 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4350 */ 23546, 23546, 21089, 23598, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23184, 21369, 23546, 23546,
+ /* 4365 */ 23546, 23546, 23546, 22653, 22665, 23615, 23546, 23546, 23546, 35799, 23546, 23546, 23644, 23546, 23546,
+ /* 4380 */ 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 23664, 27132, 23546, 23546, 23546,
+ /* 4395 */ 44844, 23546, 23546, 23688, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 22603,
+ /* 4410 */ 22824, 22824, 22824, 34828, 22804, 22804, 22804, 22804, 39677, 48779, 23733, 23546, 23546, 23546, 23546,
+ /* 4425 */ 34921, 23753, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824,
+ /* 4440 */ 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 23777, 48792, 23546, 23546, 23546, 23546,
+ /* 4455 */ 23546, 50620, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 41753, 22821, 22824, 22824, 22824,
+ /* 4470 */ 22824, 44122, 35849, 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546,
+ /* 4485 */ 23546, 23546, 47562, 47563, 47563, 47563, 34866, 22821, 22824, 22824, 22824, 22824, 23826, 22804, 22804,
+ /* 4500 */ 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824,
+ /* 4515 */ 22824, 22824, 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563,
+ /* 4530 */ 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824,
+ /* 4545 */ 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561,
+ /* 4560 */ 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559,
+ /* 4575 */ 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4590 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4605 */ 23546, 23546, 23546, 21089, 39721, 23546, 23546, 23546, 30797, 25982, 23546, 23546, 23849, 21369, 20313,
+ /* 4620 */ 44188, 23887, 23893, 23909, 23546, 49114, 23932, 23546, 23546, 23546, 36603, 23546, 23546, 51042, 23546,
+ /* 4635 */ 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 24187, 24465, 24820, 25200, 24258, 18282, 18849,
+ /* 4650 */ 18305, 23964, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495, 19670,
+ /* 4665 */ 23993, 24116, 24017, 24046, 24001, 24088, 25090, 24132, 24812, 24103, 24159, 23546, 30606, 23546, 23546,
+ /* 4680 */ 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 24182, 25436,
+ /* 4695 */ 24884, 24206, 24190, 24890, 24819, 24363, 24227, 24819, 24414, 24143, 25214, 23546, 18792, 18808, 18830,
+ /* 4710 */ 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 24243, 24030, 25425,
+ /* 4725 */ 24281, 24706, 24308, 24337, 24350, 24389, 24405, 24517, 24423, 25208, 23396, 19137, 19171, 19225, 39246,
+ /* 4740 */ 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 24439, 19364, 24455, 25063, 24489, 24505, 24533,
+ /* 4755 */ 25266, 24373, 24545, 24561, 24577, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797, 19809,
+ /* 4770 */ 24679, 24601, 25048, 19406, 24473, 24617, 25251, 25017, 24736, 26492, 19746, 41094, 19782, 18942, 19201,
+ /* 4785 */ 19798, 24633, 24673, 24695, 24722, 24779, 24801, 24836, 23977, 20842, 20016, 18679, 20827, 20042, 24871,
+ /* 4800 */ 24906, 24935, 24951, 25006, 25411, 25295, 20159, 20175, 20206, 25033, 24292, 25079, 25281, 25106, 20376,
+ /* 4815 */ 20392, 19394, 24919, 24657, 20462, 19676, 24211, 24785, 32258, 19353, 24647, 24966, 20473, 24060, 25136,
+ /* 4830 */ 20616, 25172, 25188, 25236, 24072, 25311, 25362, 25396, 25452, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4845 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 4860 */ 23546, 23546, 23546, 23546, 21089, 21328, 23546, 23546, 23546, 25841, 25477, 23546, 23546, 25472, 32915,
+ /* 4875 */ 25493, 25501, 25501, 25501, 25517, 21330, 25540, 20967, 23546, 23546, 23546, 35799, 23546, 23546, 51042,
+ /* 4890 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 19723, 18282,
+ /* 4905 */ 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968, 18495,
+ /* 4920 */ 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606, 23546,
+ /* 4935 */ 23546, 23546, 23582, 25581, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377, 18724,
+ /* 4950 */ 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20499, 25597, 18792, 18808,
+ /* 4965 */ 18830, 23628, 18814, 25623, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036, 19054,
+ /* 4980 */ 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 21016, 25645, 19137, 19171, 19225,
+ /* 4995 */ 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 25669, 25705, 25721, 19477, 25754, 19498, 25737,
+ /* 5010 */ 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190, 20797,
+ /* 5025 */ 18708, 21452, 19692, 19708, 20143, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782, 18942,
+ /* 5040 */ 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827, 20042,
+ /* 5055 */ 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143, 20301,
+ /* 5070 */ 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641, 20555,
+ /* 5085 */ 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546, 23546,
+ /* 5100 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 5115 */ 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546, 23546, 23546,
+ /* 5130 */ 50535, 23259, 25770, 25770, 25770, 25779, 21123, 21135, 20967, 23546, 23546, 23546, 35799, 23546, 23546,
+ /* 5145 */ 51042, 23546, 23546, 25220, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660, 25802,
+ /* 5160 */ 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479, 18968,
+ /* 5175 */ 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546, 30606,
+ /* 5190 */ 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208, 25377,
+ /* 5205 */ 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546, 18792,
+ /* 5220 */ 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984, 19036,
+ /* 5235 */ 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137, 19171,
+ /* 5250 */ 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754, 19498,
+ /* 5265 */ 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657, 20190,
+ /* 5280 */ 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094, 19782,
+ /* 5295 */ 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679, 20827,
+ /* 5310 */ 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274, 51143,
+ /* 5325 */ 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515, 19641,
+ /* 5340 */ 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546, 23546,
+ /* 5355 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 5370 */ 23546, 23546, 23546, 23546, 23546, 23546, 21147, 20888, 23546, 23546, 23546, 25841, 23546, 23546, 23546,
+ /* 5385 */ 23546, 21369, 22959, 25825, 25825, 25825, 25834, 20891, 22964, 25857, 23546, 23546, 23546, 35799, 23546,
+ /* 5400 */ 23546, 51042, 23546, 23546, 27140, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639, 20660,
+ /* 5415 */ 25873, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479,
+ /* 5430 */ 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620, 23546,
+ /* 5445 */ 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208,
+ /* 5460 */ 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546,
+ /* 5475 */ 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984,
+ /* 5490 */ 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137,
+ /* 5505 */ 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754,
+ /* 5520 */ 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657,
+ /* 5535 */ 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094,
+ /* 5550 */ 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679,
+ /* 5565 */ 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274,
+ /* 5580 */ 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515,
+ /* 5595 */ 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546,
+ /* 5610 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 5625 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25552, 25561, 23546, 23546, 23546, 26852, 23546, 23546,
+ /* 5640 */ 23546, 23546, 21369, 33245, 25896, 25896, 25896, 25905, 36950, 33250, 25928, 23546, 23546, 23546, 35799,
+ /* 5655 */ 23546, 23546, 51042, 23546, 23546, 22366, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639,
+ /* 5670 */ 20660, 25964, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463,
+ /* 5685 */ 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620,
+ /* 5700 */ 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505,
+ /* 5715 */ 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674,
+ /* 5730 */ 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051,
+ /* 5745 */ 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396,
+ /* 5760 */ 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477,
+ /* 5775 */ 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632,
+ /* 5790 */ 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746,
+ /* 5805 */ 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016,
+ /* 5820 */ 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139,
+ /* 5835 */ 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 25998, 25380, 50639, 18729, 32258, 26037, 20489,
+ /* 5850 */ 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546,
+ /* 5865 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 5880 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 26099, 23546, 23546, 23546, 23546, 25841, 21661,
+ /* 5895 */ 23546, 23546, 21094, 43925, 23546, 23546, 23546, 21665, 26069, 21092, 26087, 20967, 23546, 23546, 23546,
+ /* 5910 */ 35799, 23546, 23546, 51042, 31389, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926,
+ /* 5925 */ 50639, 26115, 26145, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458,
+ /* 5940 */ 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868,
+ /* 5955 */ 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024,
+ /* 5970 */ 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839,
+ /* 5985 */ 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011,
+ /* 6000 */ 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668,
+ /* 6015 */ 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721,
+ /* 6030 */ 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592,
+ /* 6045 */ 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492,
+ /* 6060 */ 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842,
+ /* 6075 */ 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222,
+ /* 6090 */ 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037,
+ /* 6105 */ 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546,
+ /* 6120 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6135 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841,
+ /* 6150 */ 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 43987, 26168, 20967, 23546, 23546,
+ /* 6165 */ 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639,
+ /* 6180 */ 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432,
+ /* 6195 */ 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597,
+ /* 6210 */ 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209,
+ /* 6225 */ 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776,
+ /* 6240 */ 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812,
+ /* 6255 */ 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604,
+ /* 6270 */ 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456,
+ /* 6285 */ 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574,
+ /* 6300 */ 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853,
+ /* 6315 */ 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977,
+ /* 6330 */ 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206,
+ /* 6345 */ 20222, 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258,
+ /* 6360 */ 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884,
+ /* 6375 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6390 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546,
+ /* 6405 */ 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546,
+ /* 6420 */ 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563,
+ /* 6435 */ 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6450 */ 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804,
+ /* 6465 */ 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546, 48975,
+ /* 6480 */ 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804,
+ /* 6495 */ 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976, 47563,
+ /* 6510 */ 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804,
+ /* 6525 */ 29879, 23672, 23807, 23546, 23546, 23546, 23546, 26285, 23546, 23546, 47562, 47563, 47563, 47563, 29369,
+ /* 6540 */ 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546,
+ /* 6555 */ 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804, 30403,
+ /* 6570 */ 47447, 23546, 23546, 26302, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970,
+ /* 6585 */ 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585,
+ /* 6600 */ 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550,
+ /* 6615 */ 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351,
+ /* 6630 */ 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6645 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546,
+ /* 6660 */ 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204,
+ /* 6675 */ 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973,
+ /* 6690 */ 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546,
+ /* 6705 */ 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804,
+ /* 6720 */ 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546, 23546, 23546,
+ /* 6735 */ 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804,
+ /* 6750 */ 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976,
+ /* 6765 */ 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804,
+ /* 6780 */ 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563,
+ /* 6795 */ 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546,
+ /* 6810 */ 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804,
+ /* 6825 */ 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804,
+ /* 6840 */ 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606,
+ /* 6855 */ 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031,
+ /* 6870 */ 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448,
+ /* 6885 */ 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6900 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546,
+ /* 6915 */ 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077,
+ /* 6930 */ 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 6945 */ 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546,
+ /* 6960 */ 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804,
+ /* 6975 */ 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 26321, 23546, 23546,
+ /* 6990 */ 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804,
+ /* 7005 */ 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546,
+ /* 7020 */ 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804,
+ /* 7035 */ 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563,
+ /* 7050 */ 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199, 23546,
+ /* 7065 */ 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804,
+ /* 7080 */ 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804,
+ /* 7095 */ 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447,
+ /* 7110 */ 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759,
+ /* 7125 */ 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729,
+ /* 7140 */ 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7155 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546,
+ /* 7170 */ 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432,
+ /* 7185 */ 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7200 */ 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546,
+ /* 7215 */ 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762,
+ /* 7230 */ 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546, 23546,
+ /* 7245 */ 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804,
+ /* 7260 */ 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 19867, 23546, 23546,
+ /* 7275 */ 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804,
+ /* 7290 */ 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563,
+ /* 7305 */ 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883, 33199,
+ /* 7320 */ 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804,
+ /* 7335 */ 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078,
+ /* 7350 */ 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964,
+ /* 7365 */ 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464,
+ /* 7380 */ 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307,
+ /* 7395 */ 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7410 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677,
+ /* 7425 */ 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262,
+ /* 7440 */ 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 26341, 23546, 23546, 23546, 23546, 23546,
+ /* 7455 */ 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546,
+ /* 7470 */ 26341, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824,
+ /* 7485 */ 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621, 23546,
+ /* 7500 */ 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439,
+ /* 7515 */ 22804, 22804, 22804, 22804, 22804, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546,
+ /* 7530 */ 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849,
+ /* 7545 */ 22804, 22804, 22804, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562,
+ /* 7560 */ 47563, 47563, 47563, 29369, 22821, 22824, 22824, 22824, 22824, 28821, 22804, 22804, 22804, 22804, 29883,
+ /* 7575 */ 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433,
+ /* 7590 */ 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824,
+ /* 7605 */ 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804,
+ /* 7620 */ 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296,
+ /* 7635 */ 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426,
+ /* 7650 */ 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7665 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7680 */ 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546,
+ /* 7695 */ 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7710 */ 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546, 44844, 23546,
+ /* 7725 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824,
+ /* 7740 */ 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7755 */ 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824,
+ /* 7770 */ 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7785 */ 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767,
+ /* 7800 */ 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7815 */ 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804,
+ /* 7830 */ 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824,
+ /* 7845 */ 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824,
+ /* 7860 */ 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804,
+ /* 7875 */ 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673,
+ /* 7890 */ 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552,
+ /* 7905 */ 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7920 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7935 */ 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546,
+ /* 7950 */ 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 7965 */ 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 23049, 23546, 23546, 23546, 44844,
+ /* 7980 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824,
+ /* 7995 */ 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8010 */ 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824,
+ /* 8025 */ 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8040 */ 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824,
+ /* 8055 */ 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8070 */ 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804,
+ /* 8085 */ 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824,
+ /* 8100 */ 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113,
+ /* 8115 */ 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825,
+ /* 8130 */ 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111,
+ /* 8145 */ 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030,
+ /* 8160 */ 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8175 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8190 */ 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546,
+ /* 8205 */ 23546, 23546, 19262, 39432, 32077, 26364, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546,
+ /* 8220 */ 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546, 23546,
+ /* 8235 */ 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418,
+ /* 8250 */ 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546,
+ /* 8265 */ 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824,
+ /* 8280 */ 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546,
+ /* 8295 */ 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824,
+ /* 8310 */ 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8325 */ 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804,
+ /* 8340 */ 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824,
+ /* 8355 */ 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563,
+ /* 8370 */ 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824,
+ /* 8385 */ 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561,
+ /* 8400 */ 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559,
+ /* 8415 */ 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8430 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8445 */ 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 19293,
+ /* 8460 */ 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546,
+ /* 8475 */ 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546, 23546,
+ /* 8490 */ 23546, 44844, 23546, 23546, 23546, 31312, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563,
+ /* 8505 */ 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546,
+ /* 8520 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824,
+ /* 8535 */ 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546,
+ /* 8550 */ 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824,
+ /* 8565 */ 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546,
+ /* 8580 */ 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804,
+ /* 8595 */ 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209,
+ /* 8610 */ 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563,
+ /* 8625 */ 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109,
+ /* 8640 */ 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609,
+ /* 8655 */ 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551,
+ /* 8670 */ 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8685 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8700 */ 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369,
+ /* 8715 */ 23546, 23546, 23546, 23546, 37937, 26399, 26410, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546,
+ /* 8730 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546,
+ /* 8745 */ 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563,
+ /* 8760 */ 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546,
+ /* 8775 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823,
+ /* 8790 */ 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546,
+ /* 8805 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824,
+ /* 8820 */ 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546,
+ /* 8835 */ 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376,
+ /* 8850 */ 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563,
+ /* 8865 */ 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560,
+ /* 8880 */ 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563,
+ /* 8895 */ 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549,
+ /* 8910 */ 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030,
+ /* 8925 */ 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546,
+ /* 8940 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 8955 */ 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546,
+ /* 8970 */ 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546,
+ /* 8985 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800,
+ /* 9000 */ 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563,
+ /* 9015 */ 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546,
+ /* 9030 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135,
+ /* 9045 */ 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546,
+ /* 9060 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821,
+ /* 9075 */ 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546,
+ /* 9090 */ 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824,
+ /* 9105 */ 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 26426, 23546, 48973, 47563, 47563,
+ /* 9120 */ 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546,
+ /* 9135 */ 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563,
+ /* 9150 */ 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804,
+ /* 9165 */ 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756,
+ /* 9180 */ 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546,
+ /* 9195 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 9210 */ 23546, 23546, 23546, 23546, 23546, 23546, 26445, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546,
+ /* 9225 */ 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546,
+ /* 9240 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066,
+ /* 9255 */ 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563,
+ /* 9270 */ 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546,
+ /* 9285 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563,
+ /* 9300 */ 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546,
+ /* 9315 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564,
+ /* 9330 */ 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546,
+ /* 9345 */ 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824,
+ /* 9360 */ 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563,
+ /* 9375 */ 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546,
+ /* 9390 */ 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586,
+ /* 9405 */ 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673,
+ /* 9420 */ 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141,
+ /* 9435 */ 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546,
+ /* 9450 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 9465 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546,
+ /* 9480 */ 23546, 23546, 21369, 41698, 26466, 26486, 26508, 26520, 41701, 26470, 20967, 23546, 23546, 23546, 35799,
+ /* 9495 */ 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926, 50639,
+ /* 9510 */ 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 38227, 18915, 18388, 18432, 18458, 18463,
+ /* 9525 */ 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620,
+ /* 9540 */ 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505,
+ /* 9555 */ 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674,
+ /* 9570 */ 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051,
+ /* 9585 */ 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396,
+ /* 9600 */ 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477,
+ /* 9615 */ 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632,
+ /* 9630 */ 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746,
+ /* 9645 */ 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 26543,
+ /* 9660 */ 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139,
+ /* 9675 */ 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489,
+ /* 9690 */ 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546,
+ /* 9705 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 9720 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546,
+ /* 9735 */ 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 23546, 23424, 20967, 23546, 23546, 23546,
+ /* 9750 */ 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639, 19926,
+ /* 9765 */ 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458,
+ /* 9780 */ 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868,
+ /* 9795 */ 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024,
+ /* 9810 */ 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839,
+ /* 9825 */ 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011,
+ /* 9840 */ 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668,
+ /* 9855 */ 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721,
+ /* 9870 */ 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592,
+ /* 9885 */ 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492,
+ /* 9900 */ 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842,
+ /* 9915 */ 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222,
+ /* 9930 */ 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037,
+ /* 9945 */ 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546,
+ /* 9960 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 9975 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841,
+ /* 9990 */ 23546, 23546, 23546, 23546, 21369, 28554, 23546, 26577, 26583, 26599, 47449, 44239, 20967, 23546, 23546,
+ /* 10005 */ 23546, 35799, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50639,
+ /* 10020 */ 19926, 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432,
+ /* 10035 */ 18458, 18463, 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597,
+ /* 10050 */ 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209,
+ /* 10065 */ 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776,
+ /* 10080 */ 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812,
+ /* 10095 */ 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604,
+ /* 10110 */ 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456,
+ /* 10125 */ 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574,
+ /* 10140 */ 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853,
+ /* 10155 */ 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977,
+ /* 10170 */ 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 26622, 20175, 20206,
+ /* 10185 */ 20222, 51139, 20274, 51143, 20301, 26638, 20392, 51127, 20418, 50802, 26654, 25380, 50639, 18729, 32258,
+ /* 10200 */ 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884,
+ /* 10215 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 10230 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 27306, 23546, 23546, 23546,
+ /* 10245 */ 26527, 26683, 26714, 28322, 26699, 26731, 50814, 50823, 26775, 26789, 26801, 26817, 26829, 26204, 26845,
+ /* 10260 */ 23599, 23546, 25326, 21171, 35898, 34903, 26868, 26909, 26948, 33311, 26979, 26959, 26995, 27011, 45967,
+ /* 10275 */ 27047, 27063, 27101, 27117, 34536, 27156, 23546, 23546, 44844, 41240, 34846, 23546, 42415, 27173, 27664,
+ /* 10290 */ 23546, 42356, 28101, 47563, 47563, 47563, 27192, 27418, 22824, 22824, 42533, 43762, 22804, 22804, 22804,
+ /* 10305 */ 27211, 27231, 36943, 23546, 44839, 40944, 23546, 27267, 27287, 46640, 23546, 27304, 35519, 43402, 27322,
+ /* 10320 */ 27344, 47563, 47563, 27380, 27403, 27436, 31453, 22824, 33011, 27464, 27493, 27533, 27556, 22804, 38069,
+ /* 10335 */ 35418, 30315, 27573, 26241, 27609, 23546, 44532, 27629, 39107, 50620, 23546, 45009, 27646, 31107, 27698,
+ /* 10350 */ 47563, 27746, 27765, 23297, 27785, 27825, 36368, 22824, 27859, 48139, 23833, 27991, 44504, 49256, 22804,
+ /* 10365 */ 43572, 23672, 27877, 42988, 25683, 23546, 27893, 27913, 46094, 23546, 21213, 44018, 47563, 30489, 32462,
+ /* 10380 */ 27941, 34820, 22824, 45399, 49012, 28821, 27978, 22804, 22804, 28014, 28034, 49064, 28072, 35792, 28097,
+ /* 10395 */ 51046, 28117, 50856, 22994, 28137, 47563, 41728, 28206, 28229, 22824, 41433, 28267, 28290, 22804, 34572,
+ /* 10410 */ 28320, 28338, 23546, 23546, 39715, 47560, 28358, 45550, 23113, 28379, 35308, 33078, 28399, 36714, 31970,
+ /* 10425 */ 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585,
+ /* 10440 */ 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 41649, 28419, 28455, 40472, 38341,
+ /* 10455 */ 28471, 38828, 40452, 28791, 24756, 33030, 27540, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351,
+ /* 10470 */ 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 10485 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 28526, 23546,
+ /* 10500 */ 23546, 26527, 23546, 23546, 23546, 23546, 34078, 28545, 23546, 28652, 28658, 28674, 28690, 28701, 26204,
+ /* 10515 */ 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 26963, 23546, 23546, 23546, 23546, 23546, 48973,
+ /* 10530 */ 47563, 22605, 35842, 45303, 43066, 27800, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546,
+ /* 10545 */ 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804,
+ /* 10560 */ 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 46230, 50621, 28718, 23546, 28717, 23546,
+ /* 10575 */ 48975, 47563, 47563, 47563, 27769, 28735, 22823, 22824, 22824, 22824, 49361, 49439, 22804, 22804, 22804,
+ /* 10590 */ 22804, 28781, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620, 23546, 23546, 23546, 48976,
+ /* 10605 */ 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804,
+ /* 10620 */ 22804, 29879, 23672, 23807, 23546, 18289, 23546, 23546, 44779, 49528, 23546, 36898, 47563, 47563, 47563,
+ /* 10635 */ 40417, 28807, 22824, 22824, 22824, 50340, 31197, 28844, 22804, 22804, 22804, 28863, 33199, 23546, 23546,
+ /* 10650 */ 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824, 41433, 22804, 22804, 22804,
+ /* 10665 */ 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804,
+ /* 10680 */ 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606,
+ /* 10695 */ 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031,
+ /* 10710 */ 33550, 21205, 28900, 28924, 28940, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448,
+ /* 10725 */ 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 10740 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 28963,
+ /* 10755 */ 23546, 23546, 26527, 23546, 28992, 23546, 29010, 36977, 29029, 29038, 29054, 29069, 29081, 29097, 29109,
+ /* 10770 */ 26204, 23546, 23546, 33645, 49739, 23546, 28529, 23546, 23546, 31365, 23546, 23546, 23546, 35995, 23546,
+ /* 10785 */ 29125, 31167, 22824, 29149, 40337, 48749, 32108, 23546, 29172, 23546, 44844, 29190, 42384, 23546, 31347,
+ /* 10800 */ 50774, 29209, 23546, 25948, 29214, 29230, 29291, 47563, 47563, 29309, 29325, 22824, 22824, 45608, 49036,
+ /* 10815 */ 29349, 22804, 22804, 39677, 36943, 30220, 23546, 23546, 47099, 23546, 22095, 50621, 37205, 27682, 23546,
+ /* 10830 */ 23546, 48975, 28152, 40051, 47563, 29366, 37135, 45217, 46920, 46953, 36665, 22824, 49439, 49901, 29385,
+ /* 10845 */ 29404, 34563, 22804, 29885, 40883, 26241, 23546, 23546, 47600, 23546, 23546, 29423, 23546, 29445, 23546,
+ /* 10860 */ 48976, 47563, 47563, 47563, 44406, 47564, 22821, 22824, 22824, 49328, 42575, 22767, 35849, 22804, 22804,
+ /* 10875 */ 39288, 28274, 50448, 23672, 29464, 23546, 23546, 23546, 29498, 42828, 23546, 23546, 47562, 47563, 47563,
+ /* 10890 */ 46820, 29369, 22821, 22824, 22824, 37856, 22824, 28821, 22804, 22804, 30184, 22804, 29883, 33199, 23546,
+ /* 10905 */ 23546, 29517, 23546, 47519, 29538, 47563, 46768, 47563, 41728, 22824, 49353, 22824, 41433, 22804, 41641,
+ /* 10920 */ 22804, 27843, 29565, 23546, 23546, 23546, 29581, 33988, 49629, 29610, 50265, 49148, 29627, 30732, 37573,
+ /* 10935 */ 29644, 31970, 23546, 23546, 28626, 22586, 47563, 47563, 29661, 22824, 47375, 22804, 22804, 29679, 47447,
+ /* 10950 */ 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759,
+ /* 10965 */ 33031, 45087, 23089, 29701, 47077, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 27251,
+ /* 10980 */ 29717, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 10995 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546,
+ /* 11010 */ 21570, 23546, 23546, 26527, 23546, 29745, 24166, 23546, 32508, 29764, 29773, 29789, 29803, 29812, 29828,
+ /* 11025 */ 29839, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 34673, 34671, 23546,
+ /* 11040 */ 38486, 38493, 29855, 28213, 35842, 29875, 43066, 27800, 23546, 40629, 29901, 44844, 23546, 29926, 30774,
+ /* 11055 */ 23546, 23546, 41541, 20026, 29946, 29989, 29293, 38320, 30005, 40270, 30031, 42116, 30052, 30082, 30100,
+ /* 11070 */ 49972, 39453, 30135, 41942, 39677, 36943, 23546, 23546, 23546, 42078, 23546, 30162, 50621, 23546, 23546,
+ /* 11085 */ 23546, 39564, 48975, 47563, 47563, 47563, 48721, 37135, 22823, 22824, 22824, 22824, 42777, 49439, 22804,
+ /* 11100 */ 22804, 22804, 22804, 30182, 30146, 30200, 30236, 23546, 23546, 23546, 30252, 30271, 50620, 23546, 23546,
+ /* 11115 */ 45468, 23469, 31420, 34156, 47563, 47563, 45201, 30292, 30331, 30348, 22824, 22824, 30365, 29156, 29407,
+ /* 11130 */ 22804, 22804, 22804, 30399, 23672, 23807, 23546, 23546, 23546, 23546, 45523, 28572, 23546, 33872, 47563,
+ /* 11145 */ 47563, 30419, 29369, 30438, 22824, 22824, 48645, 22824, 31904, 22804, 22804, 50360, 22804, 30539, 33199,
+ /* 11160 */ 49920, 23546, 30462, 23546, 50724, 48973, 36270, 47563, 30480, 41728, 35391, 22824, 30505, 41433, 50493,
+ /* 11175 */ 22804, 30530, 30403, 47447, 49732, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078,
+ /* 11190 */ 22804, 22804, 31970, 23546, 23251, 23546, 22586, 47563, 47563, 30555, 22824, 36108, 22804, 22804, 30575,
+ /* 11205 */ 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 30597, 46609, 47561, 23111, 30673, 39296, 30622,
+ /* 11220 */ 30648, 30668, 30689, 19013, 30707, 30727, 30748, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307,
+ /* 11235 */ 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11250 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677,
+ /* 11265 */ 23546, 23547, 30771, 23546, 26527, 25156, 30790, 23546, 30813, 24321, 30837, 30846, 30862, 30876, 30888,
+ /* 11280 */ 30904, 30915, 26204, 22703, 30931, 26561, 35799, 30978, 26921, 26341, 27925, 30994, 31013, 31032, 31061,
+ /* 11295 */ 31045, 31097, 31131, 31147, 31183, 31227, 31261, 31277, 39237, 39476, 31293, 33748, 31328, 22212, 31363,
+ /* 11310 */ 31381, 41158, 23546, 23546, 40033, 23546, 22587, 32449, 31405, 47817, 28510, 31441, 31475, 46890, 31498,
+ /* 11325 */ 30304, 31538, 22625, 36744, 47681, 39677, 36943, 23698, 29973, 31554, 29930, 31590, 23708, 31634, 39997,
+ /* 11340 */ 31661, 48812, 31689, 31711, 31727, 31763, 31798, 31814, 29245, 31850, 40093, 31890, 34721, 31940, 35662,
+ /* 11355 */ 31956, 31986, 27076, 32035, 32066, 32093, 32133, 26241, 50755, 23546, 43683, 23546, 32169, 19239, 32192,
+ /* 11370 */ 32249, 22951, 24750, 43255, 32274, 47563, 32292, 45560, 22821, 32317, 22824, 42593, 48588, 50230, 35849,
+ /* 11385 */ 32356, 22804, 45665, 32384, 32405, 32421, 23807, 25150, 32478, 32497, 47176, 23546, 32524, 45835, 36145,
+ /* 11400 */ 40407, 31425, 32550, 44054, 32586, 34739, 22824, 32631, 32657, 30066, 33080, 32683, 47042, 40501, 29883,
+ /* 11415 */ 33199, 23546, 45717, 33237, 23546, 23546, 32701, 31115, 42955, 32563, 41728, 45894, 41614, 32608, 41433,
+ /* 11430 */ 33712, 42499, 35727, 30403, 47447, 28590, 32719, 48060, 32755, 32790, 42232, 33671, 32806, 37745, 39609,
+ /* 11445 */ 32837, 40736, 33730, 32892, 32931, 32953, 19435, 22586, 32974, 48106, 28046, 33009, 33027, 33047, 48381,
+ /* 11460 */ 35461, 47447, 40617, 22585, 47563, 50257, 22824, 33074, 36473, 36549, 33096, 40786, 36807, 32667, 39296,
+ /* 11475 */ 33119, 43227, 48451, 49953, 33140, 24763, 23318, 45645, 33156, 33172, 33217, 47559, 33030, 30691, 33266,
+ /* 11490 */ 33282, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11505 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11520 */ 22677, 23546, 23546, 33306, 23546, 26527, 33327, 33345, 25456, 24849, 33370, 33400, 23546, 33386, 33428,
+ /* 11535 */ 33437, 33453, 33464, 26204, 23546, 23546, 33480, 35799, 23546, 23546, 23546, 23546, 27288, 23546, 23546,
+ /* 11550 */ 34477, 23546, 34484, 31605, 33499, 33519, 43660, 33545, 33568, 27800, 23546, 33621, 23546, 44844, 33621,
+ /* 11565 */ 23546, 23546, 30997, 23546, 33640, 34051, 23546, 22587, 33661, 47563, 47563, 47563, 33687, 22824, 22824,
+ /* 11580 */ 22824, 43762, 33703, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 50621,
+ /* 11595 */ 23546, 23546, 23546, 33746, 48975, 47563, 47563, 47563, 43863, 37135, 22823, 22824, 22824, 22824, 34733,
+ /* 11610 */ 49439, 22804, 22804, 22804, 22804, 33764, 29885, 40883, 26241, 23546, 23546, 23546, 23546, 23546, 50620,
+ /* 11625 */ 23546, 20258, 23546, 48976, 47563, 47563, 46759, 47563, 47564, 22821, 22824, 22824, 37850, 22824, 22767,
+ /* 11640 */ 35849, 22804, 22804, 33781, 22804, 29879, 23672, 23807, 23546, 23546, 23546, 23546, 23546, 43159, 23546,
+ /* 11655 */ 47562, 47563, 47563, 31773, 29369, 22821, 22824, 22824, 49239, 22824, 28821, 22804, 22804, 22804, 33801,
+ /* 11670 */ 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 41728, 22824, 22824, 22824,
+ /* 11685 */ 41433, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824,
+ /* 11700 */ 22824, 33078, 22804, 22804, 31970, 33820, 23546, 23546, 22586, 44762, 47563, 23109, 33840, 22825, 34299,
+ /* 11715 */ 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673,
+ /* 11730 */ 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 23335,
+ /* 11745 */ 32233, 42307, 22729, 33859, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11760 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11775 */ 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 32176, 23546, 23546, 41552, 33893, 33902, 33918,
+ /* 11790 */ 33924, 33940, 33956, 33967, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 37894, 23546, 23546, 23546,
+ /* 11805 */ 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 28765, 41920, 23546, 23546, 44844,
+ /* 11820 */ 23546, 23546, 23546, 39585, 23546, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824,
+ /* 11835 */ 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 11850 */ 23546, 43177, 23546, 23546, 45738, 48975, 47563, 47563, 47563, 47563, 37135, 41960, 22824, 22824, 22824,
+ /* 11865 */ 22824, 47410, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 20340, 23546, 23178,
+ /* 11880 */ 20358, 23546, 23546, 20360, 33983, 47563, 47563, 34004, 47563, 47564, 22821, 22824, 36824, 22824, 22824,
+ /* 11895 */ 22767, 35849, 22804, 33785, 22804, 22804, 29879, 34024, 23546, 23546, 23546, 34050, 23546, 23546, 23546,
+ /* 11910 */ 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804,
+ /* 11925 */ 22804, 29883, 33199, 23546, 23546, 32147, 47539, 23546, 48973, 47563, 47563, 39206, 45209, 22824, 22824,
+ /* 11940 */ 43898, 27834, 22804, 22804, 34943, 30403, 47447, 34067, 47158, 34094, 23546, 34121, 32984, 34141, 34177,
+ /* 11955 */ 43533, 34196, 34244, 36447, 34263, 31970, 28608, 23546, 34315, 34336, 34355, 34372, 28875, 33605, 34412,
+ /* 11970 */ 34436, 34454, 31964, 47447, 46606, 43054, 32993, 34501, 34521, 30673, 34552, 36549, 46609, 47561, 23111,
+ /* 11985 */ 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030,
+ /* 12000 */ 33552, 39426, 43326, 34588, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12015 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12030 */ 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546,
+ /* 12045 */ 23546, 23546, 19262, 39432, 32077, 26204, 41690, 23546, 26286, 34628, 23546, 23546, 23546, 34692, 23546,
+ /* 12060 */ 34693, 23546, 23546, 34656, 34689, 40521, 22887, 37164, 34396, 43815, 34709, 34755, 23546, 23546, 29501,
+ /* 12075 */ 44844, 26383, 30255, 23546, 23546, 41921, 23546, 23546, 23546, 22587, 47563, 47563, 32276, 47563, 27418,
+ /* 12090 */ 22824, 22824, 35655, 43762, 22804, 22804, 35850, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546,
+ /* 12105 */ 23546, 23546, 23546, 23546, 34780, 43953, 48975, 47563, 47563, 47563, 47563, 29859, 22823, 22824, 22824,
+ /* 12120 */ 22824, 22824, 30446, 22804, 22804, 22804, 22804, 22804, 34799, 33201, 23546, 34844, 23546, 23546, 23546,
+ /* 12135 */ 23546, 23546, 23546, 23546, 42714, 48976, 34862, 47563, 47563, 47563, 47564, 34882, 22824, 22824, 22824,
+ /* 12150 */ 22824, 22767, 30383, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 34898, 23546, 23546,
+ /* 12165 */ 23546, 23546, 47562, 47563, 47563, 49594, 27195, 22821, 22824, 22824, 22824, 49007, 30376, 22804, 22804,
+ /* 12180 */ 22804, 28251, 29883, 33199, 23546, 23546, 45156, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824,
+ /* 12195 */ 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563,
+ /* 12210 */ 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 28617, 23546, 48860, 47563, 47563, 23109, 22824,
+ /* 12225 */ 22825, 22804, 22804, 48020, 34919, 46606, 50168, 47563, 35289, 22824, 34937, 22804, 34959, 46609, 47561,
+ /* 12240 */ 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559,
+ /* 12255 */ 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12270 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12285 */ 23546, 23546, 23546, 22677, 23546, 23546, 26217, 23546, 26527, 28994, 29429, 32937, 21397, 21407, 19607,
+ /* 12300 */ 19616, 34984, 34999, 35011, 35027, 35038, 26204, 23546, 23546, 23546, 21159, 35548, 23546, 23546, 29013,
+ /* 12315 */ 35054, 32876, 23546, 35263, 35074, 35112, 39498, 35166, 47961, 27448, 49402, 46199, 35202, 23546, 23546,
+ /* 12330 */ 23546, 38910, 23546, 47123, 35227, 23546, 23546, 23546, 35244, 44990, 22587, 44754, 35279, 47563, 35324,
+ /* 12345 */ 35372, 48187, 22824, 29333, 35407, 49176, 35434, 22804, 35477, 39677, 36943, 23546, 35515, 50019, 41319,
+ /* 12360 */ 42187, 35535, 23546, 19253, 43384, 35575, 35592, 35612, 35186, 47563, 42920, 37391, 20600, 22823, 35386,
+ /* 12375 */ 22824, 40181, 35635, 35678, 29350, 22804, 33765, 35713, 35750, 48433, 33201, 23546, 23546, 23546, 23546,
+ /* 12390 */ 35766, 20349, 35815, 44388, 23546, 23546, 40380, 47253, 47563, 47563, 41209, 36250, 35833, 43893, 22824,
+ /* 12405 */ 22824, 48653, 43541, 43789, 35866, 22804, 22804, 31917, 36853, 33195, 23546, 19730, 35885, 35914, 32534,
+ /* 12420 */ 35930, 35957, 45488, 36011, 28363, 36030, 36050, 36074, 36103, 39870, 50408, 42260, 32597, 45635, 22804,
+ /* 12435 */ 36124, 36169, 36204, 27085, 31863, 36220, 46659, 44955, 21826, 38142, 32958, 36266, 47872, 36286, 36321,
+ /* 12450 */ 36366, 36384, 36409, 36435, 36471, 36489, 36514, 36540, 36572, 23546, 23546, 18340, 36595, 30632, 36619,
+ /* 12465 */ 36640, 39370, 36661, 36681, 36702, 36740, 36760, 31970, 23546, 36781, 18841, 22586, 47563, 47563, 23109,
+ /* 12480 */ 22824, 22825, 22804, 22804, 31964, 34034, 46606, 22585, 31741, 36801, 36823, 36840, 38424, 36549, 46609,
+ /* 12495 */ 36869, 23111, 30673, 39296, 36886, 35338, 36933, 36966, 48975, 23107, 30672, 23141, 24756, 33030, 33551,
+ /* 12510 */ 42313, 47646, 36993, 39426, 42307, 22729, 23448, 37021, 23363, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12525 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12540 */ 23546, 23546, 23546, 23546, 22677, 23546, 23546, 39988, 23546, 26527, 23546, 23546, 23546, 23546, 21369,
+ /* 12555 */ 50028, 21708, 39996, 40225, 24990, 37071, 37082, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546,
+ /* 12570 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800, 23546,
+ /* 12585 */ 23546, 23546, 44844, 23546, 23546, 23546, 23546, 31016, 23546, 23546, 23546, 22587, 47563, 47563, 47563,
+ /* 12600 */ 47563, 27418, 22824, 27420, 22824, 43762, 22804, 22804, 48012, 22804, 39677, 36943, 23546, 23546, 23546,
+ /* 12615 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823,
+ /* 12630 */ 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546,
+ /* 12645 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824,
+ /* 12660 */ 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546,
+ /* 12675 */ 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376,
+ /* 12690 */ 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563,
+ /* 12705 */ 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560,
+ /* 12720 */ 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563,
+ /* 12735 */ 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549,
+ /* 12750 */ 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030,
+ /* 12765 */ 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546,
+ /* 12780 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 12795 */ 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 25524, 23546, 26527, 23546, 23546, 23546, 23546,
+ /* 12810 */ 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546,
+ /* 12825 */ 37098, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800,
+ /* 12840 */ 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563,
+ /* 12855 */ 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546,
+ /* 12870 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135,
+ /* 12885 */ 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 37115,
+ /* 12900 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 37134, 47563, 47563, 47563, 47564, 37151,
+ /* 12915 */ 22824, 22824, 22824, 22824, 22767, 28828, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546,
+ /* 12930 */ 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824,
+ /* 12945 */ 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563,
+ /* 12960 */ 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546,
+ /* 12975 */ 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563,
+ /* 12990 */ 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804,
+ /* 13005 */ 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756,
+ /* 13020 */ 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546,
+ /* 13035 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 13050 */ 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 41164, 23546, 26527, 23546, 34764, 23546,
+ /* 13065 */ 19155, 37185, 37221, 37234, 37250, 37256, 37272, 37288, 37299, 26204, 23546, 37315, 23546, 35799, 23546,
+ /* 13080 */ 43426, 26746, 23546, 23546, 37335, 23546, 32153, 42194, 37334, 37351, 37380, 37407, 37443, 40833, 37430,
+ /* 13095 */ 32821, 37459, 23546, 23546, 34612, 23546, 23546, 40581, 34220, 23546, 41122, 29193, 49795, 34228, 47262,
+ /* 13110 */ 37494, 29549, 41774, 37514, 42784, 22904, 45886, 37530, 38036, 37570, 36188, 37589, 23034, 37618, 28342,
+ /* 13125 */ 23546, 23546, 23546, 23546, 50126, 23546, 23546, 23546, 23546, 23546, 48975, 28498, 44484, 47563, 28434,
+ /* 13140 */ 44023, 37641, 37671, 39810, 30349, 22824, 39853, 47704, 29645, 22804, 49383, 22804, 37657, 33201, 23546,
+ /* 13155 */ 23546, 50909, 37693, 23546, 32019, 38379, 23546, 23546, 23546, 48976, 47563, 47563, 46474, 32220, 37710,
+ /* 13170 */ 22821, 22824, 22824, 49321, 37734, 37761, 35849, 22804, 22804, 37788, 37809, 29879, 33195, 23546, 37872,
+ /* 13185 */ 23546, 23546, 37889, 23546, 23546, 23546, 47562, 27357, 47563, 47563, 27195, 22821, 40293, 22824, 22824,
+ /* 13200 */ 22824, 30376, 34247, 22804, 22804, 22804, 29883, 33199, 37910, 31075, 23546, 37928, 47744, 48973, 37953,
+ /* 13215 */ 47563, 47563, 37979, 38003, 22824, 22824, 38027, 38061, 22804, 22804, 38085, 47447, 23404, 23546, 28599,
+ /* 13230 */ 23546, 47560, 31782, 47563, 23113, 38011, 22824, 33078, 33721, 22804, 31970, 23546, 21592, 23546, 22586,
+ /* 13245 */ 47563, 50097, 23109, 22824, 40810, 22804, 22804, 38110, 47447, 46606, 22585, 47563, 24761, 22824, 30673,
+ /* 13260 */ 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141,
+ /* 13275 */ 33290, 45056, 38132, 38158, 38179, 33552, 39426, 27505, 38215, 23448, 23351, 23363, 23546, 23546, 23546,
+ /* 13290 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 13305 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23648, 23546, 26527, 23546, 26305,
+ /* 13320 */ 23546, 23546, 29594, 20530, 20539, 38250, 38264, 38273, 38289, 38300, 26364, 23546, 23948, 23546, 35799,
+ /* 13335 */ 23546, 34320, 23546, 23546, 23546, 23948, 23546, 35554, 36579, 23947, 35559, 38316, 33588, 36393, 38336,
+ /* 13350 */ 43066, 27800, 23546, 23546, 38357, 44844, 23546, 39344, 42555, 23546, 39071, 23546, 23546, 38375, 41192,
+ /* 13365 */ 48530, 47563, 47812, 38395, 28750, 22824, 42121, 31482, 43762, 38449, 22804, 38419, 38440, 32050, 38473,
+ /* 13380 */ 38509, 46688, 34783, 23546, 23546, 23546, 23546, 23546, 38530, 23546, 23546, 48975, 47883, 38550, 42949,
+ /* 13395 */ 47563, 37135, 22823, 38568, 30084, 22824, 22824, 49439, 42031, 34293, 41837, 22804, 22804, 29885, 33201,
+ /* 13410 */ 23546, 38929, 23546, 38602, 23546, 44369, 37873, 23791, 38621, 23546, 48976, 27031, 38642, 47563, 38659,
+ /* 13425 */ 47564, 38683, 47916, 22824, 22824, 38702, 33843, 35849, 39277, 22804, 33804, 38724, 29879, 33195, 23546,
+ /* 13440 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824,
+ /* 13455 */ 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973,
+ /* 13470 */ 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 36556, 23546, 23546,
+ /* 13485 */ 23546, 23546, 47560, 38744, 47563, 30559, 22824, 22824, 46066, 22804, 22804, 31970, 23546, 23546, 49685,
+ /* 13500 */ 22586, 47563, 47563, 23109, 47427, 22825, 22804, 35452, 31964, 47447, 46606, 22585, 47563, 24761, 22824,
+ /* 13515 */ 30673, 22804, 36549, 38761, 47561, 38782, 38802, 43621, 23464, 38824, 38844, 33550, 48975, 23107, 30672,
+ /* 13530 */ 23141, 24756, 33030, 33551, 47559, 33030, 38045, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546,
+ /* 13545 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 13560 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23810, 23546, 46101, 23546,
+ /* 13575 */ 29522, 38860, 33103, 38895, 38945, 38984, 38970, 38989, 38954, 39005, 39016, 26204, 23546, 24981, 39032,
+ /* 13590 */ 39052, 39135, 26183, 26715, 27157, 23546, 39087, 39123, 35972, 23871, 39151, 32436, 39187, 39222, 39262,
+ /* 13605 */ 39312, 39360, 27800, 27271, 23546, 23546, 40856, 29748, 35256, 26269, 47340, 39386, 28121, 33483, 41086,
+ /* 13620 */ 39406, 48539, 39200, 45029, 47563, 29260, 30036, 22824, 47369, 43762, 41883, 39448, 22787, 22804, 32852,
+ /* 13635 */ 39469, 27673, 33624, 23546, 39492, 23546, 23546, 30166, 23546, 19760, 23546, 25974, 48975, 39514, 47563,
+ /* 13650 */ 47563, 47563, 37135, 37987, 39541, 30332, 22824, 22824, 49439, 34278, 22804, 48403, 22804, 22804, 29885,
+ /* 13665 */ 33201, 23546, 23546, 23546, 23546, 49277, 23546, 23546, 39561, 44662, 39580, 20000, 47563, 47563, 38745,
+ /* 13680 */ 47563, 41583, 39601, 22824, 22824, 42751, 22824, 39625, 36344, 22804, 22804, 49650, 22804, 39663, 33195,
+ /* 13695 */ 39390, 39701, 21803, 40964, 23546, 28563, 39737, 39764, 42864, 39780, 30015, 27711, 27195, 22821, 39796,
+ /* 13710 */ 39832, 37838, 39869, 30376, 37543, 39886, 39910, 39936, 47724, 39958, 49087, 33227, 48840, 39980, 40013,
+ /* 13725 */ 20680, 50204, 40049, 40067, 40083, 45419, 22824, 40109, 40125, 36765, 22804, 40151, 40167, 47447, 40217,
+ /* 13740 */ 23546, 23546, 19121, 40241, 48114, 40263, 48445, 44596, 40286, 40309, 42808, 40330, 30581, 40353, 23546,
+ /* 13755 */ 23546, 40374, 28485, 40396, 27517, 40433, 40468, 40722, 40488, 31964, 30114, 48477, 40517, 36058, 24761,
+ /* 13770 */ 45115, 30673, 40537, 36549, 40555, 19020, 29663, 30673, 40603, 40652, 40668, 40708, 40752, 40779, 40802,
+ /* 13785 */ 40826, 40849, 24756, 33030, 33551, 47559, 33030, 33552, 40872, 40899, 22729, 23448, 40923, 23363, 23546,
+ /* 13800 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 13815 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 40939, 26527,
+ /* 13830 */ 23546, 35150, 40960, 23546, 26932, 40980, 40989, 41005, 41019, 41028, 41044, 41055, 26204, 41071, 27176,
+ /* 13845 */ 35142, 41110, 22748, 41145, 23546, 41180, 29961, 41225, 35127, 41274, 41299, 41335, 41350, 41366, 41401,
+ /* 13860 */ 41487, 41458, 41474, 41503, 23546, 18442, 27630, 46235, 23546, 41314, 19147, 41528, 40358, 23546, 23546,
+ /* 13875 */ 45375, 22587, 47563, 36909, 41568, 47891, 27418, 38686, 27953, 41607, 41630, 22804, 23213, 41665, 46983,
+ /* 13890 */ 39677, 36943, 23546, 45937, 23546, 37118, 23546, 39337, 41681, 33824, 35058, 38605, 23546, 41717, 41752,
+ /* 13905 */ 28167, 41769, 47563, 43475, 41790, 42050, 41800, 22824, 22824, 41816, 41853, 50302, 41874, 22804, 49204,
+ /* 13920 */ 29885, 47656, 41907, 23546, 38879, 36785, 23546, 23546, 23546, 23546, 23546, 39036, 48976, 47563, 46791,
+ /* 13935 */ 34008, 47563, 47564, 22821, 22824, 44589, 46895, 22824, 22767, 35849, 22804, 41937, 38457, 22804, 29879,
+ /* 13950 */ 33195, 23546, 23546, 49550, 23546, 45766, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 32301, 41958,
+ /* 13965 */ 22824, 22824, 22824, 46046, 28243, 22804, 22804, 22804, 22804, 41977, 33199, 20951, 42005, 23546, 23546,
+ /* 13980 */ 23546, 44350, 47563, 31827, 47563, 41591, 22824, 49433, 22824, 28884, 22804, 42026, 22804, 30403, 31211,
+ /* 13995 */ 23546, 23546, 23546, 23546, 27328, 40247, 47563, 27241, 38708, 22824, 42285, 31924, 22804, 29685, 23546,
+ /* 14010 */ 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 22739, 46606, 49667, 46712,
+ /* 14025 */ 38403, 42047, 44103, 22804, 44463, 42066, 42221, 42103, 42137, 42175, 42210, 42248, 42276, 42301, 48975,
+ /* 14040 */ 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 35697, 39426, 36136, 22729, 23448, 42329, 23363,
+ /* 14055 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 14070 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 26377,
+ /* 14085 */ 26527, 23546, 23546, 42378, 33354, 42400, 20758, 23546, 26429, 42436, 42448, 42464, 42475, 26204, 23546,
+ /* 14100 */ 23546, 25120, 35799, 23546, 23546, 23546, 31573, 31305, 23546, 23546, 31567, 25118, 23546, 48973, 37963,
+ /* 14115 */ 23115, 42491, 47011, 42515, 27800, 23546, 42549, 23546, 44844, 23546, 38766, 18352, 23546, 39064, 23546,
+ /* 14130 */ 23546, 22159, 22587, 48548, 38163, 45793, 48521, 47316, 42571, 42591, 47404, 42609, 44147, 39942, 22845,
+ /* 14145 */ 35499, 47057, 42343, 42636, 23546, 42657, 23546, 42010, 42641, 26759, 23546, 23546, 23546, 23546, 48975,
+ /* 14160 */ 47563, 47563, 36917, 47563, 37135, 22823, 22824, 22824, 42693, 22824, 49439, 22804, 22804, 28847, 22804,
+ /* 14175 */ 22804, 29885, 45066, 44270, 23546, 42713, 23546, 23546, 26553, 42677, 42730, 31574, 23546, 48976, 47563,
+ /* 14190 */ 48931, 47563, 47563, 47564, 42748, 22824, 42767, 22824, 22824, 34180, 35849, 22804, 42800, 22804, 22804,
+ /* 14205 */ 29879, 33195, 23546, 44983, 23546, 23546, 23546, 23546, 42824, 23546, 47562, 47563, 36034, 47563, 27749,
+ /* 14220 */ 22821, 22824, 22824, 42844, 22824, 48373, 22804, 22804, 38192, 22804, 29883, 33199, 23546, 23546, 23546,
+ /* 14235 */ 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403,
+ /* 14250 */ 47447, 23546, 18259, 23546, 23546, 42862, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 39325,
+ /* 14265 */ 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585,
+ /* 14280 */ 47563, 24761, 22824, 30673, 22804, 48281, 42880, 42913, 28181, 33529, 39296, 42936, 24759, 33031, 33550,
+ /* 14295 */ 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351,
+ /* 14310 */ 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 14325 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546,
+ /* 14340 */ 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204,
+ /* 14355 */ 23546, 23546, 23546, 35799, 23546, 23546, 38514, 23546, 23546, 23546, 44073, 44076, 50916, 44069, 36233,
+ /* 14370 */ 42971, 33598, 40201, 40539, 43066, 29275, 42987, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546,
+ /* 14385 */ 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804,
+ /* 14400 */ 22804, 22804, 39677, 36943, 23546, 23546, 23546, 43004, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 14415 */ 48975, 47563, 47563, 47563, 47563, 37135, 43023, 22824, 22824, 22824, 22824, 43497, 22804, 22804, 22804,
+ /* 14430 */ 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976,
+ /* 14445 */ 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804,
+ /* 14460 */ 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563,
+ /* 14475 */ 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546,
+ /* 14490 */ 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804,
+ /* 14505 */ 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804,
+ /* 14520 */ 31970, 23546, 23546, 23546, 22586, 30422, 47563, 23109, 38579, 22825, 32685, 22804, 31964, 47447, 46606,
+ /* 14535 */ 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031,
+ /* 14550 */ 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448,
+ /* 14565 */ 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 14580 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546,
+ /* 14595 */ 23546, 22195, 38234, 23546, 23546, 22088, 23546, 31645, 43040, 31695, 43090, 43103, 43112, 43128, 43139,
+ /* 14610 */ 26204, 23546, 31341, 32732, 35799, 43366, 43155, 43175, 36087, 40692, 50768, 31673, 43193, 32904, 31522,
+ /* 14625 */ 31081, 43243, 43271, 43287, 43315, 43342, 40683, 23546, 23546, 23546, 45381, 43358, 40568, 43382, 43400,
+ /* 14640 */ 43418, 23546, 23546, 30119, 43208, 47563, 43442, 27364, 43462, 43491, 28908, 22824, 43513, 43557, 22804,
+ /* 14655 */ 43588, 41858, 43607, 43637, 43676, 23546, 23546, 23546, 18266, 35576, 23546, 23546, 43699, 43717, 43736,
+ /* 14670 */ 20331, 32703, 47563, 41378, 47563, 46720, 41989, 43754, 29628, 22824, 22824, 43651, 43778, 43812, 46171,
+ /* 14685 */ 22804, 44212, 43831, 43879, 33201, 23546, 23546, 45346, 23546, 43914, 43941, 23546, 27809, 23863, 43976,
+ /* 14700 */ 44003, 47563, 48620, 44039, 35181, 49990, 44092, 22824, 45449, 39545, 44119, 42697, 44138, 22804, 44163,
+ /* 14715 */ 27998, 44211, 35734, 33195, 39171, 23546, 23546, 23067, 44228, 32012, 23546, 44255, 36870, 46433, 23003,
+ /* 14730 */ 47563, 27195, 22821, 44297, 46134, 22824, 22824, 30376, 39647, 22804, 44322, 22804, 41442, 44340, 23546,
+ /* 14745 */ 44366, 44385, 23546, 23546, 34339, 44404, 47563, 47563, 44422, 22824, 22824, 22824, 44438, 22804, 22804,
+ /* 14760 */ 22804, 44454, 47447, 48298, 23546, 23546, 23546, 44479, 47563, 47563, 46130, 22824, 22824, 44500, 22804,
+ /* 14775 */ 22804, 44520, 23546, 40027, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447,
+ /* 14790 */ 46606, 22585, 47563, 24761, 22824, 30673, 22804, 38094, 49704, 44555, 44579, 44612, 44650, 23464, 24759,
+ /* 14805 */ 33031, 33550, 44685, 30652, 34420, 36724, 24756, 33030, 33551, 47559, 33030, 45310, 44716, 44744, 32641,
+ /* 14820 */ 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 14835 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677, 23546,
+ /* 14850 */ 23546, 23546, 25786, 26527, 44778, 28976, 18999, 44795, 44824, 44860, 44808, 44885, 44899, 44911, 44927,
+ /* 14865 */ 44938, 26204, 44954, 40587, 23546, 44971, 23546, 23546, 43960, 23546, 50132, 23546, 45006, 35089, 26325,
+ /* 14880 */ 35096, 32207, 45025, 45045, 44306, 45082, 45103, 27800, 35987, 37200, 44669, 44844, 34640, 23546, 23546,
+ /* 14895 */ 23546, 23546, 45137, 45172, 23546, 19324, 45188, 43446, 47563, 47563, 45233, 45249, 45268, 22824, 43762,
+ /* 14910 */ 45291, 40314, 22804, 22804, 39677, 36943, 37912, 23546, 23546, 45326, 45362, 23546, 23546, 23546, 23546,
+ /* 14925 */ 23546, 37055, 48975, 48512, 31834, 47563, 47563, 46028, 22823, 45397, 45415, 22824, 22824, 36333, 38728,
+ /* 14940 */ 44324, 22804, 22804, 22804, 45435, 33201, 23546, 23546, 26251, 43720, 23546, 45465, 26758, 45484, 45504,
+ /* 14955 */ 23546, 45539, 47563, 47563, 47285, 43856, 45576, 45600, 22824, 22824, 47994, 48169, 45624, 45661, 22804,
+ /* 14970 */ 22804, 42152, 45681, 29879, 45697, 45713, 45733, 23546, 25942, 23546, 23546, 30214, 45754, 47562, 47563,
+ /* 14985 */ 27730, 45789, 27195, 22821, 22824, 47619, 47969, 22824, 30376, 22804, 22804, 45809, 22804, 29883, 33199,
+ /* 15000 */ 23546, 21039, 23546, 49467, 37049, 48973, 47563, 45851, 48716, 45584, 47934, 22824, 45868, 48003, 35869,
+ /* 15015 */ 22804, 45910, 30403, 47447, 23546, 48332, 18869, 22345, 47560, 47563, 47563, 23113, 22824, 22824, 33078,
+ /* 15030 */ 22804, 22804, 32000, 21288, 23546, 45931, 45953, 47563, 37498, 23109, 22824, 40444, 22804, 34438, 36455,
+ /* 15045 */ 45997, 44634, 19558, 46021, 50382, 46044, 28056, 22804, 34468, 46609, 35619, 30711, 46062, 46082, 23464,
+ /* 15060 */ 24759, 33031, 33550, 19538, 36296, 49945, 23141, 46117, 38586, 45823, 48503, 46150, 46187, 39426, 42307,
+ /* 15075 */ 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15090 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22677,
+ /* 15105 */ 23546, 23546, 23546, 23737, 26527, 23546, 23546, 34968, 23546, 46215, 26881, 26893, 46251, 46267, 46279,
+ /* 15120 */ 46295, 46306, 26204, 46322, 23241, 25565, 35799, 25341, 42889, 46340, 22204, 44869, 46352, 46368, 46377,
+ /* 15135 */ 46393, 46349, 46420, 46455, 46490, 46547, 46518, 46534, 32867, 46005, 19766, 34600, 44844, 46563, 23546,
+ /* 15150 */ 26188, 46580, 41258, 46596, 46625, 46675, 46736, 46784, 46807, 46842, 38552, 46877, 45877, 46911, 46944,
+ /* 15165 */ 36419, 46977, 46999, 47027, 27557, 39677, 37035, 47093, 47115, 35228, 23546, 47139, 47174, 23546, 47766,
+ /* 15180 */ 23546, 49770, 47192, 20591, 47219, 47244, 47278, 38643, 47301, 41736, 47356, 47391, 47426, 31459, 49439,
+ /* 15195 */ 36524, 39920, 40135, 22804, 35492, 33058, 47443, 23546, 20251, 43007, 37694, 47465, 46324, 47491, 47518,
+ /* 15210 */ 23546, 47535, 47555, 39525, 47841, 47563, 34125, 47580, 47616, 47635, 39844, 22824, 37169, 48362, 35849,
+ /* 15225 */ 47672, 47697, 22804, 41891, 47720, 33195, 23058, 47740, 23546, 45516, 47760, 23546, 47782, 18627, 47798,
+ /* 15240 */ 50186, 47833, 47857, 27195, 47907, 47932, 47950, 47985, 48036, 39636, 46165, 37602, 50472, 50517, 37554,
+ /* 15255 */ 27477, 48056, 18311, 23546, 35780, 48076, 48095, 44700, 47563, 47563, 48130, 48155, 37677, 22824, 48203,
+ /* 15270 */ 48236, 49183, 22804, 48272, 47447, 18372, 48297, 48314, 48330, 41202, 45981, 33877, 34811, 48348, 48040,
+ /* 15285 */ 48397, 48419, 37793, 31970, 48467, 23546, 23546, 48493, 46466, 31618, 34505, 49612, 47069, 35443, 43299,
+ /* 15300 */ 48564, 28304, 47475, 19993, 48611, 37364, 48636, 48669, 43591, 36549, 46609, 47561, 23111, 30673, 39296,
+ /* 15315 */ 23464, 24759, 33031, 33550, 48975, 23107, 30672, 44177, 29729, 48685, 36498, 48701, 45275, 48737, 39426,
+ /* 15330 */ 42307, 22729, 39685, 48765, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15345 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15360 */ 22677, 23546, 23546, 23546, 23546, 48828, 23546, 23546, 48856, 23546, 35941, 30944, 30953, 48876, 30953,
+ /* 15375 */ 30962, 48892, 48903, 26204, 23546, 23546, 23546, 40636, 23546, 26348, 23546, 23546, 23546, 23546, 26345,
+ /* 15390 */ 23546, 38923, 23546, 48973, 48919, 48178, 48947, 38808, 37005, 31513, 38873, 23546, 23546, 44844, 23546,
+ /* 15405 */ 23546, 27897, 48963, 23546, 23546, 23546, 23546, 48971, 46750, 47563, 47563, 34356, 48992, 22824, 22824,
+ /* 15420 */ 22824, 36305, 49028, 22804, 22804, 22804, 49052, 44728, 49080, 23546, 49103, 45341, 23546, 23546, 42732,
+ /* 15435 */ 48802, 47595, 38359, 35596, 48975, 47563, 49130, 41385, 43221, 47228, 22823, 48595, 46928, 41415, 49146,
+ /* 15450 */ 49164, 22804, 49199, 49220, 45915, 29388, 37824, 33201, 23546, 25346, 23546, 26261, 23546, 23546, 23546,
+ /* 15465 */ 49474, 23546, 23546, 48976, 33503, 47563, 47563, 47563, 47564, 49236, 37414, 22824, 22824, 22824, 22767,
+ /* 15480 */ 49255, 36180, 22804, 22804, 22804, 29879, 33195, 49272, 23546, 49293, 23546, 23546, 23546, 23546, 28581,
+ /* 15495 */ 36243, 47563, 47563, 47563, 27195, 49311, 22824, 22824, 22824, 22824, 37772, 22804, 22804, 22804, 22804,
+ /* 15510 */ 29883, 46502, 23546, 23546, 50321, 46564, 23546, 30276, 23289, 47563, 47563, 37718, 49344, 22824, 22824,
+ /* 15525 */ 30514, 49377, 22804, 22804, 42620, 47447, 39101, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824,
+ /* 15540 */ 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804,
+ /* 15555 */ 22804, 31964, 47447, 46606, 22585, 46439, 24761, 43524, 30673, 49399, 36549, 46609, 47561, 23111, 30673,
+ /* 15570 */ 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 49418, 45121, 44624, 47559, 33030, 33552,
+ /* 15585 */ 39426, 32368, 49455, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15600 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15615 */ 23546, 22677, 23546, 23546, 23546, 23546, 49490, 49547, 33412, 49525, 23546, 34105, 23546, 33409, 49544,
+ /* 15630 */ 42420, 41283, 49566, 49577, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15645 */ 23546, 23546, 23546, 23546, 48973, 49593, 35299, 27962, 22805, 43066, 27800, 23546, 33329, 27613, 44844,
+ /* 15660 */ 23546, 23546, 23546, 23546, 23546, 32481, 23546, 23546, 22587, 32570, 47563, 46861, 47563, 27418, 49610,
+ /* 15675 */ 22824, 32331, 43762, 42159, 22804, 27215, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546, 37318,
+ /* 15690 */ 23546, 23546, 23546, 20322, 23546, 48975, 47563, 47563, 49628, 47563, 37135, 22823, 22824, 32615, 22824,
+ /* 15705 */ 22824, 49439, 22804, 22804, 49645, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15720 */ 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824,
+ /* 15735 */ 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15750 */ 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804,
+ /* 15765 */ 22804, 29883, 33199, 23546, 23546, 49666, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824,
+ /* 15780 */ 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 49683, 23546, 23546, 47560, 47563, 47563, 23113,
+ /* 15795 */ 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825,
+ /* 15810 */ 22804, 22804, 31964, 47447, 49701, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111,
+ /* 15825 */ 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030,
+ /* 15840 */ 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15855 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 15870 */ 23546, 23546, 22677, 23546, 23546, 23546, 23546, 49720, 23546, 50953, 23546, 25809, 49755, 49786, 23546,
+ /* 15885 */ 49811, 49825, 49837, 49853, 49864, 26204, 23546, 23546, 23546, 35799, 23546, 23546, 23546, 23546, 23546,
+ /* 15900 */ 23546, 23546, 23546, 23546, 23546, 48973, 27387, 22824, 49893, 38199, 49880, 34211, 23546, 23546, 23546,
+ /* 15915 */ 44844, 23546, 23546, 23546, 23546, 42672, 23546, 23546, 23546, 22587, 47563, 47563, 47563, 47563, 27418,
+ /* 15930 */ 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546, 23546, 23546, 23546,
+ /* 15945 */ 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824, 22824,
+ /* 15960 */ 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546, 23546,
+ /* 15975 */ 23546, 49917, 23546, 23546, 23546, 22167, 47563, 47563, 47563, 47563, 47564, 49936, 22824, 22824, 22824,
+ /* 15990 */ 22824, 22767, 49969, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 45149, 23546, 23546, 23546,
+ /* 16005 */ 23546, 23546, 47562, 47563, 49988, 47563, 50006, 22821, 22824, 48578, 22824, 41424, 30376, 22804, 39894,
+ /* 16020 */ 22804, 32389, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209, 22824,
+ /* 16035 */ 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563, 47563,
+ /* 16050 */ 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109, 22824,
+ /* 16065 */ 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609, 47561,
+ /* 16080 */ 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551, 47559,
+ /* 16095 */ 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16110 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16125 */ 23546, 23546, 23546, 26445, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369, 23546,
+ /* 16140 */ 23546, 23546, 23546, 41512, 50052, 50063, 26204, 23546, 23546, 23546, 35799, 50079, 30464, 23546, 23546,
+ /* 16155 */ 23546, 23546, 32774, 23546, 41129, 32770, 46701, 50096, 40191, 28190, 22805, 43066, 27800, 23546, 23546,
+ /* 16170 */ 23546, 50113, 28719, 34485, 45773, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 29611, 47563, 27026,
+ /* 16185 */ 27418, 22824, 35645, 28383, 43762, 22804, 22921, 22804, 48250, 39677, 50148, 50164, 23546, 23546, 23546,
+ /* 16200 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135, 22823, 22824,
+ /* 16215 */ 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546, 23546, 23546,
+ /* 16230 */ 23546, 23546, 41250, 23546, 23546, 23546, 48976, 47563, 47563, 50184, 47563, 45852, 22821, 22824, 38786,
+ /* 16245 */ 22824, 22824, 45252, 35849, 22804, 48256, 22804, 22804, 29879, 33195, 48079, 23546, 23546, 23546, 23546,
+ /* 16260 */ 23546, 23546, 23546, 47562, 50202, 47563, 47563, 27195, 22821, 50220, 22824, 22824, 22824, 30376, 48220,
+ /* 16275 */ 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563, 47563, 45209,
+ /* 16290 */ 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546, 47560, 47563,
+ /* 16305 */ 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563, 47563, 23109,
+ /* 16320 */ 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549, 46609,
+ /* 16335 */ 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030, 33551,
+ /* 16350 */ 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16365 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16380 */ 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546, 21369,
+ /* 16395 */ 23546, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 21798, 23546, 23546, 35799, 23546, 23546, 46652,
+ /* 16410 */ 23546, 23546, 23546, 23546, 46656, 23546, 23546, 50246, 28439, 22824, 50294, 36350, 50281, 47331, 23546,
+ /* 16425 */ 29448, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 35817, 22587, 47563, 47563, 47563,
+ /* 16440 */ 27723, 27418, 22824, 22824, 27861, 43762, 22804, 22804, 22804, 48212, 39677, 36943, 23546, 50318, 23546,
+ /* 16455 */ 23546, 23546, 23546, 23546, 23546, 37099, 23546, 23546, 48975, 38667, 47563, 36014, 47563, 37135, 22823,
+ /* 16470 */ 50337, 22824, 46961, 22824, 49439, 28018, 22804, 22804, 50356, 22804, 29885, 33201, 23546, 43738, 23546,
+ /* 16485 */ 23546, 23546, 23546, 23546, 38534, 23546, 23546, 48976, 47563, 50376, 47563, 47563, 47564, 50398, 41961,
+ /* 16500 */ 50424, 22824, 22824, 22767, 50443, 28403, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546, 23546,
+ /* 16515 */ 23546, 23546, 21488, 23546, 47562, 47563, 31747, 47563, 34161, 22821, 22824, 43024, 22824, 22824, 50464,
+ /* 16530 */ 22804, 22804, 50488, 22804, 43844, 33199, 23546, 23546, 18921, 23546, 23546, 48973, 47563, 47563, 47563,
+ /* 16545 */ 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 31241, 23546, 23546, 39165, 23546, 29133,
+ /* 16560 */ 47563, 47563, 33578, 22824, 22824, 50509, 22804, 22804, 31970, 23546, 49295, 23546, 22586, 47563, 31161,
+ /* 16575 */ 23109, 50427, 22825, 22804, 41830, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804, 36549,
+ /* 16590 */ 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756, 33030,
+ /* 16605 */ 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546, 23546,
+ /* 16620 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16635 */ 23546, 23546, 23546, 23546, 23546, 22677, 23546, 23546, 23546, 23546, 26527, 23546, 23546, 23546, 23546,
+ /* 16650 */ 21369, 21483, 23546, 23546, 23546, 19262, 39432, 32077, 26204, 23546, 23546, 23546, 35799, 23546, 23546,
+ /* 16665 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824, 35842, 22805, 43066, 27800,
+ /* 16680 */ 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 22587, 47563, 47563,
+ /* 16695 */ 47563, 47563, 27418, 22824, 22824, 22824, 43762, 22804, 22804, 22804, 22804, 39677, 36943, 23546, 23546,
+ /* 16710 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563, 47563, 47563, 47563, 37135,
+ /* 16725 */ 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804, 29885, 33201, 23546, 23546,
+ /* 16740 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563, 47563, 47563, 47564, 22821,
+ /* 16755 */ 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879, 33195, 23546, 23546, 23546,
+ /* 16770 */ 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821, 22824, 22824, 22824, 22824,
+ /* 16785 */ 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 47563,
+ /* 16800 */ 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447, 23546, 23546, 23546, 23546,
+ /* 16815 */ 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546, 23546, 23546, 22586, 47563,
+ /* 16830 */ 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563, 24761, 22824, 30673, 22804,
+ /* 16845 */ 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975, 23107, 30672, 23141, 24756,
+ /* 16860 */ 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363, 23546, 23546, 23546, 23546,
+ /* 16875 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 16890 */ 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 46404, 21767, 21765, 32117,
+ /* 16905 */ 22038, 50563, 21058, 21061, 50533, 22036, 50551, 50579, 50591, 20967, 23546, 23546, 23546, 35799, 23546,
+ /* 16920 */ 23546, 50607, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208, 50637, 19916, 50639, 20660,
+ /* 16935 */ 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463, 18479,
+ /* 16950 */ 18968, 18495, 19670, 50655, 18544, 18567, 18590, 19934, 18528, 18551, 18574, 18597, 20868, 18620, 23546,
+ /* 16965 */ 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505, 19208,
+ /* 16980 */ 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674, 23546,
+ /* 16995 */ 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051, 18984,
+ /* 17010 */ 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396, 19137,
+ /* 17025 */ 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477, 25754,
+ /* 17040 */ 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632, 19657,
+ /* 17055 */ 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746, 41094,
+ /* 17070 */ 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016, 18679,
+ /* 17085 */ 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139, 20274,
+ /* 17100 */ 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489, 20515,
+ /* 17115 */ 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546, 23546,
+ /* 17130 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17145 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841, 23546, 23546,
+ /* 17160 */ 22150, 23546, 21369, 20766, 50679, 50692, 50708, 50717, 49509, 50740, 20967, 23546, 23546, 23546, 35799,
+ /* 17175 */ 23546, 23546, 51042, 23546, 23546, 23546, 23761, 23546, 23546, 23758, 25629, 19208, 50639, 19926, 50639,
+ /* 17190 */ 50790, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458, 18463,
+ /* 17205 */ 18479, 18968, 18495, 19670, 18521, 18544, 18567, 18590, 50663, 18528, 18551, 18574, 18597, 20868, 18620,
+ /* 17220 */ 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024, 18505,
+ /* 17235 */ 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839, 20674,
+ /* 17250 */ 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011, 20051,
+ /* 17265 */ 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668, 23396,
+ /* 17280 */ 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721, 19477,
+ /* 17295 */ 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592, 19632,
+ /* 17310 */ 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492, 19746,
+ /* 17325 */ 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842, 20016,
+ /* 17340 */ 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222, 51139,
+ /* 17355 */ 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037, 20489,
+ /* 17370 */ 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546, 23546,
+ /* 17385 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17400 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 42087, 23546,
+ /* 17415 */ 23546, 23546, 23546, 22568, 29910, 50839, 50872, 50878, 50849, 23148, 50894, 20967, 23546, 23546, 23546,
+ /* 17430 */ 35799, 23546, 23546, 50932, 23546, 23546, 22686, 23546, 23546, 23546, 22682, 25629, 19208, 50639, 19926,
+ /* 17445 */ 50639, 20660, 19723, 18282, 18849, 18305, 18327, 23546, 23546, 18368, 23546, 18915, 18388, 18432, 18458,
+ /* 17460 */ 18463, 18479, 18968, 18495, 19670, 50969, 18544, 18567, 18590, 21689, 18528, 18551, 18574, 18597, 20868,
+ /* 17475 */ 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695, 19209, 26024,
+ /* 17490 */ 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639, 18776, 19839,
+ /* 17505 */ 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958, 20812, 26011,
+ /* 17520 */ 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129, 18604, 20668,
+ /* 17535 */ 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422, 19456, 25721,
+ /* 17550 */ 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717, 19574, 19592,
+ /* 17565 */ 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432, 19853, 26492,
+ /* 17580 */ 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980, 23977, 20842,
+ /* 17595 */ 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 20159, 20175, 20206, 20222,
+ /* 17610 */ 51139, 20274, 51143, 20301, 20376, 20392, 51127, 20418, 50802, 20462, 25380, 50639, 18729, 32258, 26037,
+ /* 17625 */ 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858, 20884, 23546,
+ /* 17640 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17655 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 21089, 23546, 23546, 23546, 23546, 25841,
+ /* 17670 */ 23546, 23546, 23546, 23546, 21369, 23546, 23546, 23546, 23546, 23546, 23546, 23489, 26204, 23546, 23546,
+ /* 17685 */ 23546, 35799, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48973, 47563, 22824,
+ /* 17700 */ 35842, 22805, 43066, 27132, 23546, 23546, 23546, 44844, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17715 */ 23546, 22587, 47563, 47563, 47563, 47563, 22603, 22824, 22824, 22824, 34828, 22804, 22804, 22804, 22804,
+ /* 17730 */ 39677, 36943, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48975, 47563,
+ /* 17745 */ 47563, 47563, 47563, 37135, 22823, 22824, 22824, 22824, 22824, 49439, 22804, 22804, 22804, 22804, 22804,
+ /* 17760 */ 29885, 33201, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 48976, 47563, 47563,
+ /* 17775 */ 47563, 47563, 47564, 22821, 22824, 22824, 22824, 22824, 22767, 35849, 22804, 22804, 22804, 22804, 29879,
+ /* 17790 */ 33195, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 47562, 47563, 47563, 47563, 27195, 22821,
+ /* 17805 */ 22824, 22824, 22824, 22824, 30376, 22804, 22804, 22804, 22804, 29883, 33199, 23546, 23546, 23546, 23546,
+ /* 17820 */ 23546, 48973, 47563, 47563, 47563, 45209, 22824, 22824, 22824, 27834, 22804, 22804, 22804, 30403, 47447,
+ /* 17835 */ 23546, 23546, 23546, 23546, 47560, 47563, 47563, 23113, 22824, 22824, 33078, 22804, 22804, 31970, 23546,
+ /* 17850 */ 23546, 23546, 22586, 47563, 47563, 23109, 22824, 22825, 22804, 22804, 31964, 47447, 46606, 22585, 47563,
+ /* 17865 */ 24761, 22824, 30673, 22804, 36549, 46609, 47561, 23111, 30673, 39296, 23464, 24759, 33031, 33550, 48975,
+ /* 17880 */ 23107, 30672, 23141, 24756, 33030, 33551, 47559, 33030, 33552, 39426, 42307, 22729, 23448, 23351, 23363,
+ /* 17895 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17910 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 17925 */ 23546, 23546, 23546, 22457, 23546, 23546, 22482, 50993, 50998, 50998, 51019, 22480, 51014, 51035, 23546,
+ /* 17940 */ 23546, 23546, 23546, 23546, 23546, 51042, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 25629, 19208,
+ /* 17955 */ 50639, 19926, 50639, 20660, 19723, 18282, 18849, 18305, 51062, 23546, 23546, 18368, 23546, 18915, 18388,
+ /* 17970 */ 18432, 18458, 18463, 18479, 18968, 18495, 19670, 50655, 18544, 18567, 18590, 19934, 18528, 18551, 18574,
+ /* 17985 */ 18597, 20868, 18620, 23546, 30606, 23546, 23546, 23546, 23582, 23367, 18643, 23546, 18664, 50036, 18695,
+ /* 18000 */ 19209, 26024, 18505, 19208, 25377, 18724, 26048, 18745, 18766, 18771, 19889, 50639, 26053, 18750, 50639,
+ /* 18015 */ 18776, 19839, 20674, 23546, 18792, 18808, 18830, 23628, 18814, 18865, 23546, 44195, 18885, 18937, 18958,
+ /* 18030 */ 20812, 26011, 20051, 18984, 19036, 19054, 19072, 19090, 26127, 19108, 19038, 19056, 19074, 19092, 26129,
+ /* 18045 */ 18604, 20668, 23396, 19137, 19171, 19225, 39246, 19278, 47150, 19314, 19340, 26667, 19186, 19380, 19422,
+ /* 18060 */ 19456, 25721, 19477, 25754, 19498, 19451, 25716, 19472, 25749, 19493, 19514, 19530, 18900, 19554, 23717,
+ /* 18075 */ 19574, 19592, 19632, 19657, 20190, 20797, 20402, 21452, 19692, 19708, 19964, 21452, 19692, 19708, 20432,
+ /* 18090 */ 19853, 26492, 19746, 41094, 19782, 18942, 19201, 19798, 19825, 19883, 19905, 19950, 19883, 19905, 19980,
+ /* 18105 */ 23977, 20842, 20016, 18679, 20827, 20042, 20067, 20090, 20113, 20074, 20097, 20129, 20446, 51082, 20175,
+ /* 18120 */ 20206, 20222, 51139, 20274, 51143, 20301, 51098, 20392, 51127, 20418, 50802, 51114, 25380, 50639, 18729,
+ /* 18135 */ 32258, 26037, 20489, 20515, 19641, 20555, 20577, 20616, 20632, 20648, 20696, 20727, 20743, 20782, 20858,
+ /* 18150 */ 20884, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546,
+ /* 18165 */ 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 23546, 94503, 94503, 90406, 90406,
+ /* 18180 */ 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 1, 12290, 3, 0, 94503,
+ /* 18197 */ 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503,
+ /* 18212 */ 362, 94503, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 0,
+ /* 18228 */ 94503, 90406, 94503, 94503, 94503, 94503, 94503, 94503, 94503, 69632, 73728, 94503, 94503, 94503, 94503,
+ /* 18243 */ 94503, 65536, 94503, 0, 2183168, 0, 0, 0, 90406, 94503, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0,
+ /* 18265 */ 2985, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1631, 0, 0, 0, 0, 0, 1637, 0, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0,
+ /* 18291 */ 0, 0, 0, 0, 0, 0, 0, 0, 2454, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2904064, 2908160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 18321 */ 0, 2751, 0, 0, 0, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 0, 2997, 0, 0, 0, 0,
+ /* 18351 */ 3001, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 1191, 0, 0, 0, 0, 1107, 0, 0, 0, 2138112, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 18380 */ 0, 0, 0, 0, 0, 2978, 0, 0, 0, 2424832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625536, 0, 0, 0, 0, 0, 172032,
+ /* 18409 */ 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 1,
+ /* 18429 */ 12290, 3, 0, 2699264, 2715648, 0, 0, 2772992, 2805760, 2830336, 0, 2863104, 2920448, 0, 0, 0, 0, 0, 0, 0,
+ /* 18449 */ 1114, 0, 0, 0, 0, 1118, 0, 0, 1121, 0, 2805760, 2920448, 0, 0, 0, 0, 0, 2920448, 0, 0, 0, 0, 0, 0, 0,
+ /* 18474 */ 2732032, 0, 2179072, 2179072, 2179072, 2424832, 2433024, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 18486 */ 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2625536, 2805760, 2179072,
+ /* 18497 */ 2830336, 2179072, 2179072, 2863104, 2179072, 2179072, 2179072, 2920448, 2179072, 2179072, 2179072,
+ /* 18508 */ 2179072, 2179072, 2179072, 2179072, 2801664, 2813952, 2179072, 2838528, 2179072, 2179072, 2179072,
+ /* 18519 */ 2179072, 2179072, 0, 914, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824,
+ /* 18532 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536,
+ /* 18543 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536, 2125824, 2125824, 2125824, 2125824,
+ /* 18554 */ 2125824, 2125824, 2699264, 2125824, 2715648, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824,
+ /* 18565 */ 2125824, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 2125824, 2125824, 2805760, 2125824,
+ /* 18576 */ 2830336, 2125824, 2125824, 2863104, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824,
+ /* 18587 */ 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 18598 */ 2125824, 2125824, 2125824, 2125824, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 18609 */ 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824,
+ /* 18620 */ 2125824, 2457600, 2125824, 2125824, 2125824, 2125824, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2518, 0, 0,
+ /* 18640 */ 0, 0, 0, 0, 0, 0, 0, 2375680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 2408448, 0, 0,
+ /* 18670 */ 2584576, 0, 0, 0, 0, 2838528, 0, 0, 2838528, 0, 0, 0, 0, 0, 2469888, 2506752, 2756608, 0, 0, 2580480, 0,
+ /* 18691 */ 0, 0, 2396160, 2400256, 2412544, 0, 0, 2838528, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2408448,
+ /* 18708 */ 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 914, 0, 2125824, 2125824, 2125824, 2125824,
+ /* 18721 */ 2125824, 2445312, 2125824, 0, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824,
+ /* 18733 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2502656, 0, 0, 3010560, 2125824,
+ /* 18746 */ 2125824, 2125824, 2125824, 2125824, 2662400, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 18757 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2801664, 2813952, 2125824, 2838528, 2125824, 2801664,
+ /* 18768 */ 2813952, 2125824, 2838528, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 18779 */ 2125824, 2125824, 2125824, 2125824, 2125824, 3125248, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 18790 */ 2125824, 2125824, 2461696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2600960, 0, 2674688, 0, 2768896, 2777088,
+ /* 18811 */ 2781184, 0, 2822144, 0, 0, 2883584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3055616, 0, 0, 0, 3080192,
+ /* 18834 */ 3100672, 3104768, 0, 0, 0, 0, 3186688, 0, 0, 0, 0, 0, 0, 0, 3182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2732032, 0,
+ /* 18860 */ 0, 0, 0, 0, 0, 0, 0, 0, 3133440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3003, 3004, 0, 2719744, 0, 0, 0,
+ /* 18889 */ 0, 0, 0, 0, 0, 0, 0, 3014656, 3207168, 0, 2691072, 0, 0, 0, 0, 0, 2818048, 2846720, 0, 2916352, 0, 0,
+ /* 18911 */ 3002368, 0, 0, 3022848, 0, 0, 0, 0, 0, 2871296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2766, 0, 0, 0, 0, 0,
+ /* 18938 */ 3215360, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 18953 */ 2494464, 2179072, 2179072, 2514944, 2179072, 2179072, 2461696, 2465792, 2179072, 2179072, 2179072,
+ /* 18964 */ 2179072, 2179072, 2179072, 2523136, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2699264,
+ /* 18975 */ 2179072, 2715648, 2179072, 2723840, 2179072, 2732032, 2772992, 2179072, 2179072, 3100672, 2179072,
+ /* 18986 */ 2179072, 3133440, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 18997 */ 3207168, 2179072, 0, 0, 0, 0, 391, 392, 0, 393, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 3504, 0, 0, 0, 540,
+ /* 19023 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3399, 540, 540, 0, 0, 0, 2125824, 2125824, 2125824,
+ /* 19042 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2461696, 2465792, 2125824, 2125824,
+ /* 19053 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2523136, 2125824, 2125824, 2125824, 2125824,
+ /* 19064 */ 2125824, 2125824, 2125824, 2125824, 2600960, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 19075 */ 2641920, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2719744, 2125824, 2125824, 2125824,
+ /* 19086 */ 2125824, 2125824, 2768896, 2777088, 2768896, 2777088, 2125824, 2797568, 2822144, 2125824, 2125824,
+ /* 19097 */ 2125824, 2883584, 2125824, 2912256, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 19108 */ 2125824, 3133440, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 19119 */ 3207168, 2125824, 0, 0, 0, 0, 0, 0, 3011, 0, 0, 0, 0, 0, 0, 3018, 0, 0, 0, 0, 2605056, 0, 0, 0, 0,
+ /* 19144 */ 2887680, 0, 2924544, 0, 0, 0, 0, 0, 0, 0, 1135, 0, 0, 0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 19174 */ 3162112, 3170304, 0, 0, 3219456, 3035136, 0, 0, 0, 0, 0, 3072000, 2650112, 2179072, 2179072, 2179072,
+ /* 19190 */ 2707456, 2179072, 2736128, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2887680,
+ /* 19201 */ 2179072, 2179072, 2543616, 2547712, 2179072, 2179072, 2596864, 2179072, 2179072, 2179072, 2179072,
+ /* 19212 */ 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 19223 */ 2179072, 2584576, 0, 0, 2809856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3088384, 0, 0, 0, 0, 0, 1670, 0, 0, 0, 0,
+ /* 19249 */ 0, 0, 0, 2112, 0, 0, 0, 0, 0, 1680, 1681, 0, 1683, 0, 0, 0, 0, 0, 0, 0, 540, 561, 540, 561, 540, 540, 561,
+ /* 19276 */ 540, 585, 0, 0, 2576384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2420736, 0, 0, 0, 0, 429, 0, 0, 0, 0, 0, 0, 0,
+ /* 19305 */ 0, 0, 0, 0, 300, 0, 0, 0, 0, 0, 0, 3121152, 3141632, 0, 0, 0, 2924544, 0, 2682880, 0, 0, 0, 0, 0, 0, 0,
+ /* 19331 */ 1242, 1272, 1273, 0, 1242, 0, 540, 540, 540, 3112960, 2387968, 2179072, 2179072, 2179072, 2179072,
+ /* 19346 */ 2179072, 2179072, 2179072, 2453504, 2179072, 2473984, 2482176, 2179072, 2179072, 2179072, 2179072,
+ /* 19357 */ 2179072, 3010560, 2179072, 2179072, 2126737, 2126737, 2503569, 2126737, 2126737, 2126737, 2126737,
+ /* 19368 */ 2126737, 2126737, 2532241, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2605969,
+ /* 19379 */ 2126737, 2924544, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 19390 */ 3035136, 2179072, 2179072, 3072000, 2179072, 2179072, 2179072, 3137536, 2126737, 2126737, 2499473,
+ /* 19401 */ 2126737, 2126737, 2126737, 2556817, 2565009, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 19412 */ 3224465, 0, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 2446298, 2126810, 3121152, 2179072, 2179072,
+ /* 19425 */ 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 0, 0, 0, 0, 0,
+ /* 19440 */ 0, 3181, 0, 0, 0, 3184, 3185, 3186, 0, 0, 3189, 3194880, 2125824, 0, 0, 0, 0, 0, 0, 2387968, 2125824,
+ /* 19461 */ 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176,
+ /* 19472 */ 2125824, 2125824, 2125824, 2605056, 2125824, 2629632, 2125824, 2125824, 2650112, 2125824, 2125824,
+ /* 19483 */ 2125824, 2707456, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 19494 */ 2125824, 2125824, 2125824, 3035136, 2125824, 2125824, 3072000, 2125824, 2125824, 3121152, 2125824,
+ /* 19505 */ 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2125824, 2125824, 3190784, 2125824, 3170304,
+ /* 19516 */ 2125824, 2125824, 3190784, 3194880, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824, 2179072,
+ /* 19527 */ 2179072, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 0, 0,
+ /* 19540 */ 0, 0, 0, 0, 0, 0, 0, 3507, 540, 540, 540, 540, 540, 540, 0, 3145728, 0, 3203072, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 19566 */ 0, 0, 0, 0, 0, 3314, 0, 540, 0, 3067904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0,
+ /* 19596 */ 2895872, 0, 0, 0, 2445312, 0, 2842624, 0, 0, 0, 2637824, 0, 0, 0, 0, 432, 0, 0, 0, 329, 467, 467, 467,
+ /* 19619 */ 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 0, 0, 0, 2621440, 0, 3182592, 2899968, 0,
+ /* 19640 */ 2961408, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2592768, 2179072, 2179072, 2179072, 2179072,
+ /* 19653 */ 2179072, 2179072, 2179072, 2125824, 2445312, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 19664 */ 2179072, 2179072, 2179072, 2179072, 2179072, 2551808, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 19675 */ 3117056, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 19686 */ 2179072, 2179072, 2126737, 2126737, 2126737, 2126737, 2637824, 2125824, 2125824, 2125824, 2125824,
+ /* 19697 */ 2727936, 2752512, 2125824, 2125824, 2125824, 2125824, 2842624, 2846720, 2125824, 2895872, 2916352,
+ /* 19708 */ 2125824, 2125824, 2945024, 2125824, 2125824, 2994176, 2125824, 3002368, 2125824, 2125824, 3022848,
+ /* 19719 */ 2125824, 3067904, 3084288, 3096576, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0,
+ /* 19734 */ 0, 0, 0, 0, 0, 0, 2442, 2443, 0, 0, 2446, 0, 0, 0, 0, 0, 2928640, 0, 0, 0, 3059712, 0, 2543616, 2666496,
+ /* 19758 */ 0, 2633728, 0, 0, 0, 0, 0, 1697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0, 2494464, 0, 0, 0, 0,
+ /* 19787 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3211264, 2179072, 2928640, 2179072, 2179072, 2179072, 2998272, 2179072,
+ /* 19805 */ 2179072, 2179072, 2179072, 3059712, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0,
+ /* 19818 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2446225, 2126737, 2179072, 3178496, 2125824, 2125824,
+ /* 19829 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464, 2125824, 2125824, 2514944, 2125824,
+ /* 19840 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072,
+ /* 19851 */ 2179072, 2179072, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0,
+ /* 19870 */ 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 2113, 0, 2125824, 2543616, 2547712, 2125824, 2125824, 2596864,
+ /* 19889 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824,
+ /* 19902 */ 2125824, 2125824, 2408448, 2125824, 2928640, 2125824, 2125824, 2125824, 2998272, 2125824, 2125824,
+ /* 19913 */ 2125824, 2125824, 3059712, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824,
+ /* 19925 */ 2126811, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2125824, 2125824,
+ /* 19937 */ 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2424832,
+ /* 19950 */ 2125824, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2494464,
+ /* 19961 */ 2125824, 2125824, 2514944, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 0, 0, 2125824,
+ /* 19974 */ 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 3178496, 2125824, 2179072, 2125824,
+ /* 19985 */ 2125824, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2441216, 0, 0, 0, 0, 0, 0, 3311, 0, 0, 0,
+ /* 20003 */ 0, 0, 0, 0, 0, 540, 540, 540, 2165, 540, 540, 540, 540, 0, 0, 0, 2740224, 0, 0, 0, 0, 0, 2793472, 0, 0, 0,
+ /* 20029 */ 0, 0, 0, 0, 1244, 0, 0, 0, 0, 1247, 0, 1194, 0, 2646016, 2179072, 2179072, 2695168, 2756608, 2179072,
+ /* 20048 */ 2179072, 2179072, 2932736, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 20059 */ 2179072, 3039232, 2179072, 3063808, 2179072, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072,
+ /* 20070 */ 3153920, 3166208, 3174400, 2396160, 2400256, 2125824, 2125824, 2441216, 2125824, 2469888, 2125824,
+ /* 20081 */ 2125824, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2588672, 2125824, 2519040, 2125824,
+ /* 20092 */ 2125824, 2125824, 2125824, 2588672, 2125824, 2613248, 2646016, 2125824, 2125824, 2695168, 2756608,
+ /* 20103 */ 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 20114 */ 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3129344, 2125824, 2125824,
+ /* 20125 */ 3153920, 3166208, 3174400, 2396160, 2125824, 2125824, 3129344, 2125824, 2125824, 3153920, 3166208,
+ /* 20136 */ 3174400, 2125824, 2506752, 2506752, 2506752, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824,
+ /* 20147 */ 2125824, 2125824, 3223552, 987, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 0,
+ /* 20160 */ 3043328, 0, 3149824, 2936832, 0, 2760704, 3176, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 3158016, 2437120, 0,
+ /* 20178 */ 2785280, 0, 0, 0, 2428928, 0, 3018752, 2764800, 2572288, 0, 0, 3051520, 2179072, 2179072, 2637824,
+ /* 20193 */ 2179072, 2179072, 2179072, 2179072, 2727936, 2752512, 2179072, 2179072, 2179072, 2842624, 2846720,
+ /* 20204 */ 2179072, 2916352, 2428928, 2437120, 2179072, 2486272, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 20215 */ 2179072, 2179072, 2179072, 2654208, 2678784, 2760704, 2764800, 2854912, 2969600, 2179072, 3006464,
+ /* 20226 */ 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272,
+ /* 20237 */ 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 297, 0, 0, 0, 0, 0, 2043, 2044,
+ /* 20258 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2140, 0, 0, 0, 0, 0, 0, 2125824, 3018752, 2125824, 2125824, 2125824, 3149824,
+ /* 20280 */ 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 20291 */ 2125824, 2125824, 0, 24576, 987, 2125824, 2125824, 2125824, 2125824, 2424832, 2125824, 3149824, 2125824,
+ /* 20304 */ 2179072, 3051520, 2125824, 3051520, 2125824, 3051520, 0, 2490368, 2498560, 0, 0, 0, 0, 0, 0, 304, 0,
+ /* 20321 */ 204800, 0, 0, 0, 0, 0, 0, 0, 0, 1713, 0, 0, 0, 0, 0, 0, 0, 0, 1727, 0, 0, 0, 0, 0, 0, 0, 0, 2068, 0, 0, 0,
+ /* 20352 */ 0, 0, 0, 0, 0, 2095, 0, 0, 0, 0, 0, 0, 0, 0, 2107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2875392, 0, 0, 0, 3176, 0,
+ /* 20382 */ 0, 2834432, 0, 3227648, 2568192, 0, 0, 0, 0, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 2179072,
+ /* 20398 */ 2179072, 2179072, 2555904, 2564096, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3223552, 0, 0,
+ /* 20411 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 20422 */ 2125824, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824,
+ /* 20433 */ 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 2125824, 2179072, 2416640, 2125824, 2125824,
+ /* 20444 */ 2179072, 2179072, 2125824, 2125824, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 0, 3108864,
+ /* 20460 */ 3198976, 0, 0, 2748416, 2879488, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072,
+ /* 20479 */ 2179072, 2592768, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2125824,
+ /* 20490 */ 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 2125824, 2502656, 2125824, 2125824,
+ /* 20501 */ 2125824, 2125824, 2125824, 2125824, 296, 0, 0, 0, 296, 0, 297, 0, 0, 0, 2125824, 2125824, 2125824,
+ /* 20518 */ 3010560, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 2592768, 0, 0, 0, 0, 433, 0, 0, 0, 453, 469, 469,
+ /* 20541 */ 469, 469, 469, 469, 469, 469, 469, 479, 469, 469, 469, 469, 469, 469, 2125824, 2125824, 2125824, 2125824,
+ /* 20559 */ 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 20570 */ 2125824, 0, 1918, 2125824, 2125824, 2125824, 2408448, 2125824, 2592768, 2125824, 2125824, 2125824,
+ /* 20582 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2449408, 0, 2535424, 3031040, 0, 0, 0, 0, 0, 1734, 0, 1736,
+ /* 20599 */ 1710, 540, 540, 540, 540, 540, 540, 540, 540, 1816, 1818, 540, 540, 540, 540, 540, 1360, 0, 2859008, 0, 0,
+ /* 20620 */ 2179072, 2449408, 2179072, 2535424, 2179072, 2609152, 2179072, 2859008, 2179072, 2179072, 2179072,
+ /* 20631 */ 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824,
+ /* 20642 */ 2125824, 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824,
+ /* 20653 */ 2125824, 2125824, 3031040, 2125824, 2527232, 0, 0, 0, 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072,
+ /* 20668 */ 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 20679 */ 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2804, 540, 540, 540, 540, 2527232, 2179072, 2179072, 2179072,
+ /* 20700 */ 2179072, 2179072, 2125824, 2527232, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2527232,
+ /* 20711 */ 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 1080, 1084, 0, 0, 1088, 2125824,
+ /* 20728 */ 2125824, 2125824, 2125824, 3092480, 0, 0, 0, 0, 3026944, 2404352, 2179072, 2179072, 2179072, 2179072,
+ /* 20742 */ 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 3026944, 2404352, 2125824, 2125824, 2125824,
+ /* 20753 */ 2125824, 3026944, 2539520, 0, 2949120, 0, 0, 0, 0, 434, 0, 0, 446, 0, 0, 0, 0, 0, 0, 0, 0, 457, 1147354,
+ /* 20776 */ 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 2179072, 2658304, 2973696, 2179072, 2125824,
+ /* 20787 */ 2658304, 2973696, 2125824, 2125824, 2658304, 2973696, 2125824, 2711552, 0, 2560000, 2179072, 2179072,
+ /* 20799 */ 2945024, 2179072, 2179072, 2994176, 2179072, 3002368, 2179072, 2179072, 3022848, 2179072, 3067904,
+ /* 20810 */ 3084288, 3096576, 2179072, 2179072, 2600960, 2179072, 2179072, 2179072, 2179072, 2641920, 2179072,
+ /* 20821 */ 2179072, 2179072, 2179072, 2179072, 2179072, 2719744, 2179072, 2179072, 2441216, 2179072, 2469888,
+ /* 20832 */ 2179072, 2179072, 2179072, 2519040, 2179072, 2179072, 2179072, 2179072, 2588672, 2179072, 2613248,
+ /* 20843 */ 2703360, 0, 0, 0, 0, 2977792, 0, 0, 3047424, 3129344, 0, 2981888, 2396160, 0, 3153920, 2560000, 2125824,
+ /* 20860 */ 2560000, 2125824, 0, 2179072, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 0, 2179072, 2125824,
+ /* 20873 */ 2125824, 2125824, 2457600, 2179072, 2179072, 2179072, 2179072, 2457600, 2125824, 2125824, 2125824,
+ /* 20884 */ 2985984, 2985984, 2985984, 2985984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 111050,
+ /* 20908 */ 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050, 111050,
+ /* 20921 */ 111050, 111050, 458, 458, 111050, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 111050, 111050,
+ /* 20938 */ 111050, 111050, 111050, 111050, 111050, 111050, 111050, 458, 111050, 111050, 111050, 111050, 111050, 0, 0,
+ /* 20953 */ 0, 0, 0, 0, 0, 0, 0, 0, 2738, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0,
+ /* 20981 */ 0, 0, 0, 0, 0, 184723, 184931, 184931, 184931, 0, 184931, 184931, 184931, 184931, 184931, 0, 0, 0, 0, 0,
+ /* 21001 */ 184931, 0, 184931, 1, 12290, 3, 78112, 1059, 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072,
+ /* 21017 */ 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 296, 0,
+ /* 21030 */ 297, 0, 2125824, 1059, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2750, 0,
+ /* 21051 */ 0, 0, 0, 2755, 0, 300, 118784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 300, 300,
+ /* 21079 */ 300, 300, 0, 0, 0, 0, 0, 300, 0, 300, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0,
+ /* 21109 */ 0, 0, 2183168, 0, 0, 0, 0, 0, 33403, 297, 0, 2134016, 49791, 301, 0, 0, 0, 0, 0, 0, 225889, 225889,
+ /* 21131 */ 225889, 225889, 225740, 225889, 225889, 225889, 225889, 225889, 225740, 225740, 225740, 225740, 225740,
+ /* 21144 */ 225906, 225740, 225906, 1, 12290, 3, 0, 0, 0, 0, 249856, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 697, 698, 0,
+ /* 21168 */ 362, 362, 362, 0, 0, 0, 0, 0, 0, 711, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 296, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21197 */ 2134016, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 0, 0, 3506, 0, 540, 540, 540, 540, 540, 540, 540, 2530,
+ /* 21222 */ 540, 540, 540, 540, 540, 540, 540, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 296,
+ /* 21240 */ 0, 0, 0, 300, 0, 0, 0, 300, 119195, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 122880, 122880, 122880, 122880,
+ /* 21262 */ 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 0, 0,
+ /* 21277 */ 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21297 */ 0, 0, 3166, 3167, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 0, 0, 0, 0, 0, 122880, 0, 122880, 0,
+ /* 21320 */ 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21350 */ 122880, 122880, 122880, 122880, 122880, 0, 122880, 0, 2105629, 12290, 3, 0, 0, 291, 0, 0, 0, 0, 291, 0, 0,
+ /* 21371 */ 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 746, 0, 0, 0,
+ /* 21400 */ 0, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 69632, 73728, 0, 416, 416, 0, 0, 65536, 416, 1092, 0,
+ /* 21425 */ 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2765, 0, 0, 0, 0, 0, 1824, 2125824,
+ /* 21448 */ 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 21459 */ 2125824, 2125824, 2125824, 2551808, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 131072, 0, 0, 0,
+ /* 21475 */ 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507, 0, 0, 0, 0, 0,
+ /* 21505 */ 131072, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 131072, 0, 131072, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21530 */ 0, 131072, 0, 131072, 131072, 131072, 131072, 0, 131072, 131072, 131072, 131072, 131072, 0, 0, 0, 0, 0,
+ /* 21548 */ 131072, 0, 131072, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 135168, 135168, 0, 0, 0, 0, 0,
+ /* 21575 */ 0, 0, 0, 0, 0, 0, 0, 0, 320, 321, 0, 0, 0, 135168, 0, 0, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3174, 0,
+ /* 21605 */ 0, 0, 0, 0, 0, 0, 135168, 135168, 135168, 135168, 135168, 135168, 135168, 0, 135168, 135168, 135168,
+ /* 21622 */ 135168, 135168, 0, 0, 0, 0, 0, 135168, 0, 135168, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118784,
+ /* 21647 */ 296, 0, 2183168, 0, 0, 0, 0, 0, 636, 637, 0, 2134016, 640, 641, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0,
+ /* 21673 */ 0, 0, 0, 0, 0, 266240, 0, 0, 0, 1361, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824,
+ /* 21690 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 986, 2125824, 2125824, 2125824,
+ /* 21703 */ 2125824, 2424832, 0, 301, 139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331, 301, 301, 301, 301,
+ /* 21728 */ 0, 0, 0, 0, 0, 301, 0, 301, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 297, 0, 2183168, 0, 0,
+ /* 21756 */ 0, 0, 0, 296, 33406, 0, 2134016, 300, 49794, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21782 */ 1134592, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61440, 0, 0, 0, 0, 647, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 21811 */ 0, 0, 0, 2455, 0, 0, 0, 0, 0, 301, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2779, 0,
+ /* 21838 */ 0, 0, 0, 0, 298, 298, 143728, 298, 298, 298, 143728, 69632, 73728, 298, 298, 143658, 298, 298, 65536, 298,
+ /* 21858 */ 298, 0, 0, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 363, 298, 0, 143658, 298, 298,
+ /* 21879 */ 298, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658,
+ /* 21892 */ 143658, 143658, 143658, 143658, 298, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658,
+ /* 21906 */ 143658, 143658, 298, 298, 298, 143658, 368, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298,
+ /* 21925 */ 298, 298, 298, 298, 143658, 298, 298, 143658, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658,
+ /* 21941 */ 298, 0, 298, 0, 298, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143658, 298, 143658,
+ /* 21961 */ 143658, 143658, 143658, 298, 298, 143658, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 143728,
+ /* 21979 */ 298, 298, 298, 298, 298, 298, 298, 143658, 143658, 143658, 143658, 143658, 143658, 143728, 143658, 143728,
+ /* 21995 */ 143728, 143728, 143728, 143728, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 143658, 1, 12290,
+ /* 22009 */ 3, 0, 0, 0, 0, 0, 0, 0, 90406, 90406, 90406, 90406, 0, 94503, 0, 0, 0, 3117056, 0, 0, 0, 0, 0, 0, 0,
+ /* 22034 */ 2200252, 2200252, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 155648,
+ /* 22058 */ 155648, 0, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648,
+ /* 22072 */ 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 155648, 0, 0, 0, 0,
+ /* 22087 */ 155648, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1663, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0,
+ /* 22116 */ 155648, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 0, 12290, 3, 0, 0,
+ /* 22138 */ 2183168, 126976, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 1146880, 0, 1146880, 0, 0,
+ /* 22161 */ 0, 0, 0, 0, 0, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 540, 2163, 540, 540, 540, 540, 540, 540, 0, 0, 0, 3117056, 0,
+ /* 22188 */ 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 345, 346, 347, 0, 0, 0, 0, 0, 0, 0, 757, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 22220 */ 1156, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744,
+ /* 22244 */ 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744,
+ /* 22257 */ 159744, 163840, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 159744, 159744, 0, 0, 0, 0, 0, 0,
+ /* 22274 */ 0, 0, 25160, 0, 0, 159744, 0, 0, 0, 0, 25160, 25160, 25160, 159744, 25160, 25160, 25160, 25160, 25160,
+ /* 22293 */ 159744, 159744, 159744, 159744, 25160, 159744, 25160, 1, 12290, 3, 0, 167936, 167936, 167936, 167936,
+ /* 22308 */ 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1, 12290,
+ /* 22322 */ 3, 0, 167936, 167936, 167936, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936,
+ /* 22342 */ 167936, 167936, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3015, 0, 0, 0, 0, 0, 0, 0, 0, 2138112, 1183, 0, 0,
+ /* 22368 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0,
+ /* 22397 */ 0, 0, 0, 0, 0, 172032, 172032, 0, 172032, 0, 0, 172032, 0, 172032, 0, 172032, 0, 0, 0, 0, 172032, 172032,
+ /* 22419 */ 172032, 172032, 172032, 172032, 172032, 172032, 1, 12290, 3, 0, 172032, 0, 172032, 172032, 0, 172032,
+ /* 22435 */ 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032,
+ /* 22448 */ 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 22467 */ 106496, 0, 0, 0, 0, 0, 1, 286, 3, 0, 0, 0, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 0, 0,
+ /* 22496 */ 0, 106496, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128,
+ /* 22510 */ 176128, 176128, 176128, 176128, 1, 0, 3, 78112, 176128, 176128, 176128, 0, 0, 176128, 0, 0, 0, 0, 0, 0, 0,
+ /* 22531 */ 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111050, 0, 0, 0,
+ /* 22553 */ 0, 0, 78112, 290, 0, 634, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 1159168, 414, 414, 0,
+ /* 22578 */ 0, 0, 0, 0, 414, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 0, 914, 561, 561,
+ /* 22607 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 959, 561, 585, 585, 585, 1490, 585, 585, 585,
+ /* 22628 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1498, 585, 585, 0, 0, 229376, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 22652 */ 1686, 0, 0, 0, 0, 0, 0, 404, 404, 404, 404, 0, 404, 404, 404, 404, 404, 0, 0, 0, 0, 0, 404, 0, 404, 1,
+ /* 22678 */ 12290, 3, 78112, 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155072, 0, 0, 0, 0, 0, 0, 0, 2131, 0, 0, 0, 0,
+ /* 22707 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, 0, 0, 561, 561, 561, 561, 561, 561, 2250, 561, 561, 561, 561,
+ /* 22733 */ 561, 561, 585, 585, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0, 3295, 0, 0, 0, 0, 0, 0, 0, 712, 0, 0, 0, 716, 0,
+ /* 22761 */ 0, 719, 0, 561, 561, 2287, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 585,
+ /* 22784 */ 585, 585, 2347, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1514, 585, 585, 2372,
+ /* 22804 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 561, 561,
+ /* 22826 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 2671, 585, 585,
+ /* 22847 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1515, 585, 585, 0, 0, 0, 2994, 0, 0, 0, 2998, 0, 0,
+ /* 22871 */ 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 540, 3035, 540, 540, 540,
+ /* 22890 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 910, 540, 3075, 561, 561, 561, 561, 561, 561, 561,
+ /* 22911 */ 561, 561, 561, 561, 561, 561, 561, 561, 1417, 3116, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 22932 */ 585, 585, 585, 585, 1501, 0, 0, 3178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3187, 0, 0, 0, 0, 0, 2046, 0, 2149, 0,
+ /* 22960 */ 0, 0, 0, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 1, 12290, 3, 0,
+ /* 22980 */ 540, 540, 540, 3203, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3211, 540, 540, 540, 540, 540, 2813,
+ /* 23000 */ 540, 540, 2817, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2555, 540, 540, 540, 540, 540, 540, 3255,
+ /* 23020 */ 585, 585, 585, 3258, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3266, 585, 561, 0, 1287, 585, 1467,
+ /* 23040 */ 1376, 540, 540, 1339, 540, 540, 561, 561, 1430, 561, 0, 585, 585, 585, 585, 585, 288, 1079, 0, 0, 0, 0, 0,
+ /* 23063 */ 0, 0, 0, 2427, 0, 0, 0, 0, 0, 0, 0, 0, 2465, 0, 0, 2468, 0, 0, 0, 0, 0, 0, 0, 0, 3309, 0, 0, 0, 0, 0, 0,
+ /* 23094 */ 0, 0, 0, 0, 540, 3508, 540, 3509, 540, 540, 540, 3326, 3327, 540, 540, 540, 540, 540, 540, 540, 540, 561,
+ /* 23116 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 961, 561, 585, 585, 585, 3361, 585, 585,
+ /* 23137 */ 585, 585, 3362, 3363, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 0,
+ /* 23162 */ 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 3387, 0, 0, 0, 0, 0, 2092, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 23194 */ 404, 0, 0, 0, 0, 0, 561, 3416, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 3425, 585, 585, 585, 585,
+ /* 23217 */ 585, 585, 1492, 585, 585, 585, 585, 585, 585, 585, 1499, 585, 585, 585, 585, 3431, 585, 585, 585, 585,
+ /* 23237 */ 3435, 540, 561, 585, 0, 0, 0, 0, 0, 0, 665, 0, 0, 668, 0, 0, 0, 0, 0, 0, 0, 3172, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 23267 */ 0, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 3450,
+ /* 23289 */ 540, 540, 540, 540, 540, 2814, 540, 2816, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2233, 540, 540,
+ /* 23309 */ 540, 540, 540, 0, 561, 561, 561, 3573, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585,
+ /* 23330 */ 585, 3538, 585, 585, 3585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 3627, 561, 561,
+ /* 23353 */ 585, 585, 0, 540, 561, 585, 0, 540, 561, 585, 0, 540, 561, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 23380 */ 2662400, 0, 2813952, 78112, 290, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 0, 0, 0, 0, 2473984,
+ /* 23403 */ 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2134756, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 23433 */ 0, 0, 0, 1, 12290, 3, 0, 0, 0, 188416, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561,
+ /* 23456 */ 585, 585, 585, 585, 0, 0, 540, 540, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540,
+ /* 23482 */ 540, 540, 2169, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 3, 78112, 192971, 192971,
+ /* 23507 */ 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971,
+ /* 23520 */ 192971, 0, 192971, 0, 1, 12290, 3, 0, 192971, 192971, 192971, 0, 0, 192971, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 23544 */ 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 0, 0, 0, 0, 192971, 192971, 192971,
+ /* 23570 */ 192971, 192971, 192971, 192971, 192971, 192971, 0, 192971, 192971, 192971, 192971, 192971, 0, 0, 0, 0, 0,
+ /* 23587 */ 0, 0, 0, 0, 0, 2801664, 0, 0, 0, 0, 2142208, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674, 78112,
+ /* 23616 */ 290, 0, 0, 0, 0, 0, 296, 297, 0, 299, 300, 301, 0, 0, 0, 0, 0, 0, 2797568, 0, 0, 0, 0, 0, 0, 0, 2850816,
+ /* 23643 */ 2867200, 0, 0, 740, 404, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 0, 0, 0, 0, 0, 740, 540, 585, 585, 561,
+ /* 23671 */ 540, 540, 540, 540, 540, 561, 561, 561, 561, 585, 585, 585, 585, 2029, 0, 2031, 0, 0, 0, 0, 740, 1184, 0,
+ /* 23694 */ 0, 0, 0, 1188, 0, 0, 0, 0, 0, 0, 0, 1583, 0, 1585, 0, 0, 0, 0, 0, 0, 0, 1661, 1662, 0, 0, 0, 0, 0, 0, 0,
+ /* 23724 */ 0, 2727936, 0, 0, 0, 3084288, 0, 0, 0, 0, 0, 0, 1577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 351, 352, 353,
+ /* 23752 */ 354, 0, 0, 0, 1188, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1150976, 0, 0, 0, 0, 0, 0, 561, 561, 585,
+ /* 23780 */ 585, 585, 585, 1559, 2029, 0, 0, 0, 0, 1565, 2031, 0, 0, 0, 0, 0, 2120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2130,
+ /* 23807 */ 2033, 0, 2035, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, 337, 338, 561, 561, 2323, 2648, 0, 0, 0, 0,
+ /* 23834 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2339, 585, 585, 2342, 0, 304, 0, 304, 0, 0, 0, 0,
+ /* 23857 */ 0, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 2136, 0, 2138, 0, 0, 0, 0, 0, 0, 0, 0, 791, 817, 0, 817, 812, 0, 0, 0,
+ /* 23887 */ 0, 0, 0, 204800, 204800, 0, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800,
+ /* 23902 */ 204800, 204800, 204800, 204800, 205104, 204800, 204800, 205103, 205104, 204800, 205103, 205103, 204800,
+ /* 23915 */ 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 2183801, 0, 0, 0, 0, 0, 296, 297, 151552,
+ /* 23942 */ 2134016, 300, 301, 0, 212992, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3117056, 0, 0,
+ /* 23970 */ 0, 0, 0, 0, 0, 0, 2200253, 0, 0, 0, 0, 0, 0, 2932736, 2965504, 0, 0, 3076096, 0, 0, 2695168, 3174400,
+ /* 23992 */ 2646016, 0, 914, 2126737, 2126737, 2126737, 2126737, 2425745, 2433937, 2126737, 2126737, 2126737, 2126737,
+ /* 24005 */ 2126737, 2126737, 2126737, 2126737, 0, 0, 987, 2126810, 2126810, 2126810, 2126810, 2425818, 2724753,
+ /* 24018 */ 2126737, 2732945, 2773905, 2126737, 2126737, 2126737, 2806673, 2126737, 2831249, 2126737, 2126737,
+ /* 24029 */ 2864017, 2126737, 2126737, 2126737, 2126737, 2126737, 2524049, 2126737, 2126737, 2126737, 2126737,
+ /* 24040 */ 2126737, 2126737, 2126737, 2126737, 2601873, 2126737, 2126737, 2921361, 2126737, 2126737, 2126737,
+ /* 24051 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3117969, 2126737, 2126737,
+ /* 24062 */ 2126737, 2126737, 2593681, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126810,
+ /* 24073 */ 2126810, 2126810, 2126810, 3093393, 0, 0, 0, 0, 3026944, 2404352, 2179072, 2179072, 2179072, 2179072,
+ /* 24087 */ 3026944, 2434010, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24098 */ 2126810, 2126810, 2126810, 2126810, 2626522, 2126810, 2126737, 0, 2179072, 2126810, 2126810, 2126737,
+ /* 24110 */ 2457600, 2179072, 2179072, 2179072, 2179072, 2458513, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 24121 */ 2626449, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2700177, 2126737, 2716561, 2126737,
+ /* 24132 */ 2806746, 2126810, 2831322, 2126810, 2126810, 2864090, 2126810, 2126810, 2126810, 2126810, 2921434,
+ /* 24143 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2179072, 2126810, 2126810, 2126737, 2179072,
+ /* 24154 */ 2179072, 2179072, 2179072, 2126737, 2126737, 2126737, 2458586, 2126810, 2126810, 2126810, 2126810,
+ /* 24165 */ 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 321, 395, 0, 0, 0, 321, 0, 0, 2126737, 2126737, 2126737, 2409361,
+ /* 24187 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 24198 */ 2126737, 2126737, 2126737, 2126737, 2126737, 3126161, 2126737, 2126737, 2126737, 2802577, 2814865,
+ /* 24209 */ 2126737, 2839441, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 24220 */ 2126737, 2126737, 2126810, 2126810, 2126810, 2126810, 2126810, 2663386, 2126810, 2126810, 2126810,
+ /* 24231 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2802650, 2814938, 2126810,
+ /* 24242 */ 2839514, 0, 0, 0, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 24255 */ 2126737, 2462609, 2466705, 2126737, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 0, 0, 0, 0, 0, 0, 0,
+ /* 24272 */ 0, 0, 297, 0, 0, 0, 0, 0, 0, 2769809, 2778001, 2126737, 2798481, 2823057, 2126737, 2126737, 2126737,
+ /* 24289 */ 2884497, 2126737, 2913169, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2655121,
+ /* 24300 */ 2679697, 2761617, 2765713, 2786193, 2855825, 2970513, 2126737, 3007377, 2126737, 3134353, 2126737,
+ /* 24311 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3208081, 2126737, 0, 0, 0, 0, 0,
+ /* 24326 */ 325, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24344 */ 2126810, 2126810, 2126810, 2126810, 2462682, 2466778, 2126810, 2126810, 2126810, 2524122, 2126810,
+ /* 24355 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2601946, 2126810, 2126810, 2126810,
+ /* 24366 */ 2585562, 2126810, 2126810, 2126810, 2126810, 2126810, 2618330, 2126810, 2126810, 2126810, 2126810,
+ /* 24377 */ 2126810, 2126810, 2126810, 2888666, 2126810, 2126810, 2925530, 2126810, 2126810, 2126810, 2126810,
+ /* 24388 */ 2126810, 2126810, 2642906, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2720730, 2126810,
+ /* 24399 */ 2126810, 2126810, 2126810, 2126810, 2769882, 2778074, 2126810, 2798554, 2823130, 2126810, 2126810,
+ /* 24410 */ 2126810, 2884570, 2126810, 2913242, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24421 */ 2126810, 3126234, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24432 */ 3208154, 2126810, 2126737, 2179072, 2126810, 2126810, 2126737, 0, 0, 0, 2388881, 2126737, 2126737,
+ /* 24445 */ 2421649, 2126737, 2126737, 2126737, 2126737, 2126737, 2454417, 2126737, 2474897, 2483089, 2630545,
+ /* 24456 */ 2126737, 2126737, 2651025, 2126737, 2126737, 2126737, 2708369, 2126737, 2737041, 2126737, 2126737,
+ /* 24467 */ 2126737, 2126737, 2126737, 2126737, 2126737, 985, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24479 */ 2126810, 2126810, 2126810, 2126810, 2552794, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737,
+ /* 24490 */ 2126737, 3072913, 2126737, 2126737, 3122065, 2126737, 2126737, 3142545, 2126737, 2126737, 2126737,
+ /* 24501 */ 3171217, 2126737, 2126737, 3191697, 3195793, 2126737, 0, 0, 0, 0, 0, 0, 2388954, 2126810, 2126810,
+ /* 24516 */ 2421722, 2126810, 2126810, 2126810, 2126810, 2126810, 3040218, 2126810, 3064794, 2126810, 2126810,
+ /* 24527 */ 2126810, 2126810, 3101658, 2126810, 2126810, 3134426, 2126810, 2454490, 2126810, 2474970, 2483162,
+ /* 24538 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2532314, 2126810, 2126810, 2126810, 2126810,
+ /* 24549 */ 3036122, 2126810, 2126810, 3072986, 2126810, 2126810, 3122138, 2126810, 2126810, 3142618, 2126810,
+ /* 24560 */ 2126810, 2126810, 3171290, 2126810, 2126810, 3191770, 3195866, 2126810, 2126737, 2179072, 2126810,
+ /* 24571 */ 2126810, 2126737, 2179072, 2179072, 3112960, 3219456, 2126737, 2126737, 3113873, 3220369, 2126810,
+ /* 24582 */ 2126810, 3113946, 3220442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936,
+ /* 24600 */ 167936, 2638737, 2126737, 2126737, 2126737, 2126737, 2728849, 2753425, 2126737, 2126737, 2126737, 2126737,
+ /* 24612 */ 2843537, 2847633, 2126737, 2896785, 2917265, 2638810, 2126810, 2126810, 2126810, 2126810, 2728922,
+ /* 24623 */ 2753498, 2126810, 2126810, 2126810, 2126810, 2843610, 2847706, 2126810, 2896858, 2917338, 2179072,
+ /* 24634 */ 3178496, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2495377, 2126737,
+ /* 24645 */ 2126737, 2515857, 2126737, 2126737, 2126737, 2126737, 3011473, 2126737, 2126737, 2126810, 2126810,
+ /* 24656 */ 2503642, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3138522, 2126737, 2940928,
+ /* 24667 */ 2941841, 2941914, 0, 0, 0, 0, 2126737, 2544529, 2548625, 2126737, 2126737, 2597777, 2126737, 2126737,
+ /* 24681 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2552721, 2126737, 2126737,
+ /* 24692 */ 2126737, 2126737, 2126737, 2126737, 2929553, 2126737, 2126737, 2126737, 2999185, 2126737, 2126737,
+ /* 24703 */ 2126737, 2126737, 3060625, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3040145,
+ /* 24714 */ 2126737, 3064721, 2126737, 2126737, 2126737, 2126737, 3101585, 2126737, 2126737, 3179409, 2126810,
+ /* 24725 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2495450, 2126810, 2126810, 2515930,
+ /* 24736 */ 2126810, 2126810, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0, 0, 0, 2160, 0, 0,
+ /* 24758 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 3525, 561,
+ /* 24779 */ 2126810, 2544602, 2548698, 2126810, 2126810, 2597850, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24790 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 0, 2502656, 0, 0, 3010560, 2126810, 2929626,
+ /* 24803 */ 2126810, 2126810, 2126810, 2999258, 2126810, 2126810, 2126810, 2126810, 3060698, 2126810, 2126810,
+ /* 24814 */ 2126810, 2126810, 2126810, 2126810, 3118042, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810,
+ /* 24825 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737,
+ /* 24836 */ 2126810, 3179482, 2126737, 2179072, 2126810, 2126737, 2179072, 2179072, 2126737, 2126737, 2126810,
+ /* 24847 */ 2126810, 2441216, 0, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 3129344, 2179072,
+ /* 24873 */ 2179072, 3153920, 3166208, 3174400, 2397073, 2401169, 2126737, 2126737, 2442129, 2126737, 2470801,
+ /* 24884 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2663313, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 24895 */ 2126737, 2126737, 2126737, 2126737, 2126737, 0, 0, 2126810, 2126810, 2126810, 2409434, 2519953, 2126737,
+ /* 24908 */ 2126737, 2126737, 2126737, 2589585, 2126737, 2614161, 2646929, 2126737, 2126737, 2696081, 2757521,
+ /* 24919 */ 2126737, 2126737, 2126737, 2126737, 2126737, 3138449, 2126810, 2126810, 2499546, 2126810, 2126810,
+ /* 24930 */ 2126810, 2556890, 2565082, 2126810, 2126810, 2126737, 2933649, 2126737, 2126737, 2126737, 2126737,
+ /* 24941 */ 2126737, 2126737, 2126737, 3130257, 2126737, 2126737, 3154833, 3167121, 3175313, 2397146, 2401242,
+ /* 24952 */ 2126810, 2126810, 2442202, 2126810, 2470874, 2126810, 2126810, 2126810, 2520026, 2126810, 2126810,
+ /* 24963 */ 2126810, 2126810, 2589658, 2126810, 2126810, 2126810, 3011546, 2126810, 2126810, 2126737, 0, 0, 0, 0, 0,
+ /* 24978 */ 0, 0, 2592768, 0, 0, 0, 0, 663, 0, 0, 666, 667, 0, 0, 0, 0, 0, 0, 0, 540, 571, 540, 571, 540, 540, 571,
+ /* 25004 */ 540, 595, 2614234, 2647002, 2126810, 2126810, 2696154, 2757594, 2126810, 2126810, 2126810, 2126810,
+ /* 25016 */ 2933722, 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 3224538, 2126737, 2179072, 2417626,
+ /* 25027 */ 2126810, 2126737, 2179072, 2179072, 2126737, 2126737, 2854912, 2969600, 2179072, 3006464, 2179072,
+ /* 25038 */ 3018752, 2179072, 2179072, 2179072, 3149824, 2126737, 2429841, 2438033, 2126737, 2487185, 2126737,
+ /* 25049 */ 2126737, 2945937, 2126737, 2126737, 2995089, 2126737, 3003281, 2126737, 2126737, 3023761, 2126737,
+ /* 25060 */ 3068817, 3085201, 3097489, 2126737, 2126737, 2888593, 2126737, 2126737, 2925457, 2126737, 2126737,
+ /* 25071 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 3036049, 2126737, 3019665, 2126737,
+ /* 25082 */ 2126737, 2126737, 3150737, 2126810, 2429914, 2438106, 2126810, 2487258, 2126810, 2126810, 2126810,
+ /* 25093 */ 2126810, 2126810, 2700250, 2126810, 2716634, 2126810, 2724826, 2126810, 2733018, 2773978, 2126810,
+ /* 25104 */ 2126810, 2126810, 2126810, 3150810, 2126737, 2179072, 3051520, 2126737, 3052433, 2126810, 3052506, 0,
+ /* 25116 */ 2490368, 2498560, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2126810, 2593754, 2126810,
+ /* 25139 */ 2126810, 2126810, 2126810, 2126810, 2126810, 2126810, 2126737, 2449408, 0, 2535424, 3031040, 0, 0, 0, 0,
+ /* 25154 */ 0, 2439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, 370, 0, 0, 2126737, 2450321, 2126737, 2536337, 2126737,
+ /* 25177 */ 2610065, 2126737, 2859921, 2126737, 2126737, 2126737, 3031953, 2126810, 2450394, 2126810, 2536410,
+ /* 25188 */ 2126810, 2610138, 2126810, 2859994, 2126810, 2126810, 2126810, 3032026, 2126737, 2527232, 0, 0, 0, 0, 0,
+ /* 25203 */ 2179072, 2126810, 2126810, 2126737, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2126737,
+ /* 25214 */ 2126737, 2126737, 2126810, 2126810, 2126810, 2126810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 0,
+ /* 25236 */ 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2126737, 2528145, 2126737, 2126737, 2126737,
+ /* 25247 */ 2126737, 2126737, 2126810, 2528218, 2126810, 2126810, 2946010, 2126810, 2126810, 2995162, 2126810,
+ /* 25258 */ 3003354, 2126810, 2126810, 3023834, 2126810, 3068890, 3085274, 3097562, 2126810, 2126810, 2126810,
+ /* 25269 */ 2606042, 2126810, 2630618, 2126810, 2126810, 2651098, 2126810, 2126810, 2126810, 2708442, 2126810,
+ /* 25280 */ 2737114, 2126810, 2126810, 2126810, 2655194, 2679770, 2761690, 2765786, 2786266, 2855898, 2970586,
+ /* 25291 */ 2126810, 3007450, 2126810, 3019738, 2126810, 2126810, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912,
+ /* 25306 */ 3006464, 0, 3108864, 3198976, 0, 2405265, 2126737, 2126737, 2126737, 2126737, 3027857, 2405338, 2126810,
+ /* 25319 */ 2126810, 2126810, 2126810, 3027930, 2539520, 0, 2949120, 0, 0, 0, 0, 695, 0, 0, 0, 0, 362, 362, 362, 0, 0,
+ /* 25340 */ 704, 0, 0, 0, 0, 709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2049, 0, 0, 0, 0, 2179072, 2658304, 2973696,
+ /* 25365 */ 2179072, 2126737, 2659217, 2974609, 2126737, 2126810, 2659290, 2974682, 2126810, 2711552, 0, 2560000,
+ /* 25377 */ 2179072, 2179072, 3125248, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 25388 */ 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2560913, 2126737, 2560986,
+ /* 25399 */ 2126810, 0, 2179072, 2126737, 2126810, 0, 2179072, 2126737, 2126810, 0, 2179072, 2126737, 2126810,
+ /* 25412 */ 2126810, 3130330, 2126810, 2126810, 3154906, 3167194, 3175386, 2126737, 2506752, 2507738, 2507665,
+ /* 25423 */ 2179072, 2179072, 2126737, 2126737, 2126737, 2642833, 2126737, 2126737, 2126737, 2126737, 2126737,
+ /* 25434 */ 2126737, 2720657, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2126737, 2585489,
+ /* 25445 */ 2126737, 2126737, 2126737, 2126737, 2126737, 2618257, 2126737, 2985984, 2985984, 2986897, 2986970, 0, 0,
+ /* 25458 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 397, 0, 0, 0, 0, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 221184,
+ /* 25486 */ 0, 0, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 221184, 221184, 221184, 221184, 221184,
+ /* 25506 */ 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184,
+ /* 25519 */ 221184, 221184, 221184, 221184, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 25544 */ 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 1, 12290, 3, 0, 0, 0, 0, 0, 253952, 0, 0,
+ /* 25563 */ 0, 253952, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 687, 688, 0, 0, 0, 0, 0, 98304, 0, 0, 0, 53248, 0, 0, 0, 0,
+ /* 25593 */ 0, 2662400, 0, 2813952, 297, 0, 300, 0, 0, 0, 300, 0, 301, 0, 0, 0, 301, 0, 0, 0, 301, 69632, 139679, 0,
+ /* 25617 */ 0, 0, 0, 0, 65536, 0, 0, 0, 0, 3133440, 0, 98304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072,
+ /* 25642 */ 2179072, 2179072, 2179072, 300, 0, 301, 0, 0, 0, 2473984, 2478080, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176128,
+ /* 25663 */ 176128, 176128, 176128, 176128, 176128, 176128, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072,
+ /* 25675 */ 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 914, 0, 0, 0, 0, 0, 2451, 0, 0, 0, 0, 0, 0,
+ /* 25695 */ 0, 0, 0, 0, 301, 301, 0, 0, 0, 0, 0, 914, 0, 2387968, 2125824, 2125824, 2420736, 2125824, 2125824,
+ /* 25714 */ 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176, 2125824, 2125824, 2125824, 2125824,
+ /* 25725 */ 2125824, 2125824, 2531328, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2605056,
+ /* 25736 */ 2125824, 3194880, 2125824, 987, 0, 0, 0, 987, 0, 2387968, 2125824, 2125824, 2420736, 2125824, 2125824,
+ /* 25751 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2887680, 2125824, 2125824, 2924544, 2125824, 2125824,
+ /* 25762 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3035136, 225740, 225740, 225740, 225740,
+ /* 25774 */ 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 225740, 0, 0, 0,
+ /* 25789 */ 0, 0, 0, 0, 0, 0, 348, 349, 350, 0, 0, 0, 0, 2125824, 237568, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 25809 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 0, 0, 358, 249856, 249856, 249856, 249856, 249856, 249856,
+ /* 25831 */ 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 25850 */ 362, 0, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 296, 297, 0, 2134016, 300, 301, 0, 0, 217088, 2125824,
+ /* 25874 */ 241664, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 131072,
+ /* 25895 */ 131072, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413,
+ /* 25908 */ 254413, 254413, 254413, 254413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 155648, 0, 0, 2183168, 0, 0,
+ /* 25932 */ 270336, 0, 0, 296, 297, 0, 2134016, 300, 301, 200704, 0, 0, 0, 0, 0, 2462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 25958 */ 1261, 0, 0, 0, 0, 0, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 180224, 0, 0, 0, 0, 0,
+ /* 25979 */ 0, 0, 1726, 0, 0, 0, 0, 0, 0, 0, 0, 304, 304, 304, 0, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 20480, 0, 0, 0,
+ /* 26006 */ 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2768896, 2777088, 2797568, 2822144, 2179072, 2179072,
+ /* 26021 */ 2179072, 2883584, 2912256, 2179072, 2179072, 2179072, 2179072, 2179072, 2617344, 2179072, 2179072,
+ /* 26032 */ 2179072, 2179072, 2179072, 2179072, 2662400, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560,
+ /* 26043 */ 2179072, 2179072, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 26054 */ 2125824, 2125824, 2584576, 2125824, 2125824, 2125824, 2125824, 2125824, 2617344, 2125824, 2125824,
+ /* 26065 */ 2125824, 2125824, 2125824, 2125824, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2142208, 0, 0,
+ /* 26089 */ 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 2113823, 0, 0, 0, 0, 0, 0, 293, 0, 0, 0, 293, 0, 0, 245760,
+ /* 26116 */ 0, 0, 2179072, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824,
+ /* 26129 */ 2125824, 2125824, 2125824, 2125824, 2125824, 3039232, 2125824, 3063808, 2125824, 2125824, 2125824,
+ /* 26140 */ 2125824, 3100672, 2125824, 2125824, 3133440, 2125824, 245760, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 26152 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 122880, 122880, 0, 0, 274432, 274432, 274432, 274432, 0, 0, 0, 0, 0,
+ /* 26177 */ 274432, 0, 274432, 1, 12290, 3, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 1195, 0, 0,
+ /* 26204 */ 78112, 290, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 26233 */ 0, 2200252, 2200252, 2200252, 0, 0, 0, 0, 0, 0, 0, 2033, 0, 0, 0, 0, 0, 2035, 0, 0, 0, 0, 0, 0, 0, 2055,
+ /* 26259 */ 0, 2056, 0, 0, 0, 0, 0, 0, 0, 2067, 0, 0, 0, 0, 0, 0, 0, 0, 1187, 0, 0, 0, 0, 0, 0, 1104, 2483, 0, 0, 0,
+ /* 26289 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 690, 0, 0, 2993, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 383, 335, 0,
+ /* 26321 */ 0, 0, 0, 1679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 694, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 26354 */ 0, 0, 0, 730, 0, 0, 0, 0, 0, 0, 78456, 290, 0, 0, 0, 0, 0, 296, 297, 0, 0, 300, 301, 0, 0, 0, 0, 0, 344,
+ /* 26383 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1158, 0, 0, 0, 0, 0, 562, 562, 562, 562, 562, 562, 562, 586, 586, 586, 540,
+ /* 26410 */ 586, 586, 586, 586, 586, 562, 562, 540, 562, 586, 562, 586, 1, 12290, 3, 78112, 0, 0, 2771, 0, 0, 0, 0, 0,
+ /* 26434 */ 0, 0, 0, 0, 0, 0, 0, 0, 514, 521, 521, 1, 12290, 3, 78113, 290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0,
+ /* 26463 */ 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624,
+ /* 26478 */ 282624, 282624, 282624, 282624, 1, 12290, 3, 0, 282624, 282624, 282624, 0, 0, 282624, 0, 0, 0, 0, 0, 0, 0,
+ /* 26499 */ 0, 0, 0, 0, 3178496, 2670592, 0, 2744320, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624,
+ /* 26518 */ 282624, 282624, 282624, 0, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290,
+ /* 26539 */ 0, 0, 0, 0, 3176, 0, 0, 2740224, 0, 0, 0, 0, 0, 2793472, 0, 0, 0, 0, 0, 0, 0, 2094, 0, 0, 0, 0, 0, 0, 0,
+ /* 26568 */ 0, 683, 684, 685, 0, 0, 0, 689, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 286720, 286720, 286720,
+ /* 26588 */ 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720, 286720,
+ /* 26601 */ 286720, 286720, 286720, 286720, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 302, 0, 0, 0, 0, 0, 3043328, 0,
+ /* 26625 */ 3149824, 2936832, 0, 2760704, 3301, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 2875392, 0, 0, 0, 3381, 0, 0,
+ /* 26645 */ 2834432, 0, 3227648, 2568192, 0, 0, 0, 0, 2564096, 0, 2748416, 2879488, 0, 3381, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 26667 */ 2179072, 2179072, 2179072, 2531328, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072,
+ /* 26678 */ 2605056, 2179072, 2629632, 2179072, 2179072, 0, 0, 0, 306, 0, 0, 0, 0, 0, 305, 0, 305, 306, 0, 305, 305,
+ /* 26699 */ 0, 0, 0, 305, 305, 306, 306, 0, 0, 0, 0, 0, 0, 305, 405, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 26730 */ 750, 0, 0, 0, 306, 410, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 742, 0, 0, 0, 0, 742, 0,
+ /* 26757 */ 748, 0, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 462, 462, 462, 488, 488, 462, 488, 488, 488,
+ /* 26784 */ 488, 488, 488, 488, 513, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 533, 488, 488,
+ /* 26805 */ 488, 488, 488, 541, 563, 541, 563, 541, 541, 563, 541, 587, 563, 563, 563, 563, 563, 563, 563, 587, 587,
+ /* 26826 */ 587, 541, 613, 613, 613, 613, 613, 587, 563, 563, 541, 563, 587, 563, 587, 1, 12290, 3, 78112, 0, 0, 645,
+ /* 26848 */ 0, 0, 648, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 253952, 0, 0, 0, 0, 0, 645, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 26879 */ 0, 762, 0, 0, 0, 0, 0, 353, 0, 351, 0, 472, 472, 472, 472, 472, 472, 472, 477, 472, 472, 472, 472, 472,
+ /* 26903 */ 472, 472, 472, 472, 477, 472, 0, 768, 0, 0, 772, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 727, 0, 0, 0,
+ /* 26931 */ 731, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 343, 342, 65536, 341, 0, 788, 0, 0, 0, 0, 792, 0, 0, 0,
+ /* 26958 */ 0, 0, 0, 0, 796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 736, 0, 796, 0, 0, 0, 0, 648, 0, 0,
+ /* 26990 */ 0, 0, 0, 0, 820, 0, 0, 648, 0, 0, 0, 0, 0, 837, 792, 0, 0, 0, 0, 0, 841, 842, 792, 792, 0, 0, 0, 0, 792,
+ /* 27019 */ 736, 792, 0, 540, 540, 851, 855, 540, 540, 540, 540, 1345, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 27040 */ 540, 540, 2181, 540, 540, 540, 540, 561, 561, 561, 921, 925, 561, 561, 561, 561, 561, 561, 951, 561, 956,
+ /* 27061 */ 561, 963, 561, 966, 561, 561, 980, 561, 561, 0, 585, 585, 585, 994, 998, 585, 585, 585, 585, 585, 585,
+ /* 27082 */ 1963, 1964, 1966, 585, 585, 585, 585, 585, 585, 585, 561, 2713, 585, 2715, 2716, 540, 540, 540, 540, 585,
+ /* 27102 */ 585, 585, 1024, 585, 1029, 585, 1036, 585, 1039, 585, 585, 1053, 585, 585, 966, 0, 0, 0, 855, 585, 998,
+ /* 27123 */ 925, 851, 1065, 894, 540, 540, 921, 1070, 966, 561, 0, 585, 585, 585, 585, 585, 78112, 0, 0, 0, 0, 0, 0,
+ /* 27146 */ 0, 0, 0, 114688, 0, 241664, 258048, 0, 0, 0, 1093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 766, 0, 0,
+ /* 27175 */ 1214, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 672, 673, 0, 540, 540, 1342, 540, 540, 540, 540, 540, 540,
+ /* 27201 */ 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 585, 585, 585, 1524, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 27223 */ 585, 585, 585, 585, 585, 1517, 585, 585, 585, 1433, 0, 540, 585, 585, 561, 540, 540, 540, 540, 540, 561,
+ /* 27244 */ 561, 561, 561, 561, 561, 561, 3070, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 0, 0, 0,
+ /* 27266 */ 3662, 0, 0, 0, 1641, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1103, 1104, 1105, 1106, 1654, 0, 0, 0, 0, 0, 0,
+ /* 27294 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 1693, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 306, 0, 1732, 0,
+ /* 27325 */ 0, 1733, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 3030, 540, 540, 540, 540, 540, 540, 540, 1745,
+ /* 27347 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 1758, 540, 540, 540, 540, 540, 540, 2540, 540, 540, 540, 540,
+ /* 27368 */ 540, 540, 540, 540, 540, 540, 1329, 540, 540, 540, 540, 540, 540, 540, 540, 1795, 540, 540, 1798, 540,
+ /* 27388 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 900, 540, 540, 540, 540, 540, 540, 1810, 540, 540, 540, 540,
+ /* 27409 */ 540, 1815, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 27430 */ 561, 561, 561, 561, 1416, 561, 1825, 561, 561, 561, 561, 1831, 561, 561, 561, 561, 561, 1837, 561, 561,
+ /* 27450 */ 561, 561, 561, 983, 561, 0, 585, 585, 585, 585, 585, 1002, 585, 1010, 561, 1892, 561, 561, 561, 561, 561,
+ /* 27471 */ 561, 561, 561, 561, 561, 1904, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 2726, 0, 0, 2729, 2730,
+ /* 27493 */ 561, 561, 1909, 561, 561, 561, 561, 561, 561, 561, 26027, 1919, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0,
+ /* 27515 */ 540, 3649, 540, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 3231, 3232, 561, 1925, 585,
+ /* 27535 */ 585, 585, 585, 585, 1931, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 3596, 1944,
+ /* 27557 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1540, 561, 561, 2025, 585, 585,
+ /* 27578 */ 585, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, 0, 2487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0,
+ /* 27608 */ 0, 0, 0, 0, 2041, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1132, 0, 0, 0, 2075, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 27640 */ 0, 0, 0, 0, 0, 1135, 0, 2145, 0, 0, 0, 2143, 0, 0, 2150, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 0, 0, 0, 0, 0, 0,
+ /* 27670 */ 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 1584, 0, 0, 0, 0, 0, 0, 0, 0, 1700, 0, 0, 0, 0, 1705, 0, 0, 540, 540,
+ /* 27700 */ 2171, 540, 540, 2174, 540, 540, 540, 540, 540, 540, 2182, 540, 540, 540, 540, 540, 540, 2568, 540, 540,
+ /* 27720 */ 540, 540, 2572, 540, 540, 540, 540, 540, 540, 1347, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 27740 */ 2556, 540, 540, 540, 540, 540, 540, 540, 2201, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 27761 */ 540, 0, 0, 2242, 540, 540, 540, 2214, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 27782 */ 1805, 540, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2254, 561, 0, 585, 585,
+ /* 27804 */ 585, 585, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2123, 0, 2125, 2126, 0, 0, 0, 0, 561, 2257, 561, 561,
+ /* 27829 */ 561, 561, 561, 561, 2265, 561, 561, 561, 561, 561, 561, 561, 0, 0, 585, 585, 585, 585, 585, 585, 585, 561,
+ /* 27851 */ 540, 585, 585, 561, 540, 2952, 561, 2954, 561, 2299, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 27871 */ 561, 561, 561, 561, 1438, 561, 2033, 0, 2035, 0, 0, 2426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2434, 0, 0, 0, 2475,
+ /* 27897 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1193, 0, 0, 0, 0, 2484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2493, 0, 0, 0, 0,
+ /* 27929 */ 0, 0, 756, 0, 0, 0, 0, 0, 0, 763, 0, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 2592, 561, 561,
+ /* 27955 */ 561, 561, 561, 1408, 561, 561, 1412, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585,
+ /* 27976 */ 1008, 585, 2656, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2664, 585, 585, 585, 585, 585,
+ /* 27996 */ 585, 2350, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2379, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 28017 */ 2699, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1940, 585, 585, 2708, 585, 585,
+ /* 28037 */ 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 561, 561, 561, 3229, 561, 561,
+ /* 28058 */ 561, 561, 561, 561, 585, 585, 585, 3352, 585, 585, 585, 3355, 585, 585, 2731, 0, 0, 0, 0, 0, 0, 2736, 0,
+ /* 28081 */ 0, 0, 0, 0, 0, 0, 0, 0, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 192971, 0, 0, 0, 2759, 0,
+ /* 28102 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1234, 540, 540, 540, 0, 0, 0, 2788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 28133 */ 1238, 0, 0, 0, 540, 540, 540, 2826, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2833, 540, 540, 540,
+ /* 28155 */ 540, 1748, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1760, 540, 540, 540, 540, 1765, 540, 540, 540,
+ /* 28175 */ 540, 540, 540, 540, 540, 1772, 540, 540, 540, 540, 561, 3406, 561, 561, 3408, 561, 561, 561, 561, 561,
+ /* 28195 */ 561, 561, 0, 585, 585, 585, 585, 585, 585, 1009, 585, 561, 561, 561, 2860, 561, 561, 2864, 561, 561, 561,
+ /* 28216 */ 561, 561, 561, 561, 561, 561, 944, 561, 561, 561, 561, 561, 561, 561, 2873, 561, 561, 561, 561, 561, 561,
+ /* 28237 */ 561, 561, 561, 561, 561, 2881, 561, 561, 0, 0, 0, 2649, 0, 1920, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 28259 */ 585, 2703, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2908, 585, 585, 2912, 585, 585, 585, 585, 585,
+ /* 28279 */ 585, 585, 585, 585, 585, 2393, 2394, 585, 585, 585, 585, 585, 2921, 585, 585, 585, 585, 585, 585, 585,
+ /* 28299 */ 585, 585, 585, 585, 2929, 585, 585, 0, 0, 0, 3292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3297, 2955, 585, 0, 0, 0, 0,
+ /* 28326 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 305, 0, 0, 0, 2970, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1588, 1589, 0,
+ /* 28357 */ 0, 540, 540, 540, 540, 3036, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2546, 540, 540,
+ /* 28378 */ 540, 561, 561, 561, 3076, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1436, 561, 561, 561,
+ /* 28399 */ 585, 585, 585, 3117, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2356, 585, 2358, 0,
+ /* 28420 */ 0, 0, 0, 3176, 3442, 0, 3444, 0, 0, 0, 0, 0, 540, 3451, 540, 540, 540, 540, 1796, 540, 540, 540, 540, 540,
+ /* 28444 */ 540, 540, 540, 540, 540, 540, 905, 540, 540, 540, 540, 3453, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 28465 */ 540, 540, 561, 3466, 561, 3468, 0, 0, 3501, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 3510, 540, 540, 540,
+ /* 28488 */ 540, 540, 3204, 3205, 540, 540, 540, 540, 3209, 3210, 540, 540, 540, 540, 540, 1749, 1750, 540, 540, 540,
+ /* 28508 */ 540, 1757, 540, 540, 540, 540, 540, 540, 1346, 540, 540, 540, 540, 540, 540, 1356, 540, 540, 307, 308,
+ /* 28528 */ 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 418, 0, 0, 0, 0, 0, 449, 0, 0, 0, 0, 0, 0, 0,
+ /* 28561 */ 0, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 2490, 0, 0, 0, 0, 0, 0, 0, 0, 2504, 0, 0, 0, 0, 0, 0, 0, 0, 2517, 0, 0,
+ /* 28592 */ 0, 0, 0, 0, 0, 0, 2975, 0, 0, 0, 0, 0, 0, 0, 0, 2999, 0, 0, 0, 0, 0, 0, 0, 0, 3164, 0, 0, 0, 0, 0, 0, 0,
+ /* 28624 */ 0, 3173, 0, 0, 0, 0, 0, 0, 0, 0, 3183, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 28655 */ 449, 449, 418, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 532, 449, 532, 532, 532, 449,
+ /* 28676 */ 532, 532, 532, 532, 449, 542, 564, 542, 564, 542, 542, 564, 542, 588, 564, 564, 564, 564, 564, 564, 564,
+ /* 28697 */ 588, 588, 588, 542, 588, 588, 588, 588, 588, 564, 564, 616, 621, 588, 621, 627, 1, 12290, 3, 78112, 0,
+ /* 28718 */ 1677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 540, 540, 540, 1811, 540, 540, 540, 540, 540,
+ /* 28744 */ 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1377,
+ /* 28765 */ 561, 0, 585, 585, 585, 585, 585, 78112, 1079, 0, 0, 1082, 1086, 0, 0, 1090, 585, 585, 585, 1993, 585, 585,
+ /* 28787 */ 585, 585, 585, 1999, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 3551, 0, 3553, 0, 0, 0, 0, 0, 561,
+ /* 28811 */ 561, 561, 561, 561, 2589, 561, 561, 561, 561, 2593, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585,
+ /* 28833 */ 585, 585, 585, 585, 585, 2338, 585, 585, 585, 585, 585, 585, 585, 2657, 585, 585, 585, 585, 585, 585, 585,
+ /* 28854 */ 585, 585, 585, 585, 585, 585, 585, 1971, 585, 585, 585, 2709, 585, 585, 585, 585, 561, 540, 585, 585, 561,
+ /* 28875 */ 540, 540, 540, 540, 540, 540, 561, 561, 3228, 561, 561, 561, 561, 561, 561, 561, 0, 0, 585, 2900, 585,
+ /* 28896 */ 585, 585, 585, 585, 540, 3514, 540, 3516, 540, 540, 3518, 540, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 28916 */ 1396, 1398, 561, 561, 561, 561, 561, 561, 3527, 561, 3529, 561, 561, 3531, 561, 585, 585, 585, 585, 585,
+ /* 28936 */ 585, 585, 585, 3540, 585, 3542, 585, 585, 3544, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 0,
+ /* 28961 */ 0, 147456, 0, 0, 0, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 0, 0, 0, 0, 0, 373, 0, 0, 0, 0, 365,
+ /* 28987 */ 0, 382, 0, 348, 0, 0, 310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 0, 0, 0, 313, 0, 0, 0, 0, 0, 0,
+ /* 29019 */ 0, 0, 0, 0, 0, 0, 0, 764, 0, 0, 420, 428, 419, 428, 0, 310, 428, 441, 450, 463, 463, 463, 463, 463, 463,
+ /* 29044 */ 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 484, 489, 489, 500, 489, 489, 489, 489, 489,
+ /* 29065 */ 489, 489, 489, 515, 515, 528, 528, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 515, 529, 529, 529,
+ /* 29086 */ 529, 529, 543, 565, 543, 565, 543, 543, 565, 543, 589, 565, 565, 565, 565, 565, 565, 565, 589, 589, 589,
+ /* 29107 */ 612, 589, 589, 589, 589, 589, 614, 615, 615, 612, 615, 614, 615, 614, 1, 12290, 3, 78112, 0, 702, 0, 0, 0,
+ /* 29130 */ 0, 0, 702, 0, 0, 0, 540, 540, 540, 540, 540, 3028, 540, 540, 540, 540, 540, 540, 540, 561, 967, 561, 561,
+ /* 29153 */ 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 2337, 585, 585, 585, 585, 2341, 585, 0, 1108, 0,
+ /* 29175 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 3200, 0, 1150, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 29206 */ 1102, 0, 0, 0, 1228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1240, 0, 0, 540, 540, 1276, 1278, 540, 540,
+ /* 29233 */ 540, 540, 540, 540, 540, 540, 1292, 540, 1297, 540, 540, 1301, 540, 540, 540, 540, 1812, 540, 540, 540,
+ /* 29253 */ 540, 540, 540, 540, 540, 540, 1823, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 29274 */ 1378, 561, 0, 585, 585, 585, 585, 585, 78112, 1079, 0, 0, 1083, 1087, 0, 0, 1091, 540, 1304, 540, 540,
+ /* 29295 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1302, 540, 1360, 914, 561, 561, 1364, 561,
+ /* 29315 */ 1367, 561, 561, 561, 561, 561, 561, 561, 561, 1381, 561, 1386, 561, 561, 1390, 561, 561, 1393, 561, 561,
+ /* 29335 */ 561, 561, 561, 561, 561, 561, 1431, 561, 561, 1435, 561, 561, 561, 561, 1484, 585, 585, 585, 585, 585,
+ /* 29355 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1942, 540, 1793, 1794, 540, 540, 540, 540, 540, 540,
+ /* 29375 */ 540, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 585, 585, 1946, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 29396 */ 585, 585, 585, 585, 585, 585, 2005, 585, 585, 585, 1959, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 29417 */ 585, 585, 585, 585, 2357, 585, 2102, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 328, 379, 381, 0, 0,
+ /* 29444 */ 0, 0, 0, 2133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1119, 0, 0, 2033, 0, 2035, 0, 0, 0, 0, 0, 0, 2428,
+ /* 29474 */ 0, 0, 0, 0, 0, 0, 0, 2122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880,
+ /* 29498 */ 0, 0, 2474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1133, 0, 0, 0, 0, 0, 0, 2760, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 29530 */ 0, 0, 0, 380, 0, 0, 0, 384, 0, 0, 2799, 0, 0, 0, 0, 0, 0, 0, 2803, 540, 540, 540, 540, 540, 540, 540,
+ /* 29556 */ 1326, 540, 540, 540, 540, 540, 540, 540, 1339, 585, 2956, 0, 0, 0, 0, 0, 2962, 0, 0, 0, 0, 0, 0, 0, 2966,
+ /* 29581 */ 0, 0, 0, 3008, 0, 0, 0, 0, 0, 0, 0, 0, 3017, 0, 0, 0, 0, 0, 383, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0,
+ /* 29610 */ 3048, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1320, 3089, 561, 561,
+ /* 29630 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1858, 3130, 585, 585, 585, 585, 585, 585,
+ /* 29651 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 1957, 540, 3225, 540, 540, 540, 540, 561, 561, 561, 561, 561,
+ /* 29672 */ 561, 561, 561, 561, 561, 561, 3414, 585, 585, 585, 3281, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540,
+ /* 29693 */ 561, 561, 585, 585, 0, 0, 0, 3157, 3513, 540, 540, 540, 540, 540, 540, 540, 561, 3521, 561, 3522, 561,
+ /* 29714 */ 561, 561, 3526, 540, 540, 540, 3664, 561, 561, 561, 3666, 585, 585, 585, 3668, 0, 0, 540, 540, 540, 3560,
+ /* 29735 */ 540, 540, 540, 540, 540, 540, 540, 540, 3568, 561, 321, 321, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 29761 */ 1161, 0, 0, 0, 0, 371, 0, 430, 436, 0, 442, 451, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464,
+ /* 29784 */ 464, 464, 464, 464, 464, 464, 464, 464, 490, 490, 501, 490, 490, 490, 490, 490, 490, 490, 490, 516, 516,
+ /* 29805 */ 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 544, 566, 544, 566, 544, 544, 566,
+ /* 29826 */ 544, 590, 566, 566, 566, 566, 566, 566, 566, 590, 590, 590, 544, 590, 590, 590, 590, 590, 566, 566, 544,
+ /* 29847 */ 566, 590, 566, 590, 1, 12290, 3, 78112, 540, 540, 540, 874, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 29868 */ 540, 540, 540, 540, 1822, 540, 1360, 585, 1017, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 29888 */ 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 1122, 0, 1124, 1125, 0, 0, 0, 1127, 1128,
+ /* 29910 */ 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 1159168, 0, 0, 0, 0, 1159168, 0, 0, 1166, 1167, 0, 0, 0, 0, 0, 0, 0,
+ /* 29937 */ 0, 0, 0, 0, 0, 1634, 0, 0, 0, 1113, 0, 1253, 0, 0, 0, 0, 0, 1128, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 773,
+ /* 29966 */ 774, 0, 0, 778, 779, 0, 675, 0, 0, 0, 0, 0, 0, 1598, 0, 0, 0, 0, 0, 0, 0, 0, 1605, 0, 0, 1268, 1127, 0, 0,
+ /* 29995 */ 0, 0, 0, 0, 0, 0, 0, 540, 540, 1277, 540, 540, 540, 1323, 540, 540, 1325, 540, 540, 1328, 540, 540, 540,
+ /* 30018 */ 540, 540, 540, 540, 540, 2554, 540, 540, 540, 540, 540, 540, 2560, 1360, 914, 561, 561, 1365, 561, 561,
+ /* 30038 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 1400, 561, 561, 561, 561, 561, 561, 1404, 561, 561, 561, 561,
+ /* 30059 */ 561, 561, 561, 1413, 561, 561, 1415, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585,
+ /* 30081 */ 2655, 561, 1419, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1874, 561, 561,
+ /* 30101 */ 561, 1443, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 1456, 585, 585, 0, 0, 3291, 0, 0, 0, 0, 0,
+ /* 30124 */ 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, 1266, 585, 585, 585, 1504, 585, 585, 1506, 585, 585, 585, 1510, 585, 585,
+ /* 30148 */ 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 2020, 561, 561, 0, 0, 0, 1657, 0, 0, 0, 0, 0, 0, 0,
+ /* 30173 */ 0, 0, 0, 0, 0, 1675, 0, 0, 0, 585, 1991, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 30197 */ 585, 585, 2695, 561, 2024, 585, 585, 585, 2028, 0, 2029, 0, 0, 0, 0, 0, 2031, 0, 0, 0, 0, 0, 2502, 0, 0,
+ /* 30222 */ 0, 0, 0, 0, 0, 0, 0, 0, 1586, 1587, 0, 0, 0, 0, 0, 0, 0, 2033, 0, 0, 0, 0, 0, 2035, 0, 0, 0, 0, 0, 2038,
+ /* 30252 */ 0, 0, 2077, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 0, 2091, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 30284 */ 0, 0, 0, 540, 540, 540, 2807, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 2252, 561, 561, 561,
+ /* 30307 */ 561, 561, 1447, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 2017, 540,
+ /* 30327 */ 540, 540, 2021, 561, 2256, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 30347 */ 1875, 2272, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1890, 561, 561,
+ /* 30367 */ 561, 2314, 561, 2316, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 585, 585, 585, 585, 585,
+ /* 30390 */ 585, 585, 585, 585, 585, 585, 2340, 585, 585, 585, 2399, 585, 2401, 585, 585, 585, 585, 585, 585, 585,
+ /* 30410 */ 561, 540, 585, 585, 561, 540, 540, 561, 561, 540, 540, 2564, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 30431 */ 540, 540, 540, 540, 540, 3212, 540, 0, 0, 0, 561, 561, 561, 561, 2588, 561, 561, 561, 561, 561, 561, 561,
+ /* 30453 */ 561, 1916, 561, 26027, 0, 585, 585, 585, 585, 0, 2757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 735, 0,
+ /* 30480 */ 2834, 540, 540, 540, 540, 540, 540, 540, 2840, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2571, 540,
+ /* 30500 */ 540, 540, 540, 540, 540, 2882, 561, 561, 561, 561, 561, 561, 561, 2888, 561, 561, 561, 561, 561, 561, 561,
+ /* 30521 */ 0, 0, 585, 585, 585, 2902, 585, 585, 585, 2930, 585, 585, 585, 585, 585, 585, 585, 2936, 585, 585, 585,
+ /* 30542 */ 585, 585, 585, 585, 561, 540, 2714, 585, 561, 540, 540, 540, 540, 540, 540, 3226, 540, 540, 540, 561, 561,
+ /* 30563 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3074, 585, 585, 585, 585, 3282, 585, 585, 585, 561,
+ /* 30584 */ 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 3156, 0, 585, 585, 3369, 540, 540, 561, 561, 585, 585,
+ /* 30606 */ 0, 0, 0, 0, 0, 0, 0, 0, 2617344, 0, 0, 0, 0, 0, 2789376, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 3445, 0, 0, 0, 0,
+ /* 30635 */ 540, 540, 540, 540, 3027, 540, 540, 540, 540, 3031, 540, 540, 540, 540, 540, 540, 3456, 540, 540, 540,
+ /* 30655 */ 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3524, 561, 561, 561, 561, 3471, 561, 561, 561, 561, 561,
+ /* 30676 */ 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3486, 585, 585, 585, 585, 585, 585,
+ /* 30697 */ 585, 585, 561, 0, 0, 0, 0, 0, 3626, 540, 540, 540, 3515, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561,
+ /* 30720 */ 561, 561, 561, 561, 561, 3413, 561, 561, 3528, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585,
+ /* 30741 */ 585, 585, 585, 3113, 585, 585, 585, 3541, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362,
+ /* 30765 */ 362, 208896, 0, 0, 0, 0, 323, 324, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194, 1196, 0, 0, 0, 0,
+ /* 30793 */ 322, 370, 325, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 322, 0, 0, 369, 369, 399, 0, 325, 0,
+ /* 30822 */ 0, 0, 0, 0, 0, 0, 0, 0, 233472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, 0, 322, 452, 465, 465, 465, 465,
+ /* 30850 */ 465, 465, 465, 478, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 491, 491, 465, 491, 491, 506,
+ /* 30871 */ 508, 491, 491, 506, 491, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 534, 517, 517,
+ /* 30892 */ 517, 517, 517, 545, 567, 545, 567, 545, 545, 567, 545, 591, 567, 567, 567, 567, 567, 567, 567, 591, 591,
+ /* 30913 */ 591, 545, 591, 591, 591, 591, 591, 567, 567, 545, 567, 591, 567, 591, 1, 12290, 3, 78112, 659, 0, 0, 0, 0,
+ /* 30936 */ 0, 0, 0, 0, 0, 0, 670, 671, 0, 0, 0, 0, 0, 439, 0, 0, 0, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
+ /* 30963 */ 473, 473, 473, 473, 473, 473, 557, 580, 557, 580, 557, 557, 580, 557, 604, 0, 0, 707, 708, 0, 0, 0, 0, 0,
+ /* 30987 */ 714, 0, 0, 0, 718, 0, 720, 0, 769, 770, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1209, 0, 0, 787, 0, 789, 0,
+ /* 31017 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 801, 0, 806, 0, 809, 0, 0, 0, 0, 806, 809, 0, 0, 0,
+ /* 31047 */ 809, 0, 707, 0, 0, 826, 0, 0, 0, 0, 0, 826, 826, 829, 809, 806, 0, 0, 0, 0, 0, 0, 0, 789, 0, 801, 0, 818,
+ /* 31075 */ 0, 0, 0, 0, 0, 2745, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 811, 540, 540, 854, 540, 540, 0, 0, 0, 789, 0, 0, 0, 0,
+ /* 31105 */ 0, 838, 0, 0, 0, 0, 0, 0, 0, 2142, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2819, 540, 540, 540,
+ /* 31129 */ 540, 540, 0, 0, 0, 787, 0, 0, 0, 838, 818, 838, 0, 540, 540, 852, 540, 858, 540, 540, 871, 540, 881, 540,
+ /* 31153 */ 886, 540, 540, 893, 896, 901, 540, 909, 540, 540, 540, 540, 540, 3215, 540, 540, 540, 540, 540, 540, 540,
+ /* 31174 */ 540, 540, 540, 895, 540, 540, 540, 540, 540, 561, 561, 561, 922, 561, 928, 561, 561, 941, 561, 561, 952,
+ /* 31195 */ 561, 957, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 585, 2653, 585, 585, 0, 0, 2959, 0, 0, 0, 0,
+ /* 31220 */ 0, 0, 0, 0, 0, 2965, 0, 965, 968, 973, 561, 981, 561, 561, 0, 585, 585, 585, 995, 585, 1001, 585, 585, 0,
+ /* 31244 */ 2958, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 131072, 0, 0, 1014, 585, 585, 1025, 585, 1030, 585, 585,
+ /* 31269 */ 1038, 1041, 1046, 585, 1054, 585, 585, 968, 0, 0, 0, 540, 585, 585, 561, 852, 540, 1066, 901, 540, 922,
+ /* 31290 */ 561, 1071, 973, 0, 0, 0, 1110, 0, 0, 0, 0, 0, 0, 0, 1117, 0, 0, 0, 0, 0, 0, 775, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 31320 */ 0, 1205, 0, 0, 0, 0, 0, 0, 0, 1137, 1138, 0, 0, 0, 0, 1142, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 664, 0, 0,
+ /* 31349 */ 0, 0, 0, 0, 0, 0, 0, 0, 1206, 0, 0, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0,
+ /* 31382 */ 0, 1182, 741, 0, 0, 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 1303, 540, 540, 540,
+ /* 31409 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1318, 540, 540, 540, 540, 2173, 540, 540, 540, 540, 540,
+ /* 31430 */ 540, 540, 540, 540, 540, 540, 540, 2558, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 31451 */ 561, 1372, 561, 561, 561, 561, 561, 1850, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1902, 1903,
+ /* 31471 */ 561, 561, 561, 561, 561, 561, 1387, 561, 561, 561, 1392, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 31491 */ 1432, 561, 561, 561, 561, 561, 1439, 561, 561, 561, 1421, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 31511 */ 561, 1437, 561, 0, 585, 585, 585, 1049, 585, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 0, 0, 0, 811,
+ /* 31537 */ 0, 585, 585, 585, 585, 1463, 585, 585, 585, 585, 585, 585, 1478, 585, 585, 585, 1483, 0, 0, 1608, 1609,
+ /* 31558 */ 1610, 0, 1612, 1613, 0, 0, 0, 0, 1618, 0, 0, 0, 0, 0, 679, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 31588 */ 0, 2144, 0, 0, 1640, 0, 0, 1643, 0, 1645, 0, 0, 0, 0, 0, 1651, 1652, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 0,
+ /* 31616 */ 540, 846, 540, 540, 540, 540, 540, 540, 3216, 540, 540, 540, 540, 540, 3221, 540, 3223, 540, 0, 1668, 0,
+ /* 31637 */ 0, 1670, 0, 0, 0, 0, 1672, 1673, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 347, 345, 65536, 0, 1692, 0,
+ /* 31663 */ 0, 0, 0, 0, 1698, 1699, 0, 1701, 1702, 1703, 0, 0, 0, 0, 0, 0, 810, 811, 0, 0, 0, 0, 811, 0, 0, 0, 1719,
+ /* 31690 */ 0, 0, 0, 1723, 1724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 1715, 0, 0, 0, 1735, 1585,
+ /* 31719 */ 1585, 1737, 540, 1739, 540, 1740, 540, 1742, 540, 540, 540, 1746, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 31739 */ 540, 1759, 540, 540, 540, 540, 540, 3318, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2557,
+ /* 31759 */ 540, 540, 540, 540, 540, 540, 1763, 540, 540, 540, 540, 1767, 540, 1769, 540, 540, 540, 540, 540, 540,
+ /* 31779 */ 540, 540, 2570, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3041, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 31800 */ 1777, 1778, 1780, 540, 540, 540, 540, 540, 540, 1787, 1788, 540, 540, 1791, 1792, 540, 540, 540, 540, 540,
+ /* 31820 */ 540, 540, 1800, 540, 540, 540, 1804, 540, 540, 540, 540, 540, 540, 2829, 540, 540, 540, 540, 540, 540,
+ /* 31840 */ 540, 540, 540, 540, 1770, 540, 540, 540, 540, 540, 0, 1828, 561, 1830, 561, 561, 1832, 561, 1834, 561,
+ /* 31860 */ 561, 561, 1838, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 2725, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0,
+ /* 31884 */ 135168, 135168, 0, 0, 65536, 135168, 1859, 561, 1861, 561, 561, 561, 561, 561, 561, 561, 561, 1869, 1870,
+ /* 31903 */ 1872, 561, 561, 0, 2648, 0, 0, 0, 0, 585, 585, 585, 585, 2652, 585, 585, 585, 585, 585, 585, 2390, 585,
+ /* 31925 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 3124, 585, 585, 585, 585, 585, 561, 561, 561, 1894, 561, 561,
+ /* 31946 */ 561, 1898, 561, 561, 561, 561, 561, 561, 561, 1906, 585, 1926, 585, 1928, 585, 585, 585, 1932, 585, 585,
+ /* 31966 */ 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 585, 1945,
+ /* 31988 */ 585, 585, 585, 585, 1949, 585, 585, 585, 585, 1953, 585, 1955, 585, 585, 561, 3146, 3147, 3148, 540, 540,
+ /* 32008 */ 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 2488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2096, 0, 0, 0, 0, 0, 0, 1974, 1975,
+ /* 32037 */ 1976, 585, 585, 1979, 1980, 585, 585, 585, 585, 585, 585, 585, 1988, 585, 561, 0, 1288, 585, 1468, 1377,
+ /* 32057 */ 540, 540, 540, 1549, 540, 561, 561, 561, 1553, 585, 585, 1992, 585, 585, 585, 585, 585, 585, 585, 2000,
+ /* 32077 */ 585, 585, 585, 585, 585, 561, 561, 540, 561, 585, 561, 585, 1, 12290, 3, 78112, 585, 585, 585, 585, 2011,
+ /* 32098 */ 561, 540, 2014, 585, 561, 1792, 540, 2019, 540, 1886, 561, 0, 585, 585, 1040, 585, 585, 78112, 1079, 0, 0,
+ /* 32119 */ 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 0, 2023, 561, 1980, 585, 2027, 585, 0, 2029, 0, 0, 0,
+ /* 32144 */ 0, 0, 2031, 0, 0, 0, 0, 0, 2761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 2089, 0, 0, 0, 0,
+ /* 32175 */ 2093, 0, 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2119, 0, 2121, 0, 0, 0, 0, 0, 0, 0,
+ /* 32206 */ 2129, 0, 0, 0, 0, 786, 0, 805, 0, 0, 0, 0, 540, 849, 540, 540, 540, 540, 540, 2216, 540, 540, 540, 540,
+ /* 32230 */ 540, 540, 2221, 540, 540, 540, 540, 540, 540, 3633, 561, 561, 561, 561, 561, 561, 3639, 585, 585, 0, 0, 0,
+ /* 32252 */ 2134, 0, 0, 0, 0, 2139, 0, 0, 0, 0, 0, 0, 0, 0, 2990080, 2179072, 2179072, 2502656, 2179072, 2179072,
+ /* 32272 */ 2179072, 2179072, 540, 2187, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1337,
+ /* 32291 */ 540, 2211, 2212, 540, 540, 540, 540, 540, 540, 2219, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2582,
+ /* 32311 */ 540, 540, 540, 0, 0, 0, 561, 561, 2258, 561, 2260, 561, 561, 561, 561, 561, 561, 2268, 561, 2270, 561,
+ /* 32332 */ 561, 561, 561, 1426, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3343, 561, 561, 561, 561,
+ /* 32352 */ 3344, 3345, 561, 561, 2343, 585, 2345, 585, 585, 585, 585, 585, 585, 2353, 585, 2355, 585, 585, 585, 585,
+ /* 32372 */ 561, 0, 0, 0, 3648, 0, 540, 540, 540, 540, 3652, 540, 585, 585, 585, 585, 2389, 585, 585, 585, 585, 585,
+ /* 32394 */ 585, 585, 585, 585, 585, 585, 585, 2705, 585, 585, 585, 585, 585, 585, 585, 2402, 585, 585, 2405, 2406,
+ /* 32414 */ 585, 585, 561, 2177, 585, 2345, 2260, 540, 2414, 540, 540, 561, 2418, 561, 561, 585, 2422, 585, 585, 2029,
+ /* 32434 */ 0, 2031, 0, 0, 0, 0, 795, 663, 844, 0, 0, 0, 0, 540, 848, 540, 540, 540, 540, 540, 1283, 540, 540, 540,
+ /* 32458 */ 540, 540, 540, 1298, 540, 540, 540, 540, 540, 540, 2580, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 0, 0,
+ /* 32480 */ 2450, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 2459, 0, 0, 0, 0, 0, 2464, 0, 2466, 2467, 0,
+ /* 32509 */ 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 371, 0, 65536, 0, 0, 2498, 0, 0, 0, 0, 0, 0, 0, 2505, 0, 0, 0, 0,
+ /* 32538 */ 0, 0, 0, 2479, 0, 0, 0, 2481, 0, 0, 0, 0, 2561, 540, 540, 540, 2566, 540, 540, 540, 540, 540, 540, 540,
+ /* 32562 */ 2573, 540, 540, 540, 540, 540, 540, 2838, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1296, 540,
+ /* 32582 */ 540, 540, 540, 540, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 2591, 561, 561, 561, 561, 561, 561, 2640,
+ /* 32604 */ 561, 561, 561, 2643, 561, 561, 561, 561, 561, 561, 2886, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 32624 */ 1867, 561, 561, 561, 561, 561, 561, 2621, 561, 561, 561, 561, 2625, 561, 561, 561, 2630, 561, 561, 561,
+ /* 32644 */ 561, 561, 561, 585, 585, 585, 585, 585, 585, 0, 3661, 0, 0, 561, 2637, 561, 561, 561, 561, 561, 561, 561,
+ /* 32666 */ 2642, 561, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3427, 585, 2669, 585,
+ /* 32686 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3267, 2797, 2798, 0, 0, 0, 0, 0, 0,
+ /* 32709 */ 0, 0, 0, 540, 540, 540, 540, 540, 1741, 540, 0, 0, 2982, 2983, 0, 2984, 0, 2986, 0, 0, 0, 0, 2988, 0, 0,
+ /* 32734 */ 0, 0, 0, 680, 681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2047, 0, 0, 0, 0, 0, 0, 0, 0, 3007, 0, 0, 2988, 0, 0, 3013,
+ /* 32764 */ 3014, 0, 3016, 0, 0, 3019, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 3022,
+ /* 32793 */ 540, 540, 540, 540, 540, 540, 3029, 540, 540, 540, 540, 540, 3033, 3062, 540, 561, 561, 561, 561, 561,
+ /* 32813 */ 561, 3069, 561, 561, 561, 561, 561, 3073, 561, 0, 585, 585, 1042, 585, 585, 288, 1079, 0, 0, 1082, 1086,
+ /* 32834 */ 0, 0, 1090, 3103, 561, 585, 585, 585, 585, 585, 585, 3110, 585, 585, 585, 585, 585, 3114, 585, 561, 0,
+ /* 32855 */ 1543, 585, 1545, 1546, 540, 540, 1548, 540, 540, 561, 561, 1552, 561, 0, 585, 585, 1044, 585, 585, 78112,
+ /* 32875 */ 1079, 0, 0, 0, 0, 0, 0, 0, 794, 0, 0, 0, 0, 0, 0, 0, 798, 3144, 585, 561, 540, 585, 561, 540, 3150, 561,
+ /* 32901 */ 3152, 585, 3154, 0, 0, 0, 0, 0, 0, 825, 0, 819, 0, 664, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 221184, 0, 0,
+ /* 32927 */ 0, 0, 65536, 0, 0, 0, 3160, 0, 0, 3163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 32957 */ 3170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 2806, 540, 540, 540, 3202, 540, 540, 540, 540, 540, 540,
+ /* 32982 */ 540, 3207, 540, 540, 540, 540, 540, 540, 540, 540, 3040, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 33002 */ 3322, 540, 540, 540, 540, 540, 540, 561, 3234, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 33023 */ 561, 561, 1889, 561, 3245, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585,
+ /* 33044 */ 585, 585, 585, 585, 585, 3257, 585, 585, 585, 585, 585, 585, 585, 3262, 585, 585, 585, 585, 585, 561,
+ /* 33064 */ 2013, 585, 2015, 2016, 540, 2018, 540, 540, 561, 2022, 561, 561, 561, 3349, 561, 561, 585, 585, 585, 585,
+ /* 33084 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2667, 0, 3378, 3379, 0, 3176, 0, 3383, 0, 0, 0, 0,
+ /* 33107 */ 0, 0, 0, 0, 0, 384, 0, 0, 0, 0, 0, 384, 0, 0, 0, 3441, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540,
+ /* 33136 */ 540, 2167, 540, 540, 0, 0, 0, 0, 3503, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3512, 0, 0, 3557, 3558,
+ /* 33160 */ 3559, 540, 540, 540, 3562, 540, 3564, 540, 540, 540, 540, 3569, 3570, 3571, 561, 561, 561, 3574, 561,
+ /* 33179 */ 3576, 561, 561, 561, 561, 3581, 3582, 3583, 585, 561, 1203, 540, 585, 585, 561, 540, 540, 540, 540, 540,
+ /* 33199 */ 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 585, 585, 3586, 585, 3588, 585, 585,
+ /* 33224 */ 585, 585, 3593, 0, 0, 0, 0, 0, 0, 0, 2747, 2748, 2749, 0, 0, 0, 0, 0, 0, 0, 2763, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 33253 */ 0, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 254413, 1, 12290, 0, 0, 540, 3628, 540, 540,
+ /* 33270 */ 540, 3632, 561, 561, 3634, 561, 561, 561, 3638, 585, 585, 3640, 585, 585, 585, 3644, 561, 0, 0, 0, 0, 0,
+ /* 33292 */ 540, 540, 540, 540, 540, 540, 540, 3563, 540, 3565, 540, 540, 540, 561, 0, 0, 0, 326, 327, 0, 0, 0, 0, 0,
+ /* 33316 */ 0, 0, 0, 0, 0, 0, 674, 0, 0, 0, 0, 0, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1120, 0, 0, 0, 0,
+ /* 33348 */ 366, 0, 0, 0, 374, 376, 0, 0, 0, 0, 0, 0, 0, 344, 0, 402, 0, 0, 0, 0, 0, 402, 0, 0, 409, 0, 0, 0, 409,
+ /* 33377 */ 69632, 73728, 0, 366, 366, 0, 421, 65536, 366, 0, 0, 366, 421, 498, 502, 498, 498, 507, 498, 498, 498,
+ /* 33398 */ 507, 498, 421, 421, 327, 421, 0, 0, 421, 0, 421, 0, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 33427 */ 0, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 546, 568, 546, 568,
+ /* 33448 */ 546, 546, 568, 546, 592, 568, 568, 568, 568, 568, 568, 568, 592, 592, 592, 546, 592, 592, 592, 592, 592,
+ /* 33469 */ 568, 568, 546, 568, 592, 568, 592, 1, 12290, 3, 78112, 0, 0, 677, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 33496 */ 1248, 0, 0, 540, 540, 540, 875, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2183,
+ /* 33517 */ 540, 540, 561, 561, 915, 561, 561, 561, 561, 561, 561, 945, 561, 561, 561, 561, 561, 561, 585, 3421, 585,
+ /* 33538 */ 585, 3423, 585, 585, 585, 585, 585, 585, 1018, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 33559 */ 585, 561, 0, 0, 0, 0, 0, 0, 540, 0, 0, 0, 540, 988, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561,
+ /* 33584 */ 561, 3068, 561, 561, 561, 561, 561, 561, 561, 561, 932, 561, 561, 946, 561, 561, 561, 561, 561, 561, 934,
+ /* 33605 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 3240, 561, 561, 561, 561, 561, 561, 0, 0, 1109, 0, 0, 0, 0,
+ /* 33628 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1604, 0, 0, 0, 0, 1229, 0, 1109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0,
+ /* 33660 */ 0, 540, 540, 540, 1281, 540, 540, 540, 540, 540, 1293, 540, 540, 540, 540, 540, 540, 540, 540, 3054, 3056,
+ /* 33681 */ 540, 540, 540, 3059, 540, 3061, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 1370, 561, 561, 561, 561,
+ /* 33701 */ 561, 1382, 585, 585, 1461, 585, 585, 585, 585, 585, 1473, 585, 585, 585, 585, 585, 585, 585, 585, 2914,
+ /* 33721 */ 585, 585, 585, 585, 585, 585, 585, 585, 3122, 585, 585, 585, 585, 585, 585, 585, 585, 3136, 3138, 585,
+ /* 33741 */ 585, 585, 3141, 585, 3143, 0, 1720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134, 0, 1990, 585, 585,
+ /* 33767 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1972, 585, 585, 585, 2373, 585, 585, 585,
+ /* 33788 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2370, 585, 585, 585, 585, 2698, 585, 585, 585, 585, 585,
+ /* 33809 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 2383, 585, 0, 0, 0, 3161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 33836 */ 1688, 0, 0, 0, 561, 561, 3235, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 2325,
+ /* 33858 */ 0, 3663, 540, 540, 540, 3665, 561, 561, 561, 3667, 585, 585, 585, 0, 0, 540, 540, 540, 2526, 540, 540,
+ /* 33879 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3058, 540, 540, 540, 422, 422, 0, 422, 431, 0, 422, 0,
+ /* 33901 */ 422, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 492,
+ /* 33922 */ 492, 466, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492,
+ /* 33943 */ 492, 492, 492, 492, 547, 569, 547, 569, 547, 547, 569, 547, 593, 569, 569, 569, 569, 569, 569, 569, 593,
+ /* 33964 */ 593, 593, 547, 593, 593, 593, 593, 593, 569, 569, 547, 569, 593, 569, 593, 1, 12290, 3, 78112, 0, 0, 0, 0,
+ /* 33987 */ 2159, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3032, 540, 540, 540, 540, 540, 2202, 540,
+ /* 34009 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2208, 540, 540, 2413, 540, 540, 540, 2417,
+ /* 34029 */ 561, 561, 561, 2421, 585, 585, 585, 0, 0, 0, 0, 3293, 0, 0, 0, 0, 0, 3296, 0, 0, 0, 2458, 0, 0, 0, 0, 0,
+ /* 34056 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1250, 2967, 0, 0, 0, 2971, 0, 0, 0, 0, 0, 2977, 0, 0, 0, 0, 0, 0, 0, 69632,
+ /* 34086 */ 73728, 0, 0, 0, 418, 0, 65536, 0, 0, 2992, 0, 0, 2995, 0, 0, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 69632,
+ /* 34113 */ 73728, 0, 367, 367, 0, 0, 65536, 367, 0, 0, 0, 3023, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 34135 */ 540, 540, 540, 2222, 540, 540, 540, 540, 3049, 540, 540, 540, 540, 540, 540, 540, 540, 3057, 540, 540,
+ /* 34155 */ 3060, 540, 540, 540, 540, 2189, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2583, 0, 0, 0,
+ /* 34177 */ 540, 540, 3063, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 2326, 0, 561, 561,
+ /* 34198 */ 3090, 561, 561, 561, 561, 561, 561, 561, 561, 3098, 561, 561, 3101, 561, 0, 585, 585, 1045, 585, 585,
+ /* 34218 */ 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 1102, 1101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 1275, 540, 561,
+ /* 34245 */ 561, 3104, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2666, 585, 585, 585,
+ /* 34265 */ 3131, 585, 585, 585, 585, 585, 585, 585, 585, 3139, 585, 585, 3142, 585, 585, 585, 585, 585, 1930, 585,
+ /* 34285 */ 585, 585, 585, 585, 585, 585, 585, 1941, 585, 585, 585, 585, 585, 1948, 585, 585, 585, 585, 585, 585, 585,
+ /* 34306 */ 585, 585, 585, 585, 3263, 585, 585, 585, 585, 0, 0, 0, 0, 3179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 732, 0,
+ /* 34333 */ 0, 0, 0, 0, 0, 3192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 2808, 3201, 540, 540, 540, 540,
+ /* 34360 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1359, 540, 3213, 540, 540, 540, 540, 540, 540, 540,
+ /* 34381 */ 3218, 540, 3220, 540, 540, 540, 540, 540, 540, 561, 3227, 561, 561, 561, 3230, 561, 561, 561, 561, 561,
+ /* 34401 */ 982, 561, 0, 585, 585, 585, 585, 999, 585, 585, 585, 561, 561, 3246, 561, 3248, 561, 561, 561, 561, 561,
+ /* 34422 */ 561, 561, 561, 561, 561, 585, 585, 585, 585, 585, 3537, 585, 585, 585, 585, 3256, 585, 585, 585, 585, 585,
+ /* 34443 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3278, 585, 585, 3268, 585, 585, 585, 585, 585, 585, 585,
+ /* 34464 */ 585, 3274, 585, 3276, 585, 585, 561, 3370, 540, 3371, 561, 3372, 585, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0,
+ /* 34488 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1179, 540, 540, 3328, 540, 540, 540, 540, 540, 540, 540, 561, 561,
+ /* 34513 */ 561, 561, 561, 561, 561, 561, 561, 3233, 561, 561, 561, 561, 3340, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 34534 */ 561, 3346, 561, 0, 994, 1075, 1039, 585, 585, 78112, 1079, 0, 0, 1081, 1085, 0, 0, 1089, 3358, 585, 585,
+ /* 34555 */ 585, 585, 585, 585, 585, 585, 585, 3364, 585, 585, 585, 585, 585, 585, 585, 1981, 1982, 585, 585, 585,
+ /* 34575 */ 585, 585, 585, 585, 561, 540, 585, 585, 561, 2951, 540, 2953, 561, 561, 561, 3654, 3655, 561, 561, 585,
+ /* 34595 */ 585, 3658, 3659, 585, 585, 0, 0, 0, 0, 0, 0, 1126, 0, 0, 0, 1130, 1131, 0, 0, 0, 0, 0, 0, 1141, 0, 1143,
+ /* 34621 */ 0, 0, 362, 362, 0, 0, 0, 691, 0, 0, 0, 0, 696, 0, 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1154, 0, 0, 0, 0,
+ /* 34651 */ 0, 1160, 0, 1162, 0, 758, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 758, 758, 0, 0, 0, 0, 803, 0, 0, 0, 0, 0,
+ /* 34681 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 856, 585,
+ /* 34714 */ 999, 926, 540, 540, 540, 540, 910, 561, 561, 561, 561, 561, 1880, 1881, 1882, 561, 561, 1885, 1886, 561,
+ /* 34734 */ 561, 561, 561, 561, 1896, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2603, 561, 2605, 561, 561,
+ /* 34754 */ 561, 982, 0, 585, 585, 585, 585, 1055, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 375, 0, 378, 0, 0, 0, 378, 0, 0,
+ /* 34780 */ 0, 0, 1709, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1619, 0, 0, 585, 585, 585, 2010, 585, 561, 540, 585,
+ /* 34807 */ 585, 561, 540, 540, 540, 540, 561, 561, 561, 3066, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2600,
+ /* 34828 */ 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 987, 585, 585, 585, 585, 585, 0, 2039, 0, 0, 0, 0, 0, 0, 0,
+ /* 34853 */ 0, 0, 0, 0, 0, 0, 0, 1178, 0, 540, 540, 540, 2172, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 34877 */ 540, 540, 2238, 2584, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2255, 0, 0,
+ /* 34900 */ 0, 0, 2461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 747, 0, 0, 0, 0, 3288, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 34932 */ 0, 0, 0, 1184, 1184, 561, 561, 561, 561, 3350, 561, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 34954 */ 2939, 585, 585, 585, 585, 3368, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0,
+ /* 34979 */ 0, 0, 394, 0, 0, 467, 467, 485, 493, 493, 485, 493, 493, 493, 493, 493, 493, 493, 493, 518, 526, 526, 526,
+ /* 35002 */ 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 535, 526, 526, 526, 526, 526, 548, 570, 548, 570, 548,
+ /* 35023 */ 548, 570, 548, 594, 570, 570, 570, 570, 570, 570, 570, 594, 594, 594, 548, 594, 594, 594, 594, 594, 570,
+ /* 35044 */ 570, 548, 570, 594, 570, 594, 1, 12290, 3, 78112, 767, 0, 0, 771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 35070 */ 1704, 0, 0, 0, 821, 0, 0, 0, 798, 0, 0, 821, 0, 0, 0, 0, 0, 821, 821, 0, 0, 0, 0, 805, 0, 0, 786, 0, 0, 0,
+ /* 35100 */ 0, 805, 0, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 798, 0, 0, 0, 0, 0, 0, 839, 794, 0, 0, 839, 0, 0, 0, 0,
+ /* 35131 */ 808, 0, 0, 692, 0, 0, 672, 0, 692, 0, 813, 675, 676, 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, 0, 0, 0, 0, 340, 0,
+ /* 35160 */ 0, 0, 0, 0, 0, 0, 540, 867, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 911, 540, 540,
+ /* 35183 */ 540, 540, 2215, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1756, 540, 540, 540, 540, 983, 0,
+ /* 35204 */ 585, 585, 585, 1077, 1056, 78112, 1079, 0, 0, 0, 0, 0, 0, 0, 412, 412, 0, 0, 0, 0, 0, 412, 0, 1180, 0, 0,
+ /* 35230 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1621, 0, 0, 1241, 0, 0, 0, 0, 0, 0, 0, 0, 1246, 0, 0, 0, 0, 0, 0,
+ /* 35262 */ 1170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 816, 0, 0, 0, 0, 0, 0, 540, 1305, 540, 540, 540, 540, 540, 540, 540,
+ /* 35288 */ 1313, 540, 540, 540, 540, 540, 540, 540, 540, 3332, 540, 561, 561, 561, 561, 561, 561, 935, 561, 561, 561,
+ /* 35309 */ 561, 561, 561, 561, 561, 561, 3094, 561, 3096, 561, 561, 561, 561, 561, 561, 1340, 540, 540, 1344, 540,
+ /* 35329 */ 540, 540, 540, 540, 1350, 540, 540, 540, 1357, 540, 540, 540, 540, 540, 3458, 540, 3460, 3461, 540, 3463,
+ /* 35349 */ 540, 561, 561, 561, 561, 561, 2262, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1399, 561, 561, 561,
+ /* 35370 */ 561, 561, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1375, 561, 561, 561, 561,
+ /* 35390 */ 1848, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2868, 561, 561, 561, 561, 561, 1441, 561,
+ /* 35410 */ 561, 561, 1448, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 585, 585, 1998, 585, 585, 585, 585,
+ /* 35430 */ 585, 2003, 585, 585, 1485, 585, 585, 585, 585, 585, 585, 585, 1493, 585, 585, 585, 585, 585, 585, 585,
+ /* 35450 */ 585, 3261, 585, 585, 585, 585, 585, 585, 585, 585, 3272, 585, 585, 585, 585, 585, 585, 585, 585, 3283,
+ /* 35470 */ 540, 585, 561, 540, 540, 561, 561, 585, 1522, 585, 585, 1526, 585, 585, 585, 585, 585, 1532, 585, 585,
+ /* 35490 */ 585, 1539, 585, 585, 585, 585, 585, 1996, 1997, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1531, 585,
+ /* 35510 */ 585, 585, 585, 585, 585, 0, 0, 0, 1595, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1716, 0, 0, 0, 0, 0, 1656, 0,
+ /* 35539 */ 0, 0, 0, 0, 0, 0, 0, 0, 1665, 0, 0, 0, 0, 0, 710, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 540,
+ /* 35571 */ 540, 540, 540, 540, 1708, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1653, 0, 0, 0, 1722, 0, 0, 0, 0, 0,
+ /* 35601 */ 0, 0, 0, 0, 0, 0, 0, 1729, 0, 0, 0, 0, 0, 0, 1706, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 35629 */ 540, 540, 3398, 540, 3400, 540, 561, 561, 1893, 561, 561, 561, 561, 561, 561, 1901, 561, 561, 561, 561,
+ /* 35649 */ 561, 561, 1410, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1428, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 35670 */ 561, 1917, 26027, 0, 1922, 585, 1924, 585, 561, 561, 561, 1910, 1912, 561, 561, 561, 561, 561, 26027, 0,
+ /* 35690 */ 585, 585, 585, 585, 585, 585, 2335, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 3622, 0, 3624, 0, 0,
+ /* 35712 */ 540, 585, 585, 585, 585, 1978, 585, 585, 585, 585, 585, 585, 585, 585, 1987, 585, 585, 585, 585, 585, 585,
+ /* 35733 */ 2934, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2407, 561, 540, 585, 585, 561, 585, 585, 585, 585,
+ /* 35754 */ 1995, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2004, 2006, 0, 0, 0, 2078, 0, 0, 0, 2081, 0, 0, 0, 0,
+ /* 35778 */ 0, 2087, 0, 0, 0, 0, 0, 2774, 0, 0, 0, 2778, 0, 2780, 0, 0, 0, 0, 0, 0, 2746, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 35808 */ 362, 362, 362, 0, 0, 0, 0, 0, 2103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1265, 0, 0, 0, 0, 561, 561,
+ /* 35838 */ 561, 561, 561, 2249, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 35859 */ 585, 585, 585, 585, 585, 585, 1519, 585, 585, 2346, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 35880 */ 585, 585, 585, 2919, 585, 2448, 0, 0, 0, 0, 0, 0, 0, 0, 2453, 0, 0, 2456, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0,
+ /* 35908 */ 0, 0, 0, 0, 0, 736, 0, 0, 0, 2460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2471, 0, 0, 0, 2485, 2486, 0, 0, 2489,
+ /* 35938 */ 0, 0, 2492, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 417, 417, 0, 0, 65536, 417, 0, 0, 2499, 0, 0, 0, 0, 0,
+ /* 35965 */ 0, 0, 0, 0, 0, 0, 2510, 0, 0, 0, 0, 815, 0, 812, 795, 0, 0, 817, 0, 667, 0, 791, 0, 0, 0, 0, 1096, 0, 0,
+ /* 35994 */ 1098, 0, 0, 0, 0, 0, 0, 0, 0, 827, 0, 0, 0, 0, 0, 0, 0, 0, 540, 2524, 540, 540, 540, 540, 540, 540, 540,
+ /* 36021 */ 540, 540, 540, 540, 540, 540, 1789, 540, 540, 540, 540, 540, 2551, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 36042 */ 540, 540, 540, 540, 540, 2559, 540, 540, 2562, 540, 540, 540, 540, 540, 540, 2569, 540, 540, 540, 540,
+ /* 36062 */ 540, 540, 540, 540, 540, 540, 3323, 540, 540, 540, 540, 540, 540, 2576, 540, 540, 540, 2579, 540, 540,
+ /* 36082 */ 540, 540, 540, 540, 540, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, 0, 0, 765, 0, 0, 0, 0, 561, 2586, 561, 561,
+ /* 36110 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 3254, 561, 561, 561, 585, 585, 585, 585, 585, 2672, 585, 585,
+ /* 36131 */ 585, 585, 585, 585, 2677, 585, 585, 585, 585, 561, 0, 3646, 0, 0, 0, 540, 540, 540, 540, 540, 540, 2529,
+ /* 36153 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2842, 540, 540, 540, 540, 540, 585, 585, 585, 2683, 585,
+ /* 36174 */ 585, 585, 585, 585, 585, 2690, 585, 585, 585, 585, 585, 585, 585, 2351, 585, 585, 585, 585, 585, 585, 585,
+ /* 36195 */ 585, 1508, 585, 585, 585, 585, 585, 585, 585, 585, 2697, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 36215 */ 2704, 585, 585, 585, 2707, 0, 0, 0, 0, 2735, 0, 0, 0, 0, 0, 0, 0, 2739, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0,
+ /* 36244 */ 540, 540, 540, 540, 540, 2528, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2234, 540, 540, 540, 540,
+ /* 36265 */ 0, 540, 540, 540, 2811, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2821, 540, 540,
+ /* 36286 */ 540, 540, 540, 2836, 540, 540, 540, 2839, 540, 2841, 540, 540, 540, 540, 540, 540, 540, 540, 3520, 561,
+ /* 36306 */ 561, 561, 561, 561, 561, 561, 1450, 26027, 1360, 987, 585, 585, 585, 585, 585, 2845, 540, 540, 540, 540,
+ /* 36326 */ 540, 540, 0, 0, 561, 561, 2853, 561, 561, 561, 561, 561, 1913, 561, 561, 561, 561, 26027, 0, 585, 585,
+ /* 36347 */ 585, 585, 2333, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1050, 585, 585, 585, 585, 561, 561,
+ /* 36367 */ 2858, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2284, 561, 561, 561, 2874,
+ /* 36387 */ 2875, 561, 561, 561, 561, 2878, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 1005,
+ /* 36408 */ 585, 561, 561, 561, 2884, 561, 561, 561, 2887, 561, 2889, 561, 561, 561, 561, 561, 561, 1449, 561, 26027,
+ /* 36428 */ 1360, 987, 1453, 585, 585, 585, 585, 2893, 561, 561, 561, 561, 561, 561, 0, 0, 585, 585, 2901, 585, 585,
+ /* 36449 */ 585, 585, 585, 585, 585, 3121, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 561, 540, 3285, 561,
+ /* 36470 */ 3287, 585, 2906, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3367, 585,
+ /* 36490 */ 585, 2922, 2923, 585, 585, 585, 585, 2926, 585, 585, 585, 585, 585, 585, 585, 585, 3592, 561, 0, 0, 0, 0,
+ /* 36512 */ 3595, 0, 585, 585, 585, 2932, 585, 585, 585, 2935, 585, 2937, 585, 585, 585, 585, 585, 585, 585, 1933,
+ /* 36532 */ 585, 585, 585, 585, 1939, 585, 585, 585, 2941, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540,
+ /* 36553 */ 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 2963, 0, 0, 0, 0, 0, 585, 585, 2957, 0, 0, 2960, 2961, 0,
+ /* 36580 */ 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 3009, 0, 0, 3012, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 36612 */ 2200253, 151552, 2200253, 0, 0, 0, 151552, 540, 540, 540, 540, 3037, 540, 540, 540, 540, 540, 540, 540,
+ /* 36631 */ 540, 540, 540, 540, 540, 3325, 540, 540, 540, 540, 540, 540, 540, 3051, 540, 540, 540, 540, 540, 540, 540,
+ /* 36652 */ 540, 540, 540, 540, 540, 3465, 561, 561, 561, 561, 561, 561, 3077, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 36673 */ 561, 561, 561, 561, 1887, 1888, 561, 561, 561, 561, 561, 561, 3092, 561, 561, 561, 561, 561, 561, 561,
+ /* 36693 */ 561, 561, 561, 561, 3480, 585, 585, 585, 585, 561, 561, 585, 585, 585, 585, 3108, 585, 585, 585, 585,
+ /* 36713 */ 3112, 585, 585, 585, 585, 585, 585, 585, 3135, 585, 3137, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0,
+ /* 36735 */ 0, 3552, 0, 0, 0, 585, 585, 585, 3118, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1512,
+ /* 36757 */ 585, 585, 585, 585, 585, 585, 585, 3133, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2917,
+ /* 36778 */ 585, 585, 2920, 0, 0, 3168, 3169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2071, 0, 0, 0, 540, 540, 540, 540,
+ /* 36805 */ 3329, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3412, 561, 561, 3336, 561,
+ /* 36825 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2285, 3347, 561, 561, 561, 561, 561,
+ /* 36846 */ 585, 585, 585, 585, 585, 585, 3354, 585, 585, 585, 585, 585, 585, 2404, 585, 585, 585, 585, 561, 2178,
+ /* 36866 */ 585, 2346, 2261, 3389, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2534, 0,
+ /* 36887 */ 0, 0, 0, 3176, 0, 0, 0, 0, 0, 3447, 3448, 0, 540, 540, 540, 540, 2527, 540, 540, 540, 540, 2531, 540, 540,
+ /* 36911 */ 540, 540, 540, 540, 540, 1312, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1784, 540, 540, 540, 540, 540,
+ /* 36932 */ 540, 561, 561, 561, 561, 3473, 561, 3475, 3476, 561, 3478, 561, 585, 585, 585, 585, 585, 1079, 0, 0, 0, 0,
+ /* 36954 */ 0, 0, 0, 0, 0, 0, 254413, 0, 0, 0, 0, 0, 585, 585, 585, 3488, 585, 3490, 3491, 585, 3493, 585, 3495, 0, 0,
+ /* 36979 */ 0, 0, 0, 0, 0, 69632, 73728, 313, 314, 314, 419, 420, 65536, 427, 585, 585, 3617, 585, 3618, 585, 585,
+ /* 37000 */ 585, 561, 0, 0, 0, 0, 0, 0, 540, 585, 585, 561, 540, 540, 540, 904, 540, 561, 561, 561, 976, 561, 561,
+ /* 37023 */ 585, 585, 3673, 3674, 3675, 3676, 0, 540, 561, 585, 0, 540, 561, 585, 585, 585, 585, 585, 1079, 0, 0,
+ /* 37044 */ 1563, 0, 0, 0, 1569, 0, 0, 0, 0, 0, 2789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 0, 0, 0, 571, 571,
+ /* 37073 */ 571, 571, 571, 571, 571, 595, 595, 595, 540, 595, 595, 595, 595, 595, 571, 571, 540, 571, 595, 571, 595,
+ /* 37094 */ 1, 12290, 3, 78112, 737, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1707, 0, 0, 2040, 0, 0, 0, 0, 0, 0,
+ /* 37124 */ 0, 0, 0, 0, 0, 0, 0, 1635, 0, 0, 2170, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 37148 */ 540, 540, 1360, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2253, 561, 561, 561, 561, 926, 561,
+ /* 37170 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2307, 561, 561, 561, 2310, 400, 0, 0, 0, 0, 378, 0,
+ /* 37192 */ 69632, 73728, 0, 0, 0, 0, 423, 65536, 0, 0, 0, 0, 1111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1687, 0, 1689, 0,
+ /* 37220 */ 0, 423, 423, 0, 423, 0, 437, 423, 0, 423, 468, 468, 468, 475, 468, 468, 468, 468, 468, 468, 468, 468, 475,
+ /* 37243 */ 468, 468, 468, 468, 468, 468, 468, 468, 482, 468, 494, 494, 468, 494, 494, 494, 494, 494, 494, 494, 494,
+ /* 37264 */ 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 537, 549, 572, 549, 572, 549, 549,
+ /* 37285 */ 572, 549, 596, 572, 572, 572, 572, 572, 572, 572, 596, 596, 596, 549, 596, 596, 596, 596, 596, 572, 572,
+ /* 37306 */ 549, 572, 596, 572, 596, 1, 12290, 3, 78112, 0, 660, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1666, 0,
+ /* 37333 */ 0, 830, 0, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 742, 661, 0, 0, 0, 0, 0, 540, 847,
+ /* 37364 */ 540, 540, 540, 540, 540, 540, 3330, 540, 540, 540, 561, 561, 561, 561, 561, 3335, 861, 540, 540, 540, 540,
+ /* 37385 */ 540, 540, 540, 540, 540, 897, 540, 540, 540, 540, 540, 540, 540, 1799, 540, 540, 540, 540, 540, 540, 1807,
+ /* 37406 */ 540, 561, 561, 916, 561, 561, 561, 931, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2266, 561, 561, 561,
+ /* 37427 */ 561, 561, 561, 0, 0, 0, 540, 989, 585, 561, 540, 540, 897, 540, 540, 561, 561, 969, 561, 561, 561, 561,
+ /* 37449 */ 561, 0, 585, 585, 989, 585, 585, 585, 1004, 585, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1101, 1102, 0, 0, 0, 0,
+ /* 37475 */ 0, 0, 1203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 0, 0, 540, 540, 540, 1308, 540, 540, 540, 540,
+ /* 37502 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 3222, 540, 540, 1360, 914, 561, 1363, 561, 561, 561, 561,
+ /* 37522 */ 561, 561, 561, 561, 561, 561, 1376, 1383, 561, 561, 561, 1444, 561, 561, 561, 561, 26027, 1360, 987, 585,
+ /* 37542 */ 1454, 585, 585, 585, 585, 585, 585, 2659, 585, 585, 2662, 2663, 585, 585, 585, 585, 585, 585, 585, 2712,
+ /* 37562 */ 540, 585, 585, 561, 540, 540, 540, 540, 585, 585, 1488, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 37583 */ 585, 585, 585, 585, 3128, 585, 1521, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1535, 585,
+ /* 37603 */ 585, 585, 585, 585, 585, 2673, 585, 585, 585, 2676, 585, 585, 2678, 585, 2679, 561, 585, 585, 1521, 585,
+ /* 37623 */ 585, 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 759, 0, 0, 0, 0, 0, 0, 1826, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 37650 */ 561, 561, 561, 561, 561, 1841, 1842, 585, 585, 2009, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540,
+ /* 37670 */ 540, 561, 561, 561, 561, 1849, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2880, 561, 561, 561,
+ /* 37691 */ 561, 561, 2063, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2074, 540, 540, 2226, 540, 540, 540, 540,
+ /* 37717 */ 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 2854, 561, 561, 561, 561, 561, 561, 2301,
+ /* 37738 */ 561, 561, 561, 561, 561, 561, 2306, 561, 561, 561, 561, 561, 561, 3079, 561, 561, 561, 561, 561, 3085,
+ /* 37758 */ 561, 561, 3088, 2311, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585,
+ /* 37781 */ 585, 585, 585, 585, 585, 2654, 585, 585, 585, 585, 585, 2374, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 37802 */ 585, 585, 585, 3140, 585, 585, 585, 585, 2386, 585, 585, 585, 585, 585, 585, 2391, 585, 585, 585, 585,
+ /* 37822 */ 585, 2396, 585, 585, 585, 585, 585, 2012, 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 561, 561,
+ /* 37842 */ 2624, 561, 561, 561, 561, 561, 561, 2632, 561, 561, 561, 561, 561, 2288, 561, 561, 561, 561, 561, 561,
+ /* 37862 */ 561, 561, 561, 561, 2631, 561, 561, 561, 561, 561, 2435, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 37888 */ 2114, 0, 0, 0, 0, 2476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, 2732, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 37920 */ 0, 0, 0, 0, 0, 0, 1590, 1591, 0, 0, 0, 2772, 0, 0, 0, 0, 2777, 0, 0, 0, 0, 0, 0, 0, 540, 562, 540, 562,
+ /* 37948 */ 540, 540, 562, 540, 586, 540, 540, 2810, 540, 540, 540, 540, 540, 540, 2818, 540, 540, 540, 540, 540, 540,
+ /* 37969 */ 540, 889, 540, 540, 540, 540, 907, 540, 540, 540, 540, 540, 540, 540, 2849, 540, 540, 0, 0, 561, 561, 561,
+ /* 37991 */ 561, 561, 561, 561, 561, 561, 1836, 561, 561, 561, 561, 561, 2857, 561, 561, 561, 561, 561, 561, 2865,
+ /* 38011 */ 561, 561, 561, 561, 561, 561, 561, 561, 3081, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2897,
+ /* 38032 */ 561, 561, 0, 0, 585, 585, 585, 585, 585, 585, 585, 1467, 1474, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 38053 */ 3621, 0, 0, 0, 0, 0, 0, 540, 2905, 585, 585, 585, 585, 585, 585, 2913, 585, 585, 585, 585, 585, 585, 585,
+ /* 38076 */ 585, 585, 1983, 585, 585, 1986, 585, 585, 585, 585, 585, 585, 585, 2945, 585, 585, 561, 540, 585, 585,
+ /* 38096 */ 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 3376, 0, 585, 3280, 585, 585, 585, 585, 585, 585, 561,
+ /* 38119 */ 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 3155, 0, 0, 585, 585, 585, 3587, 585, 3589, 585, 585, 585,
+ /* 38141 */ 561, 0, 0, 0, 0, 0, 0, 0, 2791, 0, 0, 0, 2793, 0, 0, 0, 0, 0, 0, 0, 0, 3600, 540, 540, 540, 540, 540, 540,
+ /* 38169 */ 540, 540, 540, 540, 540, 1314, 540, 540, 540, 540, 3607, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 38190 */ 561, 3614, 585, 585, 585, 585, 585, 585, 2686, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1045, 585,
+ /* 38210 */ 585, 585, 585, 585, 972, 561, 3653, 561, 561, 561, 561, 585, 3657, 585, 585, 585, 585, 0, 0, 0, 0, 0, 0,
+ /* 38233 */ 1204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 345, 469, 469, 469, 453, 453, 469, 453, 453, 453,
+ /* 38259 */ 453, 453, 453, 453, 453, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519,
+ /* 38280 */ 550, 573, 550, 573, 550, 550, 573, 550, 597, 573, 573, 573, 573, 573, 573, 573, 597, 597, 597, 550, 597,
+ /* 38301 */ 597, 597, 597, 597, 573, 573, 550, 573, 597, 573, 597, 1, 12290, 3, 78112, 862, 540, 540, 876, 540, 540,
+ /* 38322 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1315, 540, 540, 540, 585, 1019, 585, 585, 585, 585, 585,
+ /* 38343 */ 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 3498, 0, 0, 1123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 38370 */ 0, 0, 0, 1607, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2111, 0, 0, 0, 540, 1341, 540, 540,
+ /* 38399 */ 540, 540, 540, 1348, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3333, 561, 561, 561, 561, 561, 585,
+ /* 38420 */ 585, 585, 585, 1505, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3365, 585, 585, 585, 585,
+ /* 38441 */ 585, 1523, 585, 585, 585, 585, 585, 1530, 585, 585, 585, 585, 585, 585, 585, 1468, 585, 585, 585, 585,
+ /* 38461 */ 585, 585, 585, 585, 585, 2378, 585, 585, 585, 585, 585, 585, 561, 585, 585, 585, 1557, 585, 1079, 0, 1561,
+ /* 38482 */ 0, 0, 0, 1567, 0, 0, 0, 0, 0, 803, 0, 0, 0, 0, 0, 0, 0, 803, 0, 0, 0, 0, 540, 540, 540, 540, 540, 1573, 0,
+ /* 38511 */ 0, 0, 1579, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, 0, 1695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 38544 */ 0, 0, 2127, 0, 0, 0, 540, 1762, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 38566 */ 1358, 540, 1843, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1854, 561, 561, 561, 561, 561, 561, 3239,
+ /* 38586 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 3578, 561, 561, 585, 585, 585, 585, 0, 2064, 2065, 0, 0, 0,
+ /* 38608 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1717, 0, 0, 0, 0, 0, 0, 2135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0,
+ /* 38640 */ 0, 0, 2186, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1808, 540, 540,
+ /* 38661 */ 2213, 540, 540, 540, 540, 2218, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1754, 540, 540, 540, 540,
+ /* 38681 */ 540, 540, 2240, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1401, 561, 561,
+ /* 38702 */ 2298, 561, 561, 561, 561, 2303, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3083, 561, 561, 561,
+ /* 38722 */ 561, 561, 585, 585, 585, 2388, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1938, 585, 585,
+ /* 38743 */ 585, 3034, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2210, 0, 0, 0, 3380,
+ /* 38765 */ 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1175, 0, 0, 0, 0, 540, 540, 3404, 540, 561, 561, 561, 561, 561,
+ /* 38791 */ 561, 561, 561, 561, 561, 561, 561, 2282, 561, 561, 561, 561, 561, 561, 561, 3419, 561, 585, 585, 585, 585,
+ /* 38812 */ 585, 585, 585, 585, 585, 585, 1049, 585, 585, 585, 585, 561, 540, 3454, 540, 540, 540, 540, 540, 540, 540,
+ /* 38833 */ 540, 540, 540, 561, 561, 561, 561, 3523, 561, 561, 561, 3469, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 38854 */ 561, 585, 585, 585, 585, 3484, 385, 387, 337, 0, 0, 0, 0, 0, 0, 336, 0, 0, 337, 0, 0, 0, 0, 0, 1097, 0, 0,
+ /* 38881 */ 0, 0, 0, 0, 0, 0, 0, 0, 2057, 0, 0, 0, 0, 0, 0, 0, 0, 384, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0,
+ /* 38911 */ 0, 0, 0, 1139, 1140, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2048, 0,
+ /* 38941 */ 0, 0, 0, 0, 0, 0, 336, 0, 0, 438, 0, 444, 0, 470, 470, 470, 470, 470, 470, 470, 551, 574, 551, 574, 551,
+ /* 38966 */ 551, 574, 551, 598, 480, 470, 470, 470, 499, 476, 499, 499, 499, 499, 499, 499, 499, 499, 470, 470, 476,
+ /* 38987 */ 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 480, 470, 481, 480, 470, 470, 470, 470, 574, 574, 574,
+ /* 39008 */ 574, 574, 574, 574, 598, 598, 598, 551, 598, 598, 598, 598, 598, 574, 574, 551, 574, 598, 574, 598, 1,
+ /* 39029 */ 12290, 3, 78112, 0, 0, 0, 678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2153, 0, 0, 0, 0, 0, 693, 0, 0, 0, 0,
+ /* 39059 */ 0, 0, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 0, 0, 1223, 0, 0, 0, 0, 0,
+ /* 39089 */ 0, 663, 0, 791, 0, 0, 0, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 2972, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2097, 0,
+ /* 39119 */ 2099, 0, 0, 0, 0, 0, 804, 0, 0, 0, 0, 0, 812, 0, 0, 0, 0, 706, 0, 0, 0, 0, 0, 0, 0, 0, 715, 0, 717, 0, 0,
+ /* 39150 */ 0, 831, 0, 0, 0, 663, 834, 0, 791, 0, 0, 0, 0, 0, 840, 0, 0, 0, 0, 0, 2996, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 39181 */ 2429, 2430, 0, 0, 0, 0, 863, 540, 540, 877, 540, 540, 540, 888, 540, 540, 540, 540, 906, 540, 540, 540,
+ /* 39203 */ 540, 540, 1311, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2843, 540, 540, 540, 540, 561, 561,
+ /* 39224 */ 917, 561, 561, 561, 933, 561, 561, 947, 561, 561, 561, 561, 960, 561, 0, 995, 585, 1076, 1046, 585, 78112,
+ /* 39245 */ 1079, 0, 0, 0, 0, 0, 0, 0, 0, 2686976, 2736128, 0, 0, 2531328, 2707456, 0, 3190784, 561, 561, 561, 978,
+ /* 39266 */ 561, 561, 561, 0, 585, 585, 990, 585, 585, 585, 1006, 585, 585, 585, 585, 585, 2349, 585, 585, 585, 585,
+ /* 39287 */ 2354, 585, 585, 585, 585, 585, 585, 585, 2377, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 561, 585,
+ /* 39308 */ 0, 0, 0, 0, 585, 1020, 585, 585, 585, 585, 1033, 585, 585, 585, 585, 1051, 585, 585, 585, 561, 540, 585,
+ /* 39330 */ 561, 3149, 540, 3151, 561, 3153, 585, 0, 0, 0, 0, 0, 0, 1660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 0,
+ /* 39358 */ 0, 0, 0, 0, 0, 540, 990, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 3067, 561, 561, 561, 561,
+ /* 39381 */ 3071, 561, 561, 561, 561, 0, 0, 0, 1215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2431, 0, 2433, 0, 1238, 0, 0,
+ /* 39409 */ 0, 0, 1270, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 3561, 540, 540, 540, 540, 540, 540, 540, 540, 561,
+ /* 39433 */ 561, 561, 561, 561, 561, 561, 585, 585, 585, 540, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1491, 585,
+ /* 39454 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1495, 585, 585, 585, 585, 561, 585, 585, 1556, 585, 585,
+ /* 39475 */ 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1100, 0, 0, 0, 0, 0, 0, 1622, 0, 0, 1625, 0, 1627, 0, 0, 0, 0, 0, 0, 0,
+ /* 39505 */ 0, 0, 0, 839, 540, 540, 540, 540, 859, 540, 1744, 540, 540, 540, 540, 540, 540, 540, 540, 1755, 540, 540,
+ /* 39527 */ 540, 540, 540, 540, 540, 2176, 540, 540, 2180, 540, 540, 540, 2184, 540, 561, 561, 561, 1847, 561, 561,
+ /* 39547 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2294, 561, 561, 561, 0, 0, 2117, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 39572 */ 0, 0, 0, 0, 0, 1730, 0, 0, 0, 0, 0, 0, 2148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1207, 0, 0, 0, 0, 0, 0, 0,
+ /* 39604 */ 561, 561, 561, 561, 2248, 561, 561, 561, 561, 561, 561, 561, 561, 3095, 3097, 561, 561, 561, 3100, 561,
+ /* 39624 */ 3102, 561, 561, 2313, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 585, 2651,
+ /* 39647 */ 585, 585, 585, 585, 585, 585, 585, 2660, 585, 585, 585, 585, 585, 2665, 585, 585, 2398, 585, 585, 585,
+ /* 39667 */ 585, 585, 585, 585, 585, 585, 585, 561, 540, 2410, 585, 561, 0, 540, 585, 585, 561, 540, 540, 540, 540,
+ /* 39688 */ 540, 561, 561, 561, 561, 585, 585, 585, 585, 0, 3669, 540, 3670, 0, 2436, 0, 0, 0, 0, 0, 0, 2441, 0, 0, 0,
+ /* 39713 */ 2444, 2445, 0, 0, 0, 0, 0, 3010, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 304, 0, 0, 0, 0, 2497, 0, 0, 0, 0, 0,
+ /* 39743 */ 0, 0, 0, 0, 2506, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 163840, 0, 0, 0, 0, 65536, 0, 2512, 0, 0, 0, 0, 2515,
+ /* 39770 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2523, 540, 2536, 2537, 540, 540, 540, 540, 540, 2542, 540, 2544, 540, 540, 540,
+ /* 39794 */ 540, 2548, 561, 2595, 561, 561, 2598, 2599, 561, 561, 561, 561, 561, 2604, 561, 2606, 561, 561, 561, 561,
+ /* 39814 */ 1863, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2890, 561, 561, 561, 561, 561, 561, 561,
+ /* 39834 */ 2610, 561, 561, 561, 561, 561, 561, 561, 561, 2616, 561, 561, 561, 561, 561, 2276, 561, 561, 2279, 561,
+ /* 39854 */ 561, 561, 561, 561, 561, 561, 1915, 561, 561, 26027, 1920, 585, 585, 585, 585, 2636, 561, 561, 561, 561,
+ /* 39874 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2608, 2668, 585, 2670, 585, 585, 585, 585, 2674,
+ /* 39894 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 2675, 585, 585, 585, 585, 585, 585, 2680, 585, 585, 585, 585,
+ /* 39915 */ 585, 585, 585, 585, 2688, 585, 585, 585, 585, 585, 585, 585, 1950, 585, 585, 585, 585, 1954, 585, 585,
+ /* 39935 */ 585, 2696, 585, 585, 585, 585, 2700, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1494, 585, 585,
+ /* 39955 */ 585, 585, 585, 561, 2720, 561, 561, 585, 2722, 585, 585, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2964, 0, 0, 0, 0,
+ /* 39980 */ 2770, 0, 0, 0, 2773, 0, 0, 2776, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 40012 */ 1691, 0, 2786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2795, 0, 0, 0, 0, 0, 3171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 40043 */ 1245, 0, 0, 0, 0, 0, 540, 2825, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 40065 */ 1773, 540, 540, 2835, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2844, 540, 540,
+ /* 40085 */ 2847, 540, 540, 2850, 540, 0, 0, 2851, 561, 561, 561, 561, 561, 561, 1851, 561, 561, 561, 561, 1855, 561,
+ /* 40106 */ 561, 561, 561, 561, 2883, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2892, 561, 561,
+ /* 40127 */ 2895, 561, 561, 2898, 561, 0, 0, 2899, 585, 585, 585, 585, 585, 585, 585, 1965, 585, 585, 585, 1970, 585,
+ /* 40148 */ 585, 585, 585, 585, 2931, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2940, 585, 585,
+ /* 40169 */ 2943, 585, 585, 2946, 585, 561, 2948, 585, 2949, 2950, 540, 540, 561, 561, 561, 561, 1878, 561, 561, 561,
+ /* 40189 */ 561, 1884, 561, 561, 561, 561, 561, 561, 936, 561, 561, 561, 561, 561, 561, 561, 561, 561, 984, 0, 585,
+ /* 40210 */ 585, 585, 585, 585, 585, 1007, 585, 0, 2968, 2969, 0, 0, 0, 0, 2974, 0, 0, 0, 0, 0, 0, 0, 0, 331, 0, 331,
+ /* 40236 */ 331, 0, 0, 0, 0, 3020, 0, 0, 540, 540, 3025, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3043,
+ /* 40259 */ 540, 540, 540, 540, 540, 540, 540, 3050, 540, 540, 3052, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 40280 */ 1352, 540, 540, 540, 540, 540, 561, 561, 561, 3091, 561, 561, 3093, 561, 561, 561, 561, 561, 561, 561,
+ /* 40300 */ 561, 561, 2602, 561, 561, 561, 561, 561, 561, 561, 561, 585, 585, 3106, 585, 585, 585, 585, 585, 585, 585,
+ /* 40321 */ 585, 585, 585, 585, 1496, 585, 585, 585, 1500, 585, 585, 585, 3132, 585, 585, 3134, 585, 585, 585, 585,
+ /* 40341 */ 585, 585, 585, 585, 585, 1040, 585, 585, 585, 585, 585, 967, 3158, 0, 0, 0, 3162, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 40366 */ 0, 0, 0, 1222, 0, 0, 1225, 0, 3190, 0, 0, 3193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 540, 2166,
+ /* 40393 */ 540, 540, 540, 540, 540, 3214, 540, 540, 540, 540, 540, 540, 540, 3219, 540, 540, 540, 540, 540, 540, 540,
+ /* 40414 */ 2541, 540, 2543, 540, 540, 540, 540, 540, 540, 540, 540, 2581, 540, 540, 540, 540, 0, 2584, 0, 561, 561,
+ /* 40435 */ 561, 3236, 3237, 561, 561, 561, 561, 561, 3241, 561, 561, 561, 561, 561, 561, 3250, 561, 561, 561, 561,
+ /* 40455 */ 561, 561, 561, 561, 585, 585, 585, 585, 3536, 585, 585, 585, 585, 561, 561, 561, 3247, 561, 561, 561, 561,
+ /* 40476 */ 561, 561, 561, 561, 561, 561, 561, 585, 3481, 585, 3483, 585, 585, 585, 585, 3269, 585, 585, 585, 585,
+ /* 40496 */ 585, 585, 585, 585, 3275, 585, 585, 585, 585, 585, 585, 2701, 585, 585, 585, 585, 585, 585, 585, 2706,
+ /* 40516 */ 585, 0, 0, 3308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 540, 856, 540, 585, 3359, 585, 585, 585,
+ /* 40542 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1057, 561, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0,
+ /* 40567 */ 3386, 0, 0, 0, 0, 0, 1169, 0, 1171, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 40597 */ 669, 0, 0, 0, 0, 0, 585, 3429, 585, 585, 585, 585, 585, 585, 561, 540, 561, 585, 0, 3437, 0, 0, 0, 0, 0,
+ /* 40622 */ 3300, 0, 3176, 3302, 0, 0, 3305, 0, 0, 0, 0, 0, 0, 1113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362, 0, 703,
+ /* 40650 */ 0, 0, 3440, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540, 3452, 540, 540, 540, 540, 3457, 540, 540,
+ /* 40675 */ 540, 540, 3462, 540, 540, 561, 561, 3467, 561, 0, 997, 1037, 585, 1048, 585, 78112, 1079, 0, 0, 0, 0, 0,
+ /* 40697 */ 0, 0, 776, 0, 0, 0, 0, 0, 783, 0, 0, 561, 561, 561, 3472, 561, 561, 561, 561, 3477, 561, 561, 585, 585,
+ /* 40721 */ 3482, 585, 585, 585, 585, 585, 585, 3259, 3260, 585, 585, 585, 585, 3264, 3265, 585, 585, 585, 585, 585,
+ /* 40741 */ 585, 3120, 585, 585, 585, 585, 585, 3126, 585, 585, 3129, 585, 585, 3487, 585, 585, 585, 585, 3492, 585,
+ /* 40761 */ 585, 561, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 167936, 0, 0, 0, 0, 65536, 0, 3499, 0, 0, 0, 0, 0, 3505, 0,
+ /* 40787 */ 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3397, 540, 540, 540, 540, 540, 540, 540, 540, 3517, 540,
+ /* 40808 */ 540, 3519, 561, 561, 561, 561, 561, 561, 561, 561, 3252, 561, 561, 561, 561, 561, 561, 585, 561, 561, 561,
+ /* 40829 */ 3530, 561, 561, 3532, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1042, 585, 585, 585, 585, 585, 969,
+ /* 40849 */ 585, 585, 3543, 585, 585, 3545, 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1144, 0, 362, 362, 0, 1147, 0, 540, 540,
+ /* 40874 */ 3629, 3630, 540, 540, 561, 561, 561, 3635, 3636, 561, 561, 585, 585, 585, 585, 0, 2029, 0, 0, 0, 0, 0,
+ /* 40896 */ 2031, 0, 0, 3641, 3642, 585, 585, 561, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3395, 540, 540, 540,
+ /* 40919 */ 540, 540, 540, 3401, 561, 561, 585, 585, 0, 540, 561, 585, 0, 540, 561, 585, 3681, 3682, 3683, 3684, 339,
+ /* 40940 */ 340, 341, 342, 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1617, 0, 0, 0, 0, 0, 0, 0, 388, 0, 0, 0, 0, 0, 0, 0,
+ /* 40971 */ 0, 0, 0, 0, 0, 2469, 0, 2470, 0, 342, 342, 343, 342, 0, 341, 342, 445, 454, 471, 471, 471, 471, 471, 471,
+ /* 40995 */ 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 486, 495, 495, 503, 495, 505, 495, 495, 505,
+ /* 41016 */ 505, 495, 505, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 552, 575,
+ /* 41037 */ 552, 575, 552, 552, 575, 552, 599, 575, 575, 575, 575, 575, 575, 575, 599, 599, 599, 552, 599, 599, 599,
+ /* 41058 */ 599, 599, 575, 575, 552, 575, 599, 575, 599, 1, 12290, 3, 78112, 0, 0, 0, 646, 0, 0, 0, 0, 651, 652, 653,
+ /* 41082 */ 654, 655, 656, 657, 0, 0, 0, 0, 1144, 0, 0, 1259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2957312, 0, 0, 0, 0, 0, 0, 0,
+ /* 41111 */ 692, 0, 0, 0, 0, 0, 0, 699, 362, 362, 362, 0, 0, 0, 0, 0, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 735, 0, 800,
+ /* 41141 */ 0, 0, 0, 0, 721, 0, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 0, 1202, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 41173 */ 0, 333, 334, 0, 0, 0, 0, 0, 646, 752, 753, 754, 0, 0, 0, 0, 0, 760, 761, 0, 0, 0, 0, 0, 0, 1271, 0, 0, 0,
+ /* 41202 */ 0, 0, 0, 540, 540, 540, 3026, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2220, 540, 540, 540, 540,
+ /* 41224 */ 540, 0, 761, 0, 0, 790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 797, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 1157, 0, 0, 0, 0, 0,
+ /* 41255 */ 0, 0, 2106, 0, 0, 0, 0, 0, 0, 0, 0, 1219, 0, 0, 0, 0, 0, 0, 0, 723, 0, 692, 814, 0, 0, 0, 0, 761, 0, 0, 0,
+ /* 41286 */ 0, 0, 0, 0, 558, 581, 558, 581, 558, 558, 581, 558, 605, 0, 754, 823, 824, 0, 0, 0, 0, 0, 0, 754, 0, 0,
+ /* 41312 */ 828, 699, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1633, 0, 0, 0, 0, 0, 0, 833, 0, 0, 0, 835, 0,
+ /* 41343 */ 0, 0, 692, 699, 0, 0, 692, 833, 0, 0, 0, 0, 0, 0, 0, 0, 0, 692, 540, 540, 853, 857, 860, 540, 868, 540,
+ /* 41369 */ 540, 882, 884, 887, 540, 540, 540, 898, 902, 540, 540, 540, 540, 540, 540, 1766, 540, 540, 540, 540, 540,
+ /* 41390 */ 540, 540, 540, 540, 540, 1786, 540, 540, 540, 540, 540, 561, 561, 561, 923, 927, 930, 561, 938, 561, 561,
+ /* 41411 */ 561, 953, 955, 958, 561, 561, 561, 561, 1879, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2641,
+ /* 41432 */ 561, 561, 561, 561, 561, 561, 561, 561, 2648, 0, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585,
+ /* 41453 */ 561, 2717, 540, 540, 540, 585, 585, 585, 1026, 1028, 1031, 585, 585, 585, 1043, 1047, 585, 585, 585, 585,
+ /* 41473 */ 970, 0, 0, 0, 1060, 585, 1062, 1063, 853, 540, 898, 902, 1068, 923, 561, 970, 974, 561, 561, 561, 561, 0,
+ /* 41495 */ 585, 585, 585, 996, 1000, 1003, 585, 1011, 1073, 0, 996, 585, 1043, 1047, 1078, 78112, 1079, 0, 0, 0, 0,
+ /* 41516 */ 0, 0, 0, 560, 583, 560, 583, 560, 560, 583, 560, 607, 0, 0, 1199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1208, 0, 0,
+ /* 41543 */ 0, 0, 0, 1231, 0, 0, 0, 0, 1236, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 422, 65536, 0, 540, 1322,
+ /* 41570 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 1331, 540, 540, 1338, 540, 540, 540, 540, 2228, 540, 540,
+ /* 41590 */ 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 2852, 561, 561, 561, 561, 561, 561, 561, 561, 1422,
+ /* 41611 */ 561, 561, 1429, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2879, 561, 561, 561, 561, 561, 561, 561,
+ /* 41631 */ 1442, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 585, 585, 2925, 585, 585,
+ /* 41651 */ 585, 585, 585, 585, 585, 585, 561, 540, 561, 585, 3436, 0, 3438, 0, 585, 1503, 585, 585, 585, 585, 585,
+ /* 41672 */ 585, 585, 585, 585, 585, 1513, 585, 585, 1520, 1667, 0, 1669, 0, 0, 0, 1671, 0, 748, 0, 0, 0, 0, 0, 0, 0,
+ /* 41697 */ 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624,
+ /* 41716 */ 282624, 0, 0, 1602, 0, 0, 0, 0, 0, 0, 540, 1738, 540, 540, 540, 540, 540, 540, 540, 2584, 0, 561, 561,
+ /* 41739 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 1839, 561, 561, 561, 1743, 540, 540, 540, 540, 540, 540, 540,
+ /* 41760 */ 540, 540, 540, 540, 540, 540, 540, 540, 2238, 540, 1776, 540, 540, 1781, 540, 540, 540, 540, 540, 540,
+ /* 41780 */ 540, 540, 540, 540, 540, 1353, 540, 540, 540, 540, 0, 561, 1829, 561, 561, 561, 561, 561, 561, 1835, 561,
+ /* 41801 */ 561, 561, 561, 561, 561, 1864, 561, 561, 561, 1868, 561, 561, 1873, 561, 561, 1907, 561, 561, 561, 561,
+ /* 41821 */ 561, 561, 561, 561, 561, 26027, 0, 585, 1923, 585, 585, 585, 585, 585, 585, 3270, 585, 585, 585, 585, 585,
+ /* 41842 */ 585, 585, 585, 585, 1968, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1929, 585, 585, 585, 585, 585,
+ /* 41863 */ 585, 585, 585, 585, 585, 585, 1511, 585, 585, 585, 585, 585, 1958, 585, 585, 585, 1962, 585, 585, 1967,
+ /* 41883 */ 585, 585, 585, 585, 585, 585, 585, 1469, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2392, 585, 585, 585,
+ /* 41904 */ 2395, 585, 585, 0, 1086, 0, 0, 0, 2034, 0, 1090, 0, 0, 0, 2036, 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 41932 */ 0, 0, 0, 0, 1226, 585, 585, 585, 585, 2362, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1534,
+ /* 41954 */ 585, 585, 585, 585, 2585, 0, 1826, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 41975 */ 561, 2271, 585, 585, 585, 2710, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540,
+ /* 41995 */ 1814, 540, 540, 540, 540, 1820, 540, 540, 540, 1360, 0, 0, 0, 0, 2744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 42021 */ 1649, 0, 0, 0, 0, 585, 585, 585, 585, 2924, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1937,
+ /* 42043 */ 585, 585, 585, 585, 561, 561, 3338, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1857,
+ /* 42064 */ 561, 561, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 3385, 0, 0, 0, 0, 0, 0, 1628, 1629, 1630, 0, 0, 0, 0, 0, 0,
+ /* 42093 */ 0, 0, 1159168, 362, 0, 0, 0, 0, 0, 0, 3402, 540, 540, 540, 561, 561, 561, 3407, 561, 561, 561, 561, 3411,
+ /* 42116 */ 561, 561, 561, 561, 1391, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1414, 561, 561, 561, 561,
+ /* 42137 */ 561, 561, 3417, 561, 561, 561, 585, 585, 585, 3422, 585, 585, 585, 585, 3426, 585, 585, 585, 585, 585,
+ /* 42157 */ 2375, 2376, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1476, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 42177 */ 585, 585, 3432, 585, 585, 585, 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 1644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 661,
+ /* 42204 */ 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 3446, 0, 0, 0, 540, 540, 540, 3392, 540, 540, 540, 540,
+ /* 42231 */ 3396, 540, 540, 540, 540, 540, 540, 540, 3039, 540, 540, 540, 540, 540, 3045, 540, 540, 540, 540, 3455,
+ /* 42251 */ 540, 540, 540, 3459, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 2626, 561, 561, 561, 561, 561, 561,
+ /* 42272 */ 2633, 561, 561, 561, 561, 3470, 561, 561, 561, 3474, 561, 561, 561, 561, 561, 585, 585, 585, 585, 585,
+ /* 42292 */ 585, 585, 3111, 585, 585, 585, 585, 585, 585, 3485, 585, 585, 585, 3489, 585, 585, 585, 585, 585, 561, 0,
+ /* 42313 */ 0, 0, 0, 0, 540, 540, 540, 540, 540, 540, 3603, 540, 3604, 540, 540, 540, 561, 561, 585, 585, 0, 540, 561,
+ /* 42336 */ 585, 3677, 3678, 3679, 3680, 0, 540, 561, 585, 585, 585, 585, 585, 1079, 0, 1562, 0, 0, 0, 1568, 0, 0, 0,
+ /* 42359 */ 0, 0, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 300, 0, 0, 0, 0, 386, 0, 0, 0, 390, 386, 0, 0, 0, 0, 0, 0,
+ /* 42390 */ 0, 0, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 344, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0,
+ /* 42419 */ 1201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 357, 0, 0, 0, 0, 521, 521, 521, 521, 0, 0, 0, 0, 0, 0, 0, 0, 521,
+ /* 42449 */ 521, 521, 521, 521, 521, 521, 553, 576, 553, 576, 553, 553, 576, 553, 600, 576, 576, 576, 576, 576, 576,
+ /* 42470 */ 576, 600, 600, 600, 553, 600, 600, 600, 600, 600, 576, 576, 617, 622, 600, 622, 628, 1, 12290, 3, 78112,
+ /* 42491 */ 561, 561, 561, 979, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2927, 585, 585, 585,
+ /* 42512 */ 585, 585, 585, 0, 0, 0, 540, 1061, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3238, 561,
+ /* 42534 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 1433, 561, 561, 561, 561, 561, 1107, 0, 0, 0, 0, 1112, 0, 0,
+ /* 42557 */ 0, 0, 0, 0, 0, 0, 0, 0, 1190, 0, 0, 0, 0, 0, 561, 561, 561, 1389, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 42583 */ 561, 561, 561, 561, 2308, 2309, 561, 561, 561, 1403, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 42603 */ 561, 561, 561, 561, 2296, 2297, 1440, 561, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 585,
+ /* 42623 */ 585, 585, 585, 585, 2947, 540, 585, 585, 561, 540, 540, 561, 561, 1574, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0,
+ /* 42647 */ 0, 0, 0, 0, 0, 1664, 0, 0, 0, 0, 1606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1620, 0, 0, 0, 0, 1216, 0,
+ /* 42678 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2110, 0, 0, 0, 0, 561, 561, 561, 1877, 561, 561, 561, 561, 561, 561, 561,
+ /* 42704 */ 561, 561, 561, 561, 561, 2322, 0, 0, 0, 2052, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2155, 0, 2116,
+ /* 42732 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1676, 0, 2241, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 42759 */ 561, 561, 561, 561, 561, 2295, 561, 561, 561, 561, 2274, 561, 561, 561, 561, 2278, 561, 2280, 561, 561,
+ /* 42779 */ 561, 561, 561, 561, 1897, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1397, 561, 561, 561, 561, 561, 561,
+ /* 42800 */ 2359, 585, 585, 585, 585, 2363, 585, 2365, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3123, 585, 3125,
+ /* 42820 */ 585, 585, 585, 585, 0, 0, 0, 2500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2494, 2495, 0, 0, 561, 2622, 561,
+ /* 42847 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2607, 561, 0, 3021, 0, 540, 540, 540,
+ /* 42868 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2533, 540, 0, 0, 0, 0, 3176, 3382, 0, 0, 3384, 0, 0, 0,
+ /* 42892 */ 0, 0, 0, 0, 728, 0, 0, 0, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 3391, 540, 540, 3393, 540,
+ /* 42921 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 1785, 540, 540, 540, 1790, 540, 0, 0, 0, 0, 3176, 0, 3443, 0,
+ /* 42944 */ 0, 0, 0, 0, 3449, 540, 540, 540, 540, 540, 1782, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 42966 */ 2832, 540, 540, 540, 540, 864, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 912,
+ /* 42987 */ 1095, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2447, 0, 0, 1624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 43019 */ 0, 2060, 0, 0, 1827, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2620, 345,
+ /* 43041 */ 345, 347, 345, 0, 0, 345, 0, 345, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 3310, 0, 0, 3312, 0, 0, 0, 0, 0, 0, 540,
+ /* 43070 */ 585, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 561, 3410, 561, 561, 561, 561, 561, 0, 0,
+ /* 43092 */ 0, 345, 345, 347, 345, 345, 345, 345, 345, 345, 512, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345,
+ /* 43113 */ 345, 345, 345, 345, 345, 345, 554, 577, 554, 577, 554, 554, 577, 554, 601, 577, 577, 577, 577, 577, 577,
+ /* 43134 */ 577, 601, 601, 601, 554, 601, 601, 601, 601, 601, 577, 577, 554, 577, 601, 577, 601, 1, 12290, 3, 78112,
+ /* 43155 */ 0, 722, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2508, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 43187 */ 0, 0, 0, 0, 1690, 0, 0, 0, 811, 0, 0, 810, 0, 0, 0, 0, 0, 755, 0, 0, 819, 0, 0, 0, 0, 1269, 0, 0, 0, 0, 0,
+ /* 43218 */ 0, 0, 1181, 540, 540, 540, 540, 540, 1797, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3464,
+ /* 43239 */ 561, 561, 561, 561, 540, 540, 872, 540, 540, 540, 540, 890, 892, 540, 540, 903, 540, 540, 540, 540, 540,
+ /* 43260 */ 540, 2175, 540, 2177, 540, 540, 540, 540, 540, 540, 2185, 561, 561, 918, 924, 561, 561, 561, 561, 942,
+ /* 43280 */ 561, 561, 561, 561, 561, 962, 964, 561, 561, 975, 561, 561, 561, 561, 0, 585, 585, 991, 997, 585, 585,
+ /* 43301 */ 585, 585, 585, 585, 585, 3271, 585, 585, 585, 585, 585, 585, 3277, 585, 1015, 585, 585, 585, 585, 585,
+ /* 43321 */ 1035, 1037, 585, 585, 1048, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 540, 540, 3650, 3651, 540, 540, 0, 0,
+ /* 43344 */ 0, 540, 991, 585, 561, 854, 892, 540, 903, 540, 924, 964, 561, 975, 0, 0, 0, 1151, 0, 1153, 0, 1155, 0, 0,
+ /* 43368 */ 0, 0, 0, 0, 0, 0, 713, 0, 0, 0, 0, 0, 0, 0, 0, 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1706, 0, 0,
+ /* 43401 */ 1198, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1731, 0, 1212, 1213, 0, 0, 0, 0, 0, 1218, 0, 0, 0, 0, 0,
+ /* 43431 */ 0, 0, 0, 729, 0, 0, 0, 0, 0, 0, 0, 540, 540, 1307, 1309, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 43456 */ 540, 540, 1316, 540, 540, 1319, 540, 540, 1343, 540, 540, 540, 540, 540, 540, 540, 540, 1354, 1355, 540,
+ /* 43476 */ 540, 540, 540, 540, 1813, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 1360, 914, 561, 561, 561,
+ /* 43496 */ 1366, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1921, 585, 585, 585, 585, 561, 561, 1420,
+ /* 43516 */ 561, 561, 561, 561, 561, 561, 561, 1434, 561, 561, 561, 561, 561, 561, 3342, 561, 561, 561, 561, 561, 561,
+ /* 43537 */ 561, 561, 561, 3080, 561, 561, 561, 561, 561, 561, 561, 561, 2319, 561, 561, 561, 561, 0, 0, 0, 561, 561,
+ /* 43559 */ 561, 1445, 1446, 561, 561, 561, 26027, 1360, 987, 585, 585, 585, 1457, 585, 585, 585, 585, 585, 2403, 585,
+ /* 43579 */ 585, 585, 585, 585, 561, 2409, 585, 2411, 2412, 585, 1487, 1489, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 43599 */ 585, 585, 585, 585, 585, 585, 3366, 585, 585, 585, 585, 1525, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 43619 */ 1536, 1537, 585, 585, 585, 585, 585, 585, 3434, 585, 561, 540, 561, 585, 0, 0, 0, 3439, 585, 1542, 0, 540,
+ /* 43641 */ 585, 585, 561, 540, 1547, 540, 540, 1550, 561, 1551, 561, 561, 561, 561, 1895, 561, 561, 561, 1900, 561,
+ /* 43661 */ 561, 561, 561, 561, 561, 561, 0, 585, 585, 988, 585, 585, 585, 585, 585, 1554, 585, 1555, 585, 585, 1558,
+ /* 43682 */ 1079, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2069, 0, 0, 0, 0, 2073, 0, 0, 1678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 43713 */ 0, 0, 2037, 0, 0, 0, 1694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2072, 0, 0, 0, 1637, 0, 0, 0, 0, 0, 0,
+ /* 43744 */ 0, 0, 0, 0, 0, 0, 0, 0, 2051, 0, 0, 561, 561, 561, 561, 561, 561, 1833, 561, 561, 561, 561, 561, 561, 561,
+ /* 43769 */ 561, 26027, 1360, 987, 585, 585, 585, 585, 585, 561, 1908, 561, 561, 561, 561, 1914, 561, 561, 561, 26027,
+ /* 43789 */ 0, 585, 585, 585, 585, 585, 2334, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2938, 585, 585, 585,
+ /* 43810 */ 585, 585, 585, 585, 1927, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1055, 585, 561,
+ /* 43831 */ 585, 585, 585, 1994, 585, 585, 585, 585, 585, 585, 585, 585, 2002, 585, 585, 585, 585, 585, 585, 2711,
+ /* 43851 */ 561, 540, 585, 585, 561, 540, 540, 540, 540, 540, 540, 2217, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 43872 */ 540, 1802, 540, 540, 540, 540, 540, 585, 2008, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 540, 540,
+ /* 43893 */ 561, 561, 561, 561, 2261, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2891, 561, 561, 561, 561,
+ /* 43914 */ 0, 2076, 0, 0, 0, 0, 0, 0, 0, 0, 2084, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 266240, 0, 0, 0, 0, 65536, 0,
+ /* 43941 */ 2088, 0, 0, 2090, 0, 0, 0, 0, 0, 0, 0, 2098, 0, 0, 0, 0, 0, 0, 1725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0,
+ /* 43972 */ 0, 0, 0, 0, 0, 0, 2146, 0, 0, 0, 2146, 0, 0, 2151, 2152, 0, 0, 0, 0, 0, 0, 0, 274432, 274432, 274432, 0,
+ /* 43998 */ 274432, 274432, 274432, 274432, 274432, 2156, 0, 0, 0, 0, 0, 0, 0, 2162, 540, 540, 540, 540, 540, 2168,
+ /* 44018 */ 540, 540, 540, 540, 2538, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1821, 540, 540,
+ /* 44038 */ 1360, 540, 2200, 540, 2203, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2209, 540, 540, 540, 540,
+ /* 44058 */ 2578, 540, 540, 540, 540, 540, 540, 540, 540, 0, 2584, 0, 0, 0, 0, 799, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 44085 */ 0, 799, 0, 0, 0, 0, 0, 0, 0, 0, 2244, 561, 561, 561, 561, 561, 561, 2251, 561, 561, 561, 561, 561, 561,
+ /* 44109 */ 3351, 585, 585, 585, 585, 585, 585, 585, 3356, 585, 561, 561, 2300, 561, 561, 561, 561, 561, 561, 561,
+ /* 44129 */ 561, 561, 561, 561, 561, 561, 2323, 0, 0, 0, 2329, 585, 585, 585, 585, 585, 585, 2336, 585, 585, 585, 585,
+ /* 44151 */ 585, 585, 585, 1470, 585, 585, 585, 585, 1480, 585, 585, 585, 585, 585, 2360, 585, 585, 585, 585, 585,
+ /* 44171 */ 585, 2366, 585, 2368, 585, 2371, 585, 585, 585, 585, 585, 585, 3546, 0, 0, 3549, 3550, 0, 0, 0, 0, 0, 0,
+ /* 44194 */ 303, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2912256, 0, 3207168, 2465792, 0, 0, 2385, 585, 585, 585, 585, 585, 585,
+ /* 44218 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 1989, 2472, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2480, 0, 0, 0, 0, 0,
+ /* 44244 */ 0, 0, 286720, 286720, 0, 286720, 286720, 1, 12290, 3, 0, 0, 0, 0, 0, 2514, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 44269 */ 2522, 0, 0, 0, 0, 1575, 0, 0, 0, 0, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 172032, 0, 0, 0, 0, 65536,
+ /* 44296 */ 0, 561, 561, 2596, 561, 561, 561, 561, 561, 2601, 561, 561, 561, 561, 561, 561, 561, 0, 585, 585, 992,
+ /* 44317 */ 585, 585, 585, 585, 585, 585, 2681, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 44338 */ 1956, 585, 2719, 561, 561, 561, 2721, 585, 585, 585, 2723, 2724, 0, 0, 0, 0, 0, 0, 0, 2801, 0, 0, 0, 540,
+ /* 44362 */ 2805, 540, 540, 540, 2742, 0, 2743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2100, 0, 0, 0, 0, 2758, 0, 0,
+ /* 44390 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2128, 0, 0, 540, 2809, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 44416 */ 540, 540, 540, 540, 2223, 2224, 540, 2846, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 561, 2855, 561,
+ /* 44437 */ 2856, 561, 2894, 561, 561, 561, 561, 561, 0, 0, 585, 585, 585, 585, 2903, 585, 2904, 585, 2942, 585, 585,
+ /* 44458 */ 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 3374, 0, 0, 3377, 0, 0, 0,
+ /* 44482 */ 540, 3024, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1771, 540, 540, 540, 540, 561, 561, 585,
+ /* 44503 */ 3105, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2369, 585, 585, 585, 585, 585, 3145,
+ /* 44523 */ 540, 585, 561, 540, 540, 561, 561, 585, 585, 0, 0, 0, 0, 0, 0, 2066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 297,
+ /* 44550 */ 0, 0, 0, 0, 0, 0, 0, 3390, 540, 540, 540, 540, 3394, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2179,
+ /* 44573 */ 540, 540, 540, 540, 540, 540, 540, 3403, 540, 540, 3405, 561, 561, 561, 561, 3409, 561, 561, 561, 561,
+ /* 44593 */ 561, 561, 2277, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3082, 561, 3084, 561, 561, 561, 561, 561,
+ /* 44613 */ 561, 561, 3418, 561, 561, 3420, 585, 585, 585, 585, 3424, 585, 585, 585, 585, 585, 585, 585, 3591, 585,
+ /* 44633 */ 561, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 3303, 0, 0, 0, 0, 3307, 0, 585, 585, 585, 585, 585, 3433, 585, 585,
+ /* 44658 */ 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 2137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1129, 0, 0, 0, 0, 0, 0, 0, 3500, 0,
+ /* 44688 */ 3502, 0, 0, 0, 0, 0, 540, 540, 540, 540, 540, 3511, 540, 540, 540, 540, 2812, 540, 2815, 540, 540, 540,
+ /* 44710 */ 540, 2820, 540, 540, 540, 2823, 540, 540, 540, 540, 3631, 540, 561, 561, 561, 561, 561, 3637, 561, 585,
+ /* 44730 */ 585, 585, 585, 585, 1079, 0, 0, 0, 1564, 0, 0, 0, 1570, 0, 585, 585, 3643, 585, 561, 3645, 0, 3647, 0, 0,
+ /* 44754 */ 540, 540, 540, 540, 540, 540, 540, 1286, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3208, 540, 540,
+ /* 44775 */ 540, 540, 540, 365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2496, 398, 0, 0, 0, 0, 0, 365, 373, 401,
+ /* 44804 */ 0, 0, 0, 0, 0, 365, 0, 0, 393, 0, 0, 0, 0, 348, 0, 0, 365, 0, 393, 0, 406, 408, 0, 0, 365, 373, 0, 69632,
+ /* 44832 */ 73728, 0, 0, 0, 0, 424, 65536, 0, 0, 0, 0, 1596, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 424,
+ /* 44861 */ 424, 0, 424, 0, 408, 424, 447, 455, 0, 0, 0, 0, 0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 644, 0, 406, 0, 496,
+ /* 44889 */ 496, 0, 496, 496, 496, 496, 496, 496, 496, 496, 522, 522, 522, 522, 455, 455, 455, 530, 455, 531, 455,
+ /* 44910 */ 455, 522, 536, 522, 522, 522, 522, 538, 555, 578, 555, 578, 555, 555, 578, 555, 602, 578, 578, 578, 608,
+ /* 44931 */ 608, 608, 578, 602, 602, 602, 555, 602, 602, 602, 602, 602, 578, 578, 618, 623, 602, 623, 629, 1, 12290,
+ /* 44952 */ 3, 78112, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2769, 0, 0, 0, 694, 0, 0, 0, 0, 0, 362, 362,
+ /* 44982 */ 362, 0, 0, 0, 0, 0, 0, 2440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0,
+ /* 45014 */ 0, 0, 0, 0, 0, 0, 0, 0, 2142, 2143, 0, 540, 540, 540, 878, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 45038 */ 540, 540, 540, 1332, 540, 540, 540, 561, 561, 919, 561, 561, 561, 561, 561, 561, 948, 950, 561, 561, 561,
+ /* 45059 */ 561, 561, 561, 3575, 561, 3577, 561, 561, 561, 585, 585, 585, 585, 0, 0, 1563, 0, 0, 0, 0, 0, 1569, 0,
+ /* 45082 */ 585, 1021, 1023, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 561, 3496, 0, 3497, 0, 0, 0,
+ /* 45104 */ 0, 0, 540, 992, 585, 561, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3341, 561, 561, 561, 561, 561,
+ /* 45126 */ 561, 561, 561, 561, 561, 3579, 561, 585, 585, 585, 585, 0, 0, 0, 1098, 1230, 0, 0, 0, 0, 0, 0, 1237, 0, 0,
+ /* 45151 */ 0, 0, 0, 0, 2452, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 0, 0,
+ /* 45183 */ 0, 0, 0, 1242, 1251, 540, 540, 1280, 540, 540, 540, 1284, 540, 540, 1295, 540, 540, 1299, 540, 540, 540,
+ /* 45204 */ 540, 540, 2229, 540, 2231, 540, 540, 540, 540, 540, 540, 540, 0, 0, 561, 561, 561, 561, 561, 561, 561,
+ /* 45225 */ 561, 561, 561, 561, 561, 1840, 561, 561, 1360, 914, 561, 561, 561, 561, 561, 561, 1369, 561, 561, 561,
+ /* 45245 */ 1373, 561, 561, 1384, 561, 561, 1388, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 45265 */ 2324, 0, 0, 561, 561, 1405, 561, 561, 561, 1409, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3612, 3613,
+ /* 45286 */ 561, 585, 585, 585, 585, 585, 1460, 585, 585, 585, 1464, 585, 585, 1475, 585, 585, 1479, 585, 585, 585,
+ /* 45306 */ 585, 585, 585, 1032, 585, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 3625, 0, 540, 0, 1623, 0, 0,
+ /* 45330 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1636, 0, 0, 0, 0, 1626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2058, 2059, 0,
+ /* 45360 */ 2061, 2062, 1638, 0, 0, 0, 1642, 0, 0, 0, 1646, 0, 0, 0, 1650, 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0,
+ /* 45388 */ 0, 0, 0, 1145, 362, 362, 0, 0, 1148, 561, 1844, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 45410 */ 561, 561, 561, 2635, 561, 561, 561, 561, 1862, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 45431 */ 2869, 561, 561, 2872, 2007, 585, 585, 585, 585, 561, 1752, 585, 1938, 1844, 540, 540, 540, 540, 561, 561,
+ /* 45451 */ 561, 561, 2275, 561, 561, 561, 561, 561, 561, 2281, 561, 2283, 561, 2286, 0, 0, 2056, 0, 0, 0, 0, 0, 0, 0,
+ /* 45475 */ 0, 0, 0, 0, 0, 0, 2154, 0, 0, 0, 0, 0, 2118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2520, 0, 0, 0, 0, 2132,
+ /* 45506 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2141, 0, 0, 0, 0, 0, 0, 2463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2491, 0, 0, 0, 0, 0,
+ /* 45538 */ 0, 0, 0, 0, 2158, 0, 0, 2161, 0, 540, 540, 2164, 540, 540, 540, 540, 540, 540, 540, 3053, 540, 3055, 540,
+ /* 45561 */ 540, 540, 540, 540, 540, 540, 540, 2232, 540, 540, 2235, 2236, 540, 540, 0, 540, 540, 540, 2227, 540, 540,
+ /* 45582 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 2242, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 561,
+ /* 45604 */ 561, 2246, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1360, 987, 585, 585, 1455, 585, 1458,
+ /* 45624 */ 561, 2312, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 0, 0, 0, 0, 0, 0, 585, 2650, 585, 585,
+ /* 45647 */ 585, 585, 585, 585, 561, 3547, 3548, 0, 0, 0, 0, 0, 0, 3554, 0, 585, 585, 2331, 585, 585, 585, 585, 585,
+ /* 45670 */ 585, 585, 585, 585, 585, 585, 585, 2381, 2382, 585, 585, 585, 585, 2387, 585, 585, 585, 585, 585, 585,
+ /* 45690 */ 585, 585, 585, 585, 585, 585, 2397, 540, 540, 2415, 2416, 561, 561, 2419, 2420, 585, 585, 2423, 2424, 0,
+ /* 45710 */ 1563, 0, 1569, 0, 1575, 0, 1581, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2752, 0, 0, 0, 0, 0, 0, 0, 2438, 0,
+ /* 45739 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1728, 0, 0, 0, 0, 0, 2513, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2519, 0, 0, 0, 0, 0,
+ /* 45771 */ 0, 2478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 0, 0, 540, 540, 540, 2565, 540, 540, 540, 540, 540,
+ /* 45798 */ 540, 540, 540, 540, 540, 540, 540, 1333, 540, 540, 540, 585, 585, 2682, 585, 585, 585, 585, 585, 585, 585,
+ /* 45819 */ 585, 585, 585, 2693, 585, 585, 585, 585, 585, 585, 3590, 585, 585, 561, 0, 3594, 0, 0, 0, 0, 0, 0, 2516,
+ /* 45842 */ 2466, 0, 0, 0, 0, 0, 2521, 0, 0, 2824, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 45865 */ 540, 540, 2239, 561, 561, 561, 561, 2885, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1395,
+ /* 45885 */ 561, 561, 561, 561, 561, 561, 561, 561, 1430, 561, 561, 561, 561, 561, 561, 561, 561, 2866, 561, 561, 561,
+ /* 45906 */ 561, 561, 561, 561, 585, 585, 585, 585, 2933, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1985,
+ /* 45927 */ 585, 585, 585, 585, 0, 3177, 0, 0, 0, 3180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1601, 1602, 0, 0, 0, 0, 0, 0, 0,
+ /* 45956 */ 0, 3194, 0, 0, 0, 0, 0, 0, 3197, 0, 3199, 540, 540, 540, 540, 880, 540, 885, 540, 891, 540, 894, 540, 540,
+ /* 45980 */ 908, 540, 540, 540, 540, 540, 3038, 540, 540, 540, 540, 540, 540, 540, 540, 3046, 540, 585, 3289, 3290, 0,
+ /* 46001 */ 0, 0, 0, 3294, 0, 0, 0, 0, 0, 0, 0, 0, 1099, 0, 0, 0, 0, 0, 0, 0, 540, 540, 3316, 540, 540, 540, 3319,
+ /* 46028 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1819, 540, 540, 540, 540, 1360, 561, 3337, 561, 561,
+ /* 46048 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2646, 561, 3415, 561, 561, 561, 561, 561, 585,
+ /* 46069 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3115, 3428, 585, 3430, 585, 585, 585, 585,
+ /* 46089 */ 585, 561, 540, 561, 585, 0, 0, 0, 0, 0, 0, 2503, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 336, 290, 0, 0, 0, 0,
+ /* 46117 */ 3555, 0, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3566, 540, 540, 561, 3064, 561, 561, 561, 561,
+ /* 46138 */ 561, 561, 561, 561, 561, 561, 561, 561, 2617, 561, 561, 561, 561, 561, 3608, 561, 3609, 561, 561, 561,
+ /* 46158 */ 561, 561, 561, 561, 585, 585, 3615, 585, 585, 585, 585, 585, 2658, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 46179 */ 585, 585, 1952, 585, 585, 585, 585, 585, 3616, 585, 585, 585, 585, 585, 585, 585, 561, 0, 0, 0, 0, 0, 0,
+ /* 46202 */ 540, 585, 585, 561, 540, 540, 540, 1067, 911, 561, 561, 561, 1072, 407, 353, 0, 0, 0, 0, 0, 69632, 73728,
+ /* 46224 */ 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 1658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 1146, 0, 0, 472, 483,
+ /* 46253 */ 472, 0, 0, 472, 0, 0, 0, 0, 0, 0, 0, 0, 523, 523, 527, 527, 527, 527, 472, 472, 472, 472, 472, 477, 472,
+ /* 46278 */ 472, 527, 523, 527, 527, 527, 527, 539, 556, 579, 556, 579, 556, 556, 579, 556, 603, 579, 579, 579, 579,
+ /* 46299 */ 579, 579, 579, 603, 603, 603, 556, 603, 603, 603, 603, 603, 579, 579, 619, 624, 603, 624, 630, 1, 12290,
+ /* 46320 */ 3, 78112, 0, 644, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2101, 0, 738, 0, 0, 0, 644, 738, 0, 744, 745,
+ /* 46349 */ 644, 0, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 802, 0, 807, 0, 0, 0, 0, 0, 0, 807, 0, 0,
+ /* 46381 */ 0, 0, 0, 644, 0, 0, 0, 802, 0, 807, 0, 793, 0, 822, 0, 0, 0, 665, 0, 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, 0,
+ /* 46411 */ 1134592, 0, 362, 0, 0, 0, 1134592, 0, 0, 0, 793, 793, 0, 644, 0, 0, 793, 807, 845, 0, 540, 850, 540, 540,
+ /* 46435 */ 540, 540, 540, 2539, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3324, 540, 540, 540, 540, 540,
+ /* 46456 */ 869, 873, 879, 883, 540, 540, 540, 540, 540, 899, 540, 540, 540, 540, 540, 540, 540, 3206, 540, 540, 540,
+ /* 46477 */ 540, 540, 540, 540, 540, 540, 2205, 540, 540, 540, 540, 540, 540, 561, 561, 920, 561, 561, 561, 561, 939,
+ /* 46498 */ 943, 949, 561, 954, 561, 561, 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 0, 2728, 0, 0, 1016, 1022, 585,
+ /* 46521 */ 1027, 585, 585, 585, 585, 585, 1044, 585, 585, 585, 585, 585, 1058, 0, 0, 0, 540, 993, 585, 561, 540, 540,
+ /* 46543 */ 899, 540, 540, 561, 561, 971, 561, 561, 561, 561, 561, 0, 585, 585, 993, 585, 585, 585, 585, 1012, 1149,
+ /* 46564 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2784, 0, 0, 0, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1211,
+ /* 46596 */ 1227, 0, 0, 1099, 0, 0, 0, 1233, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 46626 */ 0, 0, 1243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 1674, 0, 0, 0, 0, 0,
+ /* 46657 */ 0, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2753, 2754, 0, 1252, 1200, 0, 1233, 1255, 0, 1258, 0, 0, 0,
+ /* 46685 */ 0, 0, 1130, 0, 0, 0, 0, 0, 1597, 0, 0, 0, 1600, 0, 0, 1603, 0, 0, 0, 0, 0, 843, 0, 0, 0, 0, 0, 540, 540,
+ /* 46714 */ 540, 540, 540, 540, 540, 3320, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1801, 540, 540, 540, 1806,
+ /* 46734 */ 540, 540, 0, 1267, 0, 0, 0, 0, 0, 1267, 0, 0, 1149, 1267, 0, 1274, 540, 540, 540, 540, 1282, 540, 540,
+ /* 46757 */ 540, 1291, 540, 540, 540, 540, 540, 540, 540, 540, 2204, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 46777 */ 2830, 540, 540, 540, 540, 540, 540, 540, 1279, 540, 540, 540, 540, 1285, 540, 540, 540, 540, 540, 540,
+ /* 46797 */ 540, 540, 540, 540, 2194, 540, 540, 540, 540, 540, 540, 1306, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 46818 */ 540, 1317, 540, 540, 540, 540, 540, 2567, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2545,
+ /* 46838 */ 540, 540, 540, 540, 1321, 540, 540, 540, 540, 540, 540, 540, 1327, 540, 540, 540, 1334, 1336, 540, 540,
+ /* 46858 */ 540, 540, 1310, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1335, 540, 540, 540, 1360,
+ /* 46878 */ 914, 1362, 561, 561, 561, 561, 1368, 561, 561, 561, 561, 1374, 561, 561, 561, 561, 1407, 561, 561, 561,
+ /* 46898 */ 561, 561, 561, 561, 561, 561, 561, 561, 2293, 561, 561, 561, 561, 561, 561, 1406, 561, 561, 561, 561,
+ /* 46918 */ 1411, 561, 561, 561, 561, 561, 561, 561, 561, 1852, 561, 561, 561, 561, 561, 561, 561, 561, 1866, 561,
+ /* 46938 */ 561, 561, 561, 561, 561, 561, 1418, 561, 561, 561, 1425, 1427, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 46958 */ 561, 561, 1865, 561, 561, 561, 561, 561, 561, 561, 561, 1883, 561, 561, 561, 561, 561, 561, 561, 1459,
+ /* 46978 */ 585, 585, 585, 585, 1465, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1533, 585, 585, 585, 585, 585,
+ /* 46999 */ 1486, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1497, 585, 585, 585, 585, 585, 585, 1034, 585,
+ /* 47019 */ 585, 585, 585, 1052, 585, 585, 585, 561, 1502, 585, 585, 585, 585, 585, 585, 585, 585, 1509, 585, 585,
+ /* 47039 */ 585, 1516, 1518, 585, 585, 585, 585, 585, 2685, 585, 585, 585, 585, 2689, 585, 585, 585, 2694, 585, 561,
+ /* 47059 */ 0, 1290, 1544, 1470, 1379, 540, 540, 540, 540, 540, 561, 561, 561, 561, 561, 3249, 561, 3251, 561, 561,
+ /* 47079 */ 561, 561, 561, 561, 561, 585, 3534, 585, 3535, 585, 585, 585, 3539, 585, 0, 1575, 0, 0, 0, 1581, 0, 0, 0,
+ /* 47102 */ 0, 0, 0, 0, 0, 0, 0, 1632, 0, 0, 0, 0, 0, 1592, 1593, 0, 0, 0, 0, 0, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 1172,
+ /* 47132 */ 0, 0, 0, 0, 0, 0, 0, 0, 1639, 0, 0, 0, 0, 0, 0, 0, 1647, 1648, 0, 0, 0, 0, 0, 0, 0, 2387968, 0, 0, 0, 0,
+ /* 47162 */ 0, 0, 0, 0, 0, 2987, 0, 0, 0, 0, 0, 2990, 0, 1655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2482, 0, 0,
+ /* 47193 */ 0, 1721, 0, 0, 0, 0, 0, 0, 0, 1718, 0, 0, 0, 0, 0, 0, 300, 300, 300, 300, 0, 300, 300, 300, 300, 300, 540,
+ /* 47220 */ 540, 540, 1747, 540, 540, 540, 540, 1753, 540, 540, 540, 540, 540, 540, 540, 540, 1817, 540, 540, 540,
+ /* 47240 */ 540, 540, 540, 1360, 540, 540, 540, 1764, 540, 540, 540, 540, 1768, 540, 540, 540, 540, 540, 540, 540,
+ /* 47260 */ 540, 2178, 540, 540, 540, 540, 540, 540, 540, 540, 1287, 1294, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 47280 */ 540, 1779, 540, 540, 1783, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2206, 2207, 540, 540, 540,
+ /* 47300 */ 540, 1809, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561,
+ /* 47321 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 1379, 561, 0, 1074, 585, 585, 1050, 585, 78112, 1079, 0, 0,
+ /* 47342 */ 0, 0, 0, 0, 0, 1106, 0, 0, 0, 0, 0, 0, 1210, 0, 561, 1845, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 47367 */ 561, 1856, 561, 561, 561, 561, 1423, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3253, 561,
+ /* 47387 */ 561, 561, 561, 585, 561, 1860, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1871, 561, 561, 561, 561,
+ /* 47408 */ 1424, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 26027, 1920, 585, 585, 585, 585, 1876, 561,
+ /* 47428 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3244, 561, 561, 585, 2026, 585, 585,
+ /* 47449 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 2079, 2080, 0, 0, 2082, 2083, 0, 0, 0, 0,
+ /* 47479 */ 0, 0, 0, 3176, 0, 0, 0, 0, 0, 3306, 0, 0, 0, 0, 0, 0, 2105, 0, 0, 0, 0, 2108, 2109, 0, 0, 0, 0, 0, 0, 301,
+ /* 47509 */ 301, 301, 301, 0, 301, 301, 301, 301, 301, 2115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2796, 0, 0,
+ /* 47537 */ 0, 2147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2781, 0, 0, 0, 0, 0, 2157, 0, 0, 0, 0, 0, 540, 540, 540, 540,
+ /* 47567 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 540, 2225, 540, 540, 540, 540, 2230, 540,
+ /* 47588 */ 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 0, 1696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2070, 0, 0, 0, 0, 0,
+ /* 47617 */ 2242, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2618, 561, 561, 561, 561, 561,
+ /* 47638 */ 2259, 561, 561, 2263, 561, 561, 561, 2267, 561, 561, 561, 561, 561, 561, 3610, 561, 3611, 561, 561, 561,
+ /* 47658 */ 585, 585, 585, 585, 0, 0, 0, 2030, 0, 1082, 0, 0, 0, 2032, 585, 2344, 585, 585, 2348, 585, 585, 585, 2352,
+ /* 47681 */ 585, 585, 585, 585, 585, 585, 585, 1528, 585, 585, 585, 585, 585, 585, 1538, 585, 585, 585, 585, 2361,
+ /* 47701 */ 585, 585, 2364, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1935, 1936, 585, 585, 585, 585, 1943, 585,
+ /* 47721 */ 585, 2400, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585, 585, 561, 540, 2718, 540, 540, 0, 0, 0,
+ /* 47743 */ 2437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2794, 0, 0, 0, 0, 2473, 0, 0, 0, 2477, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 47774 */ 0, 0, 1685, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2511, 0, 540, 540, 2525, 540,
+ /* 47803 */ 540, 540, 540, 540, 540, 540, 540, 540, 2532, 540, 540, 540, 540, 1324, 540, 540, 540, 540, 540, 540, 540,
+ /* 47824 */ 540, 540, 540, 540, 1330, 540, 540, 540, 540, 540, 540, 2550, 540, 540, 2552, 540, 2553, 540, 540, 540,
+ /* 47844 */ 540, 540, 540, 540, 540, 540, 2193, 540, 540, 2196, 540, 540, 540, 540, 2563, 540, 540, 540, 540, 540,
+ /* 47864 */ 540, 540, 540, 540, 540, 540, 540, 2574, 540, 540, 540, 540, 2827, 2828, 540, 540, 540, 540, 2831, 540,
+ /* 47884 */ 540, 540, 540, 540, 540, 540, 1751, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1351, 540, 540, 540, 540,
+ /* 47905 */ 540, 540, 0, 0, 0, 561, 561, 2587, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2264, 561, 561, 561,
+ /* 47927 */ 561, 2269, 561, 561, 561, 2594, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 47948 */ 2871, 561, 561, 2609, 561, 561, 561, 2612, 561, 561, 2614, 561, 2615, 561, 561, 561, 561, 561, 929, 561,
+ /* 47968 */ 937, 561, 561, 561, 561, 561, 561, 561, 561, 2629, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2623,
+ /* 47989 */ 561, 561, 2627, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2290, 2291, 561, 561, 561, 561, 561, 561,
+ /* 48009 */ 561, 0, 2327, 585, 585, 585, 585, 585, 585, 585, 1507, 585, 585, 585, 585, 585, 585, 585, 585, 561, 540,
+ /* 48030 */ 585, 561, 3284, 540, 3286, 561, 561, 561, 561, 2638, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 48050 */ 561, 561, 3099, 561, 561, 561, 0, 0, 2733, 2734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3002, 0, 0, 0, 2785,
+ /* 48077 */ 0, 2787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2432, 0, 0, 0, 0, 0, 0, 2800, 0, 0, 0, 0, 0, 0, 540, 540,
+ /* 48108 */ 540, 540, 540, 540, 540, 3217, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3042, 540, 3044, 540,
+ /* 48128 */ 540, 540, 540, 540, 540, 2848, 540, 540, 540, 0, 0, 561, 561, 561, 561, 561, 561, 561, 2318, 561, 561,
+ /* 48149 */ 561, 561, 561, 0, 0, 0, 561, 561, 2859, 561, 2862, 561, 561, 561, 561, 2867, 561, 561, 561, 2870, 561,
+ /* 48170 */ 561, 561, 561, 2302, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 940, 561, 561, 561, 561, 561,
+ /* 48191 */ 561, 561, 561, 1394, 561, 561, 561, 561, 561, 561, 561, 1402, 561, 561, 561, 2896, 561, 561, 561, 0, 0,
+ /* 48212 */ 585, 585, 585, 585, 585, 585, 585, 1529, 585, 585, 585, 585, 585, 585, 585, 585, 2661, 585, 585, 585, 585,
+ /* 48233 */ 585, 585, 585, 585, 585, 2907, 585, 2910, 585, 585, 585, 585, 2915, 585, 585, 585, 2918, 585, 585, 585,
+ /* 48253 */ 585, 585, 1527, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2367, 585, 585, 585, 585, 585, 585, 585,
+ /* 48274 */ 585, 2944, 585, 585, 585, 561, 540, 585, 585, 561, 540, 540, 561, 561, 585, 585, 3373, 0, 0, 0, 3375, 0,
+ /* 48296 */ 0, 2980, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2979, 2991, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 48328 */ 0, 3005, 0, 3006, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2989, 0, 561, 561, 561, 561, 3078, 561, 561,
+ /* 48355 */ 561, 561, 561, 561, 561, 561, 3086, 561, 561, 561, 561, 2315, 561, 561, 561, 561, 561, 561, 561, 561, 0,
+ /* 48376 */ 0, 2327, 0, 0, 0, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3273, 585, 585, 585, 585, 585, 585, 561,
+ /* 48398 */ 561, 585, 585, 585, 3107, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1969, 585, 585, 585, 585, 585,
+ /* 48419 */ 585, 585, 585, 585, 3119, 585, 585, 585, 585, 585, 585, 585, 585, 3127, 585, 585, 585, 585, 585, 1901,
+ /* 48439 */ 540, 585, 585, 561, 540, 540, 540, 540, 561, 561, 3065, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 48460 */ 561, 3479, 585, 585, 585, 585, 585, 0, 3159, 0, 0, 0, 0, 0, 0, 0, 3165, 0, 0, 0, 0, 0, 0, 0, 3176, 0, 0,
+ /* 48487 */ 3304, 0, 0, 0, 0, 0, 0, 3191, 0, 0, 0, 0, 0, 0, 3195, 3196, 0, 0, 0, 0, 540, 540, 3601, 540, 3602, 540,
+ /* 48513 */ 540, 540, 540, 540, 540, 540, 540, 1752, 540, 540, 540, 540, 540, 540, 540, 540, 1349, 540, 540, 540, 540,
+ /* 48534 */ 540, 540, 540, 540, 1288, 540, 540, 540, 540, 540, 540, 540, 540, 1289, 540, 540, 540, 540, 540, 540, 540,
+ /* 48555 */ 540, 1290, 540, 540, 540, 540, 1300, 540, 540, 3279, 585, 585, 585, 585, 585, 585, 585, 561, 540, 585,
+ /* 48575 */ 561, 540, 540, 561, 561, 561, 561, 2611, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2304, 561,
+ /* 48596 */ 561, 561, 561, 561, 561, 561, 561, 561, 1853, 561, 561, 561, 561, 561, 561, 540, 540, 540, 540, 3317, 540,
+ /* 48617 */ 540, 540, 3321, 540, 540, 540, 540, 540, 540, 540, 540, 2192, 540, 540, 540, 540, 540, 540, 2198, 561,
+ /* 48637 */ 561, 561, 3339, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2628, 561, 561, 561, 561, 561,
+ /* 48658 */ 561, 561, 561, 2305, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3348, 561, 561, 561, 585, 585, 585, 585,
+ /* 48679 */ 585, 3353, 585, 585, 585, 3357, 561, 561, 3572, 561, 561, 561, 561, 561, 561, 561, 561, 3580, 585, 585,
+ /* 48699 */ 585, 3584, 3597, 0, 3598, 3599, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3605, 3606, 540, 540, 540,
+ /* 48719 */ 540, 2837, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 1803, 540, 540, 540, 540, 585, 585, 585,
+ /* 48740 */ 585, 585, 3619, 3620, 585, 561, 0, 0, 3623, 0, 0, 0, 540, 585, 585, 561, 540, 540, 895, 540, 540, 561,
+ /* 48762 */ 561, 967, 561, 561, 3671, 585, 3672, 0, 540, 561, 585, 0, 540, 561, 585, 0, 540, 561, 585, 585, 585, 585,
+ /* 48784 */ 585, 1079, 1559, 0, 0, 0, 1565, 0, 0, 0, 1571, 2033, 0, 0, 0, 0, 1577, 2035, 0, 0, 0, 0, 0, 0, 0, 1682, 0,
+ /* 48811 */ 1684, 0, 0, 0, 0, 0, 0, 0, 1712, 0, 0, 1715, 0, 0, 0, 0, 0, 355, 356, 0, 0, 0, 0, 0, 0, 0, 362, 0, 290, 0,
+ /* 48841 */ 0, 0, 0, 0, 0, 2762, 0, 0, 0, 0, 0, 0, 0, 2768, 0, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3198,
+ /* 48873 */ 0, 540, 540, 473, 473, 487, 0, 0, 487, 356, 356, 356, 509, 356, 356, 356, 356, 473, 473, 580, 580, 580,
+ /* 48895 */ 580, 580, 580, 580, 604, 604, 604, 557, 604, 604, 604, 604, 604, 580, 580, 557, 580, 604, 580, 604, 1,
+ /* 48916 */ 12290, 3, 78112, 540, 870, 540, 540, 540, 540, 540, 540, 540, 540, 540, 904, 540, 540, 540, 540, 540, 540,
+ /* 48937 */ 2191, 540, 540, 540, 540, 2195, 540, 2197, 540, 540, 561, 561, 976, 561, 561, 561, 561, 0, 585, 585, 585,
+ /* 48958 */ 585, 585, 585, 585, 1013, 1197, 0, 0, 0, 0, 0, 0, 0, 1197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 540,
+ /* 48986 */ 540, 540, 540, 540, 540, 540, 1360, 914, 561, 561, 561, 561, 561, 561, 561, 561, 1371, 561, 561, 561,
+ /* 49006 */ 1380, 561, 561, 561, 561, 2639, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2644, 561, 561,
+ /* 49026 */ 561, 561, 585, 585, 585, 1462, 585, 585, 585, 1471, 585, 585, 585, 585, 585, 585, 585, 585, 1472, 585,
+ /* 49046 */ 1477, 585, 585, 1481, 585, 585, 1541, 561, 0, 1291, 585, 1471, 1380, 540, 540, 540, 540, 540, 561, 561,
+ /* 49066 */ 561, 561, 585, 585, 585, 585, 0, 0, 0, 0, 2727, 0, 0, 0, 0, 0, 1576, 0, 0, 0, 1582, 0, 0, 0, 0, 0, 0, 0,
+ /* 49094 */ 0, 0, 2737, 0, 0, 0, 0, 0, 2741, 0, 1607, 0, 0, 0, 0, 0, 0, 0, 1615, 1616, 0, 0, 0, 0, 0, 0, 303, 204800,
+ /* 49122 */ 204800, 0, 205103, 204800, 1, 12290, 3, 0, 1761, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 49142 */ 540, 540, 540, 1774, 1891, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 49162 */ 3087, 561, 561, 561, 561, 1911, 561, 561, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 585, 585,
+ /* 49182 */ 1466, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2928, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 49203 */ 1947, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2001, 585, 585, 585, 585, 585, 585, 585,
+ /* 49223 */ 1960, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1973, 0, 0, 2243, 561, 561, 561, 561, 561,
+ /* 49244 */ 561, 561, 561, 561, 561, 561, 561, 561, 2634, 561, 561, 2328, 585, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 49265 */ 585, 585, 585, 585, 585, 585, 2384, 0, 0, 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2085, 2086, 0, 0,
+ /* 49292 */ 0, 0, 2449, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3175, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561,
+ /* 49320 */ 2590, 561, 561, 561, 561, 561, 561, 2289, 561, 561, 561, 561, 561, 561, 561, 561, 561, 2292, 561, 561,
+ /* 49340 */ 561, 561, 561, 561, 561, 561, 561, 2861, 561, 2863, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 49360 */ 2877, 561, 561, 561, 561, 561, 561, 561, 561, 1899, 561, 561, 561, 561, 561, 1905, 561, 585, 585, 585,
+ /* 49380 */ 2909, 585, 2911, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1984, 585, 585, 585, 585, 585, 585,
+ /* 49400 */ 585, 3360, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1056, 585, 561, 0, 3556, 540,
+ /* 49421 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 3567, 540, 561, 561, 561, 561, 2876, 561, 561, 561, 561,
+ /* 49442 */ 561, 561, 561, 561, 561, 561, 561, 26027, 0, 585, 585, 585, 585, 561, 561, 561, 561, 3656, 561, 585, 585,
+ /* 49463 */ 585, 585, 3660, 585, 0, 0, 0, 0, 0, 0, 2775, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2124, 0, 0, 0, 0, 0, 0, 0, 0, 357,
+ /* 49493 */ 0, 0, 0, 0, 0, 0, 362, 0, 290, 0, 0, 0, 0, 0, 0, 2790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1147354, 0, 0, 0, 0,
+ /* 49524 */ 0, 0, 0, 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2509, 0, 0, 357, 0, 367, 0, 0, 367, 0, 0, 0, 0, 0, 0,
+ /* 49556 */ 0, 0, 0, 0, 0, 0, 0, 2457, 0, 0, 581, 581, 581, 581, 581, 581, 581, 605, 605, 605, 558, 605, 605, 605,
+ /* 49580 */ 605, 605, 581, 581, 558, 581, 605, 581, 605, 1, 12290, 3, 78112, 865, 540, 540, 540, 540, 540, 540, 540,
+ /* 49601 */ 540, 540, 540, 540, 540, 540, 540, 540, 2575, 1385, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561,
+ /* 49622 */ 561, 561, 561, 561, 3243, 561, 1775, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 49643 */ 540, 3047, 585, 585, 585, 585, 1961, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2380, 585,
+ /* 49663 */ 585, 585, 585, 2756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3315, 0, 2981, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 49693 */ 0, 0, 0, 0, 0, 0, 3188, 0, 3298, 0, 3299, 0, 0, 0, 0, 3176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3388, 0, 0, 0, 0,
+ /* 49723 */ 358, 359, 360, 361, 0, 0, 362, 0, 290, 0, 0, 0, 0, 0, 0, 2973, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 362,
+ /* 49751 */ 702, 0, 0, 0, 0, 359, 0, 358, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 425, 65536, 0, 0, 0, 0, 1710, 1711, 0, 0,
+ /* 49778 */ 0, 1714, 0, 0, 0, 0, 0, 1718, 425, 425, 0, 425, 0, 359, 425, 0, 456, 0, 0, 0, 0, 0, 0, 0, 1102, 0, 0, 0,
+ /* 49806 */ 0, 1263, 1264, 0, 0, 0, 0, 0, 497, 497, 0, 504, 504, 504, 504, 510, 511, 504, 504, 524, 524, 524, 524,
+ /* 49829 */ 456, 456, 456, 456, 456, 456, 456, 456, 524, 524, 524, 524, 524, 524, 524, 559, 582, 559, 582, 559, 559,
+ /* 49850 */ 582, 559, 606, 582, 582, 582, 582, 582, 582, 582, 606, 606, 606, 559, 606, 606, 606, 606, 606, 582, 582,
+ /* 49871 */ 620, 625, 606, 625, 631, 1, 12290, 3, 78112, 0, 0, 0, 540, 585, 585, 561, 540, 540, 900, 540, 540, 561,
+ /* 49893 */ 561, 972, 561, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 1934, 585, 585, 585, 585,
+ /* 49914 */ 585, 585, 585, 0, 0, 2104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2740, 0, 0, 0, 0, 0, 561, 2245, 561,
+ /* 49942 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3533, 585, 585, 585, 585, 585, 585, 585, 585, 585, 3494,
+ /* 49963 */ 561, 0, 0, 0, 0, 0, 0, 585, 2330, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1482,
+ /* 49986 */ 585, 585, 540, 2549, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2237, 0, 540,
+ /* 50007 */ 540, 2577, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 0, 0, 0, 0, 0, 1611, 0, 0, 1614, 0, 0, 0, 0,
+ /* 50032 */ 0, 0, 0, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2891776, 0, 0, 0, 0, 0, 2392064, 583, 583, 583, 583, 583, 583,
+ /* 50058 */ 583, 607, 607, 607, 560, 607, 607, 607, 607, 607, 583, 583, 560, 583, 607, 583, 607, 1, 12290, 3, 78112,
+ /* 50079 */ 705, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 866, 540, 540, 540, 540, 540, 540, 540, 540,
+ /* 50105 */ 540, 540, 540, 540, 540, 540, 540, 3224, 1136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 362, 0, 0, 0, 0, 0,
+ /* 50131 */ 1659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 780, 0, 0, 0, 0, 786, 561, 585, 585, 585, 585, 585, 1079, 1560, 0, 0,
+ /* 50158 */ 0, 1566, 0, 0, 0, 1572, 0, 0, 0, 1578, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3313, 0, 0, 540, 2199, 540,
+ /* 50186 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2547, 540, 2535, 540, 540, 540, 540,
+ /* 50207 */ 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 2822, 540, 561, 561, 561, 2597, 561, 561, 561, 561,
+ /* 50228 */ 561, 561, 561, 561, 561, 561, 561, 561, 2317, 561, 561, 2320, 2321, 561, 561, 0, 0, 0, 0, 0, 0, 647, 0, 0,
+ /* 50252 */ 0, 0, 0, 0, 743, 540, 540, 540, 540, 540, 540, 540, 3331, 540, 540, 561, 561, 561, 561, 561, 561, 561,
+ /* 50274 */ 561, 561, 561, 3072, 561, 561, 561, 0, 0, 0, 540, 585, 585, 561, 1064, 540, 540, 905, 540, 1069, 561, 561,
+ /* 50296 */ 977, 561, 561, 561, 561, 0, 585, 585, 585, 585, 585, 585, 585, 585, 1951, 585, 585, 585, 585, 585, 585,
+ /* 50317 */ 585, 0, 0, 1594, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2767, 0, 0, 561, 561, 1846, 561, 561, 561, 561,
+ /* 50344 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 2645, 561, 561, 585, 585, 585, 1977, 585, 585, 585, 585, 585,
+ /* 50365 */ 585, 585, 585, 585, 585, 585, 585, 2692, 585, 585, 585, 540, 540, 540, 2188, 540, 2190, 540, 540, 540,
+ /* 50385 */ 540, 540, 540, 540, 540, 540, 540, 561, 561, 561, 3334, 561, 561, 0, 0, 0, 561, 561, 561, 2247, 561, 561,
+ /* 50407 */ 561, 561, 561, 561, 561, 561, 561, 2613, 561, 561, 561, 561, 561, 561, 561, 2619, 561, 561, 2273, 561,
+ /* 50427 */ 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 3242, 561, 561, 0, 585, 585, 585, 2332,
+ /* 50448 */ 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2408, 540, 585, 585, 561, 561, 2647, 0, 0, 0, 0, 0,
+ /* 50471 */ 0, 585, 585, 585, 585, 585, 585, 585, 585, 2687, 585, 585, 2691, 585, 585, 585, 585, 585, 585, 585, 585,
+ /* 50492 */ 2684, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 2916, 585, 585, 585, 585, 561, 561, 585, 585,
+ /* 50513 */ 585, 585, 585, 3109, 585, 585, 585, 585, 585, 585, 585, 585, 2702, 585, 585, 585, 585, 585, 585, 585, 0,
+ /* 50534 */ 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225706, 0, 0, 1134592, 0, 0, 0, 1134592, 1134592, 0, 0,
+ /* 50560 */ 1134592, 0, 0, 1134592, 0, 1134592, 0, 0, 0, 1134592, 1135005, 1135005, 0, 0, 0, 0, 0, 1135005, 0,
+ /* 50579 */ 1134592, 1134592, 0, 0, 0, 0, 1135202, 1135202, 1135202, 1135202, 1134592, 1135202, 1135202, 1135202,
+ /* 50593 */ 1135202, 1135202, 0, 1134592, 1134592, 1134592, 1134592, 1135202, 1134592, 1135202, 1, 12290, 3, 0, 0, 0,
+ /* 50609 */ 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 1138688, 0, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 50637 */ 2125824, 2126738, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824,
+ /* 50648 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824, 2125824, 2125824, 2125824,
+ /* 50661 */ 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 987,
+ /* 50674 */ 2125824, 2125824, 2125824, 2125824, 2424832, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354,
+ /* 50685 */ 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 1147354, 457, 457,
+ /* 50697 */ 1147354, 457, 457, 457, 457, 457, 457, 457, 457, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405,
+ /* 50712 */ 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405, 1147405,
+ /* 50723 */ 1147405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2792, 0, 0, 0, 0, 0, 0, 457, 0, 0, 0, 1147354, 1147354, 1147354,
+ /* 50747 */ 1147405, 1147405, 1147354, 1147405, 1147405, 1, 12290, 3, 0, 0, 0, 0, 2042, 0, 0, 2045, 2046, 0, 0, 0,
+ /* 50767 */ 2050, 0, 0, 0, 0, 0, 680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1221, 0, 0, 0, 0, 0, 0, 1142784, 0, 2179072,
+ /* 50794 */ 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824,
+ /* 50805 */ 2125824, 2125824, 2125824, 2125824, 3137536, 2125824, 2940928, 2940928, 2940928, 0, 0, 0, 0, 0, 0, 305,
+ /* 50821 */ 440, 448, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 1159168, 0, 0,
+ /* 50842 */ 1159168, 0, 1159168, 1159168, 0, 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168,
+ /* 50855 */ 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2802, 0, 540, 540, 540, 540, 540, 1159168, 1159168, 0, 1159168,
+ /* 50876 */ 1159168, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168,
+ /* 50888 */ 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 1159168, 1159168, 0, 1159168, 1159168, 1159168,
+ /* 50901 */ 1159168, 1159168, 1159168, 1159168, 1159168, 1, 12290, 3, 0, 0, 0, 0, 2053, 0, 2054, 0, 0, 0, 0, 0, 0, 0,
+ /* 50923 */ 0, 0, 799, 0, 799, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163264, 0, 0, 0, 0, 0,
+ /* 50951 */ 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 913, 2125824, 2125824, 2125824,
+ /* 50974 */ 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0,
+ /* 50987 */ 1452, 2125824, 2125824, 2125824, 2125824, 2424832, 106496, 0, 106496, 106496, 0, 106496, 106496, 106496,
+ /* 51001 */ 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0,
+ /* 51015 */ 0, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 51035 */ 0, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2782, 2783, 0, 0, 0,
+ /* 51064 */ 0, 3117056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163840, 0, 0, 0, 0, 3043328, 0, 3149824, 2936832, 0,
+ /* 51088 */ 2760704, 0, 0, 0, 0, 0, 2953216, 0, 0, 2826240, 2875392, 0, 0, 0, 0, 0, 0, 2834432, 0, 3227648, 2568192,
+ /* 51109 */ 0, 0, 0, 0, 2564096, 0, 2748416, 2879488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072,
+ /* 51130 */ 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824, 2125824,
+ /* 51141 */ 2125824, 2125824, 2125824, 2125824, 2125824, 2654208, 2678784, 2760704, 2764800, 2785280, 2854912,
+ /* 51152 */ 2969600, 2125824, 3006464, 2125824, 3018752, 2125824, 2125824
+];
+
+XQueryParser.EXPECTED =
+[
+ /* 0 */ 260, 268, 276, 283, 296, 304, 881, 312, 318, 331, 366, 339, 350, 361, 369, 342, 288, 886, 1555, 1545, 377,
+ /* 21 */ 384, 1551, 392, 400, 415, 423, 431, 439, 447, 455, 463, 486, 553, 490, 500, 500, 499, 498, 500, 500, 500,
+ /* 42 */ 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 353, 1871, 509, 517, 525, 1149,
+ /* 63 */ 688, 533, 1759, 407, 548, 949, 561, 323, 569, 1480, 1303, 866, 577, 1034, 592, 596, 1439, 1444, 604, 1857,
+ /* 83 */ 628, 636, 644, 1919, 1049, 652, 673, 660, 668, 681, 696, 995, 710, 718, 731, 1324, 739, 761, 1116, 776,
+ /* 103 */ 784, 792, 1170, 1200, 1204, 807, 843, 851, 859, 894, 902, 910, 723, 918, 926, 934, 942, 753, 957, 1568,
+ /* 123 */ 965, 980, 611, 988, 1738, 1003, 1011, 616, 1185, 1827, 871, 1539, 1029, 1042, 1418, 584, 1424, 972, 1057,
+ /* 142 */ 1065, 1073, 1598, 1087, 1095, 1103, 1111, 1134, 1142, 768, 478, 1163, 1289, 620, 1155, 1178, 876, 1620,
+ /* 160 */ 1643, 1193, 702, 1812, 799, 1789, 1212, 1753, 1218, 1226, 1234, 1242, 500, 1250, 1258, 828, 1266, 1274,
+ /* 178 */ 1282, 1297, 1850, 1311, 1319, 1332, 1079, 540, 1345, 1017, 1337, 1359, 1021, 1367, 1375, 1390, 1398, 1403,
+ /* 196 */ 1411, 1432, 1452, 1460, 1468, 1476, 1488, 1496, 1382, 1516, 1524, 1532, 1563, 1576, 746, 1584, 1592, 1502,
+ /* 214 */ 1606, 1614, 814, 1628, 1636, 469, 821, 1661, 1665, 1673, 1678, 1686, 1694, 1702, 1710, 1718, 501, 1726,
+ /* 232 */ 1734, 1746, 1767, 1775, 1783, 1351, 1126, 1797, 1805, 1121, 835, 1820, 474, 1835, 1843, 1865, 1508, 1879,
+ /* 250 */ 1649, 1653, 1887, 1892, 1900, 1908, 1916, 500, 500, 1927, 1975, 1928, 1939, 1939, 1939, 1934, 1938, 1939,
+ /* 268 */ 1930, 1943, 1950, 1946, 1954, 1958, 1961, 1964, 1968, 1972, 1979, 2007, 2007, 2007, 3094, 2007, 1983, 3521,
+ /* 286 */ 2007, 2812, 2007, 2007, 2007, 2007, 2779, 2007, 2007, 2132, 2007, 4152, 3820, 3824, 1987, 2098, 1994, 2000,
+ /* 304 */ 2006, 2007, 2007, 3996, 2007, 2007, 2012, 4079, 3820, 3824, 3824, 3824, 3824, 2019, 2097, 2097, 2026, 2170,
+ /* 322 */ 2032, 2007, 2007, 2007, 2007, 2919, 2007, 2428, 3887, 2007, 3734, 2038, 2089, 2007, 2007, 2007, 3390, 3824,
+ /* 340 */ 3824, 2045, 2097, 2097, 2097, 2097, 2097, 2099, 1996, 2067, 2059, 2063, 2003, 2007, 2007, 2007, 2007, 2007,
+ /* 358 */ 2259, 3005, 2007, 3049, 2007, 2007, 2007, 3818, 3820, 3820, 3820, 3820, 2133, 3824, 3824, 3824, 3824, 3824,
+ /* 376 */ 2055, 3820, 2139, 3824, 3824, 3824, 3827, 2097, 2097, 2022, 2072, 2007, 2007, 4080, 2007, 2162, 2077, 2007,
+ /* 394 */ 2007, 2779, 3400, 3820, 3820, 2053, 3824, 3825, 2097, 2097, 2084, 2072, 2088, 4151, 2385, 2007, 2007, 2007,
+ /* 412 */ 2007, 3112, 2752, 3820, 2052, 3824, 2095, 2097, 2104, 2778, 2050, 3823, 2095, 2115, 2129, 3821, 3826, 1989,
+ /* 430 */ 3390, 3822, 3827, 1990, 2137, 2141, 2149, 3819, 2141, 2159, 2167, 2048, 2174, 2028, 2181, 2184, 2188, 2192,
+ /* 448 */ 2202, 2202, 2193, 2197, 2201, 2203, 2207, 2211, 2215, 2219, 2222, 2226, 2230, 2234, 2238, 2732, 2242, 2007,
+ /* 466 */ 2007, 2737, 2247, 2007, 2007, 2007, 3028, 4134, 2007, 2007, 2007, 3213, 2007, 2007, 2007, 2007, 2702, 3310,
+ /* 484 */ 2007, 3694, 2243, 2007, 4531, 2253, 2007, 2007, 2007, 2007, 2007, 4488, 2007, 2007, 2007, 4489, 2007, 2007,
+ /* 502 */ 2007, 2007, 2007, 2007, 2007, 2007, 4297, 2280, 2282, 2286, 2289, 2293, 2297, 2301, 2662, 2386, 2007, 2007,
+ /* 520 */ 2007, 2007, 2387, 2307, 2314, 2318, 4376, 4208, 2325, 2681, 3075, 3584, 2645, 2353, 2359, 2620, 2007, 2007,
+ /* 538 */ 2381, 2363, 2007, 2007, 3675, 2007, 3534, 4411, 3291, 4070, 3348, 2391, 2007, 2395, 2399, 2007, 2007, 2007,
+ /* 556 */ 2007, 3092, 3298, 2007, 2007, 2402, 2007, 2007, 2007, 3382, 2007, 2007, 2418, 3423, 2432, 2007, 2007, 2007,
+ /* 574 */ 2007, 2797, 2433, 2797, 2457, 2007, 2007, 2007, 2007, 2463, 2007, 2007, 3716, 3131, 2917, 2007, 2007, 3777,
+ /* 592 */ 4457, 4344, 2470, 2007, 2007, 2007, 2477, 2007, 2007, 2007, 2484, 2007, 2107, 3702, 2007, 3700, 2493, 2007,
+ /* 610 */ 2111, 2007, 2007, 3723, 3037, 2007, 2007, 2007, 2090, 3072, 2007, 2007, 2007, 2007, 2261, 3346, 2007, 2007,
+ /* 628 */ 2500, 2007, 2505, 4255, 4115, 4254, 2007, 4238, 2510, 4117, 3651, 3491, 2511, 4118, 4239, 4255, 3650, 4117,
+ /* 646 */ 2516, 4116, 4117, 3593, 3670, 3596, 2528, 2531, 2535, 2538, 2542, 2007, 3509, 2620, 4365, 4173, 2562, 2566,
+ /* 664 */ 2570, 2007, 2674, 2672, 3782, 2574, 2007, 3457, 2579, 2007, 2501, 2007, 4424, 3255, 2555, 2588, 4214, 4424,
+ /* 682 */ 4450, 2584, 2592, 2599, 3102, 4176, 2007, 2007, 3778, 2008, 2342, 4482, 2348, 4126, 4353, 2007, 2007, 2007,
+ /* 700 */ 2721, 2607, 2007, 2007, 2007, 3379, 2007, 2007, 2007, 3480, 2619, 2007, 4362, 2007, 4150, 4231, 2625, 4223,
+ /* 718 */ 2632, 2636, 2007, 4444, 2654, 2007, 2007, 2007, 2007, 3897, 2007, 2007, 4225, 2675, 2642, 2007, 2007, 2007,
+ /* 736 */ 2007, 4443, 2653, 4024, 2007, 4424, 4341, 2118, 4304, 2679, 2007, 2007, 3794, 2734, 2268, 4056, 2403, 2007,
+ /* 754 */ 2007, 3896, 2007, 2655, 2910, 4541, 3011, 2685, 2775, 2007, 2007, 2007, 3576, 2686, 2007, 2007, 4010, 3290,
+ /* 772 */ 2007, 2007, 3151, 3295, 3238, 2007, 2697, 2007, 3451, 2403, 4245, 2586, 4285, 2701, 3577, 2715, 2007, 2007,
+ /* 790 */ 2007, 3620, 2706, 2007, 2007, 2007, 2007, 2713, 2775, 2007, 2007, 4082, 3399, 2007, 2007, 4082, 3399, 2741,
+ /* 808 */ 2769, 2855, 2774, 2007, 3410, 2751, 2007, 2007, 4104, 2007, 2007, 2007, 2007, 2506, 4140, 4109, 4114, 3788,
+ /* 826 */ 2803, 4147, 2007, 2007, 4385, 3699, 2007, 3534, 4411, 2007, 2041, 4469, 4448, 2007, 2007, 2007, 2709, 3410,
+ /* 844 */ 2751, 2702, 2784, 3450, 4048, 2121, 2770, 3436, 2007, 3434, 3438, 2007, 2791, 2007, 2795, 2801, 2328, 2810,
+ /* 862 */ 2787, 2452, 2816, 2453, 2007, 2443, 2450, 2424, 2465, 2007, 2007, 2007, 2007, 3098, 2007, 2007, 2007, 2007,
+ /* 880 */ 3372, 2007, 2007, 2007, 2007, 3389, 3820, 3820, 3820, 2163, 3824, 3824, 3824, 3824, 4039, 2821, 2787, 2832,
+ /* 898 */ 2786, 3985, 2838, 2843, 4030, 3312, 2839, 2844, 4031, 4431, 2848, 2834, 2852, 2859, 2860, 2177, 2864, 3301,
+ /* 916 */ 4460, 4463, 2871, 4547, 2875, 2879, 2883, 2886, 2890, 2894, 2897, 2899, 2900, 2007, 2007, 2904, 2007, 3808,
+ /* 934 */ 2910, 4541, 3081, 2914, 2007, 2007, 2924, 2928, 2937, 2944, 2952, 2961, 2968, 3274, 2970, 2007, 2473, 2408,
+ /* 952 */ 2007, 2007, 2007, 2007, 2414, 3024, 2007, 2495, 2976, 2980, 4495, 4081, 2986, 2999, 2007, 2007, 2007, 2007,
+ /* 970 */ 2007, 3335, 2007, 2489, 2007, 3285, 2007, 3286, 2007, 3109, 2656, 3009, 3015, 3021, 3139, 2007, 4251, 2344,
+ /* 988 */ 3032, 2007, 2007, 2007, 2007, 3722, 3036, 2007, 2612, 2007, 2007, 3782, 2574, 2007, 3508, 4541, 3046, 3053,
+ /* 1006 */ 2702, 3058, 2007, 2007, 3062, 3067, 2007, 2007, 2007, 2007, 3063, 2007, 2007, 2007, 3691, 2007, 2007, 2007,
+ /* 1024 */ 2007, 2338, 3741, 2007, 2007, 3119, 2007, 2007, 2007, 3125, 2007, 2007, 2007, 2550, 4047, 2007, 2007, 2920,
+ /* 1042 */ 3125, 2007, 2007, 3428, 4501, 2355, 3026, 2007, 2615, 2654, 4143, 3807, 3464, 2520, 2524, 3111, 2918, 2007,
+ /* 1060 */ 3114, 3109, 3780, 3113, 3150, 3110, 3781, 3147, 4236, 3779, 2920, 3137, 2919, 2920, 3489, 4183, 3144, 3155,
+ /* 1078 */ 2155, 2007, 2007, 2007, 4522, 3741, 2007, 3667, 2007, 3121, 3163, 3167, 3171, 3175, 3179, 3183, 3187, 3191,
+ /* 1096 */ 2007, 2007, 2817, 3354, 2007, 2765, 3195, 3974, 3201, 3218, 4237, 3222, 3226, 3236, 4136, 3242, 3713, 3038,
+ /* 1114 */ 3248, 3246, 2007, 2007, 2007, 2575, 2690, 2007, 2007, 2007, 2007, 4428, 2007, 2007, 2007, 2249, 4402, 4409,
+ /* 1132 */ 2007, 2007, 3231, 3253, 2007, 2765, 3195, 3974, 3259, 3475, 4398, 3265, 3269, 3278, 2007, 2007, 3282, 2007,
+ /* 1150 */ 2647, 2638, 3815, 3004, 2336, 2007, 2007, 2007, 3352, 2007, 2765, 3195, 2780, 3316, 2068, 3260, 3320, 3417,
+ /* 1168 */ 3327, 3333, 2007, 2719, 3457, 2007, 2725, 2730, 2741, 4471, 3360, 3364, 3407, 2007, 2007, 2007, 3368, 2007,
+ /* 1186 */ 2736, 3608, 3079, 3085, 3140, 2702, 4437, 3054, 3399, 2007, 2007, 2007, 4081, 3398, 2007, 2745, 2007, 2007,
+ /* 1204 */ 3576, 2749, 2007, 2007, 2719, 2756, 2763, 3971, 3448, 2007, 2007, 3455, 2007, 2007, 3455, 2007, 2255, 2007,
+ /* 1222 */ 3975, 3472, 3484, 2007, 3497, 2971, 3449, 2972, 2007, 3503, 3273, 4555, 4530, 4554, 3513, 4094, 4553, 3271,
+ /* 1240 */ 4553, 4095, 4554, 3272, 4093, 4528, 3271, 3515, 4528, 4529, 2007, 4379, 2620, 3519, 2007, 3525, 4151, 3529,
+ /* 1258 */ 3538, 3542, 3546, 3550, 3554, 3558, 3562, 3566, 2828, 3729, 2918, 2410, 4192, 3571, 3230, 4556, 3575, 3581,
+ /* 1276 */ 3356, 3619, 3590, 2007, 2007, 4378, 3676, 2007, 3534, 4488, 2007, 2948, 3600, 2007, 2867, 3355, 2007, 2007,
+ /* 1294 */ 2007, 2007, 3339, 4185, 3612, 2007, 2007, 2580, 3618, 2007, 2007, 2549, 2551, 2386, 2007, 2007, 3132, 3630,
+ /* 1312 */ 2007, 2007, 2608, 3641, 2007, 3647, 4412, 2007, 3655, 3866, 3249, 3663, 2007, 2007, 2007, 2660, 2007, 2007,
+ /* 1330 */ 2666, 2007, 4405, 2007, 2007, 2007, 2007, 2337, 3687, 2007, 2594, 3230, 4081, 3698, 2007, 2805, 3682, 2007,
+ /* 1348 */ 2007, 2007, 3686, 2007, 2007, 2824, 2007, 2007, 2007, 2007, 2826, 4487, 2995, 2957, 2349, 3606, 2007, 2007,
+ /* 1366 */ 3706, 2007, 4081, 3710, 2007, 2595, 2007, 3720, 4485, 2946, 3727, 3068, 3733, 2007, 3738, 2620, 2007, 2940,
+ /* 1384 */ 2777, 3753, 3945, 3949, 3954, 3868, 2007, 3747, 2620, 2007, 2007, 3747, 2620, 3751, 2378, 2034, 3757, 3764,
+ /* 1402 */ 3636, 2007, 4288, 2007, 2007, 4288, 3428, 3769, 2466, 2015, 3765, 3773, 2007, 3786, 2007, 3127, 2007, 2954,
+ /* 1420 */ 2007, 2007, 3775, 2007, 2007, 3775, 2007, 2007, 2956, 2007, 2548, 2459, 2007, 3792, 3751, 3798, 3760, 3637,
+ /* 1438 */ 2602, 2007, 3149, 4508, 2110, 2488, 2007, 3701, 2494, 2007, 2007, 4046, 2007, 3780, 2603, 2007, 3802, 3806,
+ /* 1456 */ 3812, 3837, 4356, 3836, 3831, 2331, 3835, 3677, 3841, 2332, 3836, 3678, 4221, 3854, 3848, 4359, 3847, 3845,
+ /* 1474 */ 3852, 3877, 3863, 3874, 3881, 3884, 2007, 2007, 2007, 2007, 2480, 2437, 2007, 2007, 2964, 2776, 2007, 3893,
+ /* 1492 */ 3901, 3905, 3909, 3913, 3917, 3921, 3925, 3929, 3933, 3937, 2007, 2007, 2982, 4068, 4074, 4253, 2007, 2007,
+ /* 1510 */ 3212, 4493, 2007, 2007, 2007, 2248, 3959, 3964, 3968, 4202, 3979, 3983, 3989, 3950, 2007, 4000, 4007, 4014,
+ /* 1528 */ 2007, 2007, 2963, 2421, 3753, 4019, 4023, 2040, 3626, 4028, 4035, 2007, 3229, 3106, 3743, 3026, 2726, 2007,
+ /* 1546 */ 2007, 2007, 4080, 2007, 4152, 3820, 3820, 2054, 3824, 3824, 2096, 2097, 2097, 2097, 2097, 2100, 2143, 4043,
+ /* 1564 */ 2007, 2007, 3205, 3209, 2007, 2007, 2007, 2990, 2994, 2007, 2007, 2248, 3207, 2007, 2007, 2007, 3197, 4052,
+ /* 1582 */ 2310, 4253, 4060, 2669, 2007, 4114, 2007, 2007, 2007, 2628, 3210, 2007, 2007, 2007, 2506, 4064, 2007, 2007,
+ /* 1600 */ 3232, 3254, 3975, 2007, 4119, 3159, 2962, 4078, 3753, 4086, 2404, 2007, 4090, 2620, 4114, 2007, 2007, 2007,
+ /* 1618 */ 4099, 2620, 2007, 2007, 3376, 2007, 2007, 2007, 2007, 2933, 4100, 4108, 4113, 2007, 2439, 4123, 3603, 4423,
+ /* 1636 */ 2007, 3870, 3133, 2007, 2007, 2007, 4130, 2007, 3386, 2068, 4158, 3394, 3506, 2007, 2007, 2007, 4526, 2007,
+ /* 1654 */ 2007, 2007, 4526, 2007, 3992, 2370, 4535, 4156, 2920, 2007, 2007, 4162, 2007, 2007, 2007, 4162, 2558, 2007,
+ /* 1672 */ 4166, 4170, 2007, 4180, 2007, 2007, 4189, 2007, 2007, 4196, 4200, 4206, 4212, 3859, 4218, 2007, 2693, 2007,
+ /* 1690 */ 2007, 4229, 2007, 3586, 2152, 2145, 4235, 3487, 2007, 4243, 3642, 2775, 3643, 4249, 4440, 2806, 3659, 4259,
+ /* 1708 */ 4264, 3657, 3857, 3940, 2080, 3658, 3858, 3941, 4274, 3939, 3857, 4278, 3856, 3857, 4282, 3017, 4292, 4293,
+ /* 1726 */ 4270, 2321, 4301, 4003, 4311, 4315, 4319, 4323, 4327, 4330, 4334, 4338, 2007, 2007, 2007, 2007, 2621, 3230,
+ /* 1744 */ 3492, 3042, 4267, 3478, 2931, 3955, 4350, 4514, 4396, 3306, 3462, 3468, 3444, 2007, 4516, 2007, 2007, 2446,
+ /* 1762 */ 2007, 2007, 2007, 2759, 2375, 3002, 4369, 4307, 2007, 4015, 2007, 2546, 2544, 4373, 4383, 2007, 2007, 2007,
+ /* 1780 */ 4389, 3478, 2931, 2068, 3670, 3532, 4437, 2007, 4393, 2007, 2007, 3427, 3432, 2303, 3443, 3422, 2007, 2007,
+ /* 1798 */ 4416, 4081, 2007, 2091, 3671, 3422, 3203, 4420, 2007, 2007, 2007, 2007, 2007, 3342, 2007, 3388, 3404, 3414,
+ /* 1816 */ 3421, 2007, 2254, 3381, 3994, 2931, 4346, 4454, 4260, 3567, 3304, 2007, 3439, 3100, 2007, 2007, 2007, 2007,
+ /* 1834 */ 3089, 2007, 4467, 2007, 2007, 2007, 2007, 2007, 3214, 2124, 2007, 2007, 4475, 2365, 3889, 3499, 2007, 3616,
+ /* 1852 */ 2007, 2007, 2007, 2337, 3624, 2007, 2906, 2007, 3329, 3633, 2007, 2499, 3960, 4434, 2007, 2007, 2007, 2007,
+ /* 1870 */ 4479, 2007, 2007, 3493, 2265, 2007, 2272, 3323, 2276, 4499, 2125, 2007, 4505, 2367, 4512, 2007, 4520, 2512,
+ /* 1888 */ 2007, 2007, 3211, 4539, 2007, 3211, 4539, 2073, 4037, 4454, 2007, 2007, 2007, 4545, 2007, 2649, 2007, 2007,
+ /* 1906 */ 4551, 3115, 4157, 3422, 2007, 2369, 2007, 2370, 2007, 2371, 3261, 2007, 2007, 2007, 2007, 2007, 2007, 2007,
+ /* 1924 */ 3458, 2007, 2007, 2080, 4576, 4599, 4601, 4601, 4596, 4590, 4601, 4601, 5213, 4588, 4600, 4601, 4601, 4601,
+ /* 1942 */ 4601, 4601, 4601, 4605, 4601, 4601, 4624, 4632, 4592, 4611, 4609, 4615, 4626, 4639, 4641, 4646, 4628, 4651,
+ /* 1960 */ 4653, 4653, 4647, 4635, 4657, 4642, 4661, 4665, 4669, 4673, 4676, 4680, 4682, 4686, 4690, 4560, 6008, 4569,
+ /* 1978 */ 4572, 6007, 4694, 4697, 4751, 6953, 4752, 5681, 6931, 4707, 6326, 4735, 4735, 4712, 4752, 4752, 5273, 4792,
+ /* 1996 */ 6322, 4707, 4735, 5096, 4719, 4736, 5094, 5098, 4748, 4748, 4750, 4752, 4752, 4752, 4752, 4564, 5125, 5113,
+ /* 2014 */ 4729, 5190, 6233, 4752, 5981, 4707, 4707, 4734, 4735, 4711, 4791, 6324, 5279, 4792, 6322, 4707, 4735, 6320,
+ /* 2032 */ 4748, 4749, 4752, 4752, 4582, 6339, 6230, 4730, 5190, 4752, 4752, 4752, 6892, 4707, 4707, 6327, 4735, 4714,
+ /* 2050 */ 6320, 6322, 6322, 6322, 6324, 4707, 4707, 4707, 4710, 4735, 4793, 4788, 6324, 4709, 4765, 5096, 5096, 4748,
+ /* 2068 */ 4752, 4752, 4752, 4758, 4721, 4752, 4752, 4752, 4777, 4792, 4788, 4709, 4752, 4561, 4752, 5750, 4735, 4735,
+ /* 2086 */ 4794, 6324, 4752, 5743, 4752, 4752, 4752, 4757, 4752, 4707, 4709, 4735, 4735, 4735, 4735, 4711, 4791, 6322,
+ /* 2104 */ 4792, 5276, 4722, 4752, 4563, 5399, 6420, 4752, 6238, 5201, 5242, 4735, 4735, 4785, 4752, 4563, 5663, 4752,
+ /* 2122 */ 4563, 6254, 5386, 5386, 5386, 4752, 4752, 4752, 5746, 4752, 6321, 6322, 6322, 6322, 6323, 6320, 6322, 6322,
+ /* 2140 */ 6323, 4707, 4707, 4707, 4735, 4752, 4752, 4584, 5193, 4735, 4735, 4713, 4752, 4563, 6913, 6240, 6240, 6240,
+ /* 2158 */ 6929, 4735, 4735, 4714, 5739, 6322, 6322, 6322, 6325, 6322, 6324, 4707, 4710, 4740, 5096, 5097, 4707, 4709,
+ /* 2176 */ 4735, 4752, 4698, 4752, 6653, 4709, 5467, 5467, 5467, 4752, 5513, 5517, 5483, 4804, 4818, 4798, 4802, 4844,
+ /* 2194 */ 4844, 4844, 4808, 4815, 4812, 4828, 4832, 4842, 4844, 4844, 4844, 4844, 4845, 4838, 4926, 4844, 4852, 4850,
+ /* 2212 */ 4913, 4853, 4857, 4861, 4865, 4835, 4869, 4872, 4879, 4876, 4881, 4883, 4887, 4889, 4891, 4893, 4900, 4900,
+ /* 2230 */ 4897, 4907, 4910, 4923, 4846, 4916, 4919, 4930, 4933, 4935, 4939, 4903, 4943, 4752, 4752, 4752, 4948, 4715,
+ /* 2248 */ 4752, 4752, 4752, 4977, 6877, 4954, 4752, 4752, 4752, 4978, 6115, 4759, 4759, 4752, 4752, 4753, 6060, 5603,
+ /* 2266 */ 6128, 4975, 4752, 4714, 4752, 6620, 4752, 6554, 6723, 6126, 4984, 5424, 5283, 4988, 4992, 4993, 4993, 4993,
+ /* 2284 */ 4997, 5000, 5002, 5006, 5009, 5013, 5017, 5017, 5019, 5023, 5024, 5028, 5030, 5034, 5038, 5037, 5042, 5046,
+ /* 2302 */ 4752, 4752, 4760, 5740, 4752, 5065, 4752, 5423, 4752, 4725, 4724, 4723, 4565, 5750, 4752, 5657, 4752, 5671,
+ /* 2320 */ 5072, 4752, 4743, 4752, 5390, 5082, 4752, 6010, 4752, 4751, 5572, 6253, 5505, 4752, 5971, 6389, 5056, 4752,
+ /* 2338 */ 4752, 4752, 5074, 5535, 6350, 4752, 4752, 6930, 5401, 4752, 5494, 4752, 4752, 4752, 5125, 4752, 6136, 6009,
+ /* 2356 */ 4752, 5110, 6936, 6567, 5134, 5141, 5150, 5143, 5152, 4752, 4752, 4754, 4752, 4752, 4752, 4755, 4752, 4752,
+ /* 2374 */ 4752, 4752, 6233, 6232, 4752, 4752, 6347, 4752, 4752, 6356, 5137, 5161, 5250, 4752, 4752, 4752, 5060, 6584,
+ /* 2392 */ 5222, 5223, 5186, 4752, 6234, 5190, 6523, 5174, 5165, 5171, 5181, 4752, 4752, 4752, 5190, 4752, 5143, 5180,
+ /* 2410 */ 4752, 4752, 4756, 6223, 4752, 6358, 5781, 5171, 4752, 6600, 5055, 5251, 4752, 5745, 4752, 4752, 6357, 5166,
+ /* 2428 */ 4752, 5700, 4752, 6585, 5199, 5167, 5205, 5153, 4752, 5211, 5207, 4752, 4752, 4757, 5714, 4752, 5698, 4752,
+ /* 2446 */ 5191, 5136, 5142, 5151, 5221, 6420, 4752, 4752, 4757, 5946, 5568, 5167, 6098, 6009, 4752, 5973, 4752, 5175,
+ /* 2464 */ 5166, 6097, 5153, 4752, 4752, 4583, 6238, 5201, 5241, 4752, 4752, 6357, 5780, 6547, 5167, 5243, 4752, 4752,
+ /* 2482 */ 6357, 5781, 4960, 4752, 6600, 5250, 5242, 4752, 4752, 4752, 5291, 5782, 5243, 4752, 4752, 4752, 5293, 6836,
+ /* 2500 */ 6078, 4752, 4752, 4752, 5346, 5256, 4752, 4752, 4752, 5355, 4752, 6927, 4752, 4752, 4752, 5377, 5972, 4752,
+ /* 2518 */ 4752, 6928, 5301, 5305, 5306, 5306, 5307, 5306, 5306, 5311, 5314, 5316, 5318, 5320, 5320, 5320, 5320, 5321,
+ /* 2536 */ 5325, 5325, 5325, 5327, 5325, 5325, 5331, 5331, 4752, 4752, 4761, 6855, 4752, 4752, 4960, 4752, 4752, 4752,
+ /* 2554 */ 5217, 4752, 6405, 5353, 5571, 4752, 6913, 6240, 5376, 5259, 4752, 5068, 5397, 4752, 5067, 5385, 5396, 4752,
+ /* 2572 */ 6696, 6700, 5406, 4752, 4752, 4752, 5471, 5263, 4752, 4752, 4752, 5531, 6256, 5416, 4752, 5572, 4752, 5665,
+ /* 2590 */ 4752, 5365, 4752, 5664, 4752, 4752, 4961, 4961, 4961, 5670, 4752, 6018, 4752, 4752, 6375, 6009, 4752, 6535,
+ /* 2608 */ 4752, 4752, 4752, 5581, 5083, 5429, 6534, 4752, 4752, 6428, 6383, 5341, 6009, 4752, 4752, 4752, 5187, 5417,
+ /* 2626 */ 4752, 5573, 4753, 5358, 6639, 6644, 6017, 4752, 6260, 6601, 4752, 6413, 4752, 4752, 4968, 5118, 5439, 5444,
+ /* 2644 */ 5449, 4752, 4752, 6578, 5109, 4752, 4752, 4753, 6958, 5445, 5153, 4752, 4752, 4752, 5387, 6259, 6593, 5458,
+ /* 2662 */ 4752, 4752, 5050, 5054, 5721, 5336, 5342, 4752, 4752, 6591, 4752, 4752, 6698, 4752, 4752, 4752, 5434, 5465,
+ /* 2680 */ 6603, 4752, 4752, 5080, 4752, 6569, 5473, 5477, 5445, 6429, 5475, 5869, 5481, 4752, 4752, 6717, 6721, 4752,
+ /* 2698 */ 5720, 5335, 5491, 6602, 4752, 4752, 4752, 5747, 5525, 5477, 5500, 4752, 4752, 6740, 6908, 6569, 5524, 5476,
+ /* 2716 */ 5499, 6429, 4752, 4752, 6712, 4752, 4752, 5084, 5430, 6860, 4752, 4752, 4752, 5748, 5187, 4752, 4752, 5223,
+ /* 2734 */ 4752, 5745, 6422, 4752, 4752, 4752, 6219, 4752, 5571, 4752, 5665, 6571, 5548, 5869, 5516, 5812, 5477, 5871,
+ /* 2752 */ 4752, 4752, 4752, 5750, 5720, 5335, 5504, 4752, 4752, 6868, 5157, 4752, 6861, 4752, 4752, 5111, 6426, 5386,
+ /* 2770 */ 5748, 5510, 4752, 4752, 5870, 6429, 4752, 4752, 4752, 5746, 4752, 4752, 4752, 4760, 5529, 4752, 4752, 5560,
+ /* 2788 */ 5567, 4752, 4752, 4757, 5546, 5554, 6429, 4752, 6713, 4752, 4752, 5191, 5176, 5559, 5113, 4752, 4752, 5192,
+ /* 2806 */ 4752, 4752, 4752, 6727, 4752, 6319, 4752, 4752, 5228, 4752, 5568, 4752, 4752, 4752, 5811, 5225, 6277, 5386,
+ /* 2824 */ 4752, 4752, 6874, 6878, 4752, 4752, 6206, 4752, 5720, 5814, 5569, 4752, 5687, 5691, 5225, 6255, 6934, 5689,
+ /* 2842 */ 5570, 5570, 4752, 5944, 5690, 4752, 5689, 5570, 4752, 5688, 4752, 6238, 5563, 4752, 4753, 5522, 5548, 5687,
+ /* 2860 */ 5577, 4752, 5687, 5577, 6238, 5401, 6651, 4752, 4753, 6054, 6070, 5386, 6364, 5586, 6009, 6256, 5600, 4752,
+ /* 2878 */ 6419, 5378, 5602, 5607, 5620, 5611, 5619, 5614, 5615, 5615, 5615, 5615, 5624, 5631, 5628, 5635, 5637, 5637,
+ /* 2896 */ 5637, 5642, 5638, 5646, 5646, 5646, 5646, 4752, 4752, 6449, 4752, 4752, 5247, 5251, 6259, 4778, 5412, 6009,
+ /* 2914 */ 4752, 5705, 4752, 6945, 4752, 4752, 4752, 6239, 4752, 4752, 5678, 4752, 4752, 5650, 4752, 5656, 5652, 4752,
+ /* 2932 */ 4756, 4752, 4752, 6103, 4752, 5661, 5669, 5675, 4752, 4757, 5847, 5927, 4752, 5685, 4752, 6232, 4752, 5377,
+ /* 2950 */ 6310, 4752, 4752, 5695, 4752, 4752, 5289, 5389, 4752, 4752, 5957, 6439, 4752, 4752, 4752, 5845, 5211, 5251,
+ /* 2968 */ 4752, 6437, 6441, 4752, 4752, 4752, 5860, 4581, 5709, 4752, 4752, 5227, 4752, 5718, 4752, 4752, 5356, 6055,
+ /* 2986 */ 5761, 5726, 5732, 5738, 4752, 5759, 5763, 5728, 5734, 4752, 4752, 4752, 5980, 5762, 5727, 5733, 4752, 4758,
+ /* 3004 */ 4752, 4752, 6124, 5052, 5056, 4779, 6862, 4752, 4752, 5380, 5228, 4752, 5767, 6936, 4752, 6937, 6934, 5378,
+ /* 3022 */ 4752, 5228, 5704, 4752, 4752, 6947, 4752, 4752, 5356, 5549, 5774, 5786, 6683, 5251, 5787, 6684, 4752, 4752,
+ /* 3040 */ 4752, 5990, 6258, 4778, 5412, 6009, 4752, 6557, 5986, 4752, 4775, 4752, 5744, 6946, 4752, 4752, 4752, 6094,
+ /* 3058 */ 6233, 4752, 4752, 5791, 4752, 5805, 6900, 6682, 6686, 6686, 4752, 4752, 4752, 6117, 5774, 6902, 6684, 4752,
+ /* 3076 */ 4950, 5088, 5102, 5411, 6870, 4752, 4752, 5380, 6635, 5768, 6937, 5802, 4744, 5810, 6902, 6685, 4752, 4959,
+ /* 3094 */ 4752, 4752, 4702, 4752, 4752, 5809, 6901, 5818, 4752, 4752, 5421, 4954, 4752, 5798, 4780, 6870, 5972, 4752,
+ /* 3112 */ 4752, 4752, 6241, 4752, 4752, 4752, 5188, 6000, 5824, 5251, 4752, 4752, 5842, 5822, 5828, 4752, 4752, 5453,
+ /* 3130 */ 5153, 5281, 4752, 4752, 4752, 6238, 6233, 6238, 4752, 4752, 5971, 5570, 4752, 4752, 6241, 5972, 4752, 6241,
+ /* 3148 */ 4752, 4752, 6238, 4752, 4752, 4752, 5230, 6239, 4752, 6241, 5973, 5838, 5237, 4752, 6254, 6635, 5226, 5851,
+ /* 3166 */ 6443, 5858, 5866, 5875, 5879, 5884, 5886, 5880, 5890, 5893, 5896, 5899, 5901, 5903, 5907, 5907, 5913, 5907,
+ /* 3184 */ 5907, 5909, 5920, 5921, 5917, 5917, 5919, 5917, 5917, 5918, 5917, 5931, 5265, 4752, 4752, 5460, 5360, 4757,
+ /* 3202 */ 4752, 6931, 4752, 4752, 4752, 5461, 5361, 6613, 5542, 4752, 4752, 4752, 6896, 5776, 6882, 4752, 4752, 5742,
+ /* 3220 */ 5936, 5195, 4752, 6225, 5942, 6564, 5950, 5953, 5961, 4752, 4961, 4752, 4752, 4752, 6000, 6367, 5966, 6419,
+ /* 3238 */ 4752, 4752, 5487, 4752, 6294, 4752, 6293, 5985, 4752, 5990, 5994, 4752, 4752, 4752, 6298, 6367, 5927, 4752,
+ /* 3256 */ 4752, 4752, 6243, 4759, 6930, 4752, 4752, 5741, 4752, 4752, 6938, 6005, 6421, 6050, 6014, 4752, 4752, 5505,
+ /* 3274 */ 4752, 4752, 4752, 6437, 4752, 6209, 5755, 5755, 6022, 6026, 6110, 4752, 4962, 4961, 4752, 4752, 6111, 4752,
+ /* 3292 */ 4752, 4752, 6317, 6031, 6026, 6110, 4752, 4966, 4752, 5225, 5398, 4752, 5400, 4752, 4752, 4752, 6254, 4752,
+ /* 3310 */ 6366, 5926, 4752, 4752, 5561, 5225, 5266, 4752, 4752, 5224, 6352, 4752, 6628, 4752, 4972, 5386, 5066, 6048,
+ /* 3328 */ 5970, 4752, 4752, 5573, 5398, 4752, 6208, 4752, 4752, 5596, 4752, 6059, 5779, 6064, 4752, 4977, 4821, 6882,
+ /* 3346 */ 6069, 6065, 4752, 4752, 5699, 4752, 4752, 6001, 5925, 5251, 4752, 4752, 4752, 6247, 4752, 5739, 4752, 6353,
+ /* 3364 */ 4752, 6629, 4752, 5973, 4752, 6569, 6074, 6089, 6569, 6084, 6088, 5251, 6082, 6086, 6090, 4752, 4979, 4579,
+ /* 3382 */ 4752, 4752, 4752, 6422, 4752, 6423, 6722, 4752, 4752, 4752, 6321, 6322, 5389, 6627, 4752, 5971, 4980, 4580,
+ /* 3400 */ 4752, 4752, 4752, 6320, 4757, 4752, 5740, 4752, 5075, 5968, 4752, 4977, 5523, 6665, 6354, 6627, 4752, 5972,
+ /* 3418 */ 4752, 4752, 6036, 4753, 6937, 4752, 4752, 4752, 6418, 6252, 4752, 4752, 4752, 6423, 6860, 6869, 4752, 4752,
+ /* 3436 */ 5720, 5813, 5555, 4752, 4752, 4752, 5809, 6354, 6627, 4752, 4753, 6937, 4978, 4581, 4752, 4752, 4752, 6429,
+ /* 3454 */ 4752, 4979, 4581, 4752, 4752, 5722, 5337, 5263, 4752, 6861, 6870, 4752, 5287, 5297, 4758, 4752, 5742, 6353,
+ /* 3472 */ 6860, 6869, 4758, 5740, 5390, 5998, 6234, 4752, 4752, 4752, 6102, 4752, 5386, 6234, 5505, 6935, 4755, 6239,
+ /* 3490 */ 4752, 5971, 4752, 4752, 4752, 5386, 4754, 5720, 4581, 4752, 4752, 5741, 6936, 4752, 6863, 5739, 4752, 5076,
+ /* 3508 */ 4752, 4752, 5720, 5335, 5341, 4752, 6869, 4752, 6313, 4752, 6311, 4752, 6608, 4752, 4752, 5745, 4752, 6259,
+ /* 3526 */ 4752, 4618, 6121, 6232, 6230, 6230, 5741, 6935, 4752, 4752, 6201, 5189, 4752, 6134, 6132, 6140, 6144, 6151,
+ /* 3544 */ 6145, 6145, 6150, 6146, 6155, 6159, 6163, 6167, 6169, 6174, 6176, 6169, 6169, 6170, 6186, 6187, 6180, 6180,
+ /* 3562 */ 6185, 6180, 6180, 6181, 6191, 4752, 4752, 4752, 6545, 6229, 6841, 5573, 5061, 6250, 4752, 4752, 4752, 6569,
+ /* 3580 */ 5524, 4752, 6247, 6251, 4752, 5107, 4752, 4752, 4753, 6719, 6266, 6265, 6267, 4752, 5110, 4752, 5111, 4752,
+ /* 3598 */ 5113, 5111, 4752, 5956, 4752, 5192, 4752, 6621, 5747, 6333, 4752, 4752, 5797, 5191, 6271, 6276, 5252, 4961,
+ /* 3616 */ 4752, 6281, 6287, 6251, 4752, 4752, 4752, 6570, 6286, 6291, 4752, 4752, 5751, 4752, 5833, 5832, 5831, 4752,
+ /* 3634 */ 5110, 6077, 4752, 4752, 6362, 4752, 4752, 4770, 4752, 4752, 4752, 6717, 5589, 4752, 6202, 5190, 4752, 5110,
+ /* 3652 */ 6929, 4752, 4752, 6307, 4752, 4752, 6934, 4752, 4752, 4752, 6934, 4759, 6304, 5573, 4961, 5831, 5831, 5831,
+ /* 3670 */ 4752, 5112, 4752, 4752, 5742, 5580, 4769, 6009, 4752, 4752, 6387, 4752, 5126, 4752, 6331, 4961, 4753, 5534,
+ /* 3688 */ 5538, 5542, 4752, 6282, 5536, 5540, 4752, 5112, 6427, 5932, 5582, 4771, 4752, 4752, 4752, 6546, 5782, 5243,
+ /* 3706 */ 4752, 5579, 5536, 5540, 5862, 5538, 5542, 4752, 5114, 5993, 4752, 4961, 4752, 5797, 4768, 5153, 4752, 4752,
+ /* 3724 */ 5804, 6899, 5787, 6318, 4752, 4752, 5957, 4752, 6213, 6334, 4752, 4752, 4752, 6731, 4752, 6234, 6343, 5539,
+ /* 3742 */ 6009, 4752, 4752, 5769, 4752, 4752, 5938, 6343, 5539, 4752, 6425, 4961, 4752, 5193, 4752, 4752, 6231, 4752,
+ /* 3760 */ 5377, 5401, 4752, 6254, 6318, 4752, 4752, 6255, 4752, 6425, 4752, 4752, 5409, 6311, 4961, 4752, 4752, 5823,
+ /* 3778 */ 4752, 4752, 4752, 6240, 4752, 4752, 4752, 5103, 5454, 6009, 4752, 4752, 5844, 5146, 5452, 6377, 4752, 4752,
+ /* 3796 */ 5846, 5145, 6860, 6009, 4752, 5190, 6375, 6009, 6422, 6424, 4752, 6868, 4752, 4752, 4752, 5388, 5380, 6254,
+ /* 3814 */ 6362, 4752, 5124, 5122, 4752, 4752, 6322, 6322, 6322, 6322, 4707, 4707, 4707, 4707, 4708, 4735, 4735, 6381,
+ /* 3832 */ 4752, 6009, 5377, 6389, 4752, 4752, 6885, 6009, 4752, 4752, 6868, 5377, 6253, 6887, 4752, 4752, 6887, 4752,
+ /* 3850 */ 4752, 6886, 4752, 6403, 5971, 6255, 4752, 4752, 5853, 4752, 4752, 4752, 6936, 6255, 6886, 5971, 6255, 5191,
+ /* 3868 */ 4752, 4752, 5752, 4752, 4756, 6589, 6886, 6401, 6885, 6885, 4752, 6886, 5377, 6885, 6394, 6394, 4703, 4703,
+ /* 3886 */ 4703, 4752, 5185, 4752, 4752, 4757, 5110, 4960, 5744, 6398, 4752, 5187, 6451, 4752, 4752, 6409, 4752, 6411,
+ /* 3904 */ 5750, 6215, 6417, 5744, 6435, 6217, 4752, 5189, 6447, 6457, 6461, 6462, 6466, 6486, 6469, 6484, 6472, 6478,
+ /* 3922 */ 6475, 6480, 6498, 6492, 6490, 6496, 6496, 6500, 6506, 6506, 6507, 6504, 6506, 6506, 6506, 6511, 6514, 4752,
+ /* 3940 */ 4752, 5854, 4752, 4752, 4752, 6619, 4824, 5749, 6417, 6518, 4752, 4752, 4752, 6756, 5187, 4752, 4752, 4752,
+ /* 3958 */ 6834, 6431, 4752, 4752, 4752, 6836, 5834, 6009, 6522, 6527, 6869, 4752, 6430, 4752, 5188, 4752, 5223, 4752,
+ /* 3976 */ 4752, 4752, 6253, 4752, 6540, 6551, 6561, 5402, 6575, 4752, 4752, 5945, 4752, 4752, 6755, 6009, 4752, 5188,
+ /* 3994 */ 5194, 4752, 4752, 4752, 6252, 6255, 4752, 6756, 5962, 4752, 5222, 5392, 5390, 4752, 6849, 6848, 4752, 5231,
+ /* 4012 */ 6032, 6027, 6850, 4752, 4752, 4752, 6854, 6619, 4824, 5749, 6582, 5518, 4752, 4752, 4752, 6861, 4753, 6634,
+ /* 4030 */ 4752, 4752, 5945, 5691, 4752, 4752, 6589, 4752, 4753, 4752, 4757, 5561, 4752, 6597, 4752, 6607, 4752, 5235,
+ /* 4048 */ 4752, 4752, 4752, 5225, 6612, 5541, 4752, 6617, 5229, 6351, 5401, 6625, 4752, 5753, 4752, 6633, 5359, 6640,
+ /* 4066 */ 6645, 6009, 4944, 5540, 4752, 4752, 5955, 4752, 6649, 6238, 5686, 5686, 5144, 4752, 5744, 4752, 4752, 4752,
+ /* 4084 */ 4753, 4980, 6619, 4824, 6272, 6654, 5754, 4753, 4752, 6311, 4752, 4752, 6312, 4752, 4752, 5355, 5359, 5550,
+ /* 4102 */ 6658, 6009, 5357, 6678, 4944, 5541, 4752, 5571, 4752, 6597, 6597, 6597, 6597, 4752, 4752, 4752, 6928, 4752,
+ /* 4120 */ 4752, 5110, 6426, 4752, 5746, 6423, 4752, 5266, 4752, 4564, 4752, 6662, 5550, 6671, 6670, 6009, 4752, 4752,
+ /* 4138 */ 5977, 4752, 6664, 6669, 5153, 4752, 5270, 6423, 5505, 4823, 5748, 5401, 5189, 4752, 4752, 4752, 5739, 6322,
+ /* 4156 */ 5752, 4753, 4752, 4752, 5741, 5390, 4752, 6675, 6690, 6429, 6694, 4752, 4752, 5193, 6234, 4824, 5750, 4752,
+ /* 4174 */ 5369, 4752, 4955, 4752, 4752, 5385, 5753, 4756, 4752, 6239, 4752, 6240, 4752, 5349, 4758, 4752, 6705, 6429,
+ /* 4192 */ 4752, 5372, 4758, 5592, 4752, 6705, 6429, 5572, 6238, 6913, 4752, 4752, 6009, 4752, 4752, 5712, 4752, 4752,
+ /* 4210 */ 6010, 6536, 4714, 6709, 4752, 4752, 6016, 4752, 4756, 4752, 6240, 4752, 5379, 6255, 4752, 5388, 4752, 6257,
+ /* 4228 */ 6419, 5074, 6720, 4752, 4752, 6042, 4752, 5749, 4752, 4752, 4752, 6929, 4752, 4752, 5971, 6717, 6429, 4752,
+ /* 4246 */ 4752, 6042, 5417, 6914, 6241, 4752, 5747, 6233, 4752, 4752, 4752, 6926, 4752, 6729, 4752, 4752, 4752, 6933,
+ /* 4264 */ 6727, 4563, 4752, 5747, 6741, 5389, 5192, 5222, 4752, 5986, 4561, 5748, 4752, 6936, 6934, 4562, 5749, 6934,
+ /* 4282 */ 5853, 4563, 6935, 4752, 5387, 5748, 4752, 4752, 6735, 6371, 4563, 6936, 6934, 4752, 4752, 6739, 6680, 6421,
+ /* 4300 */ 4744, 6300, 6231, 5091, 4752, 5389, 5748, 4752, 4752, 6701, 4581, 6039, 6745, 6748, 4620, 6733, 6752, 6760,
+ /* 4318 */ 6768, 6762, 6764, 6771, 6775, 6779, 6782, 6784, 6788, 6790, 6794, 6797, 6801, 6804, 6809, 6808, 6813, 6815,
+ /* 4336 */ 6819, 6817, 6823, 6827, 6830, 4752, 5391, 5223, 5222, 6421, 4752, 4752, 4759, 5112, 4760, 4752, 5113, 4752,
+ /* 4354 */ 5428, 6533, 4752, 4752, 6388, 4752, 4752, 6393, 4752, 4752, 6428, 4752, 4752, 6428, 6260, 6840, 5381, 4752,
+ /* 4372 */ 6845, 4584, 4752, 6043, 4752, 5495, 4752, 4752, 4753, 6197, 4769, 6859, 6044, 4752, 4752, 6195, 5582, 4752,
+ /* 4390 */ 6739, 6907, 5191, 4752, 6867, 6915, 4752, 5506, 5505, 4752, 5973, 4752, 4563, 4752, 5386, 4752, 5533, 5537,
+ /* 4408 */ 5541, 5389, 5388, 4752, 4752, 6232, 4752, 4752, 5747, 6741, 6355, 6235, 4752, 6543, 6238, 5400, 4752, 5188,
+ /* 4426 */ 4752, 4752, 6891, 5777, 5700, 4752, 5562, 6253, 4752, 4752, 6912, 4752, 4752, 6932, 4752, 4752, 6935, 4752,
+ /* 4444 */ 4753, 5435, 5440, 5445, 5388, 5388, 4752, 4752, 6242, 6042, 4752, 5739, 6934, 4752, 5571, 4752, 5398, 4752,
+ /* 4462 */ 4751, 5401, 5401, 5399, 5793, 4753, 6898, 5778, 4563, 4752, 5388, 5749, 6601, 5747, 6906, 5192, 6236, 4752,
+ /* 4480 */ 6897, 5777, 4563, 4752, 5130, 4752, 4752, 6338, 4752, 4752, 6231, 4752, 4752, 6920, 4752, 4752, 4752, 6261,
+ /* 4498 */ 4752, 5775, 6919, 4752, 5386, 6258, 4781, 5595, 5193, 6237, 4752, 5571, 4752, 5399, 4760, 4752, 5740, 6935,
+ /* 4516 */ 4752, 4752, 6107, 4752, 4752, 6924, 4752, 4752, 6281, 5535, 6896, 6942, 4752, 4752, 6311, 4752, 4752, 4752,
+ /* 4534 */ 6530, 4759, 4752, 5740, 6935, 6951, 4752, 4752, 4752, 6311, 5770, 4977, 6959, 4752, 4752, 6312, 5113, 4752,
+ /* 4552 */ 6957, 4752, 4752, 6313, 4752, 4752, 4752, 6453, 2, 4, 8, 262144, 0, 0, 0, 0x80000000, 1073741824, 0, 0,
+ /* 4571 */ 1075838976, 2097152, 2097152, 268435456, 4194432, 4194560, 4196352, 270532608, 2097152, 4194304, 50331648,
+ /* 4582 */ 0, 0, 0, 4194304, 0, 0, 541065216, 541065216, -2143289344, -2143289344, 4194304, 4194304, 4196352,
+ /* 4595 */ -2143289344, 4194304, 4194432, 37748736, 541065216, -2143289344, 4194304, 4194304, 4194304, 4194304,
+ /* 4605 */ 4194304, 4194304, 4198144, 4196352, 8540160, 4194304, 4194304, 4194304, 4196352, 276901888, 4194304,
+ /* 4616 */ 4194304, 8425488, 4194304, 1, 0, 1024, 137363456, 66, 37748736, 742391808, 239075328, -1405091840,
+ /* 4628 */ 775946240, 775946240, 775946240, 171966464, 742391808, 742391808, 742391808, 775946240, -1371537408,
+ /* 4637 */ 775946240, 775946240, -1405091840, -1371537408, 775946240, 775946240, 775946240, 775946240, 4718592,
+ /* 4646 */ -1371537408, 775946240, -1371537408, 775946240, -1371537408, 171966464, 775946240, 171966464, 171966464,
+ /* 4655 */ 171966464, 171966464, 239075328, 171966464, 775946240, 239075328, 64, 4718592, 2097216, 4720640, 541589504,
+ /* 4666 */ 4194368, 541589504, 4194400, 4194368, 541065280, 4194368, 4194368, -2143289280, 4194368, -2143285440,
+ /* 4676 */ -2143285408, -2143285408, 776470528, -2143285408, -2109730976, -2143285408, -2143285408, -2143285408,
+ /* 4684 */ -2109730976, -2143285408, 775946336, 775946304, 775946304, 776470528, 775946304, -1908404384, 775946304,
+ /* 4693 */ -1908404384, 0, 2097152, 4194304, 128, 0, 256, 2048, 0, 0, 16777216, 16777216, 16777216, 16777216, 64, 64,
+ /* 4709 */ 64, 64, 96, 96, 96, 64, 0, 0, 0, 24, 64, 0, 96, 96, 0, 0, 0, 288, 8388608, 0, 0, 8388608, 4096, 4096, 4096,
+ /* 4734 */ 32, 96, 96, 96, 96, 262144, 96, 96, 1048576, 128, 0, 1048576, 0, 0, 2048, 2048, 2048, 2048, 0, 0, 0, 0, 1,
+ /* 4757 */ 0, 0, 0, 2, 0, 0, 0, 3, 96, 96, 128, 128, 2048, 524288, 268435456, 536870912, 1073741824, 0, 0, 8388608,
+ /* 4777 */ 4096, 0, 64, 0, 2048, 524288, 536870912, 0, 64, 524288, 64, 96, 64, 524288, 524288, 96, 96, 64, 524288, 96,
+ /* 4797 */ 64, 80, 528, 524304, 1048592, 2097168, 268435472, 16, 16, 2, 536936448, 16, 262160, 16, 536936448, 16, 17,
+ /* 4814 */ 17, 20, 16, 48, 16, 16, 20, 48, 64, 128, 1024, 134217728, 0, 0, 24, 560, 48, 2097680, 3145744, 1048592,
+ /* 4834 */ 1048592, 2097168, 16, 1049104, 16, 16, 20, 560, 2097168, 2097168, 16, 16, 16, 16, 20, 16, 2097552, 3146256,
+ /* 4852 */ 16, 16, 16, 28, 0, 2, 2098064, 17, 21, 16, 16, 163577856, 17, 528, 528, 16, 528, 2228784, -161430188,
+ /* 4871 */ -161429680, -161430188, -161430188, -161430188, -161429680, -161430188, -161429676, -160905388, -161429676,
+ /* 4880 */ -161430188, -161429676, -161429676, -161429676, -161429676, -161429675, -161349072, -161349072, -161429675,
+ /* 4889 */ -161349072, -161349072, -161349072, -161349072, -161347728, -161347728, -161347728, -161347728, -161298576,
+ /* 4898 */ -160299088, -161298576, -161298572, -161298572, -161298572, -161298572, -18860267, -160774284, -18729163,
+ /* 4907 */ -160774288, -160299084, -161298572, -160774284, -161298572, -161298572, 16, 16, 28, 16, 16, 112, 21, 53,
+ /* 4921 */ 146804757, 146812949, 0, 16, 0, 48, 3146256, 2097680, 1048592, 146862101, 146863389, -161429676, 146863389,
+ /* 4934 */ 146863421, 146863389, 146863389, 146863389, 146863421, -161429740, -161429676, -160905388, -161298572, 0,
+ /* 4944 */ 65536, 524288, 1048576, 33554432, 0, 159383552, 0, 0, 0, 1157627904, -1073741824, 0, 0, 0, 300, 142606336,
+ /* 4960 */ 0, 8192, 0, 0, 0, 384, 0, 243269632, 0, 0, 0, 1862270976, 1, 32768, 131328, 131072, 16777216, 0, 0, 1, 2,
+ /* 4981 */ 4, 128, 2097152, 0, 1073741825, 0x80000000, 0x80000000, 8, 16777216, 1073774592, 278528, 1226014816,
+ /* 4993 */ 100665360, 100665360, 100665360, 100665360, 100665360, 100665360, -2046818288, 1091799136, -2044196848,
+ /* 5002 */ 1091799136, 1091799136, 1091799136, 1091799136, 1091799136, 1091803360, 1091799136, 1091799136, 1158908000,
+ /* 5011 */ 1158908001, 1192462432, 1192462448, 1192462448, 1192462448, 1192462448, 1200851056, 1091799393, 1200851056,
+ /* 5020 */ 1200851056, 1192462448, 1870630720, 1870647104, 1870630720, 1870647104, 1870630720, 1870647104, 1870647104,
+ /* 5029 */ 1870647104, 1870647104, 1870647104, 1870647120, 1870647124, 1870647124, 1870647124, 1870630736, 1870655316,
+ /* 5038 */ 1870655316, 1870655316, 1870655317, 1870655348, 1870647120, 1870647120, 1870647120, 1879019376, 1879035760,
+ /* 5047 */ 1870647124, 1879035760, 1879035764, 32768, 131072, 524288, 2097152, 8388608, 16777216, 134217728,
+ /* 5057 */ 268435456, 1073741824, 0x80000000, 131328, 0, 0, 0, 832, 0, 164096, 0, 0, 0, 520, 4333568, 1048576,
+ /* 5073 */ 1224736768, 0, 0, 1, 4, 0, 0, 235712, 0, 1090519040, 0, 0, 0, 999, 259072, 1191182336, 0, 0, 9437184, 0, 0,
+ /* 5094 */ 1048576, 0, 128, 128, 128, 128, 2048, 2048, 231744, 0, 0, 0, 1007, 495424, 7864320, 1862270976, 0, 0, 0,
+ /* 5113 */ 1024, 0, 0, 0, 63, 520000, 1862270976, 1862270976, 16252928, 0, 0, 16252928, 0, 0, 0, 1536, 0x80000000, 64,
+ /* 5131 */ 98304, 1048576, 150994944, 0, 64, 256, 3584, 16384, 98304, 393216, 98304, 393216, 524288, 1048576, 2097152,
+ /* 5146 */ 4194304, 0x80000000, 0, 0, 2097152, 4194304, 251658240, 536870912, 1073741824, 0, 0, 8192, 1073741824,
+ /* 5159 */ 1073741824, 8388608, 2097152, 16777216, 134217728, 268435456, 2048, 65536, 262144, 524288, 1048576,
+ /* 5170 */ 2097152, 1048576, 2097152, 4194304, 117440512, 64, 256, 1536, 16384, 65536, 117440512, 134217728,
+ /* 5182 */ 536870912, 1073741824, 0, 0, 100663296, 0, 0, 0, 4096, 0, 0, 0, 64, 0, 0, 128, -2113929216, 64, 256, 1536,
+ /* 5202 */ 65536, 262144, 524288, 4194304, 16777216, 100663296, 134217728, 536870912, 1073741824, 1048576, 2097152,
+ /* 5213 */ 4194304, 16777216, 4194432, 3145728, 524288, 2097152, 134217728, 268435456, 65536, 1048576, 0, 0, 0, 2048,
+ /* 5227 */ 0, 0, 134217728, 0, 0, 0, 15, 16, 524288, 2097152, 1073741824, 0x80000000, 0x80000000, 0, 1048576, 2097152,
+ /* 5243 */ 67108864, 1073741824, 0, 0, 0, 0, 2097152, 1073741824, 0x80000000, 0, 0, 0, 768, 0, 2097152, 0x80000000, 0,
+ /* 5260 */ -872415232, 0, -872415232, 67108864, 134217728, 1073741824, 0, 0x80000000, 0, 0, 0, 8192, 4096, 0, 0, 1536,
+ /* 5276 */ 524288, 64, 64, 96, 64, 0, 524288, 0, 1073741824, 2621440, 1073741824, 9476, 512, 0, 32, 384, 8192, 0, 0,
+ /* 5295 */ 1, 8, 512, 512, 9476, 134218240, 1050624, 262144, 512, 50331649, 1275208192, 4194312, 4194312, 4194312,
+ /* 5309 */ 4194312, 541065224, 4194312, 4194312, 4194344, -869654016, 4203820, -869654016, -869654016, -869654016,
+ /* 5319 */ -869654016, 1279402504, 1279402504, 1279402504, 1279402504, 2143549415, 2143549415, 2143549415, 2143549415,
+ /* 5328 */ 2143549415, 2143549423, 2143549415, 2143549423, 2143549423, 2143549423, 2143549423, 16, 32, 256, 1024,
+ /* 5339 */ 8192, 33554432, 8192, 33554432, 67108864, 134217728, 0, 0, 536870912, 9216, 0, 0, 1792, 0x80000000, 0,
+ /* 5354 */ 1050624, 0, 0, 1, 14, 16, 32, 1024, 2048, 77824, 524288, 0, 512, 139264, 1275068416, 512, 2760704,
+ /* 5371 */ -872415232, 0, 0, 1856, 0x80000000, 4203520, 0, 0, 0, 32768, 0, 0, 0, 58624, 520, 0, 0, 0, 131072, 0, 0, 0,
+ /* 5393 */ 512, 0, 1048576, 0, 1275068416, 0, 0, 0, 65536, 0, 0, 0, 12561, 0, 1007, 1007, 0, 0, 2048, 524288, 0,
+ /* 5414 */ 536870912, 0, 512, 0, 2048, 1048576, 0, 0, 40, 0, 2621440, 0, 0, 0x80000000, 999, 259072, 4194304,
+ /* 5431 */ 25165824, 100663296, 402653184, 1, 102, 384, 512, 5120, 5120, 8192, 16384, 229376, 4194304, 4194304,
+ /* 5445 */ 25165824, 33554432, 67108864, 402653184, 402653184, 536870912, 1073741824, 0, 0, 2048, 3145728, 16777216,
+ /* 5457 */ 536870912, 110, 110, 0, 0, 1, 30, 32, 0, 40, 0, 524288, 64, 96, 1, 6, 96, 384, 512, 1024, 4096, 8192,
+ /* 5479 */ 16384, 229376, 67108864, 402653184, 536870912, 0, 2, 16, 104, 0, 104, 104, 8192, 33554432, 134217728, 0, 0,
+ /* 5496 */ 2048, 100663296, 0, 229376, 25165824, 33554432, 402653184, 536870912, 8192, 33554432, 0, 0, 0, 17408, 0,
+ /* 5511 */ 524288, 2097152, 0, 0, 2048, 268435456, 536870912, 0, 0, 268435456, 49152, 2, 4, 32, 64, 256, 512, 1024, 8,
+ /* 5530 */ 8, 0, 0, 1, 64, 128, 3584, 16384, 3145728, 16777216, 67108864, 134217728, 805306368, 1073741824, 0, 0, 4,
+ /* 5547 */ 64, 256, 1024, 4096, 8192, 65536, 524288, 98304, 131072, 25165824, 268435456, 536870912, 0, 2, 4, 256,
+ /* 5563 */ 1024, 0, 2048, 0, 98304, 131072, 16777216, 268435456, 0, 0, 0, 262144, 0, 0, 65536, 268435456, 0, 0, 1,
+ /* 5582 */ 128, 512, 2048, 524288, 2048, 524288, 67108864, 536870912, 0, 262144, 0, 0, 2432, 0, 0, 4096, 8192, 0, 32,
+ /* 5601 */ 4100, 67108864, 0, 32768, 0, 32768, 0, 0, 134348800, 134348800, 1049088, 1049088, 8192, 1049088, 12845065,
+ /* 5616 */ 12845065, 12845065, 12845065, 270532608, 0, 1049088, 0, 134348800, 12845065, 12845065, 147193865, 5505537,
+ /* 5628 */ 5591557, 5587465, 5587457, 5587457, 147202057, 5587457, 5587457, 5591557, 5587457, 13894153, 13894153,
+ /* 5639 */ 13894153, 13894153, -1881791493, 13894153, 81003049, 13894153, 13894153, -1881791493, -1881791493,
+ /* 5648 */ -1881791493, -1881791493, 0, 9, 0, 0, 1, 5505024, 142606336, 0, 0, 0, 278528, 0, 82432, 0, 0, 1, 16777216,
+ /* 5667 */ 0, 0, 0, 139264, 0, 0, 0, 229440, 0, 5, 86528, 9, 4456448, 8388608, 0, 0, 8192, 8392704, 9, 8388608, 0, 0,
+ /* 5689 */ 256, 1024, 65536, 16777216, 268435456, 0, 0, 41, 75497472, 0, 0, 16384, 262144, 0, 0, 0, 512, 1048576, 0,
+ /* 5708 */ 0, 262144, 4194304, 8388608, 0, 0, 16384, 4194304, 0x80000000, 0, 0, 81920, 0, 0, 2, 4, 16, 32, 8192,
+ /* 5727 */ 131072, 262144, 1048576, 4194304, 8388608, 4194304, 8388608, 16777216, 33554432, -1946157056, 0,
+ /* 5738 */ -1946157056, 0, 0, 0, 524288, 0, 0, 0, 16, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 13, 0, 1, 2, 56, 64, 896,
+ /* 5765 */ 8192, 131072, 0, 0, 33554432, 1024, 0, 4, 0, 8, 16, 32, 64, 128, 1024, 2048, 16384, 65536, 262144, 524288,
+ /* 5785 */ 2097152, 384, 512, 8192, 131072, 1048576, 0, 16384, 65536, 0, 65536, 0, 0, 131072, 0, 32, 0, 32768,
+ /* 5803 */ 134217728, 0, 0, 2, 8, 16, 0, 2, 8, 32, 64, 256, 1024, 98304, 131072, 1048576, 33554432, 134217728,
+ /* 5821 */ 0x80000000, 8, 32, 384, 8192, 131072, 33554432, 131072, 33554432, 0x80000000, 0, 0, 24576, 0, 0, 0,
+ /* 5837 */ 50331648, 0, 8396800, 4194304, 134217728, 2048, 134217728, 0, 0, 2, 16384, 32768, 1048576, 2097152, 0,
+ /* 5852 */ 8396800, 0, 0, 4, 8, 0, 0, 16384, 0, 2, 4, 128, 3584, 16384, 16384, 16384, 16777216, 16384, 229376,
+ /* 5871 */ 25165824, 33554432, 268435456, 536870912, 524288, 268567040, 16384, -2113929088, 2113544, 68423701,
+ /* 5881 */ 68423701, 68423701, 68423701, 68489237, 68423701, 68423701, 68423701, 85200917, 68423701, 68489237,
+ /* 5891 */ 72618005, 68423701, 68423701, -2079059883, 68423701, -2079059883, 68425749, 68423703, 69488664, 85200919,
+ /* 5901 */ 69488664, 69488664, 69488664, 69488664, 70537244, 70537245, 70537245, 70537245, 70537245, 70537245,
+ /* 5911 */ 70539293, -2022351809, -2076946339, 70537245, -2076946339, -2076946339, -2022351681, -2022351681,
+ /* 5919 */ -2022351681, -2022351681, -2022351809, -2022351681, -2022351809, -2022351681, 32768, 65536, 4194304,
+ /* 5928 */ 16777216, 0x80000000, 0, 0, 0, 8388608, 134217728, 1073741824, 131584, 268435456, 0, 0, 4, 128, 1048576,
+ /* 5943 */ 67108864, 0, 0, 4, 256, 1024, 98304, 0, 0, 5242880, -2080374784, 268288, 0, 0, 4, 16777216, 0, 0, 23, 0, 0,
+ /* 5964 */ 0, 867391, 24, 282624, 0, 0, 6, 0, 0, 0, 2097152, 0, 0, 0, 28, 3145728, 0, 0, 32768, 65536, 0, 284672, 0,
+ /* 5987 */ 0, 0, 1048576, 0, 63, 128, 351232, 7340032, -2030043136, 0, 0, 131072, 268435456, 0, 0, 8, 32, 64, 16,
+ /* 6006 */ 4096, 262144, 1048576, 1073741824, 0, 0, 0, -2046820352, 0, 20480, 0, 0, 8, 4194304, 0, 0, 15, 16, 32,
+ /* 6025 */ 3072, 20480, 65536, 262144, 7340032, 50331648, 16, 32, 128, 3072, 20480, 0, 1, 4, 1048576, 4096, 1048576,
+ /* 6042 */ 512, 0, 0, 0, 150528, 0, 0, 0, 5242880, 0, 7, 0, 14, 32, 1024, 2048, 12288, 1, 14, 32, 128, 1024, 7340032,
+ /* 6065 */ 50331648, 0x80000000, 0, 0, 2048, 16384, 65536, 7340032, 50331648, 8, 32, 1024, 65536, 262144, 2097152,
+ /* 6080 */ 1073741824, 0, 1, 6, 8, 32, 128, 1024, 65536, 2097152, 4194304, 50331648, 0x80000000, 0, 1, 2, 4, 2097152,
+ /* 6098 */ 4194304, 67108864, 134217728, 536870912, 0, 32768, 4194304, 16777216, 0, 1, 2, 4, 50331648, 67108864,
+ /* 6112 */ 0x80000000, 0, 0, 128, 50331648, 0, 0, 8, 33554432, 4096, 4194304, 268435456, 0, 0, 32768, 131072, 131072,
+ /* 6129 */ 0, 32768, 32768, 268435968, 268435968, 1073743872, 268435968, 0, 128, 6144, 0, 229376, 128, 268435968,
+ /* 6143 */ 16777220, 268436032, 256, 256, 256, 256, 257, 256, 256, 536871168, 256, 256, 256, 256, 384, -1879046336,
+ /* 6159 */ -1879046334, 1073744256, -1879046334, -1879046326, -1879046334, -1879046334, -1879046326, -1879046326,
+ /* 6167 */ -1845491902, -1878784182, 268444480, 268444480, 268444480, 268444480, 2100318145, 268436288, 268436288,
+ /* 6176 */ 268436288, 268436288, 268436289, 268436288, 2100318149, 2100318149, 2100318149, 2100318149, 2100326337,
+ /* 6185 */ 2100318149, 2100318149, 2100318145, 2100318149, 2100318145, 2100318149, 2100326341, 2100318149, 2100326341,
+ /* 6194 */ 2100326341, 0, 1, 16, 32, 128, 512, 0, 4194304, 1, 1024, 0, 0, 229376, 0, 0, 12, 3145728, 0, 0, 576, 0, 0,
+ /* 6217 */ 16, 8192, 0, 0, 16, 262144, 0, 384, 0, 0, 21, 266240, 1864, 0, 0, 0, 8388608, 0, 0, 0, 128, 0, 0, 0, 256,
+ /* 6242 */ 0, 0, 0, 260, 512, 0, 1, 4036, 19939328, 2080374784, 0, 0, 0, 16777216, 0, 0, 0, 32, 0, 0, 0, 40, 67108864,
+ /* 6265 */ 0, 19947520, 0, 0, 0, 19947520, 2304, 0, 8, 0, 512, 301989888, 0, 0, 262144, 16777216, 0, 1, 4, 64, 128,
+ /* 6286 */ 64, 128, 3840, 16384, 19922944, 19922944, 2080374784, 0, 0, 29, 0, 0, 1536, 0x80000000, 0, 0, 32, 1, 8, 0,
+ /* 6306 */ 33554432, 0, 0, 32768, 196608, 0, 0, 0, 33554432, 0, 0, 32768, 65536, 131072, 0, 0, 524288, 524288, 524288,
+ /* 6325 */ 524288, 64, 64, 64, 32, 96, 8, 0, 33554432, 262144, 8192, 0, 0, 4194304, 1024, 0, 4096, 0, 1024, 2048,
+ /* 6345 */ 16384, 3145728, 2048, 524288, 536870912, 1073741824, 8, 0, 0, 512, 131072, 0, 0, 64, 256, 1536, 2048,
+ /* 6362 */ 33554432, 8192, 0, 0, 32, 64, 256, 32768, 65536, 16777216, 134217728, 536870912, 1073741824, 0, 3145728,
+ /* 6377 */ 16777216, 536870912, 1073741824, 0, 0, 8192, 8192, 8192, 9216, 33554432, 0, 2097152, 16777216, 1073741824,
+ /* 6391 */ 0, 0, 32768, 0, 16777216, 0, 16777216, 64, 0, 2, 0, 0, 32768, 16777216, 0, 0, 32, 512, 128, 131072, 0,
+ /* 6412 */ 134218752, 0, 0, 44, 0, 66048, 0, 0, 0, 67108864, 0, 0, 0, 8192, 0, 8192, 0, 536870912, 0, 0, 0, 12289, 0,
+ /* 6435 */ 268500992, 4243456, 0, 0, 59, 140224, 5505024, -1887436800, 0, 0, 2, 2, 4096, 4096, 0, 4096, 8192,
+ /* 6452 */ 67108864, 0, 0, 1, 4032, 0, 4243456, 4096, 1048588, 12289, 1124073472, 1124073472, 1124073472, 1124073472,
+ /* 6466 */ 1124073472, 1124073488, 1124073472, 1124073472, 1124073474, 1124073472, 1124073472, 1392574464, 1124073472,
+ /* 6475 */ 12289, 1073754113, 12289, 12289, 1124073472, 12289, 12289, 1098920193, 1098920193, 1124073488, 1124073472,
+ /* 6486 */ 1258292224, 1124073472, 1124073472, 1124073472, 1124085761, 1258304513, 1124085761, 1124085761, 1124085761,
+ /* 6495 */ 1124085777, 1132474625, 1098920209, 1132474625, 1132474625, 1132474625, 1132474625, 1400975617, 2132360255,
+ /* 6504 */ 2132622399, 2132622399, 2132360255, 2132360255, 2132360255, 2132360255, 2132622399, 2132360255, 2132360255,
+ /* 6513 */ 2132360255, 2140749119, 2132360255, 2140749119, 2140749119, 0, 65536, 268435456, 49152, 184549376, 0, 0, 0,
+ /* 6526 */ 83886080, 0, 0, 318767104, 0, 0, 32768, 100663296, 402653184, 1610612736, 0, 0, 0, 231488, 0, 12545,
+ /* 6542 */ 25165824, 0, 0, 49152, 0, 0, 256, 1536, 65536, 0, 0, 58720256, 0, 0, 131072, 32768, 0, 0, 134217728, 0,
+ /* 6562 */ 12305, 13313, 0, 0, 331776, 83886080, 117440512, 0, 0, 1, 6, 32, 64, 0, 78081, 327155712, 0, 0, 511808,
+ /* 6581 */ 7864320, 512, 65536, 0, 0, 64, 65536, 1048576, 0, 0, 33554432, 1073741824, 0, 0, 110, 0, 0, 256, 8388608,
+ /* 6600 */ 0, 0, 524288, 2097152, 0x80000000, 0, 0, 77824, 0, 0, 0, 268435456, 524288, 1048576, 16777216, 100663296,
+ /* 6616 */ 134217728, 0, 339968, 0, 0, 128, 131072, 1024, 134217728, 0, 268435456, 0, 0, 128, 33554432, 0, 0, 1,
+ /* 6634 */ 12288, 0, 0, 0, 134217728, 2048, 12288, 65536, 524288, 1048576, 1048576, 33554432, 67108864, 134217728,
+ /* 6648 */ 805306368, 0, 327680, 0, 0, 256, 65536, 0, 0, 268435456, 1048576, 33554432, 134217728, 805306368, 1, 14,
+ /* 6664 */ 16, 1024, 4096, 8192, 229376, 65536, 524288, 33554432, 134217728, 536870912, 1073741824, 0, 1, 14, 1024,
+ /* 6679 */ 2048, 4096, 8192, 131072, 1048576, 8388608, 33554432, 134217728, 0x80000000, 0, 0, 4096, 65536, 524288,
+ /* 6693 */ 134217728, 16384, 4194304, 0, 0, 999, 29619200, 2113929216, 0, 0, 0, 148480, 1, 12, 1024, 134217728, 0,
+ /* 6710 */ 128, 134217728, 8, 0, 8, 8, 8, 0, 1, 4, 8, 134217728, 536870912, 0, 0, 1073741824, 32768, 0, 4, 8,
+ /* 6730 */ 536870912, 0, 0, 1024, 1024, 0, 1024, 2048, 3145728, 0, 8, 32, 512, 4096, 8192, 0, 0, 68157440, 137363456,
+ /* 6749 */ 0, 66, 66, 524288, 4100, 1024, 0, 0, 605247, 1058013184, 1073741824, 100680704, 25165824, 92274688,
+ /* 6763 */ 25165824, 25165824, 92274688, 92274688, 25165952, 25165824, 25165824, 26214400, 92274688, 25165824,
+ /* 6773 */ 92274688, 93323264, 92274688, 92274688, 92274688, 92274688, 92274720, 93323264, 25165890, 100721664,
+ /* 6783 */ 25165890, 100721928, 100721928, 100787464, 100853000, 100721928, 100721928, 125977600, 125977600,
+ /* 6792 */ 125977600, 125977600, 125846528, 125846528, 126895104, 125846528, 125846528, 125846528, 125846560,
+ /* 6801 */ 125977600, 127026176, 125977600, 125977600, 127026176, 127026176, 281843, 1330419, 281843, 1330419, 281843,
+ /* 6812 */ 281843, 1330419, 1330419, 281843, 281843, 5524723, 5524723, 5524723, 5524723, 93605107, 5524723, 39079155,
+ /* 6824 */ 72633587, 72633587, 5524723, 92556531, 93605107, 93605107, 127290611, 97799411, 127290611, 131484915,
+ /* 6834 */ 2097152, 134217728, 0, 0, 1024, 65536, 58368, 0, 0, 0, 301989888, 8, 124160, 189696, 0, 0, 605503,
+ /* 6851 */ 1066401792, 0, 0, 3, 240, 19456, 262144, 0, 150528, 0, 0, 0, 536870912, 0, 1073741824, 0, 57344, 0, 0, 0,
+ /* 6871 */ 1073741824, 0, 0, 0, 1, 2, 112, 128, 3072, 16384, 262144, 2048, 16384, 262144, 0, 0, 2097152, 16777216, 0,
+ /* 6890 */ 0, 0, 1, 2, 48, 64, 0, 1, 2, 16, 32, 64, 384, 8192, 131072, 1048576, 32, 4096, 8192, 131072, 0, 0, 32768,
+ /* 6913 */ 0, 256, 0, 256, 0, 65536, 1024, 2048, 262144, 0, 0, 32768, 256, 0, 0, 1024, 2097152, 0, 0, 0, 16384, 0, 0,
+ /* 6936 */ 0, 4, 0, 0, 0, 5, 64, 128, 262144, 0, 0, 2097152, 268435456, 0, 0, 64, 128, 0, 0, 1536, 1792, 1, 2, 16, 64,
+ /* 6961 */ 0, 0
+];
+
+XQueryParser.TOKEN =
+[
+ "(0)",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSection",
+ "Wildcard",
+ "EQName",
+ "URILiteral",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "StringLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "PITarget",
+ "NCName",
+ "QName",
+ "S",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "EOF",
+ "'!'",
+ "'!='",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "'$'",
+ "'%'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "')'",
+ "'*'",
+ "'*'",
+ "'+'",
+ "','",
+ "'-'",
+ "'-->'",
+ "'.'",
+ "'..'",
+ "'/'",
+ "'//'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "'::'",
+ "':='",
+ "';'",
+ "'<'",
+ "'<!--'",
+ "'</'",
+ "'<<'",
+ "'<='",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'>='",
+ "'>>'",
+ "'?'",
+ "'?>'",
+ "'@'",
+ "'NaN'",
+ "'['",
+ "']'",
+ "'after'",
+ "'all'",
+ "'allowing'",
+ "'ancestor'",
+ "'ancestor-or-self'",
+ "'and'",
+ "'any'",
+ "'append'",
+ "'array'",
+ "'as'",
+ "'ascending'",
+ "'at'",
+ "'attribute'",
+ "'base-uri'",
+ "'before'",
+ "'boundary-space'",
+ "'break'",
+ "'by'",
+ "'case'",
+ "'cast'",
+ "'castable'",
+ "'catch'",
+ "'check'",
+ "'child'",
+ "'collation'",
+ "'collection'",
+ "'comment'",
+ "'constraint'",
+ "'construction'",
+ "'contains'",
+ "'content'",
+ "'context'",
+ "'continue'",
+ "'copy'",
+ "'copy-namespaces'",
+ "'count'",
+ "'decimal-format'",
+ "'decimal-separator'",
+ "'declare'",
+ "'default'",
+ "'delete'",
+ "'descendant'",
+ "'descendant-or-self'",
+ "'descending'",
+ "'diacritics'",
+ "'different'",
+ "'digit'",
+ "'distance'",
+ "'div'",
+ "'document'",
+ "'document-node'",
+ "'element'",
+ "'else'",
+ "'empty'",
+ "'empty-sequence'",
+ "'encoding'",
+ "'end'",
+ "'entire'",
+ "'eq'",
+ "'every'",
+ "'exactly'",
+ "'except'",
+ "'exit'",
+ "'external'",
+ "'first'",
+ "'following'",
+ "'following-sibling'",
+ "'for'",
+ "'foreach'",
+ "'foreign'",
+ "'from'",
+ "'ft-option'",
+ "'ftand'",
+ "'ftnot'",
+ "'ftor'",
+ "'function'",
+ "'ge'",
+ "'greatest'",
+ "'group'",
+ "'grouping-separator'",
+ "'gt'",
+ "'idiv'",
+ "'if'",
+ "'import'",
+ "'in'",
+ "'index'",
+ "'infinity'",
+ "'inherit'",
+ "'insensitive'",
+ "'insert'",
+ "'instance'",
+ "'integrity'",
+ "'intersect'",
+ "'into'",
+ "'is'",
+ "'item'",
+ "'json'",
+ "'json-item'",
+ "'key'",
+ "'language'",
+ "'last'",
+ "'lax'",
+ "'le'",
+ "'least'",
+ "'let'",
+ "'levels'",
+ "'loop'",
+ "'lowercase'",
+ "'lt'",
+ "'minus-sign'",
+ "'mod'",
+ "'modify'",
+ "'module'",
+ "'most'",
+ "'namespace'",
+ "'namespace-node'",
+ "'ne'",
+ "'next'",
+ "'no'",
+ "'no-inherit'",
+ "'no-preserve'",
+ "'node'",
+ "'nodes'",
+ "'not'",
+ "'object'",
+ "'occurs'",
+ "'of'",
+ "'on'",
+ "'only'",
+ "'option'",
+ "'or'",
+ "'order'",
+ "'ordered'",
+ "'ordering'",
+ "'paragraph'",
+ "'paragraphs'",
+ "'parent'",
+ "'pattern-separator'",
+ "'per-mille'",
+ "'percent'",
+ "'phrase'",
+ "'position'",
+ "'preceding'",
+ "'preceding-sibling'",
+ "'preserve'",
+ "'previous'",
+ "'processing-instruction'",
+ "'relationship'",
+ "'rename'",
+ "'replace'",
+ "'return'",
+ "'returning'",
+ "'revalidation'",
+ "'same'",
+ "'satisfies'",
+ "'schema'",
+ "'schema-attribute'",
+ "'schema-element'",
+ "'score'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'xquery'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'{|'",
+ "'|'",
+ "'||'",
+ "'|}'",
+ "'}'",
+ "'}}'"
+];
+
+ // line 1179 "XQueryParser.ebnf"
+ });
+ // line 33487 "XQueryParser.js"
+// End
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.ebnf b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.ebnf
new file mode 100644
index 000000000..51fb83f84
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.ebnf
@@ -0,0 +1,543 @@
+<?xqlint
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module){
+var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler)
+{
+ init(string, parsingEventHandler);
+?>
+
+start ::= '<![CDATA['
+ | '<!--'
+ | '<?'
+ | '(#'
+ | '(:~'
+ | '(:'
+ | '"'
+ | "'"
+ | "}"
+ | "{"
+ | "("
+ | ")"
+ | "/"
+ | "["
+ | "]"
+ | ","
+ | "."
+ | ";"
+ | ":"
+ | "!"
+ | "|"
+ | Annotation
+ | ModuleDecl
+ | OptionDecl
+ | AttrTest
+ | Wildcard
+ | IntegerLiteral
+ | DecimalLiteral
+ | DoubleLiteral
+ | Variable
+ | EQName
+ | Tag
+ | Operator
+ | EOF
+
+StartTag ::= '>' | '/>' | QName | "=" | '"' | "'" | EOF
+
+
+TagContent
+ ::= ElementContentChar | Tag | EndTag | '<![CDATA[' | '<!--' | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | EOF
+ /* ws: explicit */
+
+AposAttr
+ ::= EscapeApos | AposAttrContentChar | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | "'" | EOF
+ /* ws: explicit */
+
+QuotAttr
+ ::= EscapeQuot | QuotAttrContentChar | PredefinedEntityRef | CharRef | '{{' | '}}' | '{' | '"' | EOF
+ /* ws: explicit */
+
+CData ::= CDataSectionContents | ']]>' | EOF
+ /* ws: explicit */
+
+XMLComment
+ ::= DirCommentContents | '-->' | EOF
+ /* ws: explicit */
+
+PI ::= DirPIContents | '?' | '?>' | EOF
+ /* ws: explicit */
+
+Pragma ::= PragmaContents | '#' | '#)' | EOF
+ /* ws: explicit */
+
+Comment ::= ':)' | '(:' | CommentContents | EOF
+ /* ws: explicit */
+
+CommentDoc
+ ::= DocTag | DocCommentContents | ':)' | '(:' | EOF
+ /* ws: explicit */
+
+QuotString
+ ::= PredefinedEntityRef | CharRef | EscapeQuot | QuotChar | '"' | EOF
+ /* ws: explicit */
+
+AposString
+ ::= PredefinedEntityRef | CharRef | EscapeApos | AposChar | "'" | EOF
+ /* ws: explicit */
+
+Prefix ::= NCName
+
+_EQName ::= EQName
+
+Whitespace
+ ::= S^WS
+ /* ws: definition */
+
+EQName ::= FunctionName
+ | 'attribute'
+ | 'comment'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'function'
+ | 'if'
+ | 'item'
+ | 'namespace-node'
+ | 'node'
+ | 'processing-instruction'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'switch'
+ | 'text'
+ | 'typeswitch'
+FunctionName
+ ::= EQName^Token
+ | 'after'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'child'
+ | 'collation'
+ | 'copy'
+ | 'count'
+ | 'declare'
+ | 'default'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'descending'
+ | 'div'
+ | 'document'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'every'
+ | 'except'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'import'
+ | 'insert'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'last'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'module'
+ | 'namespace'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'rename'
+ | 'replace'
+ | 'return'
+ | 'satisfies'
+ | 'self'
+ | 'some'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'try'
+ | 'union'
+ | 'unordered'
+ | 'validate'
+ | 'where'
+ | 'with'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'variable'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+NCName ::= NCName^Token
+ | 'after'
+ | 'and'
+ | 'as'
+ | 'ascending'
+ | 'before'
+ | 'case'
+ | 'cast'
+ | 'castable'
+ | 'collation'
+ | 'count'
+ | 'default'
+ | 'descending'
+ | 'div'
+ | 'else'
+ | 'empty'
+ | 'end'
+ | 'eq'
+ | 'except'
+ | 'for'
+ | 'ge'
+ | 'group'
+ | 'gt'
+ | 'idiv'
+ | 'instance'
+ | 'intersect'
+ | 'into'
+ | 'is'
+ | 'le'
+ | 'let'
+ | 'lt'
+ | 'mod'
+ | 'modify'
+ | 'ne'
+ | 'only'
+ | 'or'
+ | 'order'
+ | 'return'
+ | 'satisfies'
+ | 'stable'
+ | 'start'
+ | 'to'
+ | 'treat'
+ | 'union'
+ | 'where'
+ | 'with'
+ | 'ancestor'
+ | 'ancestor-or-self'
+ | 'attribute'
+ | 'child'
+ | 'comment'
+ | 'copy'
+ | 'declare'
+ | 'delete'
+ | 'descendant'
+ | 'descendant-or-self'
+ | 'document'
+ | 'document-node'
+ | 'element'
+ | 'empty-sequence'
+ | 'every'
+ | 'first'
+ | 'following'
+ | 'following-sibling'
+ | 'function'
+ | 'if'
+ | 'import'
+ | 'insert'
+ | 'item'
+ | 'last'
+ | 'module'
+ | 'namespace'
+ | 'namespace-node'
+ | 'node'
+ | 'ordered'
+ | 'parent'
+ | 'preceding'
+ | 'preceding-sibling'
+ | 'processing-instruction'
+ | 'rename'
+ | 'replace'
+ | 'schema-attribute'
+ | 'schema-element'
+ | 'self'
+ | 'some'
+ | 'switch'
+ | 'text'
+ | 'try'
+ | 'typeswitch'
+ | 'unordered'
+ | 'validate'
+ | 'variable'
+ | 'xquery'
+ | 'allowing'
+ | 'at'
+ | 'base-uri'
+ | 'boundary-space'
+ | 'break'
+ | 'catch'
+ | 'construction'
+ | 'context'
+ | 'continue'
+ | 'copy-namespaces'
+ | 'decimal-format'
+ | 'encoding'
+ | 'exit'
+ | 'external'
+ | 'ft-option'
+ | 'in'
+ | 'index'
+ | 'integrity'
+ | 'lax'
+ | 'nodes'
+ | 'option'
+ | 'ordering'
+ | 'revalidation'
+ | 'schema'
+ | 'score'
+ | 'sliding'
+ | 'strict'
+ | 'tumbling'
+ | 'type'
+ | 'updating'
+ | 'value'
+ | 'version'
+ | 'while'
+ | 'constraint'
+ | 'loop'
+ | 'returning'
+<?TOKENS?>
+
+ModuleDecl
+ ::= ('import' S)? ('module' | 'schema') S 'namespace'
+
+Annotation
+ ::= '%' EQName ?
+
+OptionDecl
+ ::= 'declare' S ( ( 'decimal-format' | 'option' )
+ | ('default' S 'decimal-format') )
+
+Operator ::= '!=' | ':=' | '>=' | '<=' | '=' | '<' | '>' | '-' | '+' | 'div' | '||' | '?'
+
+Variable ::= '$' EQName
+
+Tag ::= '<' QName
+
+EndTag ::= '</' QName S? '>'
+
+PragmaContents
+ ::= ( Char* - ( Char* '#' Char* ) )+
+DirCommentContents
+ ::= ( ( Char - '-' ) | '-' ( Char - '-' ) )+
+DirPIContents
+ ::= ( Char* - ( Char* '?' Char* ) )+
+CDataSectionContents
+ ::= ( Char+ - ( Char* ']]>' Char* ) ) & ']]'
+ | ( Char+ - ( Char* ']]>' Char* ) ) & $
+AttrTest ::= "@" ( Wildcard | QName )
+Wildcard ::= "*"
+ | (NCName ":" "*")
+ | ("*" ":" NCName)
+ | (BracedURILiteral "*")
+EQName ::= QName
+ | URIQualifiedName
+URIQualifiedName
+ ::= BracedURILiteral NCName
+BracedURILiteral
+ ::= 'Q' '{' (PredefinedEntityRef | CharRef | [^&{}] )* '}'
+URILiteral
+ ::= StringLiteral
+IntegerLiteral
+ ::= Digits
+DecimalLiteral
+ ::= '.' Digits
+ | Digits '.' [0-9]*
+ /* ws: explicit */
+DoubleLiteral
+ ::= ( '.' Digits | Digits ( '.' [0-9]* )? ) [Ee] [+#x002D]? Digits
+ /* ws: explicit */
+PredefinedEntityRef
+ ::= '&' ( 'lt' | 'gt' | 'amp' | 'quot' | 'apos' ) ';'
+ /* ws: explicit */
+EscapeQuot
+ ::= '""'
+EscapeApos
+ ::= "''"
+QuotChar ::= (Char - ["&])+
+AposChar ::= (Char - [&'])+
+ElementContentChar
+ ::= (Char - [&<{}])+
+QuotAttrContentChar
+ ::= (Char - ["&<{}])+
+AposAttrContentChar
+ ::= (Char - [&'<{}])+
+PITarget ::= NCName - ( ( 'X' | 'x' ) ( 'M' | 'm' ) ( 'L' | 'l' ) )
+Name ::= NameStartChar NameChar*
+NameStartChar
+ ::= [:A-Z_a-z#x00C0-#x00D6#x00D8-#x00F6#x00F8-#x02FF#x0370-#x037D#x037F-#x1FFF#x200C-#x200D#x2070-#x218F#x2C00-#x2FEF#x3001-#xD7FF#xF900-#xFDCF#xFDF0-#xFFFD#x10000-#xEFFFF]
+NameChar ::= NameStartChar
+ | [-.0-9#x00B7#x0300-#x036F#x203F-#x2040]
+NCName ::= Name - ( Char* ':' Char* )
+Char ::= [#x0009#x000A#x000D#x0020-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF]
+QName ::= PrefixedName
+ | UnprefixedName
+PrefixedName
+ ::= Prefix ':' LocalPart
+UnprefixedName
+ ::= LocalPart
+Prefix ::= NCName
+LocalPart
+ ::= NCName
+S ::= [#x0009#x000A#x000D#x0020]+
+CharRef ::= '&#' [0-9]+ ';'
+ | '&#x' [0-9A-Fa-f]+ ';'
+Digits ::= [0-9]+
+CommentContents
+ ::= ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) & '(:'
+ | ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) & $
+ | ( ( Char+ - ( Char* ( '(:' | ':)' ) Char* ) ) - ( Char* '(' ) ) & ':'
+DocTag ::= ' @' NCName?
+DocCommentContents
+ ::= ( ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) - ( Char* '(' ) ) & ':'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) & '(:'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @' ) Char* ) ) & ' @'
+ | ( Char+ - ( Char* ( '(:' | ':)' | ' @') Char* ) ) & $
+EOF ::= $
+NonNCNameChar
+ ::= $
+ | ':'
+ | ( Char - NameChar )
+DelimitingChar
+ ::= NonNCNameChar
+ | '-'
+ | '.'
+DelimitingChar
+ \\ IntegerLiteral DecimalLiteral DoubleLiteral
+NonNCNameChar
+ \\ EQName^Token QName NCName^Token 'NaN' 'after' 'all'
+ 'allowing' 'ancestor' 'ancestor-or-self' 'and' 'any'
+ 'append' 'array' 'as' 'ascending' 'at' 'attribute'
+ 'base-uri' 'before' 'boundary-space' 'break' 'by' 'case'
+ 'cast' 'castable' 'catch' 'check' 'child' 'collation'
+ 'collection' 'comment' 'constraint' 'construction'
+ 'contains' 'content' 'context' 'continue' 'copy'
+ 'copy-namespaces' 'count' 'decimal-format'
+ 'decimal-separator' 'declare' 'default' 'delete'
+ 'descendant' 'descendant-or-self' 'descending'
+ 'diacritics' 'different' 'digit' 'distance' 'div'
+ 'document' 'document-node' 'element' 'else' 'empty'
+ 'empty-sequence' 'encoding' 'end' 'entire' 'eq' 'every'
+ 'exactly' 'except' 'exit' 'external' 'first' 'following'
+ 'following-sibling' 'for' 'foreach' 'foreign' 'from'
+ 'ft-option' 'ftand' 'ftnot' 'ftor' 'function' 'ge'
+ 'greatest' 'group' 'grouping-separator' 'gt' 'idiv' 'if'
+ 'import' 'in' 'index' 'infinity' 'inherit' 'insensitive'
+ 'insert' 'instance' 'integrity' 'intersect' 'into' 'is'
+ 'item' 'json' 'json-item' 'key' 'language' 'last' 'lax'
+ 'le' 'least' 'let' 'levels' 'loop' 'lowercase' 'lt'
+ 'minus-sign' 'mod' 'modify' 'module' 'most' 'namespace'
+ 'namespace-node' 'ne' 'next' 'no' 'no-inherit'
+ 'no-preserve' 'node' 'nodes' 'not' 'object' 'occurs'
+ 'of' 'on' 'only' 'option' 'or' 'order' 'ordered'
+ 'ordering' 'paragraph' 'paragraphs' 'parent'
+ 'pattern-separator' 'per-mille' 'percent' 'phrase'
+ 'position' 'preceding' 'preceding-sibling' 'preserve'
+ 'previous' 'processing-instruction' 'relationship'
+ 'rename' 'replace' 'return' 'returning' 'revalidation'
+ 'same' 'satisfies' 'schema' 'schema-attribute'
+ 'schema-element' 'score' 'self' 'sensitive' 'sentence'
+ 'sentences' 'skip' 'sliding' 'some' 'stable' 'start'
+ 'stemming' 'stop' 'strict' 'strip' 'structured-item'
+ 'switch' 'text' 'then' 'thesaurus' 'times' 'to'
+ 'treat' 'try' 'tumbling' 'type' 'typeswitch' 'union'
+ 'unique' 'unordered' 'updating' 'uppercase' 'using'
+ 'validate' 'value' 'variable' 'version' 'weight'
+ 'when' 'where' 'while' 'wildcards' 'window' 'with'
+ 'without' 'word' 'words' 'xquery' 'zero-digit'
+'*' << Wildcard '*'^OccurrenceIndicator
+EQName^Token
+ << 'after' 'ancestor' 'ancestor-or-self' 'and' 'as' 'ascending' 'attribute' 'before' 'case' 'cast' 'castable' 'child' 'collation' 'comment' 'copy' 'count' 'declare' 'default' 'delete' 'descendant' 'descendant-or-self' 'descending' 'div' 'document' 'document-node' 'element' 'else' 'empty' 'empty-sequence' 'end' 'eq' 'every' 'except' 'first' 'following' 'following-sibling' 'for' 'function' 'ge' 'group' 'gt' 'idiv' 'if' 'import' 'insert' 'instance' 'intersect' 'into' 'is' 'item' 'last' 'le' 'let' 'lt' 'mod' 'modify' 'module' 'namespace' 'namespace-node' 'ne' 'node' 'only' 'or' 'order' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'return' 'satisfies' 'schema-attribute' 'schema-element' 'self' 'some' 'stable' 'start' 'switch' 'text' 'to' 'treat' 'try' 'typeswitch' 'union' 'unordered' 'validate' 'where' 'with' 'xquery' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'collection' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'variable' 'version' 'while' 'constraint' 'loop' 'returning' 'append' 'array' 'json-item' 'object' 'structured-item'
+NCName^Token
+ << 'after' 'and' 'as' 'ascending' 'before' 'case' 'cast' 'castable' 'collation' 'count' 'default' 'descending' 'div' 'else' 'empty' 'end' 'eq' 'except' 'for' 'ge' 'group' 'gt' 'idiv' 'instance' 'intersect' 'into' 'is' 'le' 'let' 'lt' 'mod' 'modify' 'ne' 'only' 'or' 'order' 'return' 'satisfies' 'stable' 'start' 'to' 'treat' 'union' 'where' 'with' 'contains' 'paragraphs' 'sentences' 'times' 'words' 'by' 'ancestor' 'ancestor-or-self' 'attribute' 'child' 'comment' 'copy' 'declare' 'delete' 'descendant' 'descendant-or-self' 'document' 'document-node' 'element' 'empty-sequence' 'every' 'first' 'following' 'following-sibling' 'function' 'if' 'import' 'insert' 'item' 'last' 'module' 'namespace' 'namespace-node' 'node' 'ordered' 'parent' 'preceding' 'preceding-sibling' 'processing-instruction' 'rename' 'replace' 'schema-attribute' 'schema-element' 'self' 'some' 'switch' 'text' 'try' 'typeswitch' 'unordered' 'validate' 'variable' 'xquery' 'allowing' 'at' 'base-uri' 'boundary-space' 'break' 'catch' 'construction' 'context' 'continue' 'copy-namespaces' 'decimal-format' 'encoding' 'exit' 'external' 'ft-option' 'in' 'index' 'integrity' 'lax' 'nodes' 'option' 'ordering' 'revalidation' 'schema' 'score' 'sliding' 'strict' 'tumbling' 'type' 'updating' 'value' 'version' 'while' 'constraint' 'loop' 'returning'
+
+<?ENCORE?>
+
+<?xqlint
+});
+?>
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.js b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.js
new file mode 100644
index 000000000..4da4ac929
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/XQueryTokenizer.js
@@ -0,0 +1,4205 @@
+// This file was generated on Tue Mar 12, 2013 02:30 (UTC+01) by REx v5.24 which is Copyright (c) 1979-2013 by Gunther Rademacher <grd@gmx.net>
+// REx command line: XQueryTokenizer.ebnf -ll 2 -backtrack -tree -javascript -a xqlint
+
+ // line 2 "XQueryTokenizer.ebnf"
+ /* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ define(function(require, exports, module){
+ var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ // line 40 "XQueryTokenizer.js"
+ var self = this;
+
+ this.ParseException = function(b, e, s, o, x)
+ {
+ var
+ begin = b,
+ end = e,
+ state = s,
+ offending = o,
+ expected = x;
+
+ this.getBegin = function() {return begin;};
+ this.getEnd = function() {return end;};
+ this.getState = function() {return state;};
+ this.getExpected = function() {return expected;};
+ this.getOffending = function() {return offending;};
+
+ this.getMessage = function()
+ {
+ return offending < 0 ? "lexical analysis failed" : "syntax error";
+ };
+ };
+
+ function init(string, parsingEventHandler)
+ {
+ eventHandler = parsingEventHandler;
+ input = string;
+ size = string.length;
+ reset(0, 0, 0);
+ }
+
+ this.getInput = function()
+ {
+ return input;
+ };
+
+ function reset(l, b, e)
+ {
+ b0 = b; e0 = b;
+ l1 = l; b1 = b; e1 = e;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? XQueryTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = XQueryTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [XQueryTokenizer.TOKEN[e.getExpected()]];
+ }
+ return expected;
+ };
+
+ this.getErrorMessage = function(e)
+ {
+ var tokenSet = this.getExpectedTokenSet(e);
+ var found = this.getOffendingToken(e);
+ var prefix = input.substring(0, e.getBegin());
+ var lines = prefix.split("\n");
+ var line = lines.length;
+ var column = lines[line - 1].length + 1;
+ var size = e.getEnd() - e.getBegin();
+ return e.getMessage()
+ + (found == null ? "" : ", found " + found)
+ + "\nwhile expecting "
+ + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]"))
+ + "\n"
+ + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ")
+ + "at line " + line + ", column " + column + ":\n..."
+ + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64))
+ + "...";
+ };
+
+ this.parse_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ // S^WS | EOF | '!' | '"' | "'" | '(' | '(#' | '(:' | '(:~' | ')' | ',' | '.' |
+ // '/' | ':' | ';' | '<!--' | '<![CDATA[' | '<?' | '[' | ']' | 'after' |
+ // 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' | 'as' | 'ascending' |
+ // 'at' | 'attribute' | 'base-uri' | 'before' | 'boundary-space' | 'break' |
+ // 'case' | 'cast' | 'castable' | 'catch' | 'child' | 'collation' | 'comment' |
+ // 'constraint' | 'construction' | 'context' | 'continue' | 'copy' |
+ // 'copy-namespaces' | 'count' | 'decimal-format' | 'declare' | 'default' |
+ // 'delete' | 'descendant' | 'descendant-or-self' | 'descending' | 'div' |
+ // 'document' | 'document-node' | 'element' | 'else' | 'empty' | 'empty-sequence' |
+ // 'encoding' | 'end' | 'eq' | 'every' | 'except' | 'exit' | 'external' | 'first' |
+ // 'following' | 'following-sibling' | 'for' | 'ft-option' | 'function' | 'ge' |
+ // 'group' | 'gt' | 'idiv' | 'if' | 'import' | 'in' | 'index' | 'insert' |
+ // 'instance' | 'integrity' | 'intersect' | 'into' | 'is' | 'item' | 'last' |
+ // 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' | 'modify' | 'module' |
+ // 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' | 'only' | 'option' |
+ // 'or' | 'order' | 'ordered' | 'ordering' | 'parent' | 'preceding' |
+ // 'preceding-sibling' | 'processing-instruction' | 'rename' | 'replace' |
+ // 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery' | '{' | '|' | '}'
+ switch (l1)
+ {
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 56: // '<?'
+ shift(56); // '<?'
+ break;
+ case 40: // '(#'
+ shift(40); // '(#'
+ break;
+ case 42: // '(:~'
+ shift(42); // '(:~'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ case 274: // '}'
+ shift(274); // '}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 39: // '('
+ shift(39); // '('
+ break;
+ case 43: // ')'
+ shift(43); // ')'
+ break;
+ case 49: // '/'
+ shift(49); // '/'
+ break;
+ case 62: // '['
+ shift(62); // '['
+ break;
+ case 63: // ']'
+ shift(63); // ']'
+ break;
+ case 46: // ','
+ shift(46); // ','
+ break;
+ case 48: // '.'
+ shift(48); // '.'
+ break;
+ case 53: // ';'
+ shift(53); // ';'
+ break;
+ case 51: // ':'
+ shift(51); // ':'
+ break;
+ case 34: // '!'
+ shift(34); // '!'
+ break;
+ case 273: // '|'
+ shift(273); // '|'
+ break;
+ case 2: // Annotation
+ shift(2); // Annotation
+ break;
+ case 1: // ModuleDecl
+ shift(1); // ModuleDecl
+ break;
+ case 3: // OptionDecl
+ shift(3); // OptionDecl
+ break;
+ case 12: // AttrTest
+ shift(12); // AttrTest
+ break;
+ case 13: // Wildcard
+ shift(13); // Wildcard
+ break;
+ case 15: // IntegerLiteral
+ shift(15); // IntegerLiteral
+ break;
+ case 16: // DecimalLiteral
+ shift(16); // DecimalLiteral
+ break;
+ case 17: // DoubleLiteral
+ shift(17); // DoubleLiteral
+ break;
+ case 5: // Variable
+ shift(5); // Variable
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 4: // Operator
+ shift(4); // Operator
+ break;
+ case 33: // EOF
+ shift(33); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 58: // '>'
+ shift(58); // '>'
+ break;
+ case 50: // '/>'
+ shift(50); // '/>'
+ break;
+ case 27: // QName
+ shift(27); // QName
+ break;
+ case 57: // '='
+ shift(57); // '='
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ // '<!--' | '<![CDATA[' | '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 23: // ElementContentChar
+ shift(23); // ElementContentChar
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 7: // EndTag
+ shift(7); // EndTag
+ break;
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ // '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 25: // AposAttrContentChar
+ shift(25); // AposAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ // '{' | '{{' | '}}'
+ switch (l1)
+ {
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 24: // QuotAttrContentChar
+ shift(24); // QuotAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 11: // CDataSectionContents
+ shift(11); // CDataSectionContents
+ break;
+ case 64: // ']]>'
+ shift(64); // ']]>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 9: // DirCommentContents
+ shift(9); // DirCommentContents
+ break;
+ case 47: // '-->'
+ shift(47); // '-->'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 10: // DirPIContents
+ shift(10); // DirPIContents
+ break;
+ case 59: // '?'
+ shift(59); // '?'
+ break;
+ case 60: // '?>'
+ shift(60); // '?>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 8: // PragmaContents
+ shift(8); // PragmaContents
+ break;
+ case 36: // '#'
+ shift(36); // '#'
+ break;
+ case 37: // '#)'
+ shift(37); // '#)'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 30: // CommentContents
+ shift(30); // CommentContents
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 31: // DocTag
+ shift(31); // DocTag
+ break;
+ case 32: // DocCommentContents
+ shift(32); // DocCommentContents
+ break;
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"'
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 21: // QuotChar
+ shift(21); // QuotChar
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 22: // AposChar
+ shift(22); // AposChar
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' |
+ // 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' |
+ // 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ // 'and' | 'as' | 'ascending' | 'at' | 'attribute' | 'base-uri' | 'before' |
+ // 'boundary-space' | 'break' | 'case' | 'cast' | 'castable' | 'catch' | 'child' |
+ // 'collation' | 'comment' | 'constraint' | 'construction' | 'context' |
+ // 'continue' | 'copy' | 'copy-namespaces' | 'count' | 'decimal-format' |
+ // 'declare' | 'default' | 'delete' | 'descendant' | 'descendant-or-self' |
+ // 'descending' | 'div' | 'document' | 'document-node' | 'element' | 'else' |
+ // 'empty' | 'empty-sequence' | 'encoding' | 'end' | 'eq' | 'every' | 'except' |
+ // 'exit' | 'external' | 'first' | 'following' | 'following-sibling' | 'for' |
+ // 'ft-option' | 'function' | 'ge' | 'group' | 'gt' | 'idiv' | 'if' | 'import' |
+ // 'in' | 'index' | 'insert' | 'instance' | 'integrity' | 'intersect' | 'into' |
+ // 'is' | 'item' | 'last' | 'lax' | 'le' | 'let' | 'loop' | 'lt' | 'mod' |
+ // 'modify' | 'module' | 'namespace' | 'namespace-node' | 'ne' | 'node' | 'nodes' |
+ // 'only' | 'option' | 'or' | 'order' | 'ordered' | 'ordering' | 'parent' |
+ // 'preceding' | 'preceding-sibling' | 'processing-instruction' | 'rename' |
+ // 'replace' | 'return' | 'returning' | 'revalidation' | 'satisfies' | 'schema' |
+ // 'schema-attribute' | 'schema-element' | 'score' | 'self' | 'sliding' | 'some' |
+ // 'stable' | 'start' | 'strict' | 'switch' | 'text' | 'to' | 'treat' | 'try' |
+ // 'tumbling' | 'type' | 'typeswitch' | 'union' | 'unordered' | 'updating' |
+ // 'validate' | 'value' | 'variable' | 'version' | 'where' | 'while' | 'with' |
+ // 'xquery'
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 14: // EQName^Token
+ shift(14); // EQName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 26: // NCName^Token
+ shift(26); // NCName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 28) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = XQueryTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]];
+ }
+ else
+ {
+ if (c0 < 0xdc00)
+ {
+ var c1 = current < size ? input.charCodeAt(current) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000)
+ {
+ ++current;
+ c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000;
+ nonbmp = true;
+ }
+ }
+ var lo = 0, hi = 5;
+ for (var m = 3; ; m = (hi + lo) >> 1)
+ {
+ if (XQueryTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = XQueryTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]];
+
+ if (code > 4095)
+ {
+ result = code;
+ code &= 4095;
+ end = current;
+ }
+ }
+
+ result >>= 12;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ return error(begin, end, state, -1, -1);
+ }
+
+ if (nonbmp)
+ {
+ for (var i = result >> 9; i > 0; --i)
+ {
+ --end;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ }
+ }
+ else
+ {
+ end -= result >> 9;
+ }
+
+ return (result & 511) - 1;
+ }
+}
+
+XQueryTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 276; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2062 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(XQueryTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+XQueryTokenizer.MAP0 =
+[
+ /* 0 */ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5,
+ /* 36 */ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24,
+ /* 64 */ 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31,
+ /* 91 */ 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,
+ /* 118 */ 57, 58, 59, 60, 31, 61, 62, 63, 64, 35
+];
+
+XQueryTokenizer.MAP1 =
+[
+ /* 0 */ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181,
+ /* 21 */ 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 42 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 63 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 84 */ 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214,
+ /* 105 */ 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331,
+ /* 126 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433,
+ /* 147 */ 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331,
+ /* 168 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416,
+ /* 189 */ 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416,
+ /* 210 */ 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331,
+ /* 231 */ 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 256 */ 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ /* 290 */ 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31,
+ /* 317 */ 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
+ /* 344 */ 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43,
+ /* 371 */ 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35,
+ /* 398 */ 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35,
+ /* 425 */ 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
+];
+
+XQueryTokenizer.MAP2 =
+[
+ /* 0 */ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31,
+ /* 17 */ 35
+];
+
+XQueryTokenizer.INITIAL =
+[
+ /* 0 */ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+XQueryTokenizer.TRANSITION =
+[
+ /* 0 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 30 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 45 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 60 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 75 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 90 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 150 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 255 */ 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189,
+ /* 270 */ 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033,
+ /* 285 */ 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251,
+ /* 300 */ 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940,
+ /* 315 */ 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531,
+ /* 330 */ 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551,
+ /* 345 */ 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209,
+ /* 360 */ 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816,
+ /* 375 */ 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590,
+ /* 390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 405 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 510 */ 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921,
+ /* 525 */ 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265,
+ /* 540 */ 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520,
+ /* 555 */ 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157,
+ /* 570 */ 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223,
+ /* 585 */ 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918,
+ /* 600 */ 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052,
+ /* 615 */ 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392,
+ /* 630 */ 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590,
+ /* 645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 660 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 765 */ 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349,
+ /* 780 */ 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006,
+ /* 795 */ 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497,
+ /* 810 */ 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418,
+ /* 825 */ 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473,
+ /* 840 */ 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731,
+ /* 855 */ 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706,
+ /* 870 */ 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642,
+ /* 885 */ 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590,
+ /* 900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 915 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1020 */ 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330,
+ /* 1035 */ 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665,
+ /* 1050 */ 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952,
+ /* 1065 */ 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258,
+ /* 1080 */ 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617,
+ /* 1095 */ 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864,
+ /* 1110 */ 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143,
+ /* 1125 */ 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163,
+ /* 1140 */ 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590,
+ /* 1155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1170 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1275 */ 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437,
+ /* 1290 */ 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649,
+ /* 1305 */ 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447,
+ /* 1320 */ 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527,
+ /* 1335 */ 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946,
+ /* 1350 */ 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156,
+ /* 1365 */ 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117,
+ /* 1380 */ 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796,
+ /* 1395 */ 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590,
+ /* 1410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1425 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1440 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1530 */ 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763,
+ /* 1545 */ 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880,
+ /* 1560 */ 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008,
+ /* 1575 */ 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504,
+ /* 1590 */ 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737,
+ /* 1605 */ 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481,
+ /* 1620 */ 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072,
+ /* 1635 */ 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232,
+ /* 1650 */ 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535,
+ /* 1665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1680 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1695 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173,
+ /* 1800 */ 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452,
+ /* 1815 */ 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999,
+ /* 1830 */ 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887,
+ /* 1845 */ 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730,
+ /* 1860 */ 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620,
+ /* 1875 */ 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056,
+ /* 1890 */ 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403,
+ /* 1905 */ 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505,
+ /* 1920 */ 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1935 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1950 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 1995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008,
+ /* 2055 */ 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918,
+ /* 2070 */ 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658,
+ /* 2085 */ 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585,
+ /* 2100 */ 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176,
+ /* 2115 */ 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590,
+ /* 2130 */ 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039,
+ /* 2145 */ 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807,
+ /* 2160 */ 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747,
+ /* 2175 */ 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2190 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2205 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367,
+ /* 2310 */ 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346,
+ /* 2325 */ 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311,
+ /* 2340 */ 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559,
+ /* 2355 */ 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703,
+ /* 2370 */ 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832,
+ /* 2385 */ 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621,
+ /* 2400 */ 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376,
+ /* 2415 */ 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393,
+ /* 2430 */ 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2445 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2460 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233,
+ /* 2565 */ 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327,
+ /* 2580 */ 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873,
+ /* 2595 */ 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543,
+ /* 2610 */ 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190,
+ /* 2625 */ 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753,
+ /* 2640 */ 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405,
+ /* 2655 */ 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312,
+ /* 2670 */ 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519,
+ /* 2685 */ 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2700 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2715 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008,
+ /* 2820 */ 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308,
+ /* 2835 */ 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127,
+ /* 2850 */ 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326,
+ /* 2865 */ 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661,
+ /* 2880 */ 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675,
+ /* 2895 */ 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681,
+ /* 2910 */ 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296,
+ /* 2925 */ 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437,
+ /* 2940 */ 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2955 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2970 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 2985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987,
+ /* 3075 */ 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138,
+ /* 3090 */ 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192,
+ /* 3105 */ 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714,
+ /* 3120 */ 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633,
+ /* 3135 */ 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892,
+ /* 3150 */ 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727,
+ /* 3165 */ 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963,
+ /* 3180 */ 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421,
+ /* 3195 */ 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836,
+ /* 3330 */ 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355,
+ /* 3345 */ 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535,
+ /* 3360 */ 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682,
+ /* 3375 */ 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217,
+ /* 3390 */ 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860,
+ /* 3405 */ 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979,
+ /* 3420 */ 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266,
+ /* 3435 */ 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805,
+ /* 3450 */ 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651,
+ /* 3585 */ 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281,
+ /* 3600 */ 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421,
+ /* 3615 */ 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782,
+ /* 3630 */ 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467,
+ /* 3645 */ 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152,
+ /* 3660 */ 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934,
+ /* 3675 */ 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239,
+ /* 3690 */ 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645,
+ /* 3705 */ 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3840 */ 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370,
+ /* 3855 */ 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211,
+ /* 3870 */ 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888,
+ /* 3885 */ 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855,
+ /* 3900 */ 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888,
+ /* 3915 */ 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518,
+ /* 3930 */ 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694,
+ /* 3945 */ 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701,
+ /* 3960 */ 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 3990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4095 */ 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211,
+ /* 4110 */ 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783,
+ /* 4125 */ 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888,
+ /* 4140 */ 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888,
+ /* 4155 */ 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750,
+ /* 4170 */ 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888,
+ /* 4185 */ 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018,
+ /* 4200 */ 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837,
+ /* 4215 */ 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590,
+ /* 4230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4350 */ 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921,
+ /* 4365 */ 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265,
+ /* 4380 */ 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520,
+ /* 4395 */ 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915,
+ /* 4410 */ 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223,
+ /* 4425 */ 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918,
+ /* 4440 */ 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052,
+ /* 4455 */ 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392,
+ /* 4470 */ 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590,
+ /* 4485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4605 */ 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888,
+ /* 4620 */ 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888,
+ /* 4635 */ 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888,
+ /* 4650 */ 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401,
+ /* 4665 */ 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401,
+ /* 4680 */ 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887,
+ /* 4695 */ 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889,
+ /* 4710 */ 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783,
+ /* 4725 */ 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590,
+ /* 4740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 4860 */ 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505,
+ /* 4875 */ 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654,
+ /* 4890 */ 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964,
+ /* 4905 */ 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279,
+ /* 4920 */ 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711,
+ /* 4935 */ 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831,
+ /* 4950 */ 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935,
+ /* 4965 */ 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222,
+ /* 4980 */ 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590,
+ /* 4995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5115 */ 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437,
+ /* 5130 */ 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649,
+ /* 5145 */ 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504,
+ /* 5160 */ 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527,
+ /* 5175 */ 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946,
+ /* 5190 */ 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156,
+ /* 5205 */ 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117,
+ /* 5220 */ 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796,
+ /* 5235 */ 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590,
+ /* 5250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5310 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5340 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5355 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5370 */ 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763,
+ /* 5385 */ 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880,
+ /* 5400 */ 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008,
+ /* 5415 */ 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504,
+ /* 5430 */ 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737,
+ /* 5445 */ 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481,
+ /* 5460 */ 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072,
+ /* 5475 */ 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232,
+ /* 5490 */ 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535,
+ /* 5505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5565 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5595 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5610 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5625 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173,
+ /* 5640 */ 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452,
+ /* 5655 */ 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999,
+ /* 5670 */ 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887,
+ /* 5685 */ 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730,
+ /* 5700 */ 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620,
+ /* 5715 */ 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056,
+ /* 5730 */ 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403,
+ /* 5745 */ 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505,
+ /* 5760 */ 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5820 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5850 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5865 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 5880 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008,
+ /* 5895 */ 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918,
+ /* 5910 */ 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658,
+ /* 5925 */ 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585,
+ /* 5940 */ 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176,
+ /* 5955 */ 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590,
+ /* 5970 */ 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039,
+ /* 5985 */ 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807,
+ /* 6000 */ 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747,
+ /* 6015 */ 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6075 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043,
+ /* 6150 */ 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346,
+ /* 6165 */ 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311,
+ /* 6180 */ 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559,
+ /* 6195 */ 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703,
+ /* 6210 */ 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832,
+ /* 6225 */ 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621,
+ /* 6240 */ 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376,
+ /* 6255 */ 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393,
+ /* 6270 */ 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6330 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6360 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6375 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233,
+ /* 6405 */ 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327,
+ /* 6420 */ 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873,
+ /* 6435 */ 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543,
+ /* 6450 */ 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190,
+ /* 6465 */ 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753,
+ /* 6480 */ 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405,
+ /* 6495 */ 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312,
+ /* 6510 */ 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519,
+ /* 6525 */ 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6585 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6600 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6615 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6630 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888,
+ /* 6660 */ 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401,
+ /* 6675 */ 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072,
+ /* 6690 */ 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211,
+ /* 6705 */ 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211,
+ /* 6720 */ 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211,
+ /* 6735 */ 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402,
+ /* 6750 */ 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447,
+ /* 6765 */ 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008,
+ /* 6780 */ 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6840 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6855 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6870 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6885 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 6900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059,
+ /* 6915 */ 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121,
+ /* 6930 */ 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211,
+ /* 6945 */ 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211,
+ /* 6960 */ 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086,
+ /* 6975 */ 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855,
+ /* 6990 */ 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080,
+ /* 7005 */ 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406,
+ /* 7020 */ 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516,
+ /* 7035 */ 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7095 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7110 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7125 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7140 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836,
+ /* 7170 */ 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211,
+ /* 7185 */ 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211,
+ /* 7200 */ 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211,
+ /* 7215 */ 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888,
+ /* 7230 */ 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888,
+ /* 7245 */ 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779,
+ /* 7260 */ 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833,
+ /* 7275 */ 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015,
+ /* 7290 */ 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7350 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7365 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7380 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7395 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339,
+ /* 7425 */ 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211,
+ /* 7440 */ 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211,
+ /* 7455 */ 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890,
+ /* 7470 */ 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888,
+ /* 7485 */ 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888,
+ /* 7500 */ 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211,
+ /* 7515 */ 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211,
+ /* 7530 */ 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760,
+ /* 7545 */ 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7605 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7620 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7635 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7650 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7680 */ 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211,
+ /* 7695 */ 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211,
+ /* 7710 */ 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888,
+ /* 7725 */ 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888,
+ /* 7740 */ 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888,
+ /* 7755 */ 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211,
+ /* 7770 */ 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890,
+ /* 7785 */ 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782,
+ /* 7800 */ 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7860 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7875 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7890 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7905 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7920 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 7935 */ 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211,
+ /* 7950 */ 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783,
+ /* 7965 */ 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888,
+ /* 7980 */ 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888,
+ /* 7995 */ 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750,
+ /* 8010 */ 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888,
+ /* 8025 */ 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018,
+ /* 8040 */ 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837,
+ /* 8055 */ 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590,
+ /* 8070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8115 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8130 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8160 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8175 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8190 */ 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890,
+ /* 8205 */ 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888,
+ /* 8220 */ 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888,
+ /* 8235 */ 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628,
+ /* 8250 */ 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401,
+ /* 8265 */ 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888,
+ /* 8280 */ 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868,
+ /* 8295 */ 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738,
+ /* 8310 */ 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590,
+ /* 8325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8340 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8355 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8370 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8385 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8400 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8415 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8430 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8445 */ 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888,
+ /* 8460 */ 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888,
+ /* 8475 */ 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888,
+ /* 8490 */ 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401,
+ /* 8505 */ 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401,
+ /* 8520 */ 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887,
+ /* 8535 */ 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889,
+ /* 8550 */ 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783,
+ /* 8565 */ 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590,
+ /* 8580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8595 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8610 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8625 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8640 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8655 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8670 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8685 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8700 */ 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330,
+ /* 8715 */ 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665,
+ /* 8730 */ 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952,
+ /* 8745 */ 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258,
+ /* 8760 */ 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617,
+ /* 8775 */ 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864,
+ /* 8790 */ 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143,
+ /* 8805 */ 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163,
+ /* 8820 */ 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590,
+ /* 8835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8850 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8865 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8880 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8895 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8910 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8925 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8940 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 8955 */ 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437,
+ /* 8970 */ 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649,
+ /* 8985 */ 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447,
+ /* 9000 */ 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527,
+ /* 9015 */ 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946,
+ /* 9030 */ 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156,
+ /* 9045 */ 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117,
+ /* 9060 */ 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796,
+ /* 9075 */ 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590,
+ /* 9090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9105 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9120 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9135 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9150 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9210 */ 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763,
+ /* 9225 */ 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880,
+ /* 9240 */ 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008,
+ /* 9255 */ 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504,
+ /* 9270 */ 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737,
+ /* 9285 */ 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481,
+ /* 9300 */ 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072,
+ /* 9315 */ 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232,
+ /* 9330 */ 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535,
+ /* 9345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9360 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9375 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9390 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9405 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067,
+ /* 9480 */ 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386,
+ /* 9495 */ 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401,
+ /* 9510 */ 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193,
+ /* 9525 */ 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552,
+ /* 9540 */ 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851,
+ /* 9555 */ 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889,
+ /* 9570 */ 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224,
+ /* 9585 */ 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659,
+ /* 9600 */ 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9615 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9630 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9645 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9660 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401,
+ /* 9735 */ 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401,
+ /* 9750 */ 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401,
+ /* 9765 */ 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484,
+ /* 9780 */ 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211,
+ /* 9795 */ 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187,
+ /* 9810 */ 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888,
+ /* 9825 */ 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828,
+ /* 9840 */ 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963,
+ /* 9855 */ 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9870 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9885 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9900 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9915 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 9975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185,
+ /* 9990 */ 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401,
+ /* 10005 */ 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358,
+ /* 10020 */ 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418,
+ /* 10035 */ 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540,
+ /* 10050 */ 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211,
+ /* 10065 */ 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659,
+ /* 10080 */ 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330,
+ /* 10095 */ 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419,
+ /* 10110 */ 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10125 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10140 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10155 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10170 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982,
+ /* 10245 */ 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462,
+ /* 10260 */ 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164,
+ /* 10275 */ 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211,
+ /* 10290 */ 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211,
+ /* 10305 */ 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607,
+ /* 10320 */ 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868,
+ /* 10335 */ 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086,
+ /* 10350 */ 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105,
+ /* 10365 */ 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10380 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10395 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10410 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10425 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10440 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057,
+ /* 10500 */ 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613,
+ /* 10515 */ 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344,
+ /* 10530 */ 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211,
+ /* 10545 */ 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799,
+ /* 10560 */ 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930,
+ /* 10575 */ 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085,
+ /* 10590 */ 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729,
+ /* 10605 */ 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189,
+ /* 10620 */ 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10635 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10650 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10665 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10680 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10695 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568,
+ /* 10755 */ 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121,
+ /* 10770 */ 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619,
+ /* 10785 */ 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211,
+ /* 10800 */ 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086,
+ /* 10815 */ 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855,
+ /* 10830 */ 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080,
+ /* 10845 */ 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406,
+ /* 10860 */ 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516,
+ /* 10875 */ 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10890 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10905 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10920 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10935 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10950 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 10995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836,
+ /* 11010 */ 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211,
+ /* 11025 */ 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211,
+ /* 11040 */ 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211,
+ /* 11055 */ 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888,
+ /* 11070 */ 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986,
+ /* 11085 */ 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500,
+ /* 11100 */ 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356,
+ /* 11115 */ 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015,
+ /* 11130 */ 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11160 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11175 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11190 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11205 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339,
+ /* 11265 */ 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989,
+ /* 11280 */ 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211,
+ /* 11295 */ 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890,
+ /* 11310 */ 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888,
+ /* 11325 */ 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888,
+ /* 11340 */ 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211,
+ /* 11355 */ 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211,
+ /* 11370 */ 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760,
+ /* 11385 */ 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11400 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11415 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11430 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11445 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11460 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11520 */ 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601,
+ /* 11535 */ 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260,
+ /* 11550 */ 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261,
+ /* 11565 */ 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488,
+ /* 11580 */ 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248,
+ /* 11595 */ 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490,
+ /* 11610 */ 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274,
+ /* 11625 */ 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782,
+ /* 11640 */ 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11655 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11670 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11685 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11700 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11715 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11775 */ 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211,
+ /* 11790 */ 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783,
+ /* 11805 */ 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888,
+ /* 11820 */ 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888,
+ /* 11835 */ 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750,
+ /* 11850 */ 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888,
+ /* 11865 */ 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018,
+ /* 11880 */ 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837,
+ /* 11895 */ 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590,
+ /* 11910 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11925 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11940 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11955 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11970 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 11985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12030 */ 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261,
+ /* 12045 */ 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888,
+ /* 12060 */ 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888,
+ /* 12075 */ 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628,
+ /* 12090 */ 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401,
+ /* 12105 */ 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895,
+ /* 12120 */ 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371,
+ /* 12135 */ 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738,
+ /* 12150 */ 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590,
+ /* 12165 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12180 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12195 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12210 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12225 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12285 */ 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678,
+ /* 12300 */ 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888,
+ /* 12315 */ 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217,
+ /* 12330 */ 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401,
+ /* 12345 */ 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401,
+ /* 12360 */ 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473,
+ /* 12375 */ 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889,
+ /* 12390 */ 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783,
+ /* 12405 */ 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590,
+ /* 12420 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12435 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12450 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12465 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12480 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12540 */ 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837,
+ /* 12555 */ 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888,
+ /* 12570 */ 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523,
+ /* 12585 */ 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938,
+ /* 12600 */ 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574,
+ /* 12615 */ 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016,
+ /* 12630 */ 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835,
+ /* 12645 */ 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181,
+ /* 12660 */ 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590,
+ /* 12675 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12690 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12705 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12720 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12735 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12795 */ 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888,
+ /* 12810 */ 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334,
+ /* 12825 */ 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437,
+ /* 12840 */ 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497,
+ /* 12855 */ 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401,
+ /* 12870 */ 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401,
+ /* 12885 */ 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211,
+ /* 12900 */ 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851,
+ /* 12915 */ 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590,
+ /* 12930 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12945 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12960 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12975 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 12990 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13050 */ 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000,
+ /* 13065 */ 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888,
+ /* 13080 */ 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401,
+ /* 13095 */ 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058,
+ /* 13110 */ 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144,
+ /* 13125 */ 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401,
+ /* 13140 */ 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211,
+ /* 13155 */ 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856,
+ /* 13170 */ 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951,
+ /* 13185 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13200 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13215 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13230 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13245 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074,
+ /* 13320 */ 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619,
+ /* 13335 */ 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401,
+ /* 13350 */ 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401,
+ /* 13365 */ 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756,
+ /* 13380 */ 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017,
+ /* 13395 */ 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889,
+ /* 13410 */ 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017,
+ /* 13425 */ 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659,
+ /* 13440 */ 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13455 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13470 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13485 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13500 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367,
+ /* 13575 */ 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572,
+ /* 13590 */ 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764,
+ /* 13605 */ 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942,
+ /* 13620 */ 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211,
+ /* 13635 */ 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590,
+ /* 13650 */ 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888,
+ /* 13665 */ 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123,
+ /* 13680 */ 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963,
+ /* 13695 */ 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13710 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13725 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13740 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13755 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097,
+ /* 13830 */ 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442,
+ /* 13845 */ 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775,
+ /* 13860 */ 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284,
+ /* 13875 */ 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679,
+ /* 13890 */ 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211,
+ /* 13905 */ 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659,
+ /* 13920 */ 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853,
+ /* 13935 */ 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419,
+ /* 13950 */ 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13965 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13980 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 13995 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14010 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113,
+ /* 14085 */ 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413,
+ /* 14100 */ 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164,
+ /* 14115 */ 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211,
+ /* 14130 */ 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890,
+ /* 14145 */ 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211,
+ /* 14160 */ 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123,
+ /* 14175 */ 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086,
+ /* 14190 */ 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105,
+ /* 14205 */ 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14220 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14235 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14250 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14265 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14280 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14295 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14310 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14325 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782,
+ /* 14340 */ 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154,
+ /* 14355 */ 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666,
+ /* 14370 */ 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211,
+ /* 14385 */ 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739,
+ /* 14400 */ 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778,
+ /* 14415 */ 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402,
+ /* 14430 */ 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447,
+ /* 14445 */ 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008,
+ /* 14460 */ 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14475 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14490 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14505 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14520 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14535 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14550 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14565 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14580 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059,
+ /* 14595 */ 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121,
+ /* 14610 */ 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211,
+ /* 14625 */ 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211,
+ /* 14640 */ 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086,
+ /* 14655 */ 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855,
+ /* 14670 */ 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016,
+ /* 14685 */ 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406,
+ /* 14700 */ 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516,
+ /* 14715 */ 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14730 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14745 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14760 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14775 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14790 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14805 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14820 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14835 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836,
+ /* 14850 */ 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211,
+ /* 14865 */ 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211,
+ /* 14880 */ 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211,
+ /* 14895 */ 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888,
+ /* 14910 */ 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888,
+ /* 14925 */ 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212,
+ /* 14940 */ 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833,
+ /* 14955 */ 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015,
+ /* 14970 */ 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 14985 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15000 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15015 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15030 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15045 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15060 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15075 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15090 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893,
+ /* 15105 */ 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064,
+ /* 15120 */ 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211,
+ /* 15135 */ 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890,
+ /* 15150 */ 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888,
+ /* 15165 */ 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888,
+ /* 15180 */ 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211,
+ /* 15195 */ 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211,
+ /* 15210 */ 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760,
+ /* 15225 */ 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15240 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15255 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15270 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15285 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15300 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15315 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15330 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15345 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15360 */ 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211,
+ /* 15375 */ 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100,
+ /* 15390 */ 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888,
+ /* 15405 */ 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888,
+ /* 15420 */ 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888,
+ /* 15435 */ 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346,
+ /* 15450 */ 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890,
+ /* 15465 */ 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782,
+ /* 15480 */ 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15495 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15510 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15525 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15540 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15555 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15570 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15585 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15600 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15615 */ 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189,
+ /* 15630 */ 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033,
+ /* 15645 */ 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251,
+ /* 15660 */ 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940,
+ /* 15675 */ 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531,
+ /* 15690 */ 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551,
+ /* 15705 */ 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209,
+ /* 15720 */ 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816,
+ /* 15735 */ 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590,
+ /* 15750 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15765 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15780 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15795 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15810 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15825 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15840 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15855 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 15870 */ 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921,
+ /* 15885 */ 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265,
+ /* 15900 */ 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520,
+ /* 15915 */ 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915,
+ /* 15930 */ 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223,
+ /* 15945 */ 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918,
+ /* 15960 */ 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052,
+ /* 15975 */ 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392,
+ /* 15990 */ 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590,
+ /* 16005 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16020 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16035 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16050 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16065 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16080 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16095 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16110 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16125 */ 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349,
+ /* 16140 */ 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006,
+ /* 16155 */ 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497,
+ /* 16170 */ 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418,
+ /* 16185 */ 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473,
+ /* 16200 */ 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731,
+ /* 16215 */ 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706,
+ /* 16230 */ 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642,
+ /* 16245 */ 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590,
+ /* 16260 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16275 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16290 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16305 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16320 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16335 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16350 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16365 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16380 */ 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330,
+ /* 16395 */ 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665,
+ /* 16410 */ 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952,
+ /* 16425 */ 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258,
+ /* 16440 */ 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617,
+ /* 16455 */ 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864,
+ /* 16470 */ 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143,
+ /* 16485 */ 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163,
+ /* 16500 */ 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590,
+ /* 16515 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16530 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16545 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16560 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16575 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16590 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16605 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16620 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16635 */ 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888,
+ /* 16650 */ 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888,
+ /* 16665 */ 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036,
+ /* 16680 */ 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401,
+ /* 16695 */ 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401,
+ /* 16710 */ 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401,
+ /* 16725 */ 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211,
+ /* 16740 */ 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741,
+ /* 16755 */ 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590,
+ /* 16770 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16785 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16800 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16815 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16830 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16845 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16860 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16875 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 16890 */ 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595,
+ /* 16905 */ 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880,
+ /* 16920 */ 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008,
+ /* 16935 */ 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504,
+ /* 16950 */ 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737,
+ /* 16965 */ 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481,
+ /* 16980 */ 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072,
+ /* 16995 */ 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232,
+ /* 17010 */ 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535,
+ /* 17025 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17040 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17055 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17070 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17085 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17100 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17115 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17130 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590,
+ /* 17145 */ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538,
+ /* 17162 */ 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592,
+ /* 17174 */ 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352,
+ /* 17191 */ 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17202 */ 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744,
+ /* 17213 */ 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0,
+ /* 17226 */ 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592,
+ /* 17246 */ 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088,
+ /* 17257 */ 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17268 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592,
+ /* 17279 */ 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744,
+ /* 17290 */ 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984,
+ /* 17301 */ 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592,
+ /* 17312 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17323 */ 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17334 */ 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280,
+ /* 17345 */ 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592,
+ /* 17356 */ 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0,
+ /* 17371 */ 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0,
+ /* 17395 */ 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744,
+ /* 17406 */ 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877,
+ /* 17419 */ 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920,
+ /* 17431 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0,
+ /* 17447 */ 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17458 */ 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0,
+ /* 17475 */ 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592,
+ /* 17488 */ 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312,
+ /* 17499 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592,
+ /* 17510 */ 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592,
+ /* 17521 */ 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17532 */ 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664,
+ /* 17543 */ 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17554 */ 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744,
+ /* 17565 */ 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0,
+ /* 17578 */ 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 17599 */ 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592,
+ /* 17615 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632,
+ /* 17626 */ 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592,
+ /* 17637 */ 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744,
+ /* 17648 */ 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744,
+ /* 17662 */ 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17673 */ 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744,
+ /* 17684 */ 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0,
+ /* 17697 */ 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17709 */ 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17720 */ 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744,
+ /* 17731 */ 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592,
+ /* 17750 */ 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744,
+ /* 17761 */ 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0,
+ /* 17778 */ 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17792 */ 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0,
+ /* 17805 */ 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0,
+ /* 17820 */ 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 17831 */ 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744,
+ /* 17842 */ 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592,
+ /* 17853 */ 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592,
+ /* 17864 */ 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592,
+ /* 17875 */ 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424,
+ /* 17886 */ 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744,
+ /* 17897 */ 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17908 */ 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592,
+ /* 17924 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232,
+ /* 17935 */ 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 17946 */ 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0,
+ /* 17967 */ 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744,
+ /* 17980 */ 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744,
+ /* 17991 */ 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45,
+ /* 18014 */ 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592,
+ /* 18030 */ 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592,
+ /* 18042 */ 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128,
+ /* 18053 */ 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18065 */ 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736,
+ /* 18076 */ 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192,
+ /* 18087 */ 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744,
+ /* 18106 */ 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768,
+ /* 18118 */ 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744,
+ /* 18129 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544,
+ /* 18143 */ 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592,
+ /* 18154 */ 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0,
+ /* 18169 */ 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768,
+ /* 18183 */ 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97,
+ /* 18205 */ 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592,
+ /* 18218 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520,
+ /* 18229 */ 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640,
+ /* 18240 */ 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728,
+ /* 18251 */ 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592,
+ /* 18262 */ 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744,
+ /* 18273 */ 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592,
+ /* 18284 */ 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592,
+ /* 18300 */ 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592,
+ /* 18311 */ 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18322 */ 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744,
+ /* 18333 */ 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877,
+ /* 18344 */ 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877,
+ /* 18359 */ 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730,
+ /* 18372 */ 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744,
+ /* 18383 */ 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744,
+ /* 18394 */ 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592,
+ /* 18407 */ 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592,
+ /* 18419 */ 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744,
+ /* 18430 */ 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672,
+ /* 18443 */ 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0,
+ /* 18460 */ 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 18485 */ 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592,
+ /* 18499 */ 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592,
+ /* 18512 */ 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752,
+ /* 18525 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592,
+ /* 18538 */ 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0,
+ /* 18554 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0,
+ /* 18567 */ 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18,
+ /* 18581 */ 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18,
+ /* 18597 */ 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0,
+ /* 18621 */ 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736,
+ /* 18633 */ 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592,
+ /* 18650 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 18661 */ 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592,
+ /* 18672 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592,
+ /* 18683 */ 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592,
+ /* 18694 */ 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592,
+ /* 18712 */ 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0,
+ /* 18729 */ 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592,
+ /* 18742 */ 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 18755 */ 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27,
+ /* 18769 */ 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24,
+ /* 18788 */ 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592,
+ /* 18808 */ 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528,
+ /* 18819 */ 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0,
+ /* 18836 */ 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97,
+ /* 18860 */ 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0,
+ /* 18886 */ 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0,
+ /* 18911 */ 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576,
+ /* 18925 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744,
+ /* 18936 */ 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744,
+ /* 18956 */ 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730,
+ /* 18975 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 18986 */ 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592,
+ /* 19003 */ 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 19014 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18,
+ /* 19026 */ 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0,
+ /* 19044 */ 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550,
+ /* 19060 */ 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976,
+ /* 19073 */ 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538,
+ /* 19092 */ 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0,
+ /* 19113 */ 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 19127 */ 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0,
+ /* 19149 */ 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144,
+ /* 19162 */ 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744,
+ /* 19173 */ 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97,
+ /* 19196 */ 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0,
+ /* 19221 */ 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744,
+ /* 19239 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884,
+ /* 19252 */ 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0,
+ /* 19272 */ 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968,
+ /* 19291 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0,
+ /* 19308 */ 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45,
+ /* 19332 */ 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45,
+ /* 19357 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67,
+ /* 19383 */ 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531,
+ /* 19403 */ 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45,
+ /* 19430 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 19455 */ 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67,
+ /* 19479 */ 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773,
+ /* 19504 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877,
+ /* 19515 */ 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 19535 */ 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97,
+ /* 19560 */ 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67,
+ /* 19585 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97,
+ /* 19610 */ 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0,
+ /* 19636 */ 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97,
+ /* 19663 */ 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 19690 */ 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67,
+ /* 19714 */ 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97,
+ /* 19739 */ 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67,
+ /* 19764 */ 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 19791 */ 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67,
+ /* 19816 */ 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97,
+ /* 19844 */ 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97,
+ /* 19871 */ 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0,
+ /* 19894 */ 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0,
+ /* 19919 */ 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 19935 */ 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67,
+ /* 19947 */ 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97,
+ /* 19970 */ 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67,
+ /* 19996 */ 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45,
+ /* 20021 */ 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97,
+ /* 20046 */ 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97,
+ /* 20071 */ 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 20096 */ 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0,
+ /* 20115 */ 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18,
+ /* 20133 */ 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97,
+ /* 20158 */ 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97,
+ /* 20182 */ 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730,
+ /* 20204 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602,
+ /* 20215 */ 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106,
+ /* 20226 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730,
+ /* 20237 */ 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730,
+ /* 20248 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744,
+ /* 20259 */ 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548,
+ /* 20275 */ 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877,
+ /* 20288 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 20305 */ 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 20316 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877,
+ /* 20327 */ 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453,
+ /* 20338 */ 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730,
+ /* 20350 */ 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20361 */ 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20372 */ 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877,
+ /* 20389 */ 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613,
+ /* 20400 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730,
+ /* 20411 */ 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20422 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877,
+ /* 20433 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611,
+ /* 20450 */ 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730,
+ /* 20470 */ 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20481 */ 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20492 */ 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20503 */ 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498,
+ /* 20514 */ 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730,
+ /* 20525 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744,
+ /* 20536 */ 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744,
+ /* 20547 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941,
+ /* 20561 */ 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877,
+ /* 20572 */ 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877,
+ /* 20583 */ 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877,
+ /* 20595 */ 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986,
+ /* 20606 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730,
+ /* 20617 */ 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20628 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730,
+ /* 20639 */ 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20650 */ 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730,
+ /* 20661 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290,
+ /* 20672 */ 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744,
+ /* 20683 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744,
+ /* 20694 */ 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877,
+ /* 20705 */ 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877,
+ /* 20716 */ 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877,
+ /* 20727 */ 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946,
+ /* 20738 */ 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744,
+ /* 20749 */ 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744,
+ /* 20762 */ 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20773 */ 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877,
+ /* 20784 */ 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877,
+ /* 20795 */ 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45,
+ /* 20818 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877,
+ /* 20836 */ 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357,
+ /* 20847 */ 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20858 */ 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517,
+ /* 20869 */ 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18,
+ /* 20883 */ 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730,
+ /* 20894 */ 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730,
+ /* 20905 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 20916 */ 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20927 */ 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744,
+ /* 20938 */ 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693,
+ /* 20949 */ 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20960 */ 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 20971 */ 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821,
+ /* 20983 */ 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97,
+ /* 21005 */ 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97,
+ /* 21029 */ 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 21043 */ 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877,
+ /* 21054 */ 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205,
+ /* 21065 */ 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730,
+ /* 21076 */ 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866,
+ /* 21087 */ 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730,
+ /* 21098 */ 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744,
+ /* 21109 */ 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685,
+ /* 21120 */ 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730,
+ /* 21133 */ 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730,
+ /* 21144 */ 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629,
+ /* 21155 */ 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730,
+ /* 21166 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744,
+ /* 21177 */ 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744,
+ /* 21188 */ 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744,
+ /* 21199 */ 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744,
+ /* 21210 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877,
+ /* 21221 */ 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730,
+ /* 21233 */ 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744,
+ /* 21244 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825,
+ /* 21258 */ 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744,
+ /* 21269 */ 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080,
+ /* 21286 */ 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877,
+ /* 21299 */ 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730,
+ /* 21310 */ 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528,
+ /* 21321 */ 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877,
+ /* 21334 */ 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554,
+ /* 21346 */ 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730,
+ /* 21357 */ 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730,
+ /* 21368 */ 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962,
+ /* 21381 */ 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658,
+ /* 21394 */ 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730,
+ /* 21407 */ 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0,
+ /* 21419 */ 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0,
+ /* 21434 */ 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0,
+ /* 21459 */ 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45,
+ /* 21484 */ 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592,
+ /* 21506 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880,
+ /* 21518 */ 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592,
+ /* 21541 */ 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24,
+ /* 21556 */ 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744,
+ /* 21569 */ 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0,
+ /* 21589 */ 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0,
+ /* 21616 */ 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592,
+ /* 21632 */ 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538,
+ /* 21647 */ 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512,
+ /* 21666 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884,
+ /* 21684 */ 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143,
+ /* 21703 */ 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126,
+ /* 21723 */ 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592,
+ /* 21740 */ 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27,
+ /* 21759 */ 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242,
+ /* 21776 */ 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538,
+ /* 21794 */ 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18,
+ /* 21815 */ 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143,
+ /* 21835 */ 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439,
+ /* 21853 */ 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0,
+ /* 21875 */ 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 21889 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592,
+ /* 21900 */ 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592,
+ /* 21916 */ 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0,
+ /* 21936 */ 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592,
+ /* 21949 */ 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592,
+ /* 21960 */ 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480,
+ /* 21977 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884,
+ /* 21995 */ 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078,
+ /* 22013 */ 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592,
+ /* 22032 */ 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968,
+ /* 22043 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0,
+ /* 22060 */ 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45,
+ /* 22083 */ 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45,
+ /* 22107 */ 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0,
+ /* 22131 */ 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45,
+ /* 22156 */ 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 22180 */ 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0,
+ /* 22208 */ 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45,
+ /* 22234 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0,
+ /* 22257 */ 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97,
+ /* 22282 */ 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694,
+ /* 22307 */ 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18,
+ /* 22326 */ 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24,
+ /* 22344 */ 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0,
+ /* 22363 */ 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538,
+ /* 22380 */ 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0,
+ /* 22398 */ 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976,
+ /* 22415 */ 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078,
+ /* 22433 */ 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127,
+ /* 22457 */ 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877,
+ /* 22473 */ 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22484 */ 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22495 */ 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 22506 */ 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24,
+ /* 22521 */ 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592,
+ /* 22545 */ 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45,
+ /* 22571 */ 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45,
+ /* 22596 */ 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22617 */ 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22634 */ 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101,
+ /* 22653 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884,
+ /* 22671 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27,
+ /* 22689 */ 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22707 */ 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22724 */ 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107,
+ /* 22743 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884,
+ /* 22761 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27,
+ /* 22779 */ 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22797 */ 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22814 */ 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113,
+ /* 22833 */ 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884,
+ /* 22851 */ 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27,
+ /* 22869 */ 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38,
+ /* 22887 */ 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538,
+ /* 22904 */ 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820,
+ /* 22921 */ 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0,
+ /* 22945 */ 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0,
+ /* 22972 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0,
+ /* 22997 */ 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45,
+ /* 23019 */ 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97,
+ /* 23042 */ 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646,
+ /* 23067 */ 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 23092 */ 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23118 */ 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793,
+ /* 23143 */ 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0,
+ /* 23170 */ 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074,
+ /* 23193 */ 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97,
+ /* 23218 */ 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97,
+ /* 23244 */ 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45,
+ /* 23269 */ 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45,
+ /* 23294 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 23320 */ 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97,
+ /* 23346 */ 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45,
+ /* 23369 */ 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67,
+ /* 23393 */ 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97,
+ /* 23418 */ 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45,
+ /* 23444 */ 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45,
+ /* 23469 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23495 */ 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67,
+ /* 23521 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23547 */ 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592,
+ /* 23572 */ 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97,
+ /* 23594 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373,
+ /* 23619 */ 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45,
+ /* 23644 */ 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407,
+ /* 23669 */ 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67,
+ /* 23694 */ 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67,
+ /* 23719 */ 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97,
+ /* 23745 */ 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67,
+ /* 23770 */ 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600,
+ /* 23794 */ 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 23819 */ 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0,
+ /* 23845 */ 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45,
+ /* 23872 */ 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97,
+ /* 23898 */ 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45,
+ /* 23924 */ 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112,
+ /* 23948 */ 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97,
+ /* 23974 */ 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 23999 */ 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97,
+ /* 24027 */ 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374,
+ /* 24053 */ 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45,
+ /* 24079 */ 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0,
+ /* 24104 */ 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67,
+ /* 24129 */ 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0,
+ /* 24155 */ 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45,
+ /* 24179 */ 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97,
+ /* 24203 */ 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139,
+ /* 24228 */ 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457,
+ /* 24253 */ 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67,
+ /* 24278 */ 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579,
+ /* 24303 */ 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67,
+ /* 24329 */ 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67,
+ /* 24354 */ 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97,
+ /* 24380 */ 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97,
+ /* 24405 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67,
+ /* 24431 */ 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 24456 */ 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0,
+ /* 24481 */ 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97,
+ /* 24506 */ 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 24531 */ 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97,
+ /* 24557 */ 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0,
+ /* 24582 */ 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 24607 */ 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45,
+ /* 24631 */ 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45,
+ /* 24655 */ 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45,
+ /* 24680 */ 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67,
+ /* 24705 */ 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67,
+ /* 24730 */ 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97,
+ /* 24755 */ 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97,
+ /* 24780 */ 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45,
+ /* 24805 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67,
+ /* 24830 */ 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179,
+ /* 24855 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 24880 */ 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034,
+ /* 24905 */ 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67,
+ /* 24930 */ 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97,
+ /* 24956 */ 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97,
+ /* 24983 */ 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67,
+ /* 25009 */ 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67,
+ /* 25034 */ 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146,
+ /* 25057 */ 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0,
+ /* 25081 */ 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97,
+ /* 25104 */ 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67,
+ /* 25129 */ 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648,
+ /* 25154 */ 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67,
+ /* 25178 */ 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45,
+ /* 25204 */ 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45,
+ /* 25229 */ 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67,
+ /* 25254 */ 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67,
+ /* 25279 */ 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67,
+ /* 25303 */ 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802,
+ /* 25328 */ 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67,
+ /* 25353 */ 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838,
+ /* 25374 */ 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45,
+ /* 25399 */ 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97,
+ /* 25424 */ 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97,
+ /* 25449 */ 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0,
+ /* 25474 */ 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199,
+ /* 25499 */ 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877,
+ /* 25523 */ 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877,
+ /* 25534 */ 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877,
+ /* 25545 */ 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730,
+ /* 25557 */ 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45,
+ /* 25581 */ 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67,
+ /* 25606 */ 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0,
+ /* 25630 */ 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113,
+ /* 25650 */ 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 25676 */ 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97,
+ /* 25701 */ 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 25727 */ 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45,
+ /* 25752 */ 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45,
+ /* 25777 */ 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67,
+ /* 25802 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67,
+ /* 25827 */ 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 25852 */ 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97,
+ /* 25876 */ 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97,
+ /* 25901 */ 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97,
+ /* 25926 */ 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67,
+ /* 25951 */ 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97,
+ /* 25976 */ 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 26001 */ 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788,
+ /* 26025 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0,
+ /* 26048 */ 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45,
+ /* 26073 */ 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97,
+ /* 26097 */ 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0,
+ /* 26123 */ 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97,
+ /* 26149 */ 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97,
+ /* 26173 */ 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658,
+ /* 26198 */ 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669,
+ /* 26223 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67,
+ /* 26248 */ 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67,
+ /* 26273 */ 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45,
+ /* 26299 */ 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97,
+ /* 26324 */ 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45,
+ /* 26349 */ 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67,
+ /* 26374 */ 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 26399 */ 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97,
+ /* 26426 */ 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45,
+ /* 26451 */ 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67,
+ /* 26474 */ 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97,
+ /* 26498 */ 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45,
+ /* 26524 */ 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97,
+ /* 26548 */ 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0,
+ /* 26573 */ 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45,
+ /* 26595 */ 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67,
+ /* 26620 */ 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287,
+ /* 26646 */ 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376,
+ /* 26671 */ 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67,
+ /* 26697 */ 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97,
+ /* 26721 */ 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97,
+ /* 26746 */ 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45,
+ /* 26772 */ 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97,
+ /* 26797 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 26823 */ 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97,
+ /* 26848 */ 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45,
+ /* 26874 */ 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45,
+ /* 26899 */ 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45,
+ /* 26926 */ 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97,
+ /* 26951 */ 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67,
+ /* 26975 */ 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132,
+ /* 27000 */ 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45,
+ /* 27023 */ 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97,
+ /* 27047 */ 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27072 */ 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0,
+ /* 27096 */ 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27115 */ 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918,
+ /* 27140 */ 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45,
+ /* 27166 */ 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45,
+ /* 27191 */ 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67,
+ /* 27216 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27242 */ 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45,
+ /* 27267 */ 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27292 */ 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27317 */ 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67,
+ /* 27341 */ 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97,
+ /* 27366 */ 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45,
+ /* 27391 */ 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27417 */ 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67,
+ /* 27442 */ 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351,
+ /* 27466 */ 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 27492 */ 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205,
+ /* 27517 */ 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67,
+ /* 27544 */ 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18,
+ /* 27568 */ 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67,
+ /* 27593 */ 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67,
+ /* 27618 */ 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67,
+ /* 27642 */ 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45,
+ /* 27668 */ 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97,
+ /* 27693 */ 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45,
+ /* 27720 */ 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0,
+ /* 27744 */ 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544,
+ /* 27769 */ 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45,
+ /* 27794 */ 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45,
+ /* 27819 */ 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45,
+ /* 27844 */ 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27870 */ 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589,
+ /* 27895 */ 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67,
+ /* 27922 */ 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67,
+ /* 27945 */ 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97,
+ /* 27972 */ 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 27997 */ 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0,
+ /* 28023 */ 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124,
+ /* 28048 */ 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156,
+ /* 28072 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0,
+ /* 28098 */ 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45,
+ /* 28124 */ 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28149 */ 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45,
+ /* 28173 */ 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67,
+ /* 28197 */ 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97,
+ /* 28221 */ 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45,
+ /* 28246 */ 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45,
+ /* 28270 */ 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45,
+ /* 28294 */ 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67,
+ /* 28318 */ 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67,
+ /* 28343 */ 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67,
+ /* 28367 */ 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97,
+ /* 28394 */ 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 28419 */ 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45,
+ /* 28443 */ 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28467 */ 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67,
+ /* 28492 */ 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67,
+ /* 28517 */ 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67,
+ /* 28542 */ 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 28568 */ 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97,
+ /* 28593 */ 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861,
+ /* 28617 */ 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45,
+ /* 28642 */ 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883,
+ /* 28668 */ 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592,
+ /* 28688 */ 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97,
+ /* 28711 */ 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67,
+ /* 28737 */ 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809,
+ /* 28759 */ 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45,
+ /* 28784 */ 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28810 */ 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764,
+ /* 28835 */ 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97,
+ /* 28859 */ 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97,
+ /* 28884 */ 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45,
+ /* 28908 */ 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67,
+ /* 28933 */ 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 28957 */ 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67,
+ /* 28982 */ 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67,
+ /* 29007 */ 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97,
+ /* 29028 */ 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97,
+ /* 29053 */ 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97,
+ /* 29079 */ 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 29105 */ 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67,
+ /* 29131 */ 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794,
+ /* 29157 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97,
+ /* 29182 */ 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97,
+ /* 29208 */ 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67,
+ /* 29234 */ 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0,
+ /* 29259 */ 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97,
+ /* 29285 */ 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97,
+ /* 29309 */ 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67,
+ /* 29333 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431,
+ /* 29358 */ 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67,
+ /* 29382 */ 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 29408 */ 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97,
+ /* 29433 */ 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060,
+ /* 29458 */ 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67,
+ /* 29483 */ 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67,
+ /* 29508 */ 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45,
+ /* 29533 */ 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67,
+ /* 29558 */ 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921,
+ /* 29582 */ 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97,
+ /* 29608 */ 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45,
+ /* 29633 */ 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0,
+ /* 29658 */ 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45,
+ /* 29682 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 29708 */ 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67,
+ /* 29732 */ 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105,
+ /* 29758 */ 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97,
+ /* 29784 */ 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67,
+ /* 29810 */ 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97,
+ /* 29836 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45,
+ /* 29862 */ 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 29887 */ 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092,
+ /* 29912 */ 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97,
+ /* 29937 */ 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97,
+ /* 29962 */ 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97,
+ /* 29989 */ 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45,
+ /* 30014 */ 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0,
+ /* 30039 */ 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97,
+ /* 30066 */ 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0,
+ /* 30091 */ 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774,
+ /* 30115 */ 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45,
+ /* 30138 */ 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45,
+ /* 30163 */ 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45,
+ /* 30188 */ 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67,
+ /* 30213 */ 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937,
+ /* 30238 */ 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67,
+ /* 30264 */ 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97,
+ /* 30288 */ 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67,
+ /* 30314 */ 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347,
+ /* 30339 */ 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 30365 */ 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007,
+ /* 30388 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67,
+ /* 30414 */ 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 30439 */ 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45,
+ /* 30463 */ 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67,
+ /* 30488 */ 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0,
+ /* 30513 */ 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67,
+ /* 30537 */ 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67,
+ /* 30563 */ 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97,
+ /* 30587 */ 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97,
+ /* 30612 */ 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592,
+ /* 30635 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080,
+ /* 30646 */ 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744,
+ /* 30657 */ 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 30681 */ 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67,
+ /* 30706 */ 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67,
+ /* 30731 */ 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67,
+ /* 30756 */ 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352,
+ /* 30778 */ 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0,
+ /* 30802 */ 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97,
+ /* 30828 */ 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97,
+ /* 30854 */ 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67,
+ /* 30879 */ 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97,
+ /* 30904 */ 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67,
+ /* 30929 */ 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0,
+ /* 30955 */ 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0,
+ /* 30980 */ 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67,
+ /* 31004 */ 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 31030 */ 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67,
+ /* 31055 */ 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162,
+ /* 31078 */ 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0,
+ /* 31103 */ 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259,
+ /* 31127 */ 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97,
+ /* 31150 */ 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97,
+ /* 31175 */ 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97,
+ /* 31201 */ 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67,
+ /* 31227 */ 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45,
+ /* 31252 */ 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45,
+ /* 31277 */ 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45,
+ /* 31302 */ 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67,
+ /* 31328 */ 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018,
+ /* 31353 */ 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074,
+ /* 31375 */ 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365,
+ /* 31399 */ 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97,
+ /* 31423 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 31449 */ 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 31476 */ 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130,
+ /* 31500 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0,
+ /* 31527 */ 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45,
+ /* 31554 */ 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 31579 */ 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921,
+ /* 31604 */ 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45,
+ /* 31630 */ 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45,
+ /* 31655 */ 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18,
+ /* 31680 */ 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45,
+ /* 31705 */ 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67,
+ /* 31729 */ 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97,
+ /* 31755 */ 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97,
+ /* 31782 */ 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45,
+ /* 31808 */ 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67,
+ /* 31832 */ 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97,
+ /* 31857 */ 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97,
+ /* 31884 */ 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0,
+ /* 31910 */ 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044,
+ /* 31935 */ 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 31962 */ 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97,
+ /* 31986 */ 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367,
+ /* 32010 */ 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45,
+ /* 32035 */ 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 32061 */ 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277,
+ /* 32085 */ 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97,
+ /* 32110 */ 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97,
+ /* 32135 */ 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327,
+ /* 32161 */ 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97,
+ /* 32187 */ 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0,
+ /* 32212 */ 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158,
+ /* 32235 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225,
+ /* 32260 */ 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97,
+ /* 32284 */ 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112,
+ /* 32307 */ 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0,
+ /* 32332 */ 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67,
+ /* 32356 */ 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97,
+ /* 32380 */ 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45,
+ /* 32405 */ 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27,
+ /* 32431 */ 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45,
+ /* 32456 */ 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67,
+ /* 32480 */ 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67,
+ /* 32505 */ 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67,
+ /* 32529 */ 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97,
+ /* 32554 */ 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97,
+ /* 32579 */ 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45,
+ /* 32605 */ 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45,
+ /* 32630 */ 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45,
+ /* 32655 */ 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67,
+ /* 32680 */ 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67,
+ /* 32704 */ 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112,
+ /* 32728 */ 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97,
+ /* 32752 */ 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 32778 */ 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940,
+ /* 32804 */ 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45,
+ /* 32829 */ 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45,
+ /* 32855 */ 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67,
+ /* 32880 */ 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97,
+ /* 32904 */ 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67,
+ /* 32928 */ 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074,
+ /* 32952 */ 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 32968 */ 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97,
+ /* 32983 */ 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97,
+ /* 33007 */ 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0,
+ /* 33032 */ 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97,
+ /* 33057 */ 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67,
+ /* 33082 */ 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67,
+ /* 33106 */ 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97,
+ /* 33132 */ 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97,
+ /* 33158 */ 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67,
+ /* 33183 */ 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0,
+ /* 33209 */ 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 33232 */ 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67,
+ /* 33257 */ 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97,
+ /* 33282 */ 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97,
+ /* 33307 */ 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45,
+ /* 33332 */ 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67,
+ /* 33357 */ 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67,
+ /* 33382 */ 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562,
+ /* 33407 */ 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97,
+ /* 33432 */ 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 33457 */ 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45,
+ /* 33481 */ 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67,
+ /* 33506 */ 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 33532 */ 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280,
+ /* 33556 */ 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67,
+ /* 33580 */ 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97,
+ /* 33605 */ 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161,
+ /* 33629 */ 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97,
+ /* 33654 */ 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67,
+ /* 33679 */ 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67,
+ /* 33704 */ 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97,
+ /* 33729 */ 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45,
+ /* 33755 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97,
+ /* 33780 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67,
+ /* 33805 */ 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97,
+ /* 33832 */ 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67,
+ /* 33857 */ 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97,
+ /* 33882 */ 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45,
+ /* 33907 */ 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45,
+ /* 33932 */ 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97,
+ /* 33958 */ 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45,
+ /* 33984 */ 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97,
+ /* 34009 */ 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97,
+ /* 34036 */ 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67,
+ /* 34062 */ 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45,
+ /* 34084 */ 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0,
+ /* 34109 */ 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67,
+ /* 34133 */ 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531,
+ /* 34157 */ 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97,
+ /* 34182 */ 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27,
+ /* 34207 */ 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67,
+ /* 34231 */ 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67,
+ /* 34257 */ 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175,
+ /* 34282 */ 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97,
+ /* 34308 */ 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45,
+ /* 34333 */ 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0,
+ /* 34356 */ 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45,
+ /* 34380 */ 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 34405 */ 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97,
+ /* 34430 */ 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97,
+ /* 34457 */ 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346,
+ /* 34481 */ 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45,
+ /* 34506 */ 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67,
+ /* 34531 */ 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67,
+ /* 34556 */ 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 34581 */ 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97,
+ /* 34605 */ 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45,
+ /* 34630 */ 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991,
+ /* 34655 */ 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67,
+ /* 34680 */ 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67,
+ /* 34704 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67,
+ /* 34729 */ 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592,
+ /* 34750 */ 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315,
+ /* 34771 */ 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45,
+ /* 34797 */ 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97,
+ /* 34822 */ 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97,
+ /* 34846 */ 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45,
+ /* 34871 */ 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67,
+ /* 34897 */ 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 34920 */ 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67,
+ /* 34945 */ 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45,
+ /* 34969 */ 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67,
+ /* 34994 */ 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67,
+ /* 35018 */ 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97,
+ /* 35041 */ 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97,
+ /* 35066 */ 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67,
+ /* 35090 */ 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 35115 */ 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125,
+ /* 35140 */ 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45,
+ /* 35166 */ 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35191 */ 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97,
+ /* 35217 */ 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97,
+ /* 35241 */ 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67,
+ /* 35266 */ 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97,
+ /* 35291 */ 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67,
+ /* 35316 */ 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0,
+ /* 35342 */ 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995,
+ /* 35366 */ 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265,
+ /* 35392 */ 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18,
+ /* 35416 */ 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45,
+ /* 35440 */ 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45,
+ /* 35465 */ 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67,
+ /* 35490 */ 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540,
+ /* 35514 */ 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97,
+ /* 35535 */ 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97,
+ /* 35560 */ 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45,
+ /* 35585 */ 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45,
+ /* 35610 */ 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45,
+ /* 35635 */ 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 35661 */ 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97,
+ /* 35685 */ 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67,
+ /* 35710 */ 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0,
+ /* 35735 */ 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45,
+ /* 35760 */ 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67,
+ /* 35785 */ 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 35810 */ 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97,
+ /* 35836 */ 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97,
+ /* 35862 */ 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35888 */ 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0,
+ /* 35913 */ 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97,
+ /* 35937 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67,
+ /* 35962 */ 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 35987 */ 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45,
+ /* 36011 */ 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45,
+ /* 36036 */ 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97,
+ /* 36061 */ 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67,
+ /* 36086 */ 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97,
+ /* 36111 */ 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 36137 */ 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0,
+ /* 36161 */ 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97,
+ /* 36186 */ 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97,
+ /* 36210 */ 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ /* 36236 */ 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545,
+ /* 36261 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67,
+ /* 36286 */ 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97,
+ /* 36311 */ 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559,
+ /* 36337 */ 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ /* 36361 */ 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628,
+ /* 36386 */ 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592,
+ /* 36405 */ 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36416 */ 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192,
+ /* 36427 */ 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592,
+ /* 36438 */ 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36449 */ 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592,
+ /* 36468 */ 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592,
+ /* 36479 */ 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0,
+ /* 36493 */ 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0,
+ /* 36510 */ 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592,
+ /* 36532 */ 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832,
+ /* 36545 */ 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592,
+ /* 36557 */ 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850,
+ /* 36569 */ 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97,
+ /* 36592 */ 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97,
+ /* 36618 */ 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264,
+ /* 36636 */ 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45,
+ /* 36657 */ 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45,
+ /* 36682 */ 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320,
+ /* 36701 */ 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97,
+ /* 36727 */ 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45,
+ /* 36752 */ 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0,
+ /* 36776 */ 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67
+];
+
+XQueryTokenizer.EXPECTED =
+[
+ /* 0 */ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358,
+ /* 21 */ 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634,
+ /* 42 */ 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634,
+ /* 63 */ 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751,
+ /* 84 */ 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510,
+ /* 105 */ 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578,
+ /* 126 */ 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536,
+ /* 147 */ 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762,
+ /* 168 */ 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759,
+ /* 189 */ 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793,
+ /* 210 */ 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979,
+ /* 231 */ 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927,
+ /* 252 */ 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984,
+ /* 273 */ 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024,
+ /* 293 */ 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062,
+ /* 311 */ 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084,
+ /* 329 */ 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063,
+ /* 347 */ 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150,
+ /* 365 */ 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165,
+ /* 383 */ 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235,
+ /* 401 */ 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625,
+ /* 419 */ 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032,
+ /* 437 */ 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686,
+ /* 455 */ 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686,
+ /* 473 */ 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402,
+ /* 491 */ 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686,
+ /* 509 */ 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686,
+ /* 527 */ 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409,
+ /* 545 */ 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513,
+ /* 563 */ 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552,
+ /* 581 */ 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656,
+ /* 599 */ 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515,
+ /* 617 */ 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686,
+ /* 635 */ 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698,
+ /* 653 */ 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686,
+ /* 671 */ 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944,
+ /* 689 */ 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548,
+ /* 707 */ 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686,
+ /* 725 */ 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815,
+ /* 743 */ 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260,
+ /* 761 */ 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260,
+ /* 779 */ 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882,
+ /* 797 */ 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883,
+ /* 815 */ 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686,
+ /* 833 */ 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686,
+ /* 851 */ 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811,
+ /* 869 */ 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964,
+ /* 887 */ 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686,
+ /* 905 */ 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083,
+ /* 923 */ 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855,
+ /* 941 */ 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686,
+ /* 959 */ 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686,
+ /* 977 */ 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457,
+ /* 995 */ 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449,
+ /* 1013 */ 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146,
+ /* 1031 */ 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219,
+ /* 1049 */ 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234,
+ /* 1067 */ 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198,
+ /* 1085 */ 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276,
+ /* 1103 */ 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264,
+ /* 1121 */ 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276,
+ /* 1139 */ 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223,
+ /* 1157 */ 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276,
+ /* 1175 */ 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292,
+ /* 1193 */ 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276,
+ /* 1211 */ 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318,
+ /* 1229 */ 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592,
+ /* 1247 */ 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592,
+ /* 1265 */ 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594,
+ /* 1283 */ 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431,
+ /* 1301 */ 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812,
+ /* 1319 */ 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455,
+ /* 1337 */ 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474,
+ /* 1355 */ 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353,
+ /* 1373 */ 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469,
+ /* 1391 */ 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503,
+ /* 1409 */ 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417,
+ /* 1427 */ 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212,
+ /* 1445 */ 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592,
+ /* 1463 */ 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592,
+ /* 1481 */ 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592,
+ /* 1499 */ 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592,
+ /* 1517 */ 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592,
+ /* 1535 */ 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592,
+ /* 1553 */ 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592,
+ /* 1571 */ 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594,
+ /* 1589 */ 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506,
+ /* 1607 */ 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592,
+ /* 1625 */ 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522,
+ /* 1643 */ 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383,
+ /* 1661 */ 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592,
+ /* 1679 */ 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419,
+ /* 1697 */ 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536,
+ /* 1715 */ 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626,
+ /* 1733 */ 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581,
+ /* 1751 */ 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732,
+ /* 1769 */ 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747,
+ /* 1787 */ 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592,
+ /* 1805 */ 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592,
+ /* 1823 */ 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936,
+ /* 1841 */ 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965,
+ /* 1859 */ 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830,
+ /* 1877 */ 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415,
+ /* 1895 */ 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855,
+ /* 1913 */ 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860,
+ /* 1931 */ 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498,
+ /* 1949 */ 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592,
+ /* 1967 */ 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592,
+ /* 1985 */ 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921,
+ /* 2003 */ 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592,
+ /* 2021 */ 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592,
+ /* 2039 */ 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716,
+ /* 2057 */ 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837,
+ /* 2075 */ 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496,
+ /* 2090 */ 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256,
+ /* 2101 */ 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000,
+ /* 2117 */ 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304,
+ /* 2134 */ 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864,
+ /* 2149 */ 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576,
+ /* 2168 */ 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16,
+ /* 2184 */ 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0,
+ /* 2198 */ 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192,
+ /* 2218 */ 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384,
+ /* 2234 */ 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096,
+ /* 2251 */ 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4,
+ /* 2269 */ 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384,
+ /* 2285 */ 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2,
+ /* 2303 */ 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144,
+ /* 2316 */ 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4,
+ /* 2331 */ 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0,
+ /* 2347 */ -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0,
+ /* 2362 */ 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721,
+ /* 2386 */ -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0,
+ /* 2402 */ 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112,
+ /* 2428 */ 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016,
+ /* 2442 */ 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288,
+ /* 2457 */ 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728,
+ /* 2468 */ 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536,
+ /* 2484 */ 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536,
+ /* 2501 */ 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600,
+ /* 2521 */ -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728,
+ /* 2535 */ 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216,
+ /* 2548 */ 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12,
+ /* 2559 */ 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256,
+ /* 2575 */ 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216,
+ /* 2591 */ 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8,
+ /* 2615 */ 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576,
+ /* 2635 */ 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0,
+ /* 2651 */ 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768,
+ /* 2667 */ 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0,
+ /* 2683 */ 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592,
+ /* 2699 */ 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12,
+ /* 2714 */ 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0,
+ /* 2736 */ 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864,
+ /* 2752 */ 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072,
+ /* 2768 */ 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288,
+ /* 2784 */ 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120,
+ /* 2806 */ 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432,
+ /* 2823 */ 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4,
+ /* 2836 */ 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64,
+ /* 2850 */ 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288,
+ /* 2863 */ 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912,
+ /* 2876 */ 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048,
+ /* 2892 */ 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288,
+ /* 2908 */ 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768,
+ /* 2922 */ 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304,
+ /* 2936 */ 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432,
+ /* 2948 */ 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807,
+ /* 2961 */ 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216,
+ /* 2985 */ 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456
+];
+
+XQueryTokenizer.TOKEN =
+[
+ "(0)",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "QuotChar",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'NaN'",
+ "'['",
+ "']'",
+ "']]>'",
+ "'after'",
+ "'all'",
+ "'allowing'",
+ "'ancestor'",
+ "'ancestor-or-self'",
+ "'and'",
+ "'any'",
+ "'append'",
+ "'array'",
+ "'as'",
+ "'ascending'",
+ "'at'",
+ "'attribute'",
+ "'base-uri'",
+ "'before'",
+ "'boundary-space'",
+ "'break'",
+ "'by'",
+ "'case'",
+ "'cast'",
+ "'castable'",
+ "'catch'",
+ "'check'",
+ "'child'",
+ "'collation'",
+ "'collection'",
+ "'comment'",
+ "'constraint'",
+ "'construction'",
+ "'contains'",
+ "'content'",
+ "'context'",
+ "'continue'",
+ "'copy'",
+ "'copy-namespaces'",
+ "'count'",
+ "'decimal-format'",
+ "'decimal-separator'",
+ "'declare'",
+ "'default'",
+ "'delete'",
+ "'descendant'",
+ "'descendant-or-self'",
+ "'descending'",
+ "'diacritics'",
+ "'different'",
+ "'digit'",
+ "'distance'",
+ "'div'",
+ "'document'",
+ "'document-node'",
+ "'element'",
+ "'else'",
+ "'empty'",
+ "'empty-sequence'",
+ "'encoding'",
+ "'end'",
+ "'entire'",
+ "'eq'",
+ "'every'",
+ "'exactly'",
+ "'except'",
+ "'exit'",
+ "'external'",
+ "'first'",
+ "'following'",
+ "'following-sibling'",
+ "'for'",
+ "'foreach'",
+ "'foreign'",
+ "'from'",
+ "'ft-option'",
+ "'ftand'",
+ "'ftnot'",
+ "'ftor'",
+ "'function'",
+ "'ge'",
+ "'greatest'",
+ "'group'",
+ "'grouping-separator'",
+ "'gt'",
+ "'idiv'",
+ "'if'",
+ "'import'",
+ "'in'",
+ "'index'",
+ "'infinity'",
+ "'inherit'",
+ "'insensitive'",
+ "'insert'",
+ "'instance'",
+ "'integrity'",
+ "'intersect'",
+ "'into'",
+ "'is'",
+ "'item'",
+ "'json'",
+ "'json-item'",
+ "'key'",
+ "'language'",
+ "'last'",
+ "'lax'",
+ "'le'",
+ "'least'",
+ "'let'",
+ "'levels'",
+ "'loop'",
+ "'lowercase'",
+ "'lt'",
+ "'minus-sign'",
+ "'mod'",
+ "'modify'",
+ "'module'",
+ "'most'",
+ "'namespace'",
+ "'namespace-node'",
+ "'ne'",
+ "'next'",
+ "'no'",
+ "'no-inherit'",
+ "'no-preserve'",
+ "'node'",
+ "'nodes'",
+ "'not'",
+ "'object'",
+ "'occurs'",
+ "'of'",
+ "'on'",
+ "'only'",
+ "'option'",
+ "'or'",
+ "'order'",
+ "'ordered'",
+ "'ordering'",
+ "'paragraph'",
+ "'paragraphs'",
+ "'parent'",
+ "'pattern-separator'",
+ "'per-mille'",
+ "'percent'",
+ "'phrase'",
+ "'position'",
+ "'preceding'",
+ "'preceding-sibling'",
+ "'preserve'",
+ "'previous'",
+ "'processing-instruction'",
+ "'relationship'",
+ "'rename'",
+ "'replace'",
+ "'return'",
+ "'returning'",
+ "'revalidation'",
+ "'same'",
+ "'satisfies'",
+ "'schema'",
+ "'schema-attribute'",
+ "'schema-element'",
+ "'score'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'xquery'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+ // line 542 "XQueryTokenizer.ebnf"
+ });
+ // line 4205 "XQueryTokenizer.js"
+// End
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery/visitors/SemanticHighlighter.js b/src/fauxton/assets/js/libs/ace/mode/xquery/visitors/SemanticHighlighter.js
new file mode 100644
index 000000000..fa7ecbb78
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery/visitors/SemanticHighlighter.js
@@ -0,0 +1,76 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+ var SemanticHighlighter = exports.SemanticHighlighter = function(ast) {
+
+ this.tokens = {};
+
+ this.getTokens = function() {
+ this.visit(ast);
+ return this.tokens;
+ };
+
+ this.EQName = this.NCName = function(node)
+ {
+ var row = node.pos.sl;
+ this.tokens[row] = this.tokens[row] === undefined ? [] : this.tokens[row];
+ node.pos.type = "support.function";
+ this.tokens[row].push(node.pos);
+ return true;
+ };
+
+ this.visit = function(node) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === "function") skip = this[name](node) === true ? true : false;
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function(node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === "function") {
+ handler[child.name](child);
+ }
+ else {
+ this.visit(child);
+ }
+ }
+ };
+
+ };
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/xquery_worker.js b/src/fauxton/assets/js/libs/ace/mode/xquery_worker.js
new file mode 100644
index 000000000..559603d68
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/xquery_worker.js
@@ -0,0 +1,81 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var JSONParseTreeHandler = require("./xquery/JSONParseTreeHandler").JSONParseTreeHandler;
+var XQueryParser = require("./xquery/XQueryParser").XQueryParser;
+var SemanticHighlighter = require("./xquery/visitors/SemanticHighlighter").SemanticHighlighter;
+
+var XQueryWorker = exports.XQueryWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+};
+
+oop.inherits(XQueryWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ this.sender.emit("start");
+ var value = this.doc.getValue();
+ var h = new JSONParseTreeHandler(value);
+ var parser = new XQueryParser(value, h);
+ try {
+ parser.parse_XQuery();
+ this.sender.emit("ok");
+ var ast = h.getParseTree();
+ var highlighter = new SemanticHighlighter(ast, value);
+ var tokens = highlighter.getTokens();
+ this.sender.emit("highlight", { tokens: tokens, lines: highlighter.lines });
+ } catch(e) {
+ if(e instanceof parser.ParseException) {
+ var prefix = value.substring(0, e.getBegin());
+ var line = prefix.split("\n").length;
+ var column = e.getBegin() - prefix.lastIndexOf("\n");
+ var message = parser.getErrorMessage(e);
+ this.sender.emit("error", {
+ row: line - 1,
+ column: column,
+ text: message,
+ type: "error"
+ });
+ } else {
+ throw e;
+ }
+ }
+ };
+
+}).call(XQueryWorker.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/yaml.js b/src/fauxton/assets/js/libs/ace/mode/yaml.js
new file mode 100644
index 000000000..ec0628ae9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/yaml.js
@@ -0,0 +1,78 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var Tokenizer = require("../tokenizer").Tokenizer;
+var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = YamlHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mode/yaml_highlight_rules.js b/src/fauxton/assets/js/libs/ace/mode/yaml_highlight_rules.js
new file mode 100644
index 000000000..cf9465772
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mode/yaml_highlight_rules.js
@@ -0,0 +1,116 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var YamlHighlightRules = function() {
+
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "list.markup",
+ regex : /^(?:-{3}|\.{3})\s*(?=#|$)/
+ }, {
+ token : "list.markup",
+ regex : /^\s*[\-?](?:$|\s)/
+ }, {
+ token: "constant",
+ regex: "!![\\w//]+"
+ }, {
+ token: "constant.language",
+ regex: "[&\\*][a-zA-Z0-9-_]+"
+ }, {
+ token: ["meta.tag", "keyword"],
+ regex: /^(\s*\w.*?)(\:(?:\s+|$))/
+ },{
+ token: ["meta.tag", "keyword"],
+ regex: /(\w+?)(\s*\:(?:\s+|$))/
+ }, {
+ token : "keyword.operator",
+ regex : "<<\\w*:\\w*"
+ }, {
+ token : "keyword.operator",
+ regex : "-\\s*(?=[{])"
+ }, {
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // multi line string start
+ regex : '[|>][-+\\d\\s]*$',
+ next : "qqstring"
+ }, {
+ token : "string", // single quoted string
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+\-]?[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?\b/
+ }, {
+ token : "constant.numeric", // other number
+ regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
+ }, {
+ token : "invalid.illegal", // comments are not allowed
+ regex : "\\/\\/.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : '(?=(?:(?:\\\\.)|(?:[^:]))*?:)',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]};
+
+};
+
+oop.inherits(YamlHighlightRules, TextHighlightRules);
+
+exports.YamlHighlightRules = YamlHighlightRules;
+});
diff --git a/src/fauxton/assets/js/libs/ace/model/editor.js b/src/fauxton/assets/js/libs/ace/model/editor.js
new file mode 100644
index 000000000..75939231f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/model/editor.js
@@ -0,0 +1,62 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("ace/lib/oop");
+var EventEmitter = require("ace/lib/event_emitter").EventEmitter;
+
+var Editor = exports.Editor = function() {
+ this._buffers = [];
+ this._windows = [];
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.addBuffer = function(buffer) {
+ this._buffers.push(buffer);
+ return this._buffers.length-1;
+ };
+
+ this.addWindow = function(win) {
+ this._windows.push(win);
+ return this._windows.length-1;
+ };
+
+ this.openInWindow = function(bufferId, winId) {
+ this._windows[winId || 0].setBuffer(this._buffers[bufferId]);
+ };
+
+}).call(Editor.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/default_gutter_handler.js b/src/fauxton/assets/js/libs/ace/mouse/default_gutter_handler.js
new file mode 100644
index 000000000..1ad8119c3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/default_gutter_handler.js
@@ -0,0 +1,161 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+
+function GutterHandler(mouseHandler) {
+ var editor = mouseHandler.editor;
+ var gutter = editor.renderer.$gutterLayer;
+
+ mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
+ if (!editor.isFocused() || e.getButton() != 0)
+ return;
+ var gutterRegion = gutter.getRegion(e);
+
+ if (gutterRegion == "foldWidgets")
+ return;
+
+ var row = e.getDocumentPosition().row;
+ var selection = editor.session.selection;
+
+ if (e.getShiftKey())
+ selection.selectTo(row, 0);
+ else {
+ if (e.domEvent.detail == 2) {
+ editor.selectAll();
+ return e.preventDefault();
+ }
+ mouseHandler.$clickSelection = editor.selection.getLineRange(row);
+ }
+ mouseHandler.setState("selectByLines");
+ mouseHandler.captureMouse(e);
+ return e.preventDefault();
+ });
+
+
+ var tooltipTimeout, mouseEvent, tooltip, tooltipAnnotation;
+ function createTooltip() {
+ tooltip = dom.createElement("div");
+ tooltip.className = "ace_gutter-tooltip";
+ tooltip.style.display = "none";
+ editor.container.appendChild(tooltip);
+ }
+
+ function showTooltip() {
+ if (!tooltip) {
+ createTooltip();
+ }
+ var row = mouseEvent.getDocumentPosition().row;
+ var annotation = gutter.$annotations[row];
+ if (!annotation)
+ return hideTooltip();
+
+ var maxRow = editor.session.getLength();
+ if (row == maxRow) {
+ var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;
+ var pos = mouseEvent.$pos;
+ if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))
+ return hideTooltip();
+ }
+
+ if (tooltipAnnotation == annotation)
+ return;
+ tooltipAnnotation = annotation.text.join("<br/>");
+
+ tooltip.style.display = "block";
+ tooltip.innerHTML = tooltipAnnotation;
+ editor.on("mousewheel", hideTooltip);
+
+ moveTooltip(mouseEvent);
+ }
+
+ function hideTooltip() {
+ if (tooltipTimeout)
+ tooltipTimeout = clearTimeout(tooltipTimeout);
+ if (tooltipAnnotation) {
+ tooltip.style.display = "none";
+ tooltipAnnotation = null;
+ editor.removeEventListener("mousewheel", hideTooltip);
+ }
+ }
+
+ function moveTooltip(e) {
+ var rect = editor.renderer.$gutter.getBoundingClientRect();
+ tooltip.style.left = e.x + 15 + "px";
+ if (e.y + 3 * editor.renderer.lineHeight + 15 < rect.bottom) {
+ tooltip.style.bottom = "";
+ tooltip.style.top = e.y + 15 + "px";
+ } else {
+ tooltip.style.top = "";
+ var innerHeight = window.innerHeight || document.documentElement.clientHeight;
+ tooltip.style.bottom = innerHeight - e.y + 5 + "px";
+ }
+ }
+
+ mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) {
+ var target = e.domEvent.target || e.domEvent.srcElement;
+ if (dom.hasCssClass(target, "ace_fold-widget"))
+ return hideTooltip();
+
+ if (tooltipAnnotation)
+ moveTooltip(e);
+
+ mouseEvent = e;
+ if (tooltipTimeout)
+ return;
+ tooltipTimeout = setTimeout(function() {
+ tooltipTimeout = null;
+ if (mouseEvent && !mouseHandler.isMousePressed)
+ showTooltip();
+ else
+ hideTooltip();
+ }, 50);
+ });
+
+ event.addListener(editor.renderer.$gutter, "mouseout", function(e) {
+ mouseEvent = null;
+ if (!tooltipAnnotation || tooltipTimeout)
+ return;
+
+ tooltipTimeout = setTimeout(function() {
+ tooltipTimeout = null;
+ hideTooltip();
+ }, 50);
+ });
+
+ editor.on("changeSession", hideTooltip);
+}
+
+exports.GutterHandler = GutterHandler;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/default_handlers.js b/src/fauxton/assets/js/libs/ace/mouse/default_handlers.js
new file mode 100644
index 000000000..ebe9e0c72
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/default_handlers.js
@@ -0,0 +1,274 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var DRAG_OFFSET = 0; // pixels
+
+function DefaultHandlers(mouseHandler) {
+ mouseHandler.$clickSelection = null;
+
+ var editor = mouseHandler.editor;
+ editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler));
+ editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler));
+ editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler));
+ editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler));
+ editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler));
+
+ var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd",
+ "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+
+ mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange");
+ mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange");
+}
+
+(function() {
+
+ this.onMouseDown = function(ev) {
+ var inSelection = ev.inSelection();
+ var pos = ev.getDocumentPosition();
+ this.mousedownEvent = ev;
+ var editor = this.editor;
+
+ var button = ev.getButton();
+ if (button !== 0) {
+ var selectionRange = editor.getSelectionRange();
+ var selectionEmpty = selectionRange.isEmpty();
+
+ if (selectionEmpty) {
+ editor.moveCursorToPosition(pos);
+ editor.selection.clearSelection();
+ }
+
+ // 2: contextmenu, 1: linux paste
+ editor.textInput.onContextMenu(ev.domEvent);
+ return; // stopping event here breaks contextmenu on ff mac
+ }
+
+ // if this click caused the editor to be focused should not clear the
+ // selection
+ if (inSelection && !editor.isFocused()) {
+ editor.focus();
+ if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {
+ this.mousedownEvent.time = (new Date()).getTime();
+ this.setState("focusWait");
+ this.captureMouse(ev);
+ return;
+ }
+ }
+
+ if (!inSelection || this.$clickSelection || ev.getShiftKey() || editor.inMultiSelectMode) {
+ // Directly pick STATE_SELECT, since the user is not clicking inside
+ // a selection.
+ this.startSelect(pos);
+ } else if (inSelection) {
+ this.mousedownEvent.time = (new Date()).getTime();
+ this.startSelect(pos);
+ }
+ this.captureMouse(ev);
+ return ev.preventDefault();
+ };
+
+ this.startSelect = function(pos) {
+ pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
+ var editor = this.editor;
+ // allow double/triple click handlers to change selection
+ setTimeout(function(){
+ if (this.mousedownEvent.getShiftKey()) {
+ editor.selection.selectToPosition(pos);
+ }
+ else if (!this.$clickSelection) {
+ editor.moveCursorToPosition(pos);
+ editor.selection.clearSelection();
+ }
+ }.bind(this), 0);
+ if (editor.renderer.scroller.setCapture) {
+ editor.renderer.scroller.setCapture();
+ }
+ editor.setStyle("ace_selecting");
+ this.setState("select");
+ };
+
+ this.select = function() {
+ var anchor, editor = this.editor;
+ var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+
+ if (this.$clickSelection) {
+ var cmp = this.$clickSelection.comparePoint(cursor);
+
+ if (cmp == -1) {
+ anchor = this.$clickSelection.end;
+ } else if (cmp == 1) {
+ anchor = this.$clickSelection.start;
+ } else {
+ var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+ cursor = orientedRange.cursor;
+ anchor = orientedRange.anchor;
+ }
+ editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+ }
+ editor.selection.selectToPosition(cursor);
+
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.extendSelectionBy = function(unitName) {
+ var anchor, editor = this.editor;
+ var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+ var range = editor.selection[unitName](cursor.row, cursor.column);
+
+ if (this.$clickSelection) {
+ var cmpStart = this.$clickSelection.comparePoint(range.start);
+ var cmpEnd = this.$clickSelection.comparePoint(range.end);
+
+ if (cmpStart == -1 && cmpEnd <= 0) {
+ anchor = this.$clickSelection.end;
+ if (range.end.row != cursor.row || range.end.column != cursor.column)
+ cursor = range.start;
+ } else if (cmpEnd == 1 && cmpStart >= 0) {
+ anchor = this.$clickSelection.start;
+ if (range.start.row != cursor.row || range.start.column != cursor.column)
+ cursor = range.end;
+ } else if (cmpStart == -1 && cmpEnd == 1) {
+ cursor = range.end;
+ anchor = range.start;
+ } else {
+ var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);
+ cursor = orientedRange.cursor;
+ anchor = orientedRange.anchor;
+ }
+ editor.selection.setSelectionAnchor(anchor.row, anchor.column);
+ }
+ editor.selection.selectToPosition(cursor);
+
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.selectEnd =
+ this.selectAllEnd =
+ this.selectByWordsEnd =
+ this.selectByLinesEnd = function() {
+ this.editor.unsetStyle("ace_selecting");
+ if (this.editor.renderer.scroller.releaseCapture) {
+ this.editor.renderer.scroller.releaseCapture();
+ }
+ };
+
+ this.focusWait = function() {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ var time = (new Date()).getTime();
+
+ if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ };
+
+ this.onDoubleClick = function(ev) {
+ var pos = ev.getDocumentPosition();
+ var editor = this.editor;
+ var session = editor.session;
+
+ var range = session.getBracketRange(pos);
+ if (range) {
+ if (range.isEmpty()) {
+ range.start.column--;
+ range.end.column++;
+ }
+ this.$clickSelection = range;
+ this.setState("select");
+ return;
+ }
+
+ this.$clickSelection = editor.selection.getWordRange(pos.row, pos.column);
+ this.setState("selectByWords");
+ };
+
+ this.onTripleClick = function(ev) {
+ var pos = ev.getDocumentPosition();
+ var editor = this.editor;
+
+ this.setState("selectByLines");
+ this.$clickSelection = editor.selection.getLineRange(pos.row);
+ };
+
+ this.onQuadClick = function(ev) {
+ var editor = this.editor;
+
+ editor.selectAll();
+ this.$clickSelection = editor.getSelectionRange();
+ this.setState("selectAll");
+ };
+
+ this.onMouseWheel = function(ev) {
+ if (ev.getShiftKey() || ev.getAccelKey())
+ return;
+ var t = ev.domEvent.timeStamp;
+ var dt = t - (this.$lastScrollTime||0);
+
+ var editor = this.editor;
+ var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ if (isScrolable || dt < 200) {
+ this.$lastScrollTime = t;
+ editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ return ev.stop();
+ }
+ };
+
+}).call(DefaultHandlers.prototype);
+
+exports.DefaultHandlers = DefaultHandlers;
+
+function calcDistance(ax, ay, bx, by) {
+ return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+function calcRangeOrientation(range, cursor) {
+ if (range.start.row == range.end.row)
+ var cmp = 2 * cursor.column - range.start.column - range.end.column;
+ else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)
+ var cmp = cursor.column - 4;
+ else
+ var cmp = 2 * cursor.row - range.start.row - range.end.row;
+
+ if (cmp < 0)
+ return {cursor: range.start, anchor: range.end};
+ else
+ return {cursor: range.end, anchor: range.start};
+}
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/dragdrop_handler.js b/src/fauxton/assets/js/libs/ace/mouse/dragdrop_handler.js
new file mode 100644
index 000000000..722dcb6a8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/dragdrop_handler.js
@@ -0,0 +1,417 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var AUTOSCROLL_DELAY = 200;
+var SCROLL_CURSOR_DELAY = 200;
+var SCROLL_CURSOR_HYSTERESIS = 5;
+
+function DragdropHandler(mouseHandler) {
+
+ var editor = mouseHandler.editor;
+
+ var blankImage = dom.createElement("img");
+ // Safari crashes without image data
+ blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+ if (useragent.isOpera)
+ blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;";
+
+ var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+ editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler));
+
+
+ var mouseTarget = editor.container;
+ var dragSelectionMarker, x, y;
+ var timerId, range;
+ var dragCursor, counter = 0;
+ var dragOperation;
+ var isInternal;
+ var autoScrollStartTime;
+ var cursorMovedTime;
+ var cursorPointOnCaretMoved;
+
+ this.onDragStart = function(e) {
+ // webkit workaround, see this.onMouseDown
+ if (this.cancelDrag || !mouseTarget.draggable) {
+ var self = this;
+ setTimeout(function(){
+ self.startSelect();
+ self.captureMouse(e);
+ }, 0);
+ return e.preventDefault();
+ }
+ range = editor.getSelectionRange();
+
+ var dataTransfer = e.dataTransfer;
+ dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove";
+ if (useragent.isOpera) {
+ editor.container.appendChild(blankImage);
+ // force layout
+ blankImage._top = blankImage.offsetTop;
+ }
+ dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);
+ if (useragent.isOpera) {
+ editor.container.removeChild(blankImage);
+ }
+ // clear Opera garbage
+ dataTransfer.clearData();
+ dataTransfer.setData("Text", editor.session.getTextRange());
+
+ isInternal = true;
+ this.setState("drag");
+ };
+
+ this.onDragEnd = function(e) {
+ mouseTarget.draggable = false;
+ isInternal = false;
+ this.setState(null);
+ if (!editor.getReadOnly()) {
+ var dropEffect = e.dataTransfer.dropEffect;
+ if (!dragOperation && dropEffect == "move")
+ // text was dragged outside the editor
+ editor.session.remove(editor.getSelectionRange());
+ editor.renderer.$cursorLayer.setBlinking(true);
+ }
+ this.editor.unsetStyle("ace_dragging");
+ };
+
+ this.onDragEnter = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+ return;
+ if (!dragSelectionMarker)
+ addDragMarker();
+ counter++;
+ // dataTransfer object does not save dropEffect across events on IE, so we store it in dragOperation
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+ return event.preventDefault(e);
+ };
+
+ this.onDragOver = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+ return;
+ // Opera doesn't trigger dragenter event on drag start
+ if (!dragSelectionMarker) {
+ addDragMarker();
+ counter++;
+ }
+ if (onMouseMoveTimer !== null)
+ onMouseMoveTimer = null;
+ x = e.clientX;
+ y = e.clientY;
+
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+ return event.preventDefault(e);
+ };
+
+ this.onDragLeave = function(e) {
+ counter--;
+ if (counter <= 0 && dragSelectionMarker) {
+ clearDragMarker();
+ dragOperation = null;
+ return event.preventDefault(e);
+ }
+ };
+
+ this.onDrop = function(e) {
+ if (!dragSelectionMarker)
+ return;
+ var dataTransfer = e.dataTransfer;
+ if (isInternal) {
+ switch (dragOperation) {
+ case "move":
+ if (range.contains(dragCursor.row, dragCursor.column)) {
+ // clear selection
+ range = {
+ start: dragCursor,
+ end: dragCursor
+ };
+ } else {
+ // move text
+ range = editor.moveText(range, dragCursor);
+ }
+ break;
+ case "copy":
+ // copy text
+ range = editor.moveText(range, dragCursor, true);
+ break;
+ }
+ } else {
+ var dropData = dataTransfer.getData('Text');
+ range = {
+ start: dragCursor,
+ end: editor.session.insert(dragCursor, dropData)
+ };
+ editor.focus();
+ dragOperation = null;
+ }
+ clearDragMarker();
+ return event.preventDefault(e);
+ };
+
+ event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler));
+ event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler));
+
+ function scrollCursorIntoView(cursor, prevCursor) {
+ var now = new Date().getTime();
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ var hMovement = !prevCursor || cursor.column != prevCursor.column;
+ if (!cursorMovedTime || vMovement || hMovement) {
+ editor.$blockScrolling += 1;
+ editor.moveCursorToPosition(cursor);
+ editor.$blockScrolling -= 1;
+ cursorMovedTime = now;
+ cursorPointOnCaretMoved = {x: x, y: y};
+ } else {
+ var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);
+ if (distance > SCROLL_CURSOR_HYSTERESIS) {
+ cursorMovedTime = null;
+ } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {
+ editor.renderer.scrollCursorIntoView();
+ cursorMovedTime = null;
+ }
+ }
+ }
+
+ function autoScroll(cursor, prevCursor) {
+ var now = new Date().getTime();
+ var lineHeight = editor.renderer.layerConfig.lineHeight;
+ var characterWidth = editor.renderer.layerConfig.characterWidth;
+ var editorRect = editor.renderer.scroller.getBoundingClientRect();
+ var offsets = {
+ x: {
+ left: x - editorRect.left,
+ right: editorRect.right - x
+ },
+ y: {
+ top: y - editorRect.top,
+ bottom: editorRect.bottom - y
+ }
+ };
+ var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);
+ var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);
+ var scrollCursor = {row: cursor.row, column: cursor.column};
+ if (nearestXOffset / characterWidth <= 2) {
+ scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);
+ }
+ if (nearestYOffset / lineHeight <= 1) {
+ scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);
+ }
+ var vScroll = cursor.row != scrollCursor.row;
+ var hScroll = cursor.column != scrollCursor.column;
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ if (vScroll || (hScroll && !vMovement)) {
+ if (!autoScrollStartTime)
+ autoScrollStartTime = now;
+ else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)
+ editor.renderer.scrollCursorIntoView(scrollCursor);
+ } else {
+ autoScrollStartTime = null;
+ }
+ }
+
+ function onDragInterval() {
+ var prevCursor = dragCursor;
+ dragCursor = editor.renderer.screenToTextCoordinates(x, y);
+ scrollCursorIntoView(dragCursor, prevCursor);
+ autoScroll(dragCursor, prevCursor);
+ }
+
+ function addDragMarker() {
+ range = editor.selection.toOrientedRange();
+ dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle());
+ editor.clearSelection();
+ if (editor.isFocused())
+ editor.renderer.$cursorLayer.setBlinking(false);
+ clearInterval(timerId);
+ timerId = setInterval(onDragInterval, 20);
+ counter = 0;
+ event.addListener(document, "mousemove", onMouseMove);
+ }
+
+ function clearDragMarker() {
+ clearInterval(timerId);
+ editor.session.removeMarker(dragSelectionMarker);
+ dragSelectionMarker = null;
+ editor.$blockScrolling += 1;
+ editor.selection.fromOrientedRange(range);
+ editor.$blockScrolling -= 1;
+ if (editor.isFocused() && !isInternal)
+ editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());
+ range = null;
+ counter = 0;
+ autoScrollStartTime = null;
+ cursorMovedTime = null;
+ event.removeListener(document, "mousemove", onMouseMove);
+ }
+
+ // sometimes other code on the page can stop dragleave event leaving editor stuck in the drag state
+ var onMouseMoveTimer = null;
+ function onMouseMove() {
+ if (onMouseMoveTimer == null) {
+ onMouseMoveTimer = setTimeout(function() {
+ if (onMouseMoveTimer != null && dragSelectionMarker)
+ clearDragMarker();
+ }, 20);
+ }
+ }
+
+ function canAccept(dataTransfer) {
+ var types = dataTransfer.types;
+ return !types || Array.prototype.some.call(types, function(type) {
+ return type == 'text/plain' || type == 'Text';
+ });
+ }
+
+ function getDropEffect(e) {
+ var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];
+ var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];
+
+ var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;
+
+ // IE throws error while dragging from another app
+ var effectAllowed = "uninitialized";
+ try {
+ effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();
+ } catch (e) {}
+ var dropEffect = "none";
+
+ if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+ else if (moveAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "move";
+ else if (copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+
+ return dropEffect;
+ }
+}
+
+(function() {
+
+ this.dragWait = function() {
+ var interval = (new Date()).getTime() - this.mousedownEvent.time;
+ if (interval > this.editor.getDragDelay())
+ this.startDrag();
+ };
+
+ this.dragWaitEnd = function() {
+ var target = this.editor.container;
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ this.selectEnd();
+ };
+
+ this.dragReadyEnd = function(e) {
+ this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());
+ this.editor.unsetStyle("ace_dragging");
+ this.dragWaitEnd();
+ };
+
+ this.startDrag = function(){
+ this.cancelDrag = false;
+ var target = this.editor.container;
+ target.draggable = true;
+ this.editor.renderer.$cursorLayer.setBlinking(false);
+ this.editor.setStyle("ace_dragging");
+ this.setState("dragReady");
+ };
+
+ this.onMouseDrag = function(e) {
+ var target = this.editor.container;
+ if (useragent.isIE && this.state == "dragReady") {
+ // IE does not handle [draggable] attribute set after mousedown
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 3)
+ target.dragDrop();
+ }
+ if (this.state === "dragWait") {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 0) {
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ }
+ }
+ };
+
+ this.onMouseDown = function(e) {
+ if (!this.$dragEnabled)
+ return;
+ this.mousedownEvent = e;
+ var editor = this.editor;
+
+ var inSelection = e.inSelection();
+ var button = e.getButton();
+ var clickCount = e.domEvent.detail || 1;
+ if (clickCount === 1 && button === 0 && inSelection) {
+ this.mousedownEvent.time = (new Date()).getTime();
+ var eventTarget = e.domEvent.target || e.domEvent.srcElement;
+ if ("unselectable" in eventTarget)
+ eventTarget.unselectable = "on";
+ if (editor.getDragDelay()) {
+ // https://code.google.com/p/chromium/issues/detail?id=286700
+ if (useragent.isWebKit) {
+ self.cancelDrag = true;
+ var mouseTarget = editor.container;
+ mouseTarget.draggable = true;
+ }
+ this.setState("dragWait");
+ } else {
+ this.startDrag();
+ }
+ this.captureMouse(e, this.onMouseDrag.bind(this));
+ // TODO: a better way to prevent default handler without preventing browser default action
+ e.defaultPrevented = true;
+ }
+ };
+
+}).call(DragdropHandler.prototype);
+
+
+function calcDistance(ax, ay, bx, by) {
+ return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+exports.DragdropHandler = DragdropHandler;
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/mouse/fold_handler.js b/src/fauxton/assets/js/libs/ace/mouse/fold_handler.js
new file mode 100644
index 000000000..d47f6d53a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/fold_handler.js
@@ -0,0 +1,93 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+function FoldHandler(editor) {
+
+ editor.on("click", function(e) {
+ var position = e.getDocumentPosition();
+ var session = editor.session;
+
+ // If the user clicked on a fold, then expand it.
+ var fold = session.getFoldAt(position.row, position.column, 1);
+ if (fold) {
+ if (e.getAccelKey())
+ session.removeFold(fold);
+ else
+ session.expandFold(fold);
+
+ e.stop();
+ }
+ });
+
+ editor.on("gutterclick", function(e) {
+ var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+ if (gutterRegion == "foldWidgets") {
+ var row = e.getDocumentPosition().row;
+ var session = editor.session;
+ if (session.foldWidgets && session.foldWidgets[row])
+ editor.session.onFoldWidgetClick(row, e);
+ if (!editor.isFocused())
+ editor.focus();
+ e.stop();
+ }
+ });
+
+ editor.on("gutterdblclick", function(e) {
+ var gutterRegion = editor.renderer.$gutterLayer.getRegion(e);
+
+ if (gutterRegion == "foldWidgets") {
+ var row = e.getDocumentPosition().row;
+ var session = editor.session;
+ var data = session.getParentFoldRangeData(row, true);
+ var range = data.range || data.firstRange;
+
+ if (range) {
+ var row = range.start.row;
+ var fold = session.getFoldAt(row, session.getLine(row).length, 1);
+
+ if (fold) {
+ session.removeFold(fold);
+ } else {
+ session.addFold("...", range);
+ editor.renderer.scrollCursorIntoView({row: range.start.row, column: 0});
+ }
+ }
+ e.stop();
+ }
+ });
+}
+
+exports.FoldHandler = FoldHandler;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/mouse_event.js b/src/fauxton/assets/js/libs/ace/mouse/mouse_event.js
new file mode 100644
index 000000000..aec90ddbe
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/mouse_event.js
@@ -0,0 +1,129 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+/*
+ * Custom Ace mouse event
+ */
+var MouseEvent = exports.MouseEvent = function(domEvent, editor) {
+ this.domEvent = domEvent;
+ this.editor = editor;
+
+ this.x = this.clientX = domEvent.clientX;
+ this.y = this.clientY = domEvent.clientY;
+
+ this.$pos = null;
+ this.$inSelection = null;
+
+ this.propagationStopped = false;
+ this.defaultPrevented = false;
+};
+
+(function() {
+
+ this.stopPropagation = function() {
+ event.stopPropagation(this.domEvent);
+ this.propagationStopped = true;
+ };
+
+ this.preventDefault = function() {
+ event.preventDefault(this.domEvent);
+ this.defaultPrevented = true;
+ };
+
+ this.stop = function() {
+ this.stopPropagation();
+ this.preventDefault();
+ };
+
+ /*
+ * Get the document position below the mouse cursor
+ *
+ * @return {Object} 'row' and 'column' of the document position
+ */
+ this.getDocumentPosition = function() {
+ if (this.$pos)
+ return this.$pos;
+
+ this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);
+ return this.$pos;
+ };
+
+ /*
+ * Check if the mouse cursor is inside of the text selection
+ *
+ * @return {Boolean} whether the mouse cursor is inside of the selection
+ */
+ this.inSelection = function() {
+ if (this.$inSelection !== null)
+ return this.$inSelection;
+
+ var editor = this.editor;
+
+
+ var selectionRange = editor.getSelectionRange();
+ if (selectionRange.isEmpty())
+ this.$inSelection = false;
+ else {
+ var pos = this.getDocumentPosition();
+ this.$inSelection = selectionRange.contains(pos.row, pos.column);
+ }
+
+ return this.$inSelection;
+ };
+
+ /*
+ * Get the clicked mouse button
+ *
+ * @return {Number} 0 for left button, 1 for middle button, 2 for right button
+ */
+ this.getButton = function() {
+ return event.getButton(this.domEvent);
+ };
+
+ /*
+ * @return {Boolean} whether the shift key was pressed when the event was emitted
+ */
+ this.getShiftKey = function() {
+ return this.domEvent.shiftKey;
+ };
+
+ this.getAccelKey = useragent.isMac
+ ? function() { return this.domEvent.metaKey; }
+ : function() { return this.domEvent.ctrlKey; };
+
+}).call(MouseEvent.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/mouse_handler.js b/src/fauxton/assets/js/libs/ace/mouse/mouse_handler.js
new file mode 100644
index 000000000..2565bd19b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/mouse_handler.js
@@ -0,0 +1,155 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var DefaultHandlers = require("./default_handlers").DefaultHandlers;
+var DefaultGutterHandler = require("./default_gutter_handler").GutterHandler;
+var MouseEvent = require("./mouse_event").MouseEvent;
+var DragdropHandler = require("./dragdrop_handler").DragdropHandler;
+var config = require("../config");
+
+var MouseHandler = function(editor) {
+ this.editor = editor;
+
+ new DefaultHandlers(this);
+ new DefaultGutterHandler(this);
+ new DragdropHandler(this);
+
+ var mouseTarget = editor.renderer.getMouseEventTarget();
+ event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
+ event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
+ event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent");
+ if (editor.renderer.scrollBarV) {
+ event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [300, 300, 250], this, "onMouseEvent");
+ event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [300, 300, 250], this, "onMouseEvent");
+ }
+ event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
+
+ var gutterEl = editor.renderer.$gutter;
+ event.addListener(gutterEl, "mousedown", this.onMouseEvent.bind(this, "guttermousedown"));
+ event.addListener(gutterEl, "click", this.onMouseEvent.bind(this, "gutterclick"));
+ event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
+ event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
+
+ event.addListener(mouseTarget, "mousedown", function(e) {
+ editor.focus();
+ });
+
+ event.addListener(gutterEl, "mousedown", function(e) {
+ editor.focus();
+ return event.preventDefault(e);
+ });
+};
+
+(function() {
+ this.onMouseEvent = function(name, e) {
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
+
+ this.onMouseMove = function(name, e) {
+ // optimization, because mousemove doesn't have a default handler.
+ var listeners = this.editor._eventRegistry && this.editor._eventRegistry.mousemove;
+ if (!listeners || !listeners.length)
+ return;
+
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
+
+ this.onMouseWheel = function(name, e) {
+ var mouseEvent = new MouseEvent(e, this.editor);
+ mouseEvent.speed = this.$scrollSpeed * 2;
+ mouseEvent.wheelX = e.wheelX;
+ mouseEvent.wheelY = e.wheelY;
+
+ this.editor._emit(name, mouseEvent);
+ };
+
+ this.setState = function(state) {
+ this.state = state;
+ };
+
+ this.captureMouse = function(ev, mouseMoveHandler) {
+ this.x = ev.x;
+ this.y = ev.y;
+
+ this.isMousePressed = true;
+
+ // do not move textarea during selection
+ var renderer = this.editor.renderer;
+ if (renderer.$keepTextAreaAtCursor)
+ renderer.$keepTextAreaAtCursor = null;
+
+ var self = this;
+ var onMouseMove = function(e) {
+ self.x = e.clientX;
+ self.y = e.clientY;
+ mouseMoveHandler && mouseMoveHandler(e);
+ };
+
+ var onCaptureEnd = function(e) {
+ clearInterval(timerId);
+ onCaptureInterval();
+ self[self.state + "End"] && self[self.state + "End"](e);
+ self.$clickSelection = null;
+ if (renderer.$keepTextAreaAtCursor == null) {
+ renderer.$keepTextAreaAtCursor = true;
+ renderer.$moveTextAreaToCursor();
+ }
+ self.isMousePressed = false;
+ self.onMouseEvent("mouseup", e);
+ };
+
+ var onCaptureInterval = function() {
+ self[self.state] && self[self.state]();
+ };
+
+ if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
+ return setTimeout(function() {onCaptureEnd(ev);});
+ }
+
+ event.capture(this.editor.container, onMouseMove, onCaptureEnd);
+ var timerId = setInterval(onCaptureInterval, 20);
+ };
+}).call(MouseHandler.prototype);
+
+config.defineOptions(MouseHandler.prototype, "mouseHandler", {
+ scrollSpeed: {initialValue: 2},
+ dragDelay: {initialValue: 150},
+ dragEnabled: {initialValue: true},
+ focusTimout: {initialValue: 0}
+});
+
+
+exports.MouseHandler = MouseHandler;
+});
diff --git a/src/fauxton/assets/js/libs/ace/mouse/multi_select_handler.js b/src/fauxton/assets/js/libs/ace/mouse/multi_select_handler.js
new file mode 100644
index 000000000..2e0cda7ba
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/mouse/multi_select_handler.js
@@ -0,0 +1,160 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var event = require("../lib/event");
+
+
+// mouse
+function isSamePoint(p1, p2) {
+ return p1.row == p2.row && p1.column == p2.column;
+}
+
+function onMouseDown(e) {
+ var ev = e.domEvent;
+ var alt = ev.altKey;
+ var shift = ev.shiftKey;
+ var ctrl = e.getAccelKey();
+ var button = e.getButton();
+
+ if (e.editor.inMultiSelectMode && button == 2) {
+ e.editor.textInput.onContextMenu(e.domEvent);
+ return;
+ }
+
+ if (!ctrl && !alt) {
+ if (button == 0 && e.editor.inMultiSelectMode)
+ e.editor.exitMultiSelectMode();
+ return;
+ }
+
+ var editor = e.editor;
+ var selection = editor.selection;
+ var isMultiSelect = editor.inMultiSelectMode;
+ var pos = e.getDocumentPosition();
+ var cursor = selection.getCursor();
+ var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));
+
+
+ var mouseX = e.x, mouseY = e.y;
+ var onMouseSelection = function(e) {
+ mouseX = e.clientX;
+ mouseY = e.clientY;
+ };
+
+ var blockSelect = function() {
+ var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column);
+
+ if (isSamePoint(screenCursor, newCursor)
+ && isSamePoint(cursor, selection.selectionLead))
+ return;
+ screenCursor = newCursor;
+
+ editor.selection.moveCursorToPosition(cursor);
+ editor.selection.clearSelection();
+ editor.renderer.scrollCursorIntoView();
+
+ editor.removeSelectionMarkers(rectSel);
+ rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
+ rectSel.forEach(editor.addSelectionMarker, editor);
+ editor.updateSelectionMarkers();
+ };
+
+ var session = editor.session;
+ var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var screenCursor = screenAnchor;
+
+
+
+ if (ctrl && !shift && !alt && button == 0) {
+ if (!isMultiSelect && inSelection)
+ return; // dragging
+
+ if (!isMultiSelect) {
+ var range = selection.toOrientedRange();
+ editor.addSelectionMarker(range);
+ }
+
+ var oldRange = selection.rangeList.rangeAtPoint(pos);
+
+ editor.once("mouseup", function() {
+ var tmpSel = selection.toOrientedRange();
+
+ if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
+ selection.substractPoint(tmpSel.cursor);
+ else {
+ if (range) {
+ editor.removeSelectionMarker(range);
+ selection.addRange(range);
+ }
+ selection.addRange(tmpSel);
+ }
+ });
+
+ } else if (alt && button == 0) {
+ e.stop();
+
+ if (isMultiSelect && !ctrl)
+ selection.toSingleRange();
+ else if (!isMultiSelect && ctrl)
+ selection.addRange();
+
+ var rectSel = [];
+ if (shift) {
+ screenAnchor = session.documentToScreenPosition(selection.lead);
+ blockSelect();
+ } else {
+ selection.moveCursorToPosition(pos);
+ selection.clearSelection();
+ }
+
+
+ var onMouseSelectionEnd = function(e) {
+ clearInterval(timerId);
+ editor.removeSelectionMarkers(rectSel);
+ for (var i = 0; i < rectSel.length; i++)
+ selection.addRange(rectSel[i]);
+ };
+
+ var onSelectionInterval = blockSelect;
+
+ event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);
+ var timerId = setInterval(function() {onSelectionInterval();}, 20);
+
+ return e.preventDefault();
+ }
+}
+
+
+exports.onMouseDown = onMouseDown;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/multi_select.js b/src/fauxton/assets/js/libs/ace/multi_select.js
new file mode 100644
index 000000000..a811b6bea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/multi_select.js
@@ -0,0 +1,934 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+var RangeList = require("./range_list").RangeList;
+var Range = require("./range").Range;
+var Selection = require("./selection").Selection;
+var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var commands = require("./commands/multi_select_commands");
+exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
+
+// Todo: session.find or editor.findVolatile that returns range
+var Search = require("./search").Search;
+var search = new Search();
+
+function find(session, needle, dir) {
+ search.$options.wrap = true;
+ search.$options.needle = needle;
+ search.$options.backwards = dir == -1;
+ return search.find(session);
+}
+
+// extend EditSession
+var EditSession = require("./edit_session").EditSession;
+(function() {
+ this.getSelectionMarkers = function() {
+ return this.$selectionMarkers;
+ };
+}).call(EditSession.prototype);
+
+// extend Selection
+(function() {
+ // list of ranges in reverse addition order
+ this.ranges = null;
+
+ // automatically sorted list of ranges
+ this.rangeList = null;
+
+ /**
+ * Adds a range to a selection by entering multiselect mode, if necessary.
+ * @param {Range} range The new range to add
+ * @param {Boolean} $blockChangeEvents Whether or not to block changing events
+ * @method Selection.addRange
+ **/
+ this.addRange = function(range, $blockChangeEvents) {
+ if (!range)
+ return;
+
+ if (!this.inMultiSelectMode && this.rangeCount == 0) {
+ var oldRange = this.toOrientedRange();
+ this.rangeList.add(oldRange);
+ this.rangeList.add(range);
+ if (this.rangeList.ranges.length != 2) {
+ this.rangeList.removeAll();
+ return $blockChangeEvents || this.fromOrientedRange(range);
+ }
+ this.rangeList.removeAll();
+ this.rangeList.add(oldRange);
+ this.$onAddRange(oldRange);
+ }
+
+ if (!range.cursor)
+ range.cursor = range.end;
+
+ var removed = this.rangeList.add(range);
+
+ this.$onAddRange(range);
+
+ if (removed.length)
+ this.$onRemoveRange(removed);
+
+ if (this.rangeCount > 1 && !this.inMultiSelectMode) {
+ this._emit("multiSelect");
+ this.inMultiSelectMode = true;
+ this.session.$undoSelect = false;
+ this.rangeList.attach(this.session);
+ }
+
+ return $blockChangeEvents || this.fromOrientedRange(range);
+ };
+
+ /**
+ * @method Selection.toSingleRange
+ **/
+
+ this.toSingleRange = function(range) {
+ range = range || this.ranges[0];
+ var removed = this.rangeList.removeAll();
+ if (removed.length)
+ this.$onRemoveRange(removed);
+
+ range && this.fromOrientedRange(range);
+ };
+
+ /**
+ * Removes a Range containing pos (if it exists).
+ * @param {Range} pos The position to remove, as a `{row, column}` object
+ * @method Selection.substractPoint
+ **/
+ this.substractPoint = function(pos) {
+ var removed = this.rangeList.substractPoint(pos);
+ if (removed) {
+ this.$onRemoveRange(removed);
+ return removed[0];
+ }
+ };
+
+ /**
+ * Merges overlapping ranges ensuring consistency after changes
+ * @method Selection.mergeOverlappingRanges
+ **/
+ this.mergeOverlappingRanges = function() {
+ var removed = this.rangeList.merge();
+ if (removed.length)
+ this.$onRemoveRange(removed);
+ else if(this.ranges[0])
+ this.fromOrientedRange(this.ranges[0]);
+ };
+
+ this.$onAddRange = function(range) {
+ this.rangeCount = this.rangeList.ranges.length;
+ this.ranges.unshift(range);
+ this._emit("addRange", {range: range});
+ };
+
+ this.$onRemoveRange = function(removed) {
+ this.rangeCount = this.rangeList.ranges.length;
+ if (this.rangeCount == 1 && this.inMultiSelectMode) {
+ var lastRange = this.rangeList.ranges.pop();
+ removed.push(lastRange);
+ this.rangeCount = 0;
+ }
+
+ for (var i = removed.length; i--; ) {
+ var index = this.ranges.indexOf(removed[i]);
+ this.ranges.splice(index, 1);
+ }
+
+ this._emit("removeRange", {ranges: removed});
+
+ if (this.rangeCount == 0 && this.inMultiSelectMode) {
+ this.inMultiSelectMode = false;
+ this._emit("singleSelect");
+ this.session.$undoSelect = true;
+ this.rangeList.detach(this.session);
+ }
+
+ lastRange = lastRange || this.ranges[0];
+ if (lastRange && !lastRange.isEqual(this.getRange()))
+ this.fromOrientedRange(lastRange);
+ };
+
+ // adds multicursor support to selection
+ this.$initRangeList = function() {
+ if (this.rangeList)
+ return;
+
+ this.rangeList = new RangeList();
+ this.ranges = [];
+ this.rangeCount = 0;
+ };
+
+ /**
+ * Returns a concatenation of all the ranges.
+ * @returns {Array}
+ * @method Selection.getAllRanges
+ **/
+ this.getAllRanges = function() {
+ return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];
+ };
+
+ /**
+ * Splits all the ranges into lines.
+ * @method Selection.splitIntoLines
+ **/
+
+ this.splitIntoLines = function () {
+ if (this.rangeCount > 1) {
+ var ranges = this.rangeList.ranges;
+ var lastRange = ranges[ranges.length - 1];
+ var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+ this.toSingleRange();
+ this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+ } else {
+ var range = this.getRange();
+ var isBackwards = this.isBackwards();
+ var startRow = range.start.row;
+ var endRow = range.end.row;
+ if (startRow == endRow) {
+ if (isBackwards)
+ var start = range.end, end = range.start;
+ else
+ var start = range.start, end = range.end;
+
+ this.addRange(Range.fromPoints(end, end));
+ this.addRange(Range.fromPoints(start, start));
+ return;
+ }
+
+ var rectSel = [];
+ var r = this.getLineRange(startRow, true);
+ r.start.column = range.start.column;
+ rectSel.push(r);
+
+ for (var i = startRow + 1; i < endRow; i++)
+ rectSel.push(this.getLineRange(i, true));
+
+ r = this.getLineRange(endRow, true);
+ r.end.column = range.end.column;
+ rectSel.push(r);
+
+ rectSel.forEach(this.addRange, this);
+ }
+ };
+
+ /**
+ * @method Selection.toggleBlockSelection
+ **/
+ this.toggleBlockSelection = function () {
+ if (this.rangeCount > 1) {
+ var ranges = this.rangeList.ranges;
+ var lastRange = ranges[ranges.length - 1];
+ var range = Range.fromPoints(ranges[0].start, lastRange.end);
+
+ this.toSingleRange();
+ this.setSelectionRange(range, lastRange.cursor == lastRange.start);
+ } else {
+ var cursor = this.session.documentToScreenPosition(this.selectionLead);
+ var anchor = this.session.documentToScreenPosition(this.selectionAnchor);
+
+ var rectSel = this.rectangularRangeBlock(cursor, anchor);
+ rectSel.forEach(this.addRange, this);
+ }
+ };
+
+ /**
+ *
+ * Gets list of ranges composing rectangular block on the screen
+ *
+ * @param {Cursor} screenCursor The cursor to use
+ * @param {Anchor} screenAnchor The anchor to use
+ * @param {Boolean} includeEmptyLines If true, this includes ranges inside the block which are empty due to clipping
+ * @returns {Range}
+ * @method Selection.rectangularRangeBlock
+ **/
+ this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
+ var rectSel = [];
+
+ var xBackwards = screenCursor.column < screenAnchor.column;
+ if (xBackwards) {
+ var startColumn = screenCursor.column;
+ var endColumn = screenAnchor.column;
+ } else {
+ var startColumn = screenAnchor.column;
+ var endColumn = screenCursor.column;
+ }
+
+ var yBackwards = screenCursor.row < screenAnchor.row;
+ if (yBackwards) {
+ var startRow = screenCursor.row;
+ var endRow = screenAnchor.row;
+ } else {
+ var startRow = screenAnchor.row;
+ var endRow = screenCursor.row;
+ }
+
+ if (startColumn < 0)
+ startColumn = 0;
+ if (startRow < 0)
+ startRow = 0;
+
+ if (startRow == endRow)
+ includeEmptyLines = true;
+
+ for (var row = startRow; row <= endRow; row++) {
+ var range = Range.fromPoints(
+ this.session.screenToDocumentPosition(row, startColumn),
+ this.session.screenToDocumentPosition(row, endColumn)
+ );
+ if (range.isEmpty()) {
+ if (docEnd && isSamePoint(range.end, docEnd))
+ break;
+ var docEnd = range.end;
+ }
+ range.cursor = xBackwards ? range.start : range.end;
+ rectSel.push(range);
+ }
+
+ if (yBackwards)
+ rectSel.reverse();
+
+ if (!includeEmptyLines) {
+ var end = rectSel.length - 1;
+ while (rectSel[end].isEmpty() && end > 0)
+ end--;
+ if (end > 0) {
+ var start = 0;
+ while (rectSel[start].isEmpty())
+ start++;
+ }
+ for (var i = end; i >= start; i--) {
+ if (rectSel[i].isEmpty())
+ rectSel.splice(i, 1);
+ }
+ }
+
+ return rectSel;
+ };
+}).call(Selection.prototype);
+
+// extend Editor
+var Editor = require("./editor").Editor;
+(function() {
+
+ /**
+ *
+ * Updates the cursor and marker layers.
+ * @method Editor.updateSelectionMarkers
+ *
+ **/
+ this.updateSelectionMarkers = function() {
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ /**
+ * Adds the selection and cursor.
+ * @param {Range} orientedRange A range containing a cursor
+ * @returns {Range}
+ * @method Editor.addSelectionMarker
+ **/
+ this.addSelectionMarker = function(orientedRange) {
+ if (!orientedRange.cursor)
+ orientedRange.cursor = orientedRange.end;
+
+ var style = this.getSelectionStyle();
+ orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style);
+
+ this.session.$selectionMarkers.push(orientedRange);
+ this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+ return orientedRange;
+ };
+
+ /**
+ * Removes the selection marker.
+ * @param {Range} range The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
+ * @method Editor.removeSelectionMarker
+ **/
+ this.removeSelectionMarker = function(range) {
+ if (!range.marker)
+ return;
+ this.session.removeMarker(range.marker);
+ var index = this.session.$selectionMarkers.indexOf(range);
+ if (index != -1)
+ this.session.$selectionMarkers.splice(index, 1);
+ this.session.selectionMarkerCount = this.session.$selectionMarkers.length;
+ };
+
+ this.removeSelectionMarkers = function(ranges) {
+ var markerList = this.session.$selectionMarkers;
+ for (var i = ranges.length; i--; ) {
+ var range = ranges[i];
+ if (!range.marker)
+ continue;
+ this.session.removeMarker(range.marker);
+ var index = markerList.indexOf(range);
+ if (index != -1)
+ markerList.splice(index, 1);
+ }
+ this.session.selectionMarkerCount = markerList.length;
+ };
+
+ this.$onAddRange = function(e) {
+ this.addSelectionMarker(e.range);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onRemoveRange = function(e) {
+ this.removeSelectionMarkers(e.ranges);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onMultiSelect = function(e) {
+ if (this.inMultiSelectMode)
+ return;
+ this.inMultiSelectMode = true;
+
+ this.setStyle("ace_multiselect");
+ this.keyBinding.addKeyboardHandler(commands.keyboardHandler);
+ this.commands.setDefaultHandler("exec", this.$onMultiSelectExec);
+
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onSingleSelect = function(e) {
+ if (this.session.multiSelect.inVirtualMode)
+ return;
+ this.inMultiSelectMode = false;
+
+ this.unsetStyle("ace_multiselect");
+ this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);
+
+ this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ };
+
+ this.$onMultiSelectExec = function(e) {
+ var command = e.command;
+ var editor = e.editor;
+ if (!editor.multiSelect)
+ return;
+ if (!command.multiSelectAction) {
+ var result = command.exec(editor, e.args || {});
+ editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
+ editor.multiSelect.mergeOverlappingRanges();
+ } else if (command.multiSelectAction == "forEach") {
+ result = editor.forEachSelection(command, e.args);
+ } else if (command.multiSelectAction == "forEachLine") {
+ result = editor.forEachSelection(command, e.args, true);
+ } else if (command.multiSelectAction == "single") {
+ editor.exitMultiSelectMode();
+ result = command.exec(editor, e.args || {});
+ } else {
+ result = command.multiSelectAction(editor, e.args || {});
+ }
+ return result;
+ };
+
+ /**
+ * Executes a command for each selection range.
+ * @param {String} cmd The command to execute
+ * @param {String} args Any arguments for the command
+ * @method Editor.forEachSelection
+ **/
+ this.forEachSelection = function(cmd, args, $byLines) {
+ if (this.inVirtualSelectionMode)
+ return;
+
+ var session = this.session;
+ var selection = this.selection;
+ var rangeList = selection.rangeList;
+ var result;
+
+ var reg = selection._eventRegistry;
+ selection._eventRegistry = {};
+
+ var tmpSel = new Selection(session);
+ this.inVirtualSelectionMode = true;
+ for (var i = rangeList.ranges.length; i--;) {
+ if ($byLines) {
+ while (i > 0 && rangeList.ranges[i].start.row == rangeList.ranges[i - 1].end.row)
+ i--;
+ }
+ tmpSel.fromOrientedRange(rangeList.ranges[i]);
+ this.selection = session.selection = tmpSel;
+ var cmdResult = cmd.exec(this, args || {});
+ if (!result == undefined)
+ result = cmdResult;
+ tmpSel.toOrientedRange(rangeList.ranges[i]);
+ }
+ tmpSel.detach();
+
+ this.selection = session.selection = selection;
+ this.inVirtualSelectionMode = false;
+ selection._eventRegistry = reg;
+ selection.mergeOverlappingRanges();
+
+ var anim = this.renderer.$scrollAnimation;
+ this.onCursorChange();
+ this.onSelectionChange();
+ if (anim && anim.from == anim.to)
+ this.renderer.animateScrolling(anim.from);
+
+ return result;
+ };
+
+ /**
+ * Removes all the selections except the last added one.
+ * @method Editor.exitMultiSelectMode
+ **/
+ this.exitMultiSelectMode = function() {
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
+ return;
+ this.multiSelect.toSingleRange();
+ };
+
+ this.getSelectedText = function() {
+ var text = "";
+ if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+ var ranges = this.multiSelect.rangeList.ranges;
+ var buf = [];
+ for (var i = 0; i < ranges.length; i++) {
+ buf.push(this.session.getTextRange(ranges[i]));
+ }
+ var nl = this.session.getDocument().getNewLineCharacter();
+ text = buf.join(nl);
+ if (text.length == (buf.length - 1) * nl.length)
+ text = "";
+ } else if (!this.selection.isEmpty()) {
+ text = this.session.getTextRange(this.getSelectionRange());
+ }
+ return text;
+ };
+
+ // todo this should change when paste becomes a command
+ this.onPaste = function(text) {
+ if (this.$readOnly)
+ return;
+
+ this._signal("paste", text);
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
+ return this.insert(text);
+
+ var lines = text.split(/\r\n|\r|\n/);
+ var ranges = this.selection.rangeList.ranges;
+
+ if (lines.length > ranges.length || lines.length < 2 || !lines[1])
+ return this.commands.exec("insertstring", this, text);
+
+ for (var i = ranges.length; i--;) {
+ var range = ranges[i];
+ if (!range.isEmpty())
+ this.session.remove(range);
+
+ this.session.insert(range.start, lines[i]);
+ }
+ };
+
+ /**
+ * Finds and selects all the occurences of `needle`.
+ * @param {String} The text to find
+ * @param {Object} The search options
+ * @param {Boolean} keeps
+ *
+ * @returns {Number} The cumulative count of all found matches
+ * @method Editor.findAll
+ **/
+ this.findAll = function(needle, options, additive) {
+ options = options || {};
+ options.needle = needle || options.needle;
+ this.$search.set(options);
+
+ var ranges = this.$search.findAll(this.session);
+ if (!ranges.length)
+ return 0;
+
+ this.$blockScrolling += 1;
+ var selection = this.multiSelect;
+
+ if (!additive)
+ selection.toSingleRange(ranges[0]);
+
+ for (var i = ranges.length; i--; )
+ selection.addRange(ranges[i], true);
+
+ this.$blockScrolling -= 1;
+
+ return ranges.length;
+ };
+
+ /**
+ * Adds a cursor above or below the active cursor.
+ *
+ * @param {Number} dir The direction of lines to select: -1 for up, 1 for down
+ * @param {Boolean} skip If `true`, removes the active selection range
+ *
+ * @method Editor.selectMoreLines
+ */
+ this.selectMoreLines = function(dir, skip) {
+ var range = this.selection.toOrientedRange();
+ var isBackwards = range.cursor == range.end;
+
+ var screenLead = this.session.documentToScreenPosition(range.cursor);
+ if (this.selection.$desiredColumn)
+ screenLead.column = this.selection.$desiredColumn;
+
+ var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);
+
+ if (!range.isEmpty()) {
+ var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);
+ var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);
+ } else {
+ var anchor = lead;
+ }
+
+ if (isBackwards) {
+ var newRange = Range.fromPoints(lead, anchor);
+ newRange.cursor = newRange.start;
+ } else {
+ var newRange = Range.fromPoints(anchor, lead);
+ newRange.cursor = newRange.end;
+ }
+
+ newRange.desiredColumn = screenLead.column;
+ if (!this.selection.inMultiSelectMode) {
+ this.selection.addRange(range);
+ } else {
+ if (skip)
+ var toRemove = range.cursor;
+ }
+
+ this.selection.addRange(newRange);
+ if (toRemove)
+ this.selection.substractPoint(toRemove);
+ };
+
+ /**
+ * Transposes the selected ranges.
+ * @param {Number} dir The direction to rotate selections
+ * @method Editor.transposeSelections
+ **/
+ this.transposeSelections = function(dir) {
+ var session = this.session;
+ var sel = session.multiSelect;
+ var all = sel.ranges;
+
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ if (range.isEmpty()) {
+ var tmp = session.getWordRange(range.start.row, range.start.column);
+ range.start.row = tmp.start.row;
+ range.start.column = tmp.start.column;
+ range.end.row = tmp.end.row;
+ range.end.column = tmp.end.column;
+ }
+ }
+ sel.mergeOverlappingRanges();
+
+ var words = [];
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ words.unshift(session.getTextRange(range));
+ }
+
+ if (dir < 0)
+ words.unshift(words.pop());
+ else
+ words.push(words.shift());
+
+ for (var i = all.length; i--; ) {
+ var range = all[i];
+ var tmp = range.clone();
+ session.replace(range, words[i]);
+ range.start.row = tmp.start.row;
+ range.start.column = tmp.start.column;
+ }
+ };
+
+ /**
+ * Finds the next occurence of text in an active selection and adds it to the selections.
+ * @param {Number} dir The direction of lines to select: -1 for up, 1 for down
+ * @param {Boolean} skip If `true`, removes the active selection range
+ * @method Editor.selectMore
+ **/
+ this.selectMore = function(dir, skip) {
+ var session = this.session;
+ var sel = session.multiSelect;
+
+ var range = sel.toOrientedRange();
+ if (range.isEmpty()) {
+ var range = session.getWordRange(range.start.row, range.start.column);
+ range.cursor = dir == -1 ? range.start : range.end;
+ this.multiSelect.addRange(range);
+ return;
+ }
+ var needle = session.getTextRange(range);
+
+ var newRange = find(session, needle, dir);
+ if (newRange) {
+ newRange.cursor = dir == -1 ? newRange.start : newRange.end;
+ this.multiSelect.addRange(newRange);
+ }
+ if (skip)
+ this.multiSelect.substractPoint(range.cursor);
+ };
+
+ /**
+ * Aligns the cursors or selected text.
+ * @method Editor.alignCursors
+ **/
+ this.alignCursors = function() {
+ var session = this.session;
+ var sel = session.multiSelect;
+ var ranges = sel.ranges;
+
+ if (!ranges.length) {
+ var range = this.selection.getRange();
+ var fr = range.start.row, lr = range.end.row;
+ var lines = this.session.doc.removeLines(fr, lr);
+ lines = this.$reAlignText(lines);
+ this.session.doc.insertLines(fr, lines);
+ range.start.column = 0;
+ range.end.column = lines[lines.length - 1].length;
+ this.selection.setRange(range);
+ } else {
+ // filter out ranges on same row
+ var row = -1;
+ var sameRowRanges = ranges.filter(function(r) {
+ if (r.cursor.row == row)
+ return true;
+ row = r.cursor.row;
+ });
+ sel.$onRemoveRange(sameRowRanges);
+
+ var maxCol = 0;
+ var minSpace = Infinity;
+ var spaceOffsets = ranges.map(function(r) {
+ var p = r.cursor;
+ var line = session.getLine(p.row);
+ var spaceOffset = line.substr(p.column).search(/\S/g);
+ if (spaceOffset == -1)
+ spaceOffset = 0;
+
+ if (p.column > maxCol)
+ maxCol = p.column;
+ if (spaceOffset < minSpace)
+ minSpace = spaceOffset;
+ return spaceOffset;
+ });
+ ranges.forEach(function(r, i) {
+ var p = r.cursor;
+ var l = maxCol - p.column;
+ var d = spaceOffsets[i] - minSpace;
+ if (l > d)
+ session.insert(p, lang.stringRepeat(" ", l - d));
+ else
+ session.remove(new Range(p.row, p.column, p.row, p.column - l + d));
+
+ r.start.column = r.end.column = maxCol;
+ r.start.row = r.end.row = p.row;
+ r.cursor = r.end;
+ });
+ sel.fromOrientedRange(ranges[0]);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ }
+ };
+
+ this.$reAlignText = function(lines) {
+ var isLeftAligned = true, isRightAligned = true;
+ var startW, textW, endW;
+
+ return lines.map(function(line) {
+ var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/);
+ if (!m)
+ return [line];
+
+ if (startW == null) {
+ startW = m[1].length;
+ textW = m[2].length;
+ endW = m[3].length;
+ return m;
+ }
+
+ if (startW + textW + endW != m[1].length + m[2].length + m[3].length)
+ isRightAligned = false;
+ if (startW != m[1].length)
+ isLeftAligned = false;
+
+ if (startW > m[1].length)
+ startW = m[1].length;
+ if (textW < m[2].length)
+ textW = m[2].length;
+ if (endW > m[3].length)
+ endW = m[3].length;
+
+ return m;
+ }).map(isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
+
+ function spaces(n) {
+ return lang.stringRepeat(" ", n);
+ }
+
+ function alignLeft(m) {
+ return !m[2] ? m[0] : spaces(startW) + m[2]
+ + spaces(textW - m[2].length + endW)
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ function alignRight(m) {
+ return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]
+ + spaces(endW, " ")
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ function unAlign(m) {
+ return !m[2] ? m[0] : spaces(startW) + m[2]
+ + spaces(endW)
+ + m[4].replace(/^([=:])\s+/, "$1 ")
+ }
+ }
+}).call(Editor.prototype);
+
+
+function isSamePoint(p1, p2) {
+ return p1.row == p2.row && p1.column == p2.column;
+}
+
+// patch
+// adds multicursor support to a session
+exports.onSessionChange = function(e) {
+ var session = e.session;
+ if (!session.multiSelect) {
+ session.$selectionMarkers = [];
+ session.selection.$initRangeList();
+ session.multiSelect = session.selection;
+ }
+ this.multiSelect = session.multiSelect;
+
+ var oldSession = e.oldSession;
+ if (oldSession) {
+ oldSession.multiSelect.removeEventListener("addRange", this.$onAddRange);
+ oldSession.multiSelect.removeEventListener("removeRange", this.$onRemoveRange);
+ oldSession.multiSelect.removeEventListener("multiSelect", this.$onMultiSelect);
+ oldSession.multiSelect.removeEventListener("singleSelect", this.$onSingleSelect);
+ }
+
+ session.multiSelect.on("addRange", this.$onAddRange);
+ session.multiSelect.on("removeRange", this.$onRemoveRange);
+ session.multiSelect.on("multiSelect", this.$onMultiSelect);
+ session.multiSelect.on("singleSelect", this.$onSingleSelect);
+
+ // this.$onSelectionChange = this.onSelectionChange.bind(this);
+
+ if (this.inMultiSelectMode != session.selection.inMultiSelectMode) {
+ if (session.selection.inMultiSelectMode)
+ this.$onMultiSelect();
+ else
+ this.$onSingleSelect();
+ }
+};
+
+// MultiSelect(editor)
+// adds multiple selection support to the editor
+// (note: should be called only once for each editor instance)
+function MultiSelect(editor) {
+ if (editor.$multiselectOnSessionChange)
+ return;
+ editor.$onAddRange = editor.$onAddRange.bind(editor);
+ editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);
+ editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);
+ editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);
+ editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);
+
+ editor.$multiselectOnSessionChange(editor);
+ editor.on("changeSession", editor.$multiselectOnSessionChange);
+
+ editor.on("mousedown", onMouseDown);
+ editor.commands.addCommands(commands.defaultCommands);
+
+ addAltCursorListeners(editor);
+}
+
+function addAltCursorListeners(editor){
+ var el = editor.textInput.getElement();
+ var altCursor = false;
+ event.addListener(el, "keydown", function(e) {
+ if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) {
+ if (!altCursor) {
+ editor.renderer.setMouseCursor("crosshair");
+ altCursor = true;
+ }
+ } else if (altCursor) {
+ reset();
+ }
+ });
+
+ event.addListener(el, "keyup", reset);
+ event.addListener(el, "blur", reset);
+ function reset(e) {
+ if (altCursor) {
+ editor.renderer.setMouseCursor("");
+ altCursor = false;
+ // TODO disable menu poping up
+ // e && e.preventDefault()
+ }
+ }
+}
+
+exports.MultiSelect = MultiSelect;
+
+
+require("./config").defineOptions(Editor.prototype, "editor", {
+ enableMultiselect: {
+ set: function(val) {
+ MultiSelect(this);
+ if (val) {
+ this.on("changeSession", this.$multiselectOnSessionChange);
+ this.on("mousedown", onMouseDown);
+ } else {
+ this.off("changeSession", this.$multiselectOnSessionChange);
+ this.off("mousedown", onMouseDown);
+ }
+ },
+ value: true
+ }
+})
+
+
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/multi_select_test.js b/src/fauxton/assets/js/libs/ace/multi_select_test.js
new file mode 100644
index 000000000..795aee2b7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/multi_select_test.js
@@ -0,0 +1,205 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+var MultiSelect = require("./multi_select").MultiSelect;
+
+var editor;
+var exec = function(name, times, args) {
+ do {
+ editor.commands.exec(name, editor, args);
+ } while(times --> 1)
+};
+var testRanges = function(str) {
+ assert.equal(editor.selection.getAllRanges() + "", str + "");
+}
+
+module.exports = {
+
+ name: "ACE multi_select.js",
+
+ "test: multiselect editing": function() {
+ var doc = new EditSession([
+ "w1.w2",
+ " wtt.w",
+ " wtt.w"
+ ]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+
+ editor.navigateFileEnd();
+ exec("selectMoreBefore", 4);
+ assert.ok(editor.inMultiSelectMode);
+ assert.equal(editor.selection.getAllRanges().length, 4);
+
+ var newLine = editor.session.getDocument().getNewLineCharacter();
+ var copyText = "wwww".split("").join(newLine);
+ assert.equal(editor.getCopyText(), copyText);
+ exec("insertstring", 1, "a");
+ exec("backspace", 2);
+ assert.equal(editor.session.getValue(), "w1.w2\ntt\ntt");
+ assert.equal(editor.selection.getAllRanges().length, 4);
+
+ exec("selectall");
+ assert.ok(!editor.inMultiSelectMode);
+ //assert.equal(editor.selection.getAllRanges().length, 1);
+ },
+
+ "test: multiselect navigation": function() {
+ var doc = new EditSession([
+ "w1.w2",
+ " wtt.w",
+ " wtt.we"
+ ]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+
+ editor.selectMoreLines(1);
+ testRanges("Range: [0/0] -> [0/0],Range: [1/0] -> [1/0]");
+ assert.ok(editor.inMultiSelectMode);
+
+ exec("golinedown");
+ exec("gotolineend");
+ testRanges("Range: [1/9] -> [1/9],Range: [2/10] -> [2/10]");
+ exec("selectwordleft");
+
+ testRanges("Range: [1/8] -> [1/9],Range: [2/8] -> [2/10]");
+ exec("golinedown", 2);
+ assert.ok(!editor.inMultiSelectMode);
+ },
+
+ "test: multiselect session change": function() {
+ var doc = new EditSession([
+ "w1.w2",
+ " wtt.w",
+ " wtt.w"
+ ]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+
+ editor.selectMoreLines(1)
+ testRanges("Range: [0/0] -> [0/0],Range: [1/0] -> [1/0]");
+ assert.ok(editor.inMultiSelectMode);
+
+ var doc2 = new EditSession(["w1"]);
+ editor.setSession(doc2);
+ assert.ok(!editor.inMultiSelectMode);
+
+ editor.setSession(doc);
+ assert.ok(editor.inMultiSelectMode);
+ },
+
+ "test: multiselect addRange": function() {
+ var doc = new EditSession([
+ "w1.w2",
+ " wtt.w",
+ " wtt.w"
+ ]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+ var selection = editor.selection;
+
+ var range1 = new Range(0, 2, 0, 4);
+ editor.selection.fromOrientedRange(range1);
+
+ var range2 = new Range(0, 3, 0, 4);
+ selection.addRange(range2);
+ assert.ok(!editor.inMultiSelectMode);
+ assert.ok(range2.isEqual(editor.selection.getRange()));
+
+ var range3 = new Range(0, 1, 0, 1);
+ selection.addRange(range3);
+ assert.ok(editor.inMultiSelectMode);
+ testRanges([range3, range2]);
+
+ var range4 = new Range(0, 0, 4, 0);
+ selection.addRange(range4);
+ assert.ok(!editor.inMultiSelectMode);
+ },
+
+ "test: onPaste in command with multiselect": function() {
+ var doc = new EditSession(["l1", "l2"]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+ editor.commands.addCommand({
+ name: 'insertfoo',
+ exec: function(ed) { ed.onPaste('foo'); },
+ multiSelectAction: "forEach"
+ });
+ var selection = editor.selection;
+ var range1 = new Range(0,2,0,2);
+ var range2 = new Range(1,2,1,2);
+ selection.fromOrientedRange(range1)
+ selection.addRange(range2);
+ editor.execCommand('insertfoo');
+ assert.equal('l1foo\nl2foo', editor.getValue());
+ },
+
+ "test multiselect fromJSON/toJSON": function() {
+ var doc = new EditSession(["l1", "l2"]);
+ editor = new Editor(new MockRenderer(), doc);
+ MultiSelect(editor);
+ var selection = editor.selection;
+
+ var before = selection.toJSON();
+
+ var range1 = new Range(0,2,0,2);
+ var range2 = new Range(1,2,1,2);
+ selection.fromOrientedRange(range1)
+ selection.addRange(range2);
+
+ var after = selection.toJSON();
+
+ selection.fromJSON(before);
+ assert.ok(!selection.isEqual(after));
+ assert.ok(selection.isEqual(before));
+
+ selection.fromJSON(after);
+ assert.ok(!selection.isEqual(before));
+ assert.ok(selection.isEqual(after));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/occur.js b/src/fauxton/assets/js/libs/ace/occur.js
new file mode 100644
index 000000000..385bc76ad
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/occur.js
@@ -0,0 +1,190 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var EditSession = require("./edit_session").EditSession;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+
+/**
+ * @class Occur
+ *
+ * Finds all lines matching a search term in the current [[Document
+ * `Document`]] and displays them instead of the original `Document`. Keeps
+ * track of the mapping between the occur doc and the original doc.
+ *
+ **/
+
+
+/**
+ * Creates a new `Occur` object.
+ *
+ * @constructor
+ **/
+function Occur() {}
+
+oop.inherits(Occur, Search);
+
+(function() {
+
+ /**
+ * Enables occur mode. expects that `options.needle` is a search term.
+ * This search term is used to filter out all the lines that include it
+ * and these are then used as the content of a new [[Document
+ * `Document`]]. The current cursor position of editor will be translated
+ * so that the cursor is on the matching row/column as it was before.
+ * @param {Editor} editor
+ * @param {Object} options options.needle should be a String
+ * @return {Boolean} Whether occur activation was successful
+ *
+ **/
+ this.enter = function(editor, options) {
+ if (!options.needle) return false;
+ var pos = editor.getCursorPosition();
+ this.displayOccurContent(editor, options);
+ var translatedPos = this.originalToOccurPosition(editor.session, pos);
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+
+ /**
+ * Disables occur mode. Resets the [[Sessions `EditSession`]] [[Document
+ * `Document`]] back to the original doc. If options.translatePosition is
+ * truthy also maps the [[Editors `Editor`]] cursor position accordingly.
+ * @param {Editor} editor
+ * @param {Object} options options.translatePosition
+ * @return {Boolean} Whether occur deactivation was successful
+ *
+ **/
+ this.exit = function(editor, options) {
+ var pos = options.translatePosition && editor.getCursorPosition();
+ var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos);
+ this.displayOriginalContent(editor);
+ if (translatedPos)
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+
+ this.highlight = function(sess, regexp) {
+ var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_occur-highlight", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ }
+
+ this.displayOccurContent = function(editor, options) {
+ // this.setSession(session || new EditSession(""))
+ this.$originalSession = editor.session;
+ var found = this.matchingLines(editor.session, options);
+ var lines = found.map(function(foundLine) { return foundLine.content; });
+ var occurSession = new EditSession(lines.join('\n'));
+ occurSession.$occur = this;
+ occurSession.$occurMatchingLines = found;
+ editor.setSession(occurSession);
+ this.highlight(occurSession, options.re);
+ occurSession._emit('changeBackMarker');
+ }
+
+ this.displayOriginalContent = function(editor) {
+ editor.setSession(this.$originalSession);
+ }
+
+ /**
+ * Translates the position from the original document to the occur lines in
+ * the document or the beginning if the doc {row: 0, column: 0} if not
+ * found.
+ * @param {EditSession} session The occur session
+ * @param {Object} pos The position in the original document
+ * @return {Object} position in occur doc
+ **/
+ this.originalToOccurPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ var nullPos = {row: 0, column: 0};
+ if (!lines) return nullPos;
+ for (var i = 0; i < lines.length; i++) {
+ if (lines[i].row === pos.row)
+ return {row: i, column: pos.column};
+ }
+ return nullPos;
+ }
+
+ /**
+ * Translates the position from the occur document to the original document
+ * or `pos` if not found.
+ * @param {EditSession} session The occur session
+ * @param {Object} pos The position in the occur session document
+ * @return {Object} position
+ **/
+ this.occurToOriginalPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ if (!lines || !lines[pos.row])
+ return pos;
+ return {row: lines[pos.row].row, column: pos.column};
+ }
+
+ this.matchingLines = function(session, options) {
+ options = oop.mixin({}, options);
+ if (!session || !options.needle) return [];
+ var search = new Search();
+ search.set(options);
+ return search.findAll(session).reduce(function(lines, range) {
+ var row = range.start.row;
+ var last = lines[lines.length-1];
+ return last && last.row === row ?
+ lines :
+ lines.concat({row: row, content: session.getLine(row)});
+ }, []);
+ }
+
+}).call(Occur.prototype);
+
+var dom = require('./lib/dom');
+dom.importCssString(".ace_occur-highlight {\n\
+ border-radius: 4px;\n\
+ background-color: rgba(87, 255, 8, 0.25);\n\
+ position: absolute;\n\
+ z-index: 4;\n\
+ -moz-box-sizing: border-box;\n\
+ -webkit-box-sizing: border-box;\n\
+ box-sizing: border-box;\n\
+ box-shadow: 0 0 4px rgb(91, 255, 50);\n\
+}\n\
+.ace_dark .ace_occur-highlight {\n\
+ background-color: rgb(80, 140, 85);\n\
+ box-shadow: 0 0 4px rgb(60, 120, 70);\n\
+}\n", "incremental-occur-highlighting");
+
+exports.Occur = Occur;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/occur_test.js b/src/fauxton/assets/js/libs/ace/occur_test.js
new file mode 100644
index 000000000..59fb8548b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/occur_test.js
@@ -0,0 +1,154 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var Range = require("./range").Range;
+var assert = require("./test/assertions");
+var Occur = require("./occur").Occur;
+var occurStartCommand = require("./commands/occur_commands").occurStartCommand;
+var editor, occur;
+
+module.exports = {
+
+ name: "ACE occur.js",
+
+ setUp: function() {
+ var session = new EditSession('');
+ editor = new Editor(new MockRenderer(), session);
+ occur = new Occur();
+ },
+
+ "test: find lines matching" : function() {
+ editor.session.insert({row: 0, column: 0}, 'abc\ndef\nxyz\nbcxbc');
+ var result = occur.matchingLines(editor.session, {needle: 'bc'}),
+ expected = [{row: 0, content: 'abc'}, {row: 3, content: 'bcxbc'}];
+ assert.deepEqual(result, expected);
+ },
+
+ "test: display occurrences" : function() {
+ var text = 'abc\ndef\nxyz\nbcx\n';
+ editor.session.insert({row: 0, column: 0}, text);
+ occur.displayOccurContent(editor, {needle: 'bc'});
+ assert.equal(editor.getValue(), 'abc\nbcx');
+ occur.displayOriginalContent(editor);
+ assert.equal(editor.getValue(), text);
+ },
+
+ "test: original position from occur doc" : function() {
+ var text = 'abc\ndef\nxyz\nbcx\n';
+ editor.session.insert({row: 0, column: 0}, text);
+ occur.displayOccurContent(editor, {needle: 'bc'});
+ assert.equal(editor.getValue(), 'abc\nbcx');
+ var pos = occur.occurToOriginalPosition(editor.session, {row: 1, column: 2});
+ assert.position(pos, 3, 2);
+ },
+
+ "test: occur command" : function() {
+ // setup
+ var text = 'hel\nlo\n\nwo\nrld\n';
+ editor.session.insert({row: 0, column: 0}, text);
+ editor.commands.addCommand(occurStartCommand);
+
+ // run occur for lines including 'o'
+ editor.execCommand('occur', {needle: 'o'});
+ assert.equal(editor.getValue(), 'lo\nwo');
+ // command install OK?
+ // assert.ok(editor.getReadOnly(), 'occur doc not marked as read only');
+ assert.ok(editor.getKeyboardHandler().isOccurHandler, 'no occur handler installed');
+ assert.ok(editor.commands.byName.occurexit, 'no exitoccur command installed');
+
+ // exit occur
+ editor.execCommand('occurexit');
+ assert.equal(editor.getValue(), text);
+
+ // editor state cleaned up?
+ // assert.ok(!editor.getReadOnly(), 'original doc is marked as read only');
+ assert.ok(!editor.getKeyboardHandler().isOccurHandler, 'occur handler installed after detach');
+ assert.ok(!editor.commands.byName.occurexit, 'exitoccur installed after exiting occur');
+ },
+
+ "test: occur navigation" : function() {
+ // setup
+ var text = 'hel\nlo\n\nwo\nrld\n';
+ editor.session.insert({row: 0, column: 0}, text);
+ editor.commands.addCommand(occurStartCommand);
+ editor.moveCursorToPosition({row: 1, column: 1});
+
+ // run occur for lines including 'o'
+ editor.execCommand('occur', {needle: 'o'});
+ assert.equal(editor.getValue(), 'lo\nwo');
+ assert.position(editor.getCursorPosition(), 0, 1, 'original -> occur pos');
+
+ // move to second line and accept
+ editor.moveCursorToPosition({row: 1, column: 1});
+ editor.execCommand('occuraccept');
+
+ assert.position(editor.getCursorPosition(), 3, 1, 'occur -> original pos');
+ },
+
+ "test: recursive occur" : function() {
+ // setup
+ var text = 'x\nabc1\nx\nabc2\n';
+ editor.session.insert({row: 0, column: 0}, text);
+ editor.commands.addCommand(occurStartCommand);
+
+ // orig -> occur1
+ editor.execCommand('occur', {needle: 'abc'});
+ assert.equal(editor.getValue(), 'abc1\nabc2', "orig -> occur1");
+
+ // occur1 -> occur2
+ editor.execCommand('occur', {needle: '2'});
+ assert.equal(editor.getValue(), 'abc2', "occur1 -> occur2");
+
+ // occur2 -> occur1
+ editor.execCommand('occurexit');
+ assert.equal(editor.getValue(), 'abc1\nabc2', "occur2 -> occur1");
+
+ // occur1 -> orig
+ editor.execCommand('occurexit');
+ assert.equal(editor.getValue(), text, "occur1 -> orig");
+ }
+
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/placeholder.js b/src/fauxton/assets/js/libs/ace/placeholder.js
new file mode 100644
index 000000000..bcb44ce26
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/placeholder.js
@@ -0,0 +1,269 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("./range").Range;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var oop = require("./lib/oop");
+
+/**
+ * @class PlaceHolder
+ *
+ *
+ **/
+
+/**
+ * - session (Document): The document to associate with the anchor
+ * - length (Number): The starting row position
+ * - pos (Number): The starting column position
+ * - others (String):
+ * - mainClass (String):
+ * - othersClass (String):
+ *
+ *
+ * @constructor
+ **/
+
+var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {
+ var _self = this;
+ this.length = length;
+ this.session = session;
+ this.doc = session.getDocument();
+ this.mainClass = mainClass;
+ this.othersClass = othersClass;
+ this.$onUpdate = this.onUpdate.bind(this);
+ this.doc.on("change", this.$onUpdate);
+ this.$others = others;
+
+ this.$onCursorChange = function() {
+ setTimeout(function() {
+ _self.onCursorChange();
+ });
+ };
+
+ this.$pos = pos;
+ // Used for reset
+ var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};
+ this.$undoStackDepth = undoStack.length;
+ this.setup();
+
+ session.selection.on("changeCursor", this.$onCursorChange);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ * PlaceHolder.setup()
+ *
+ * TODO
+ *
+ **/
+ this.setup = function() {
+ var _self = this;
+ var doc = this.doc;
+ var session = this.session;
+ var pos = this.$pos;
+
+ this.pos = doc.createAnchor(pos.row, pos.column);
+ this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
+ this.pos.on("change", function(event) {
+ session.removeMarker(_self.markerId);
+ _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false);
+ });
+ this.others = [];
+ this.$others.forEach(function(other) {
+ var anchor = doc.createAnchor(other.row, other.column);
+ _self.others.push(anchor);
+ });
+ session.setUndoSelect(false);
+ };
+
+ /**
+ * PlaceHolder.showOtherMarkers()
+ *
+ * TODO
+ *
+ **/
+ this.showOtherMarkers = function() {
+ if(this.othersActive) return;
+ var session = this.session;
+ var _self = this;
+ this.othersActive = true;
+ this.others.forEach(function(anchor) {
+ anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);
+ anchor.on("change", function(event) {
+ session.removeMarker(anchor.markerId);
+ anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false);
+ });
+ });
+ };
+
+ /**
+ * PlaceHolder.hideOtherMarkers()
+ *
+ * Hides all over markers in the [[EditSession `EditSession`]] that are not the currently selected one.
+ *
+ **/
+ this.hideOtherMarkers = function() {
+ if(!this.othersActive) return;
+ this.othersActive = false;
+ for (var i = 0; i < this.others.length; i++) {
+ this.session.removeMarker(this.others[i].markerId);
+ }
+ };
+
+ /**
+ * PlaceHolder@onUpdate(e)
+ *
+ * Emitted when the place holder updates.
+ *
+ **/
+ this.onUpdate = function(event) {
+ var delta = event.data;
+ var range = delta.range;
+ if(range.start.row !== range.end.row) return;
+ if(range.start.row !== this.pos.row) return;
+ if (this.$updating) return;
+ this.$updating = true;
+ var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column;
+
+ if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) {
+ var distanceFromStart = range.start.column - this.pos.column;
+ this.length += lengthDiff;
+ if(!this.session.$fromUndo) {
+ if(delta.action === "insertText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.insert(newPos, delta.text);
+ }
+ } else if(delta.action === "removeText") {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ if(otherPos.row === range.start.row && range.start.column < otherPos.column)
+ newPos.column += lengthDiff;
+ this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
+ }
+ }
+ // Special case: insert in beginning
+ if(range.start.column === this.pos.column && delta.action === "insertText") {
+ setTimeout(function() {
+ this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff);
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ var newPos = {row: other.row, column: other.column - lengthDiff};
+ if(other.row === range.start.row && range.start.column < other.column)
+ newPos.column += lengthDiff;
+ other.setPosition(newPos.row, newPos.column);
+ }
+ }.bind(this), 0);
+ }
+ else if(range.start.column === this.pos.column && delta.action === "removeText") {
+ setTimeout(function() {
+ for (var i = 0; i < this.others.length; i++) {
+ var other = this.others[i];
+ if(other.row === range.start.row && range.start.column < other.column) {
+ other.setPosition(other.row, other.column - lengthDiff);
+ }
+ }
+ }.bind(this), 0);
+ }
+ }
+ this.pos._emit("change", {value: this.pos});
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i]._emit("change", {value: this.others[i]});
+ }
+ }
+ this.$updating = false;
+ };
+
+ /**
+ * PlaceHolder@onCursorChange(e)
+ *
+ * Emitted when the cursor changes.
+ *
+ **/
+
+ this.onCursorChange = function(event) {
+ if (this.$updating) return;
+ var pos = this.session.selection.getCursor();
+ if(pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {
+ this.showOtherMarkers();
+ this._emit("cursorEnter", event);
+ } else {
+ this.hideOtherMarkers();
+ this._emit("cursorLeave", event);
+ }
+ };
+
+ /**
+ * PlaceHolder.detach()
+ *
+ * TODO
+ *
+ **/
+ this.detach = function() {
+ this.session.removeMarker(this.markerId);
+ this.hideOtherMarkers();
+ this.doc.removeEventListener("change", this.$onUpdate);
+ this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
+ this.pos.detach();
+ for (var i = 0; i < this.others.length; i++) {
+ this.others[i].detach();
+ }
+ this.session.setUndoSelect(true);
+ };
+
+ /**
+ * PlaceHolder.cancel()
+ *
+ * TODO
+ *
+ **/
+ this.cancel = function() {
+ if(this.$undoStackDepth === -1)
+ throw Error("Canceling placeholders only supported with undo manager attached to session.");
+ var undoManager = this.session.getUndoManager();
+ var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
+ for (var i = 0; i < undosRequired; i++) {
+ undoManager.undo(true);
+ }
+ };
+}).call(PlaceHolder.prototype);
+
+
+exports.PlaceHolder = PlaceHolder;
+});
diff --git a/src/fauxton/assets/js/libs/ace/placeholder_test.js b/src/fauxton/assets/js/libs/ace/placeholder_test.js
new file mode 100644
index 000000000..97e561fd7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/placeholder_test.js
@@ -0,0 +1,156 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var assert = require("./test/assertions");
+var JavaScriptMode = require("./mode/javascript").Mode;
+var PlaceHolder = require("./placeholder").PlaceHolder;
+var UndoManager = require("./undomanager").UndoManager;
+
+module.exports = {
+
+ "test: simple at the end appending of text" : function() {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+
+ editor.moveCursorTo(0, 5);
+ editor.insert('b');
+ assert.equal(session.doc.getValue(), "var ab = 10;\nconsole.log(ab, ab);");
+ editor.insert('cd');
+ assert.equal(session.doc.getValue(), "var abcd = 10;\nconsole.log(abcd, abcd);");
+ editor.remove('left');
+ editor.remove('left');
+ editor.remove('left');
+ assert.equal(session.doc.getValue(), "var a = 10;\nconsole.log(a, a);");
+ },
+
+ "test: inserting text outside placeholder" : function() {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);\n", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+
+ editor.moveCursorTo(2, 0);
+ editor.insert('b');
+ assert.equal(session.doc.getValue(), "var a = 10;\nconsole.log(a, a);\nb");
+ },
+
+ "test: insertion at the beginning" : function(next) {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ var p = new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+
+ editor.moveCursorTo(0, 4);
+ editor.insert('$');
+ assert.equal(session.doc.getValue(), "var $a = 10;\nconsole.log($a, $a);");
+ editor.moveCursorTo(0, 4);
+ // Have to put this in a setTimeout because the anchor is only fixed later.
+ setTimeout(function() {
+ editor.insert('v');
+ assert.equal(session.doc.getValue(), "var v$a = 10;\nconsole.log(v$a, v$a);");
+ next();
+ }, 10);
+ },
+
+ "test: detaching placeholder" : function() {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ var p = new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+
+ editor.moveCursorTo(0, 5);
+ editor.insert('b');
+ assert.equal(session.doc.getValue(), "var ab = 10;\nconsole.log(ab, ab);");
+ p.detach();
+ editor.insert('cd');
+ assert.equal(session.doc.getValue(), "var abcd = 10;\nconsole.log(ab, ab);");
+ },
+
+ "test: events" : function() {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);", new JavaScriptMode());
+ var editor = new Editor(new MockRenderer(), session);
+
+ var p = new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+ var entered = false;
+ var left = false;
+ p.on("cursorEnter", function() {
+ entered = true;
+ });
+ p.on("cursorLeave", function() {
+ left = true;
+ });
+
+ editor.moveCursorTo(0, 0);
+ editor.moveCursorTo(0, 4);
+ p.onCursorChange(); // Have to do this by hand because moveCursorTo doesn't trigger the event
+ assert.ok(entered);
+ editor.moveCursorTo(1, 0);
+ p.onCursorChange(); // Have to do this by hand because moveCursorTo doesn't trigger the event
+ assert.ok(left);
+ },
+
+ "test: cancel": function(next) {
+ var session = new EditSession("var a = 10;\nconsole.log(a, a);", new JavaScriptMode());
+ session.setUndoManager(new UndoManager());
+ var editor = new Editor(new MockRenderer(), session);
+ var p = new PlaceHolder(session, 1, {row: 0, column: 4}, [{row: 1, column: 12}, {row: 1, column: 15}]);
+
+ editor.moveCursorTo(0, 5);
+ editor.insert('b');
+ editor.insert('cd');
+ editor.remove('left');
+ assert.equal(session.doc.getValue(), "var abc = 10;\nconsole.log(abc, abc);");
+ // Wait a little for the changes to enter the undo stack
+ setTimeout(function() {
+ p.cancel();
+ assert.equal(session.doc.getValue(), "var a = 10;\nconsole.log(a, a);");
+ next();
+ }, 80);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/range.js b/src/fauxton/assets/js/libs/ace/range.js
new file mode 100644
index 000000000..26492865d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/range.js
@@ -0,0 +1,549 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+/**
+ * This object is used in various places to indicate a region within the editor. To better visualize how this works, imagine a rectangle. Each quadrant of the rectangle is analogus to a range, as ranges contain a starting row and starting column, and an ending row, and ending column.
+ * @class Range
+ **/
+
+/**
+ * Creates a new `Range` object with the given starting and ending row and column points.
+ * @param {Number} startRow The starting row
+ * @param {Number} startColumn The starting column
+ * @param {Number} endRow The ending row
+ * @param {Number} endColumn The ending column
+ *
+ * @constructor
+ **/
+var Range = function(startRow, startColumn, endRow, endColumn) {
+ this.start = {
+ row: startRow,
+ column: startColumn
+ };
+
+ this.end = {
+ row: endRow,
+ column: endColumn
+ };
+};
+
+(function() {
+ /**
+ * Returns `true` if and only if the starting row and column, and ending row and column, are equivalent to those given by `range`.
+ * @param {Range} range A range to check against
+ *
+ * @return {Boolean}
+ **/
+ this.isEqual = function(range) {
+ return this.start.row === range.start.row &&
+ this.end.row === range.end.row &&
+ this.start.column === range.start.column &&
+ this.end.column === range.end.column;
+ };
+
+ /**
+ *
+ * Returns a string containing the range's row and column information, given like this:
+ * ```
+ * [start.row/start.column] -> [end.row/end.column]
+ * ```
+ * @return {String}
+ **/
+ this.toString = function() {
+ return ("Range: [" + this.start.row + "/" + this.start.column +
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
+ };
+
+ /**
+ *
+ * Returns `true` if the `row` and `column` provided are within the given range. This can better be expressed as returning `true` if:
+ * ```javascript
+ * this.start.row <= row <= this.end.row &&
+ * this.start.column <= column <= this.end.column
+ * ```
+ * @param {Number} row A row to check for
+ * @param {Number} column A column to check for
+ * @returns {Boolean}
+ * @related Range.compare
+ **/
+
+ this.contains = function(row, column) {
+ return this.compare(row, column) == 0;
+ };
+
+ /**
+ * Compares `this` range (A) with another range (B).
+ * @param {Range} range A range to compare with
+ *
+ * @related Range.compare
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * <br/>
+ * * `-2`: (B) is in front of (A), and doesn't intersect with (A)<br/>
+ * * `-1`: (B) begins before (A) but ends inside of (A)<br/>
+ * * `0`: (B) is completely inside of (A) OR (A) is completely inside of (B)<br/>
+ * * `+1`: (B) begins inside of (A) but ends outside of (A)<br/>
+ * * `+2`: (B) is after (A) and doesn't intersect with (A)<br/>
+ * * `42`: FTW state: (B) ends in (A) but starts outside of (A)
+ **/
+ this.compareRange = function(range) {
+ var cmp,
+ end = range.end,
+ start = range.start;
+
+ cmp = this.compare(end.row, end.column);
+ if (cmp == 1) {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == 1) {
+ return 2;
+ } else if (cmp == 0) {
+ return 1;
+ } else {
+ return 0;
+ }
+ } else if (cmp == -1) {
+ return -2;
+ } else {
+ cmp = this.compare(start.row, start.column);
+ if (cmp == -1) {
+ return -1;
+ } else if (cmp == 1) {
+ return 42;
+ } else {
+ return 0;
+ }
+ }
+ };
+
+ /**
+ * Checks the row and column points of `p` with the row and column points of the calling range.
+ *
+ * @param {Range} p A point to compare with
+ *
+ * @related Range.compare
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * * `0` if the two points are exactly equal<br/>
+ * * `-1` if `p.row` is less then the calling range<br/>
+ * * `1` if `p.row` is greater than the calling range<br/>
+ * <br/>
+ * If the starting row of the calling range is equal to `p.row`, and:<br/>
+ * * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
+ * * Otherwise, it returns -1<br/>
+ *<br/>
+ * If the ending row of the calling range is equal to `p.row`, and:<br/>
+ * * `p.column` is less than or equal to the calling range's ending column, this returns `0`<br/>
+ * * Otherwise, it returns 1<br/>
+ **/
+ this.comparePoint = function(p) {
+ return this.compare(p.row, p.column);
+ };
+
+ /**
+ * Checks the start and end points of `range` and compares them to the calling range. Returns `true` if the `range` is contained within the caller's range.
+ * @param {Range} range A range to compare with
+ *
+ * @returns {Boolean}
+ * @related Range.comparePoint
+ **/
+ this.containsRange = function(range) {
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
+ };
+
+ /**
+ * Returns `true` if passed in `range` intersects with the one calling this method.
+ * @param {Range} range A range to compare with
+ *
+ * @returns {Boolean}
+ **/
+ this.intersects = function(range) {
+ var cmp = this.compareRange(range);
+ return (cmp == -1 || cmp == 0 || cmp == 1);
+ };
+
+ /**
+ * Returns `true` if the caller's ending row point is the same as `row`, and if the caller's ending column is the same as `column`.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ * @returns {Boolean}
+ **/
+ this.isEnd = function(row, column) {
+ return this.end.row == row && this.end.column == column;
+ };
+
+ /**
+ * Returns `true` if the caller's starting row point is the same as `row`, and if the caller's starting column is the same as `column`.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ * @returns {Boolean}
+ **/
+ this.isStart = function(row, column) {
+ return this.start.row == row && this.start.column == column;
+ };
+
+ /**
+ * Sets the starting row and column for the range.
+ * @param {Number} row A row point to set
+ * @param {Number} column A column point to set
+ *
+ **/
+ this.setStart = function(row, column) {
+ if (typeof row == "object") {
+ this.start.column = row.column;
+ this.start.row = row.row;
+ } else {
+ this.start.row = row;
+ this.start.column = column;
+ }
+ };
+
+ /**
+ * Sets the starting row and column for the range.
+ * @param {Number} row A row point to set
+ * @param {Number} column A column point to set
+ *
+ **/
+ this.setEnd = function(row, column) {
+ if (typeof row == "object") {
+ this.end.column = row.column;
+ this.end.row = row.row;
+ } else {
+ this.end.row = row;
+ this.end.column = column;
+ }
+ };
+
+ /**
+ * Returns `true` if the `row` and `column` are within the given range.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ *
+ * @returns {Boolean}
+ * @related Range.compare
+ **/
+ this.inside = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ /**
+ * Returns `true` if the `row` and `column` are within the given range's starting points.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ * @returns {Boolean}
+ * @related Range.compare
+ **/
+ this.insideStart = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isEnd(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ /**
+ * Returns `true` if the `row` and `column` are within the given range's ending points.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ * @returns {Boolean}
+ * @related Range.compare
+ *
+ **/
+ this.insideEnd = function(row, column) {
+ if (this.compare(row, column) == 0) {
+ if (this.isStart(row, column)) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ return false;
+ };
+
+ /**
+ * Checks the row and column points with the row and column points of the calling range.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ *
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * `0` if the two points are exactly equal <br/>
+ * `-1` if `p.row` is less then the calling range <br/>
+ * `1` if `p.row` is greater than the calling range <br/>
+ * <br/>
+ * If the starting row of the calling range is equal to `p.row`, and: <br/>
+ * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
+ * Otherwise, it returns -1<br/>
+ * <br/>
+ * If the ending row of the calling range is equal to `p.row`, and: <br/>
+ * `p.column` is less than or equal to the calling range's ending column, this returns `0` <br/>
+ * Otherwise, it returns 1
+ **/
+ this.compare = function(row, column) {
+ if (!this.isMultiLine()) {
+ if (row === this.start.row) {
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
+ };
+ }
+
+ if (row < this.start.row)
+ return -1;
+
+ if (row > this.end.row)
+ return 1;
+
+ if (this.start.row === row)
+ return column >= this.start.column ? 0 : -1;
+
+ if (this.end.row === row)
+ return column <= this.end.column ? 0 : 1;
+
+ return 0;
+ };
+
+ /**
+ * Checks the row and column points with the row and column points of the calling range.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * <br/>
+ * `0` if the two points are exactly equal<br/>
+ * `-1` if `p.row` is less then the calling range<br/>
+ * `1` if `p.row` is greater than the calling range, or if `isStart` is `true`.<br/>
+ * <br/>
+ * If the starting row of the calling range is equal to `p.row`, and:<br/>
+ * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
+ * Otherwise, it returns -1<br/>
+ * <br/>
+ * If the ending row of the calling range is equal to `p.row`, and:<br/>
+ * `p.column` is less than or equal to the calling range's ending column, this returns `0`<br/>
+ * Otherwise, it returns 1
+ *
+ **/
+ this.compareStart = function(row, column) {
+ if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+
+ /**
+ * Checks the row and column points with the row and column points of the calling range.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ *
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * `0` if the two points are exactly equal<br/>
+ * `-1` if `p.row` is less then the calling range<br/>
+ * `1` if `p.row` is greater than the calling range, or if `isEnd` is `true.<br/>
+ * <br/>
+ * If the starting row of the calling range is equal to `p.row`, and:<br/>
+ * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
+ * Otherwise, it returns -1<br/>
+ *<br/>
+ * If the ending row of the calling range is equal to `p.row`, and:<br/>
+ * `p.column` is less than or equal to the calling range's ending column, this returns `0`<br/>
+ * Otherwise, it returns 1
+ */
+ this.compareEnd = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+
+ /**
+ * Checks the row and column points with the row and column points of the calling range.
+ * @param {Number} row A row point to compare with
+ * @param {Number} column A column point to compare with
+ *
+ *
+ * @returns {Number} This method returns one of the following numbers:<br/>
+ * * `1` if the ending row of the calling range is equal to `row`, and the ending column of the calling range is equal to `column`<br/>
+ * * `-1` if the starting row of the calling range is equal to `row`, and the starting column of the calling range is equal to `column`<br/>
+ * <br/>
+ * Otherwise, it returns the value after calling [[Range.compare `compare()`]].
+ *
+ **/
+ this.compareInside = function(row, column) {
+ if (this.end.row == row && this.end.column == column) {
+ return 1;
+ } else if (this.start.row == row && this.start.column == column) {
+ return -1;
+ } else {
+ return this.compare(row, column);
+ }
+ };
+
+ /**
+ * Returns the part of the current `Range` that occurs within the boundaries of `firstRow` and `lastRow` as a new `Range` object.
+ * @param {Number} firstRow The starting row
+ * @param {Number} lastRow The ending row
+ *
+ *
+ * @returns {Range}
+ **/
+ this.clipRows = function(firstRow, lastRow) {
+ if (this.end.row > lastRow)
+ var end = {row: lastRow + 1, column: 0};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {row: firstRow, column: 0};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ /**
+ * Changes the row and column points for the calling range for both the starting and ending points.
+ * @param {Number} row A new row to extend to
+ * @param {Number} column A new column to extend to
+ *
+ *
+ * @returns {Range} The original range with the new row
+ **/
+ this.extend = function(row, column) {
+ var cmp = this.compare(row, column);
+
+ if (cmp == 0)
+ return this;
+ else if (cmp == -1)
+ var start = {row: row, column: column};
+ else
+ var end = {row: row, column: column};
+
+ return Range.fromPoints(start || this.start, end || this.end);
+ };
+
+ this.isEmpty = function() {
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
+ };
+
+ /**
+ *
+ * Returns `true` if the range spans across multiple lines.
+ * @returns {Boolean}
+ **/
+ this.isMultiLine = function() {
+ return (this.start.row !== this.end.row);
+ };
+
+ /**
+ *
+ * Returns a duplicate of the calling range.
+ * @returns {Range}
+ **/
+ this.clone = function() {
+ return Range.fromPoints(this.start, this.end);
+ };
+
+ /**
+ *
+ * Returns a range containing the starting and ending rows of the original range, but with a column value of `0`.
+ * @returns {Range}
+ **/
+ this.collapseRows = function() {
+ if (this.end.column == 0)
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
+ else
+ return new Range(this.start.row, 0, this.end.row, 0)
+ };
+
+ /**
+ * Given the current `Range`, this function converts those starting and ending points into screen positions, and then returns a new `Range` object.
+ * @param {EditSession} session The `EditSession` to retrieve coordinates from
+ *
+ *
+ * @returns {Range}
+ **/
+ this.toScreenRange = function(session) {
+ var screenPosStart = session.documentToScreenPosition(this.start);
+ var screenPosEnd = session.documentToScreenPosition(this.end);
+
+ return new Range(
+ screenPosStart.row, screenPosStart.column,
+ screenPosEnd.row, screenPosEnd.column
+ );
+ };
+
+
+ /* experimental */
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+
+/**
+ * Creates and returns a new `Range` based on the row and column of the given parameters.
+ * @param {Range} start A starting point to use
+ * @param {Range} end An ending point to use
+ *
+ * @returns {Range}
+**/
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
diff --git a/src/fauxton/assets/js/libs/ace/range_list.js b/src/fauxton/assets/js/libs/ace/range_list.js
new file mode 100644
index 000000000..0cbcc394b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/range_list.js
@@ -0,0 +1,240 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var Range = require("./range").Range;
+var comparePoints = Range.comparePoints;
+
+var RangeList = function() {
+ this.ranges = [];
+};
+
+(function() {
+ this.comparePoints = comparePoints;
+
+ this.pointIndex = function(pos, excludeEdges, startIndex) {
+ var list = this.ranges;
+
+ for (var i = startIndex || 0; i < list.length; i++) {
+ var range = list[i];
+ var cmpEnd = comparePoints(pos, range.end);
+ if (cmpEnd > 0)
+ continue;
+ var cmpStart = comparePoints(pos, range.start);
+ if (cmpEnd === 0)
+ return excludeEdges && cmpStart !== 0 ? -i-2 : i;
+ if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))
+ return i;
+
+ return -i-1;
+ }
+ return -i - 1;
+ };
+
+ this.add = function(range) {
+ var excludeEdges = !range.isEmpty();
+ var startIndex = this.pointIndex(range.start, excludeEdges);
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+
+ var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);
+
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+ else
+ endIndex++;
+ return this.ranges.splice(startIndex, endIndex - startIndex, range);
+ };
+
+ this.addList = function(list) {
+ var removed = [];
+ for (var i = list.length; i--; ) {
+ removed.push.call(removed, this.add(list[i]));
+ }
+ return removed;
+ };
+
+ this.substractPoint = function(pos) {
+ var i = this.pointIndex(pos);
+
+ if (i >= 0)
+ return this.ranges.splice(i, 1);
+ };
+
+ // merge overlapping ranges
+ this.merge = function() {
+ var removed = [];
+ var list = this.ranges;
+
+ list = list.sort(function(a, b) {
+ return comparePoints(a.start, b.start);
+ });
+
+ var next = list[0], range;
+ for (var i = 1; i < list.length; i++) {
+ range = next;
+ next = list[i];
+ var cmp = comparePoints(range.end, next.start);
+ if (cmp < 0)
+ continue;
+
+ if (cmp == 0 && !range.isEmpty() && !next.isEmpty())
+ continue;
+
+ if (comparePoints(range.end, next.end) < 0) {
+ range.end.row = next.end.row;
+ range.end.column = next.end.column;
+ }
+
+ list.splice(i, 1);
+ removed.push(next);
+ next = range;
+ i--;
+ }
+
+ this.ranges = list;
+
+ return removed;
+ };
+
+ this.contains = function(row, column) {
+ return this.pointIndex({row: row, column: column}) >= 0;
+ };
+
+ this.containsPoint = function(pos) {
+ return this.pointIndex(pos) >= 0;
+ };
+
+ this.rangeAtPoint = function(pos) {
+ var i = this.pointIndex(pos);
+ if (i >= 0)
+ return this.ranges[i];
+ };
+
+
+ this.clipRows = function(startRow, endRow) {
+ var list = this.ranges;
+ if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)
+ return [];
+
+ var startIndex = this.pointIndex({row: startRow, column: 0});
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+ var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);
+ if (endIndex < 0)
+ endIndex = -endIndex - 1;
+
+ var clipped = [];
+ for (var i = startIndex; i < endIndex; i++) {
+ clipped.push(list[i]);
+ }
+ return clipped;
+ };
+
+ this.removeAll = function() {
+ return this.ranges.splice(0, this.ranges.length);
+ };
+
+ this.attach = function(session) {
+ if (this.session)
+ this.detach();
+
+ this.session = session;
+ this.onChange = this.$onChange.bind(this);
+
+ this.session.on('change', this.onChange);
+ };
+
+ this.detach = function() {
+ if (!this.session)
+ return;
+ this.session.removeListener('change', this.onChange);
+ this.session = null;
+ };
+
+ this.$onChange = function(e) {
+ var changeRange = e.data.range;
+ if (e.data.action[0] == "i"){
+ var start = changeRange.start;
+ var end = changeRange.end;
+ } else {
+ var end = changeRange.start;
+ var start = changeRange.end;
+ }
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+
+ var colDiff = -start.column + end.column;
+ var ranges = this.ranges;
+
+ for (var i = 0, n = ranges.length; i < n; i++) {
+ var r = ranges[i];
+ if (r.end.row < startRow)
+ continue;
+ if (r.start.row > startRow)
+ break;
+
+ if (r.start.row == startRow && r.start.column >= start.column ) {
+ if (r.start.column == start.column && this.$insertRight) {
+ // do nothing
+ } else {
+ r.start.column += colDiff;
+ r.start.row += lineDif;
+ }
+ }
+ if (r.end.row == startRow && r.end.column >= start.column) {
+ if (r.end.column == start.column && this.$insertRight) {
+ continue;
+ }
+ // special handling for the case when two ranges share an edge
+ if (r.end.column == start.column && colDiff > 0 && i < n - 1) {
+ if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)
+ r.end.column -= colDiff;
+ }
+ r.end.column += colDiff;
+ r.end.row += lineDif;
+ }
+ }
+
+ if (lineDif != 0 && i < n) {
+ for (; i < n; i++) {
+ var r = ranges[i];
+ r.start.row += lineDif;
+ r.end.row += lineDif;
+ }
+ }
+ };
+
+}).call(RangeList.prototype);
+
+exports.RangeList = RangeList;
+});
diff --git a/src/fauxton/assets/js/libs/ace/range_list_test.js b/src/fauxton/assets/js/libs/ace/range_list_test.js
new file mode 100644
index 000000000..82e7da67a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/range_list_test.js
@@ -0,0 +1,182 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("./range").Range;
+var RangeList = require("./range_list").RangeList;
+var EditSession = require("./edit_session").EditSession;
+var assert = require("./test/assertions");
+
+function flatten(rangeList) {
+ var points = [];
+ rangeList.ranges.forEach(function(r) {
+ points.push(r.start.row, r.start.column, r.end.row, r.end.column)
+ })
+ return points;
+}
+function testRangeList(rangeList, points) {
+ assert.equal("" + flatten(rangeList), "" + points);
+}
+
+module.exports = {
+
+ name: "ACE range_list.js",
+
+ "test: rangeList pointIndex": function() {
+ var rangeList = new RangeList();
+ rangeList.ranges = [
+ new Range(1,2,3,4),
+ new Range(4,2,5,4),
+ new Range(8,8,9,9)
+ ];
+
+ assert.equal(rangeList.pointIndex({row: 0, column: 1}), -1);
+ assert.equal(rangeList.pointIndex({row: 1, column: 2}), 0);
+ assert.equal(rangeList.pointIndex({row: 1, column: 3}), 0);
+ assert.equal(rangeList.pointIndex({row: 3, column: 4}), 0);
+ assert.equal(rangeList.pointIndex({row: 4, column: 1}), -2);
+ assert.equal(rangeList.pointIndex({row: 5, column: 1}), 1);
+ assert.equal(rangeList.pointIndex({row: 8, column: 9}), 2);
+ assert.equal(rangeList.pointIndex({row: 18, column: 9}), -4);
+ },
+
+ "test: rangeList pointIndex excludeEdges": function() {
+ var rangeList = new RangeList();
+ rangeList.ranges = [
+ new Range(1,2,3,4),
+ new Range(4,2,5,4),
+ new Range(8,8,9,9),
+ new Range(10,10,10,10)
+ ];
+
+ assert.equal(rangeList.pointIndex({row: 0, column: 1}, true), -1);
+ assert.equal(rangeList.pointIndex({row: 1, column: 2}, true), -1);
+ assert.equal(rangeList.pointIndex({row: 1, column: 3}, true), 0);
+ assert.equal(rangeList.pointIndex({row: 3, column: 4}, true), -2);
+ assert.equal(rangeList.pointIndex({row: 4, column: 1}, true), -2);
+ assert.equal(rangeList.pointIndex({row: 5, column: 1}, true), 1);
+ assert.equal(rangeList.pointIndex({row: 8, column: 9}, true), 2);
+ assert.equal(rangeList.pointIndex({row: 10, column: 10}, true), 3);
+ assert.equal(rangeList.pointIndex({row: 18, column: 9}, true), -5);
+ },
+
+ "test: rangeList add": function() {
+ var rangeList = new RangeList();
+ rangeList.addList([
+ new Range(9,0,9,1),
+ new Range(1,2,3,4),
+ new Range(8,8,9,9),
+ new Range(4,2,5,4),
+ new Range(3,20,3,24),
+ new Range(6,6,7,7)
+ ]);
+ assert.equal(rangeList.ranges.length, 5);
+
+ rangeList.add(new Range(1,2,3,5));
+ assert.range(rangeList.ranges[0], 1,2,3,5);
+ assert.equal(rangeList.ranges.length, 5);
+
+ rangeList.add(new Range(7,7,7,7));
+ assert.range(rangeList.ranges[3], 7,7,7,7);
+ rangeList.add(new Range(7,8,7,8));
+ assert.range(rangeList.ranges[4], 7,8,7,8);
+ },
+
+ "test: rangeList add empty": function() {
+ var rangeList = new RangeList();
+ rangeList.addList([
+ new Range(7,10,7,10),
+ new Range(9,10,9,10),
+ new Range(8,10,8,10)
+ ]);
+ assert.equal(rangeList.ranges.length, 3);
+
+ rangeList.add(new Range(9,10,9,10));
+ testRangeList(rangeList, [7,10,7,10,8,10,8,10,9,10,9,10]);
+ },
+
+ "test: rangeList merge": function() {
+ var rangeList = new RangeList();
+ rangeList.addList([
+ new Range(1,2,3,4),
+ new Range(4,2,5,4),
+ new Range(6,6,7,7),
+ new Range(8,8,9,9)
+ ]);
+ var removed = [];
+
+ assert.equal(rangeList.ranges.length, 4);
+
+ rangeList.ranges[1].end.row = 7;
+ removed = rangeList.merge();
+ assert.equal(removed.length, 1);
+ assert.range(rangeList.ranges[1], 4,2,7,7);
+ assert.equal(rangeList.ranges.length, 3);
+
+ rangeList.ranges[0].end.row = 10;
+ removed = rangeList.merge();
+ assert.range(rangeList.ranges[0], 1,2,10,4);
+ assert.equal(removed.length, 2);
+ assert.equal(rangeList.ranges.length, 1);
+
+ rangeList.ranges.push(new Range(10,10,10,10));
+ rangeList.ranges.push(new Range(10,10,10,10));
+ removed = rangeList.merge();
+ assert.equal(rangeList.ranges.length, 2);
+ },
+
+ "test: rangeList remove": function() {
+ var rangeList = new RangeList();
+ var list = [
+ new Range(1,2,3,4),
+ new Range(4,2,5,4),
+ new Range(6,6,7,7),
+ new Range(8,8,9,9)
+ ];
+ rangeList.addList(list);
+ assert.equal(rangeList.ranges.length, 4);
+ rangeList.substractPoint({row: 1, column: 2});
+ assert.equal(rangeList.ranges.length, 3);
+ rangeList.substractPoint({row: 6, column: 7});
+ assert.equal(rangeList.ranges.length, 2);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/range_test.js b/src/fauxton/assets/js/libs/ace/range_test.js
new file mode 100644
index 000000000..16265bf81
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/range_test.js
@@ -0,0 +1,191 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var Range = require("./range").Range;
+var EditSession = require("./edit_session").EditSession;
+var assert = require("./test/assertions");
+
+module.exports = {
+
+ name: "ACE range.js",
+
+ "test: create range": function() {
+ var range = new Range(1,2,3,4);
+
+ assert.equal(range.start.row, 1);
+ assert.equal(range.start.column, 2);
+ assert.equal(range.end.row, 3);
+ assert.equal(range.end.column, 4);
+ },
+
+ "test: create from points": function() {
+ var range = Range.fromPoints({row: 1, column: 2}, {row:3, column:4});
+
+ assert.equal(range.start.row, 1);
+ assert.equal(range.start.column, 2);
+ assert.equal(range.end.row, 3);
+ assert.equal(range.end.column, 4);
+ },
+
+ "test: clip to rows": function() {
+ assert.range(new Range(0, 20, 100, 30).clipRows(10, 30), 10, 0, 31, 0);
+ assert.range(new Range(0, 20, 30, 10).clipRows(10, 30), 10, 0, 30, 10);
+
+ var range = new Range(0, 20, 3, 10);
+ var range = range.clipRows(10, 30);
+
+ assert.ok(range.isEmpty());
+ assert.range(range, 10, 0, 10, 0);
+ },
+
+ "test: isEmpty": function() {
+ var range = new Range(1, 2, 1, 2);
+ assert.ok(range.isEmpty());
+
+ var range = new Range(1, 2, 1, 6);
+ assert.notOk(range.isEmpty());
+ },
+
+ "test: is multi line": function() {
+ var range = new Range(1, 2, 1, 6);
+ assert.notOk(range.isMultiLine());
+
+ var range = new Range(1, 2, 2, 6);
+ assert.ok(range.isMultiLine());
+ },
+
+ "test: clone": function() {
+ var range = new Range(1, 2, 3, 4);
+ var clone = range.clone();
+
+ assert.position(clone.start, 1, 2);
+ assert.position(clone.end, 3, 4);
+
+ clone.start.column = 20;
+ assert.position(range.start, 1, 2);
+
+ clone.end.column = 20;
+ assert.position(range.end, 3, 4);
+ },
+
+ "test: contains for multi line ranges": function() {
+ var range = new Range(1, 10, 5, 20);
+
+ assert.ok(range.contains(1, 10));
+ assert.ok(range.contains(2, 0));
+ assert.ok(range.contains(3, 100));
+ assert.ok(range.contains(5, 19));
+ assert.ok(range.contains(5, 20));
+
+ assert.notOk(range.contains(1, 9));
+ assert.notOk(range.contains(0, 0));
+ assert.notOk(range.contains(5, 21));
+ },
+
+ "test: contains for single line ranges": function() {
+ var range = new Range(1, 10, 1, 20);
+
+ assert.ok(range.contains(1, 10));
+ assert.ok(range.contains(1, 15));
+ assert.ok(range.contains(1, 20));
+
+ assert.notOk(range.contains(0, 9));
+ assert.notOk(range.contains(2, 9));
+ assert.notOk(range.contains(1, 9));
+ assert.notOk(range.contains(1, 21));
+ },
+
+ "test: extend range": function() {
+ var range = new Range(2, 10, 2, 30);
+
+ var range = range.extend(2, 5);
+ assert.range(range, 2, 5, 2, 30);
+
+ var range = range.extend(2, 35);
+ assert.range(range, 2, 5, 2, 35);
+
+ var range = range.extend(2, 15);
+ assert.range(range, 2, 5, 2, 35);
+
+ var range = range.extend(1, 4);
+ assert.range(range, 1, 4, 2, 35);
+
+ var range = range.extend(6, 10);
+ assert.range(range, 1, 4, 6, 10);
+ },
+
+ "test: collapse rows" : function() {
+ var range = new Range(0, 2, 1, 2);
+ assert.range(range.collapseRows(), 0, 0, 1, 0);
+
+ var range = new Range(2, 2, 3, 1);
+ assert.range(range.collapseRows(), 2, 0, 3, 0);
+
+ var range = new Range(2, 2, 3, 0);
+ assert.range(range.collapseRows(), 2, 0, 2, 0);
+
+ var range = new Range(2, 0, 2, 0);
+ assert.range(range.collapseRows(), 2, 0, 2, 0);
+ },
+
+ "test: to screen range" : function() {
+ var session = new EditSession([
+ "juhu",
+ "12\t\t34",
+ "ぁぁa",
+ "\t\t34"
+ ]);
+
+ var range = new Range(0, 0, 0, 3);
+ assert.range(range.toScreenRange(session), 0, 0, 0, 3);
+
+ var range = new Range(1, 1, 1, 3);
+ assert.range(range.toScreenRange(session), 1, 1, 1, 4);
+
+ var range = new Range(2, 1, 2, 2);
+ assert.range(range.toScreenRange(session), 2, 2, 2, 4);
+
+ var range = new Range(3, 0, 3, 4);
+ assert.range(range.toScreenRange(session), 3, 0, 3, 10);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/renderloop.js b/src/fauxton/assets/js/libs/ace/renderloop.js
new file mode 100644
index 000000000..ccbe98e1b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/renderloop.js
@@ -0,0 +1,75 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var event = require("./lib/event");
+
+/**
+ *
+ *
+ * Batches changes (that force something to be redrawn) in the background.
+ * @class RenderLoop
+ **/
+
+
+var RenderLoop = function(onRender, win) {
+ this.onRender = onRender;
+ this.pending = false;
+ this.changes = 0;
+ this.window = win || window;
+};
+
+(function() {
+
+
+ this.schedule = function(change) {
+ //this.onRender(change);
+ //return;
+ this.changes = this.changes | change;
+ if (!this.pending) {
+ this.pending = true;
+ var _self = this;
+ event.nextFrame(function() {
+ _self.pending = false;
+ var changes;
+ while (changes = _self.changes) {
+ _self.changes = 0;
+ _self.onRender(changes);
+ }
+ }, this.window);
+ }
+ };
+
+}).call(RenderLoop.prototype);
+
+exports.RenderLoop = RenderLoop;
+});
diff --git a/src/fauxton/assets/js/libs/ace/requirejs/text.js b/src/fauxton/assets/js/libs/ace/requirejs/text.js
new file mode 100644
index 000000000..cba62eef7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/requirejs/text.js
@@ -0,0 +1,51 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/*
+ * Extremely simplified version of the requireJS text plugin
+ */
+
+(function() {
+
+var globalRequire = typeof require != "undefined" && require;
+
+define(function (require, exports, module) {
+ "use strict";
+
+ exports.load = function (name, req, onLoad, config) {
+ //Using special require.nodeRequire, something added by r.js.
+ if (globalRequire && globalRequire.nodeRequire)
+ onLoad(globalRequire.nodeRequire('fs').readFileSync(req.toUrl(name), 'utf8'));
+ else
+ require("../lib/net").get(req.toUrl(name), onLoad);
+ };
+});
+
+})();
diff --git a/src/fauxton/assets/js/libs/ace/scrollbar.js b/src/fauxton/assets/js/libs/ace/scrollbar.js
new file mode 100644
index 000000000..02a96e09b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/scrollbar.js
@@ -0,0 +1,204 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var event = require("./lib/event");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+/**
+ * A set of methods for setting and retrieving the editor's scrollbar.
+ * @class ScrollBar
+ **/
+
+/**
+ * Creates a new `ScrollBar`. `parent` is the owner of the scroll bar.
+ * @param {DOMElement} parent A DOM element
+ *
+ * @constructor
+ **/
+var ScrollBarV = function(parent, renderer) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_scrollbar";
+
+ this.inner = dom.createElement("div");
+ this.inner.className = "ace_scrollbar-inner";
+ this.element.appendChild(this.inner);
+
+ parent.appendChild(this.element);
+
+ // in OSX lion the scrollbars appear to have no width. In this case resize the
+ // element to show the scrollbar but still pretend that the scrollbar has a width
+ // of 0px
+ // in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
+ // make element a little bit wider to retain scrollbar when page is zoomed
+ renderer.$scrollbarWidth =
+ this.width = dom.scrollbarWidth(parent.ownerDocument);
+ renderer.$scrollbarWidth =
+ this.width = dom.scrollbarWidth(parent.ownerDocument);
+ this.fullWidth = this.width;
+ this.inner.style.width =
+ this.element.style.width = (this.width || 15) + 5 + "px";
+ this.setVisible(false);
+ this.element.style.overflowY = "scroll";
+
+ event.addListener(this.element, "scroll", this.onScrollV.bind(this));
+ event.addListener(this.element, "mousedown", event.preventDefault);
+};
+
+var ScrollBarH = function(parent, renderer) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_scrollbar-h";
+
+ this.inner = dom.createElement("div");
+ this.inner.className = "ace_scrollbar-inner";
+ this.element.appendChild(this.inner);
+
+ parent.appendChild(this.element);
+
+ // in OSX lion the scrollbars appear to have no width. In this case resize the
+ // element to show the scrollbar but still pretend that the scrollbar has a width
+ // of 0px
+ // in Firefox 6+ scrollbar is hidden if element has the same width as scrollbar
+ // make element a little bit wider to retain scrollbar when page is zoomed
+ this.height = renderer.$scrollbarWidth;
+ this.fullHeight = this.height;
+ this.inner.style.height =
+ this.element.style.height = (this.height || 15) + 5 + "px";
+ this.setVisible(false);
+ this.element.style.overflowX = "scroll";
+
+ event.addListener(this.element, "scroll", this.onScrollH.bind(this));
+ event.addListener(this.element, "mousedown", event.preventDefault);
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+
+ this.setVisible = function(show) {
+ if (show) {
+ this.element.style.display = "";
+ if (this.fullWidth)
+ this.width = this.fullWidth;
+ if (this.fullHeight)
+ this.height = this.fullHeight;
+ } else {
+ this.element.style.display = "none";
+ this.height = this.width = 0;
+ }
+ };
+
+ /**
+ * Emitted when the scroll bar, well, scrolls.
+ * @event scroll
+ * @param {Object} e Contains one property, `"data"`, which indicates the current scroll top position
+ **/
+ this.onScrollV = function() {
+ if (!this.skipEvent) {
+ this.scrollTop = this.element.scrollTop;
+ this._emit("scroll", {data: this.scrollTop});
+ }
+ this.skipEvent = false;
+ };
+ this.onScrollH = function() {
+ if (!this.skipEvent) {
+ this.scrollLeft = this.element.scrollLeft;
+ this._emit("scroll", {data: this.scrollLeft});
+ }
+ this.skipEvent = false;
+ };
+
+ /**
+ * Returns the width of the scroll bar.
+ * @returns {Number}
+ **/
+ this.getWidth = function() {
+ return this.width;
+ };
+
+ this.getHeight = function() {
+ return this.height;
+ };
+
+ /**
+ * Sets the height of the scroll bar, in pixels.
+ * @param {Number} height The new height
+ **/
+ this.setHeight = function(height) {
+ this.element.style.height = height + "px";
+ };
+
+ this.setWidth = function(width) {
+ this.element.style.width = width + "px";
+ };
+
+ /**
+ * Sets the inner height of the scroll bar, in pixels.
+ * @param {Number} height The new inner height
+ **/
+ this.setInnerHeight = function(height) {
+ this.inner.style.height = height + "px";
+ };
+
+ this.setInnerWidth = function(width) {
+ this.inner.style.width = width + "px";
+ };
+
+ /**
+ * Sets the scroll top of the scroll bar.
+ * @param {Number} scrollTop The new scroll top
+ **/
+ // on chrome 17+ for small zoom levels after calling this function
+ // this.element.scrollTop != scrollTop which makes page to scroll up.
+ this.setScrollTop = function(scrollTop) {
+ if (this.scrollTop != scrollTop) {
+ this.skipEvent = true;
+ this.scrollTop = this.element.scrollTop = scrollTop;
+ }
+ };
+ this.setScrollLeft = function(scrollLeft) {
+ if (this.scrollLeft != scrollLeft) {
+ this.skipEvent = true;
+ this.scrollLeft = this.element.scrollLeft = scrollLeft;
+ }
+ };
+
+}).call(ScrollBarV.prototype);
+ScrollBarH.prototype = ScrollBarV.prototype;
+
+
+
+exports.ScrollBar = ScrollBarV; // backward compatibility
+exports.ScrollBarV = ScrollBarV;
+exports.ScrollBarH = ScrollBarH;
+});
diff --git a/src/fauxton/assets/js/libs/ace/search.js b/src/fauxton/assets/js/libs/ace/search.js
new file mode 100644
index 000000000..48cd88fb7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/search.js
@@ -0,0 +1,389 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+/**
+ * @class Search
+ *
+ * A class designed to handle all sorts of text searches within a [[Document `Document`]].
+ *
+ **/
+
+/**
+ *
+ *
+ * Creates a new `Search` object. The following search options are avaliable:
+ *
+ * - `needle`: The string or regular expression you're looking for
+ * - `backwards`: Whether to search backwards from where cursor currently is. Defaults to `false`.
+ * - `wrap`: Whether to wrap the search back to the beginning when it hits the end. Defaults to `false`.
+ * - `caseSensitive`: Whether the search ought to be case-sensitive. Defaults to `false`.
+ * - `wholeWord`: Whether the search matches only on whole words. Defaults to `false`.
+ * - `range`: The [[Range]] to search within. Set this to `null` for the whole document
+ * - `regExp`: Whether the search is a regular expression or not. Defaults to `false`.
+ * - `start`: The starting [[Range]] or cursor position to begin the search
+ * - `skipCurrent`: Whether or not to include the current line in the search. Default to `false`.
+ *
+ * @constructor
+ **/
+
+var Search = function() {
+ this.$options = {};
+};
+
+(function() {
+ /**
+ * Sets the search options via the `options` parameter.
+ * @param {Object} options An object containing all the new search properties
+ *
+ *
+ * @returns {Search}
+ * @chainable
+ **/
+ this.set = function(options) {
+ oop.mixin(this.$options, options);
+ return this;
+ };
+
+ /**
+ * [Returns an object containing all the search options.]{: #Search.getOptions}
+ * @returns {Object}
+ **/
+ this.getOptions = function() {
+ return lang.copyObject(this.$options);
+ };
+
+ /**
+ * Sets the search options via the `options` parameter.
+ * @param {Object} An object containing all the search propertie
+ * @related Search.set
+ **/
+ this.setOptions = function(options) {
+ this.$options = options;
+ };
+ /**
+ * Searches for `options.needle`. If found, this method returns the [[Range `Range`]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
+ * @param {EditSession} session The session to search with
+ *
+ *
+ * @returns {Range}
+ **/
+ this.find = function(session) {
+ var iterator = this.$matchIterator(session, this.$options);
+
+ if (!iterator)
+ return false;
+
+ var firstRange = null;
+ iterator.forEach(function(range, row, offset) {
+ if (!range.start) {
+ var column = range.offset + (offset || 0);
+ firstRange = new Range(row, column, row, column+range.length);
+ } else
+ firstRange = range;
+ return true;
+ });
+
+ return firstRange;
+ };
+
+ /**
+ * Searches for all occurances `options.needle`. If found, this method returns an array of [[Range `Range`s]] where the text first occurs. If `options.backwards` is `true`, the search goes backwards in the session.
+ * @param {EditSession} session The session to search with
+ *
+ *
+ * @returns {[Range]}
+ **/
+ this.findAll = function(session) {
+ var options = this.$options;
+ if (!options.needle)
+ return [];
+ this.$assembleRegExp(options);
+
+ var range = options.range;
+ var lines = range
+ ? session.getLines(range.start.row, range.end.row)
+ : session.doc.getAllLines();
+
+ var ranges = [];
+ var re = options.re;
+ if (options.$isMultiLine) {
+ var len = re.length;
+ var maxRow = lines.length - len;
+ for (var row = re.offset || 0; row <= maxRow; row++) {
+ for (var j = 0; j < len; j++)
+ if (lines[row + j].search(re[j]) == -1)
+ break;
+
+ var startLine = lines[row];
+ var line = lines[row + len - 1];
+ var startIndex = startLine.match(re[0])[0].length;
+ var endIndex = line.match(re[len - 1])[0].length;
+
+ ranges.push(new Range(
+ row, startLine.length - startIndex,
+ row + len - 1, endIndex
+ ));
+ }
+ } else {
+ for (var i = 0; i < lines.length; i++) {
+ var matches = lang.getMatchOffsets(lines[i], re);
+ for (var j = 0; j < matches.length; j++) {
+ var match = matches[j];
+ ranges.push(new Range(i, match.offset, i, match.offset + match.length));
+ }
+ }
+ }
+
+ if (range) {
+ var startColumn = range.start.column;
+ var endColumn = range.start.column;
+ var i = 0, j = ranges.length - 1;
+ while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)
+ i++;
+
+ while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)
+ j--;
+
+ ranges = ranges.slice(i, j + 1);
+ for (i = 0, j = ranges.length; i < j; i++) {
+ ranges[i].start.row += range.start.row;
+ ranges[i].end.row += range.start.row;
+ }
+ }
+
+ return ranges;
+ };
+
+ /**
+ * Searches for `options.needle` in `input`, and, if found, replaces it with `replacement`.
+ * @param {String} input The text to search in
+ * @param {String} replacement The replacing text
+ * + (String): If `options.regExp` is `true`, this function returns `input` with the replacement already made. Otherwise, this function just returns `replacement`.<br/>
+ * If `options.needle` was not found, this function returns `null`.
+ *
+ *
+ * @returns {String}
+ **/
+ this.replace = function(input, replacement) {
+ var options = this.$options;
+
+ var re = this.$assembleRegExp(options);
+ if (options.$isMultiLine)
+ return replacement;
+
+ if (!re)
+ return;
+
+ var match = re.exec(input);
+ if (!match || match[0].length != input.length)
+ return null;
+
+ replacement = input.replace(re, replacement);
+ if (options.preserveCase) {
+ replacement = replacement.split("");
+ for (var i = Math.min(input.length, input.length); i--; ) {
+ var ch = input[i];
+ if (ch && ch.toLowerCase() != ch)
+ replacement[i] = replacement[i].toUpperCase();
+ else
+ replacement[i] = replacement[i].toLowerCase();
+ }
+ replacement = replacement.join("");
+ }
+
+ return replacement;
+ };
+
+ this.$matchIterator = function(session, options) {
+ var re = this.$assembleRegExp(options);
+ if (!re)
+ return false;
+
+ var self = this, callback, backwards = options.backwards;
+
+ if (options.$isMultiLine) {
+ var len = re.length;
+ var matchIterator = function(line, row, offset) {
+ var startIndex = line.search(re[0]);
+ if (startIndex == -1)
+ return;
+ for (var i = 1; i < len; i++) {
+ line = session.getLine(row + i);
+ if (line.search(re[i]) == -1)
+ return;
+ }
+
+ var endIndex = line.match(re[len - 1])[0].length;
+
+ var range = new Range(row, startIndex, row + len - 1, endIndex);
+ if (re.offset == 1) {
+ range.start.row--;
+ range.start.column = Number.MAX_VALUE;
+ } else if (offset)
+ range.start.column += offset;
+
+ if (callback(range))
+ return true;
+ };
+ } else if (backwards) {
+ var matchIterator = function(line, row, startIndex) {
+ var matches = lang.getMatchOffsets(line, re);
+ for (var i = matches.length-1; i >= 0; i--)
+ if (callback(matches[i], row, startIndex))
+ return true;
+ };
+ } else {
+ var matchIterator = function(line, row, startIndex) {
+ var matches = lang.getMatchOffsets(line, re);
+ for (var i = 0; i < matches.length; i++)
+ if (callback(matches[i], row, startIndex))
+ return true;
+ };
+ }
+
+ return {
+ forEach: function(_callback) {
+ callback = _callback;
+ self.$lineIterator(session, options).forEach(matchIterator);
+ }
+ };
+ };
+
+ this.$assembleRegExp = function(options, $disableFakeMultiline) {
+ if (options.needle instanceof RegExp)
+ return options.re = options.needle;
+
+ var needle = options.needle;
+
+ if (!options.needle)
+ return options.re = false;
+
+ if (!options.regExp)
+ needle = lang.escapeRegExp(needle);
+
+ if (options.wholeWord)
+ needle = "\\b" + needle + "\\b";
+
+ var modifier = options.caseSensitive ? "g" : "gi";
+
+ options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle);
+ if (options.$isMultiLine)
+ return options.re = this.$assembleMultilineRegExp(needle, modifier);
+
+ try {
+ var re = new RegExp(needle, modifier);
+ } catch(e) {
+ re = false;
+ }
+ return options.re = re;
+ };
+
+ this.$assembleMultilineRegExp = function(needle, modifier) {
+ var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n");
+ var re = [];
+ for (var i = 0; i < parts.length; i++) try {
+ re.push(new RegExp(parts[i], modifier));
+ } catch(e) {
+ return false;
+ }
+ if (parts[0] == "") {
+ re.shift();
+ re.offset = 1;
+ } else {
+ re.offset = 0;
+ }
+ return re;
+ };
+
+ this.$lineIterator = function(session, options) {
+ var backwards = options.backwards == true;
+ var skipCurrent = options.skipCurrent != false;
+
+ var range = options.range;
+ var start = options.start;
+ if (!start)
+ start = range ? range[backwards ? "end" : "start"] : session.selection.getRange();
+
+ if (start.start)
+ start = start[skipCurrent != backwards ? "end" : "start"];
+
+ var firstRow = range ? range.start.row : 0;
+ var lastRow = range ? range.end.row : session.getLength() - 1;
+
+ var forEach = backwards ? function(callback) {
+ var row = start.row;
+
+ var line = session.getLine(row).substring(0, start.column);
+ if (callback(line, row))
+ return;
+
+ for (row--; row >= firstRow; row--)
+ if (callback(session.getLine(row), row))
+ return;
+
+ if (options.wrap == false)
+ return;
+
+ for (row = lastRow, firstRow = start.row; row >= firstRow; row--)
+ if (callback(session.getLine(row), row))
+ return;
+ } : function(callback) {
+ var row = start.row;
+
+ var line = session.getLine(row).substr(start.column);
+ if (callback(line, row, start.column))
+ return;
+
+ for (row = row+1; row <= lastRow; row++)
+ if (callback(session.getLine(row), row))
+ return;
+
+ if (options.wrap == false)
+ return;
+
+ for (row = firstRow, lastRow = start.row; row <= lastRow; row++)
+ if (callback(session.getLine(row), row))
+ return;
+ };
+
+ return {forEach: forEach};
+ };
+
+}).call(Search.prototype);
+
+exports.Search = Search;
+});
diff --git a/src/fauxton/assets/js/libs/ace/search_highlight.js b/src/fauxton/assets/js/libs/ace/search_highlight.js
new file mode 100644
index 000000000..11defd9cd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/search_highlight.js
@@ -0,0 +1,82 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+
+var SearchHighlight = function(regExp, clazz, type) {
+ this.setRegexp(regExp);
+ this.clazz = clazz;
+ this.type = type || "text";
+};
+
+(function() {
+ // needed to prevent long lines from freezing the browser
+ this.MAX_RANGES = 500;
+
+ this.setRegexp = function(regExp) {
+ if (this.regExp+"" == regExp+"")
+ return;
+ this.regExp = regExp;
+ this.cache = [];
+ };
+
+ this.update = function(html, markerLayer, session, config) {
+ if (!this.regExp)
+ return;
+ var start = config.firstRow, end = config.lastRow;
+
+ for (var i = start; i <= end; i++) {
+ var ranges = this.cache[i];
+ if (ranges == null) {
+ ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);
+ if (ranges.length > this.MAX_RANGES)
+ ranges = ranges.slice(0, this.MAX_RANGES);
+ ranges = ranges.map(function(match) {
+ return new Range(i, match.offset, i, match.offset + match.length);
+ });
+ this.cache[i] = ranges.length ? ranges : "";
+ }
+
+ for (var j = ranges.length; j --; ) {
+ markerLayer.drawSingleLineMarker(
+ html, ranges[j].toScreenRange(session), this.clazz, config);
+ }
+ }
+ };
+
+}).call(SearchHighlight.prototype);
+
+exports.SearchHighlight = SearchHighlight;
+});
diff --git a/src/fauxton/assets/js/libs/ace/search_test.js b/src/fauxton/assets/js/libs/ace/search_test.js
new file mode 100644
index 000000000..6e12a53e9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/search_test.js
@@ -0,0 +1,461 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var Search = require("./search").Search;
+var assert = require("./test/assertions");
+
+module.exports = {
+ "test: configure the search object" : function() {
+ var search = new Search();
+ search.set({
+ needle: "juhu"
+ });
+ },
+
+ "test: find simple text in document" : function() {
+ var session = new EditSession(["juhu kinners 123", "456"]);
+ var search = new Search().set({
+ needle: "kinners"
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 0, 5);
+ assert.position(range.end, 0, 12);
+ },
+
+ "test: find simple text in next line" : function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+ var search = new Search().set({
+ needle: "kinners"
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 5);
+ assert.position(range.end, 1, 12);
+ },
+
+ "test: find text starting at cursor position" : function() {
+ var session = new EditSession(["juhu kinners", "juhu kinners 123"]);
+ session.getSelection().moveCursorTo(0, 6);
+ var search = new Search().set({
+ needle: "kinners"
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 5);
+ assert.position(range.end, 1, 12);
+ },
+
+ "test: wrap search is on by default" : function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+ session.getSelection().moveCursorTo(2, 1);
+
+ var search = new Search().set({
+ needle: "kinners"
+ });
+
+ assert.notEqual(search.find(session), null);
+ },
+
+ "test: wrap search should wrap at file end" : function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+ session.getSelection().moveCursorTo(2, 1);
+
+ var search = new Search().set({
+ needle: "kinners",
+ wrap: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 5);
+ assert.position(range.end, 1, 12);
+ },
+
+ "test: wrap search should find needle even if it starts inside it" : function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+ session.getSelection().moveCursorTo(6, 1);
+
+ var search = new Search().set({
+ needle: "kinners",
+ wrap: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 5);
+ assert.position(range.end, 1, 12);
+ },
+
+ "test: wrap search with no match should return 'null'": function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+ session.getSelection().moveCursorTo(2, 1);
+
+ var search = new Search().set({
+ needle: "xyz",
+ wrap: true
+ });
+
+ assert.equal(search.find(session), null);
+ },
+
+ "test: case sensitive is by default off": function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+
+ var search = new Search().set({
+ needle: "JUHU"
+ });
+
+ assert.range(search.find(session), 1, 0, 1, 4);
+ },
+
+ "test: case sensitive search": function() {
+ var session = new EditSession(["abc", "juhu kinners 123", "456"]);
+
+ var search = new Search().set({
+ needle: "KINNERS",
+ caseSensitive: true
+ });
+
+ var range = search.find(session);
+ assert.equal(range, null);
+ },
+
+ "test: whole word search should not match inside of words": function() {
+ var session = new EditSession(["juhukinners", "juhu kinners 123", "456"]);
+
+ var search = new Search().set({
+ needle: "kinners",
+ wholeWord: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 5);
+ assert.position(range.end, 1, 12);
+ },
+
+ "test: find backwards": function() {
+ var session = new EditSession(["juhu juhu juhu juhu"]);
+ session.getSelection().moveCursorTo(0, 10);
+ var search = new Search().set({
+ needle: "juhu",
+ backwards: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 0, 5);
+ assert.position(range.end, 0, 9);
+ },
+
+ "test: find in selection": function() {
+ var session = new EditSession(["juhu", "juhu", "juhu", "juhu"]);
+ session.getSelection().setSelectionAnchor(1, 0);
+ session.getSelection().selectTo(3, 5);
+
+ var search = new Search().set({
+ needle: "juhu",
+ wrap: true,
+ range: session.getSelection().getRange()
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 0);
+ assert.position(range.end, 1, 4);
+
+ search = new Search().set({
+ needle: "juhu",
+ wrap: true,
+ range: session.getSelection().getRange()
+ });
+
+ session.getSelection().setSelectionAnchor(0, 2);
+ session.getSelection().selectTo(3, 2);
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 0);
+ assert.position(range.end, 1, 4);
+ },
+
+ "test: find backwards in selection": function() {
+ var session = new EditSession(["juhu", "juhu", "juhu", "juhu"]);
+
+ session.getSelection().setSelectionAnchor(0, 2);
+ session.getSelection().selectTo(3, 2);
+
+ var search = new Search().set({
+ needle: "juhu",
+ wrap: true,
+ backwards: true,
+ range: session.getSelection().getRange()
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 2, 0);
+ assert.position(range.end, 2, 4);
+
+ search = new Search().set({
+ needle: "juhu",
+ wrap: true,
+ range: session.getSelection().getRange()
+ });
+
+ session.getSelection().setSelectionAnchor(0, 2);
+ session.getSelection().selectTo(1, 2);
+
+ var range = search.find(session);
+ assert.position(range.start, 1, 0);
+ assert.position(range.end, 1, 4);
+ },
+
+ "test: edge case - match directly before the cursor" : function() {
+ var session = new EditSession(["123", "123", "juhu"]);
+
+ var search = new Search().set({
+ needle: "juhu",
+ wrap: true
+ });
+
+ session.getSelection().moveCursorTo(2, 5);
+
+ var range = search.find(session);
+ assert.position(range.start, 2, 0);
+ assert.position(range.end, 2, 4);
+ },
+
+ "test: edge case - match backwards directly after the cursor" : function() {
+ var session = new EditSession(["123", "123", "juhu"]);
+
+ var search = new Search().set({
+ needle: "juhu",
+ wrap: true,
+ backwards: true
+ });
+
+ session.getSelection().moveCursorTo(2, 0);
+
+ var range = search.find(session);
+ assert.position(range.start, 2, 0);
+ assert.position(range.end, 2, 4);
+ },
+
+ "test: find using a regular expression" : function() {
+ var session = new EditSession(["abc123 123 cd", "abc"]);
+
+ var search = new Search().set({
+ needle: "\\d+",
+ regExp: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 0, 3);
+ assert.position(range.end, 0, 6);
+ },
+
+ "test: find using a regular expression and whole word" : function() {
+ var session = new EditSession(["abc123 123 cd", "abc"]);
+
+ var search = new Search().set({
+ needle: "\\d+\\b",
+ regExp: true,
+ wholeWord: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 0, 7);
+ assert.position(range.end, 0, 10);
+ },
+
+ "test: use regular expressions with capture groups": function() {
+ var session = new EditSession([" ab: 12px", " <h1 abc"]);
+
+ var search = new Search().set({
+ needle: "(\\d+)",
+ regExp: true
+ });
+
+ var range = search.find(session);
+ assert.position(range.start, 0, 6);
+ assert.position(range.end, 0, 8);
+ },
+
+ "test: find all matches in selection" : function() {
+ var session = new EditSession(["juhu", "juhu", "juhu", "juhu"]);
+
+ session.getSelection().setSelectionAnchor(0, 2);
+ session.getSelection().selectTo(3, 2);
+
+ var search = new Search().set({
+ needle: "uh",
+ wrap: true,
+ range: session.getSelection().getRange()
+ });
+
+ var ranges = search.findAll(session);
+
+ assert.equal(ranges.length, 2);
+ assert.position(ranges[0].start, 1, 1);
+ assert.position(ranges[0].end, 1, 3);
+ assert.position(ranges[1].start, 2, 1);
+ assert.position(ranges[1].end, 2, 3);
+ },
+
+
+ "test: find all multiline matches" : function() {
+ var session = new EditSession(["juhu", "juhu", "juhu", "juhu"]);
+
+ var search = new Search().set({
+ needle: "hu\nju",
+ wrap: true
+ });
+
+ var ranges = search.findAll(session);
+
+ assert.equal(ranges.length, 3);
+ assert.position(ranges[0].start, 0, 2);
+ assert.position(ranges[0].end, 1, 2);
+ assert.position(ranges[1].start, 1, 2);
+ assert.position(ranges[1].end, 2, 2);
+ },
+
+ "test: replace() should return the replacement if the input matches the needle" : function() {
+ var search = new Search().set({
+ needle: "juhu"
+ });
+
+ assert.equal(search.replace("juhu", "kinners"), "kinners");
+ assert.equal(search.replace("", "kinners"), null);
+ assert.equal(search.replace(" juhu", "kinners"), null);
+
+ // case sensitivity
+ assert.equal(search.replace("Juhu", "kinners"), "kinners");
+ search.set({caseSensitive: true});
+ assert.equal(search.replace("Juhu", "kinners"), null);
+
+ // regexp replacement
+ },
+
+ "test: replace with a RegExp search" : function() {
+ var search = new Search().set({
+ needle: "\\d+",
+ regExp: true
+ });
+
+ assert.equal(search.replace("123", "kinners"), "kinners");
+ assert.equal(search.replace("01234", "kinners"), "kinners");
+ assert.equal(search.replace("", "kinners"), null);
+ assert.equal(search.replace("a12", "kinners"), null);
+ assert.equal(search.replace("12a", "kinners"), null);
+ },
+
+ "test: replace with RegExp match and capture groups" : function() {
+ var search = new Search().set({
+ needle: "ab(\\d\\d)",
+ regExp: true
+ });
+
+ assert.equal(search.replace("ab12", "cd$1"), "cd12");
+ assert.equal(search.replace("ab12", "-$&-"), "-ab12-");
+ assert.equal(search.replace("ab12", "$$"), "$");
+ },
+
+ "test: find all using regular expresion containing $" : function() {
+ var session = new EditSession(["a", " b", "c ", "d"]);
+
+ var search = new Search().set({
+ needle: "[ ]+$",
+ regExp: true,
+ wrap: true
+ });
+
+ session.getSelection().moveCursorTo(1, 2);
+ var ranges = search.findAll(session);
+
+ assert.equal(ranges.length, 1);
+ assert.position(ranges[0].start, 2, 1);
+ assert.position(ranges[0].end, 2, 2);
+ },
+
+ "test: find all matches in a line" : function() {
+ var session = new EditSession("foo bar foo baz foobar foo");
+
+ var search = new Search().set({
+ needle: "foo",
+ wrap: true,
+ wholeWord: true
+ });
+
+ session.getSelection().moveCursorTo(0, 4);
+
+ var ranges = search.findAll(session);
+
+ assert.equal(ranges.length, 3);
+ assert.position(ranges[0].start, 0, 0);
+ assert.position(ranges[0].end, 0, 3);
+ assert.position(ranges[1].start, 0, 8);
+ assert.position(ranges[1].end, 0, 11);
+ assert.position(ranges[2].start, 0, 23);
+ assert.position(ranges[2].end, 0, 26);
+ },
+
+ "test: find all matches in a line backwards" : function() {
+ var session = new EditSession("foo bar foo baz foobar foo");
+
+ var search = new Search().set({
+ needle: "foo",
+ wrap: true,
+ wholeWord: true,
+ backwards: true
+ });
+
+ session.getSelection().moveCursorTo(0, 13);
+
+ var ranges = search.findAll(session);
+
+ assert.equal(ranges.length, 3);
+ assert.position(ranges[2].start, 0, 23);
+ assert.position(ranges[2].end, 0, 26);
+ assert.position(ranges[1].start, 0, 8);
+ assert.position(ranges[1].end, 0, 11);
+ assert.position(ranges[0].start, 0, 0);
+ assert.position(ranges[0].end, 0, 3);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/selection.js b/src/fauxton/assets/js/libs/ace/selection.js
new file mode 100644
index 000000000..d3dab8314
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/selection.js
@@ -0,0 +1,915 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+
+/**
+ *
+ * Contains the cursor position and the text selection of an edit session.
+ *
+ * The row/columns used in the selection are in document coordinates representing ths coordinates as thez appear in the document before applying soft wrap and folding.
+ * @class Selection
+ **/
+
+
+/**
+ * Emitted when the cursor position changes.
+ * @event changeCursor
+ *
+ *
+ *
+**/
+/**
+ * Emitted when the cursor selection changes.
+ * @event changeSelection
+ *
+ *
+ *
+**/
+/**
+ * Creates a new `Selection` object.
+ * @param {EditSession} session The session to use
+ *
+ *
+ *
+ * @constructor
+ **/
+var Selection = function(session) {
+ this.session = session;
+ this.doc = session.getDocument();
+
+ this.clearSelection();
+ this.lead = this.selectionLead = this.doc.createAnchor(0, 0);
+ this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);
+
+ var self = this;
+ this.lead.on("change", function(e) {
+ self._emit("changeCursor");
+ if (!self.$isEmpty)
+ self._emit("changeSelection");
+ if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)
+ self.$desiredColumn = null;
+ });
+
+ this.selectionAnchor.on("change", function() {
+ if (!self.$isEmpty)
+ self._emit("changeSelection");
+ });
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ /**
+ *
+ * Returns `true` if the selection is empty.
+ * @returns {Boolean}
+ **/
+ this.isEmpty = function() {
+ return (this.$isEmpty || (
+ this.anchor.row == this.lead.row &&
+ this.anchor.column == this.lead.column
+ ));
+ };
+
+ /**
+ * Returns `true` if the selection is a multi-line.
+ * @returns {Boolean}
+ **/
+ this.isMultiLine = function() {
+ if (this.isEmpty()) {
+ return false;
+ }
+
+ return this.getRange().isMultiLine();
+ };
+
+ /**
+ * Gets the current position of the cursor.
+ * @returns {Number}
+ **/
+ this.getCursor = function() {
+ return this.lead.getPosition();
+ };
+
+ /**
+ * Sets the row and column position of the anchor. This function also emits the `'changeSelection'` event.
+ * @param {Number} row The new row
+ * @param {Number} column The new column
+ *
+ *
+ **/
+ this.setSelectionAnchor = function(row, column) {
+ this.anchor.setPosition(row, column);
+
+ if (this.$isEmpty) {
+ this.$isEmpty = false;
+ this._emit("changeSelection");
+ }
+ };
+
+ /**
+ * Returns an object containing the `row` and `column` of the calling selection anchor.
+ *
+ * @returns {Object}
+ * @related Anchor.getPosition
+ **/
+ this.getSelectionAnchor = function() {
+ if (this.$isEmpty)
+ return this.getSelectionLead()
+ else
+ return this.anchor.getPosition();
+ };
+
+ /**
+ *
+ * Returns an object containing the `row` and `column` of the calling selection lead.
+ * @returns {Object}
+ **/
+ this.getSelectionLead = function() {
+ return this.lead.getPosition();
+ };
+
+ /**
+ * Shifts the selection up (or down, if [[Selection.isBackwards `isBackwards()`]] is true) the given number of columns.
+ * @param {Number} columns The number of columns to shift by
+ *
+ *
+ *
+ **/
+ this.shiftSelection = function(columns) {
+ if (this.$isEmpty) {
+ this.moveCursorTo(this.lead.row, this.lead.column + columns);
+ return;
+ };
+
+ var anchor = this.getSelectionAnchor();
+ var lead = this.getSelectionLead();
+
+ var isBackwards = this.isBackwards();
+
+ if (!isBackwards || anchor.column !== 0)
+ this.setSelectionAnchor(anchor.row, anchor.column + columns);
+
+ if (isBackwards || lead.column !== 0) {
+ this.$moveSelection(function() {
+ this.moveCursorTo(lead.row, lead.column + columns);
+ });
+ }
+ };
+
+ /**
+ * Returns `true` if the selection is going backwards in the document.
+ * @returns {Boolean}
+ **/
+ this.isBackwards = function() {
+ var anchor = this.anchor;
+ var lead = this.lead;
+ return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));
+ };
+
+ /**
+ * [Returns the [[Range]] for the selected text.]{: #Selection.getRange}
+ * @returns {Range}
+ **/
+ this.getRange = function() {
+ var anchor = this.anchor;
+ var lead = this.lead;
+
+ if (this.isEmpty())
+ return Range.fromPoints(lead, lead);
+
+ if (this.isBackwards()) {
+ return Range.fromPoints(lead, anchor);
+ }
+ else {
+ return Range.fromPoints(anchor, lead);
+ }
+ };
+
+ /**
+ * [Empties the selection (by de-selecting it). This function also emits the `'changeSelection'` event.]{: #Selection.clearSelection}
+ **/
+ this.clearSelection = function() {
+ if (!this.$isEmpty) {
+ this.$isEmpty = true;
+ this._emit("changeSelection");
+ }
+ };
+
+ /**
+ * Selects all the text in the document.
+ **/
+ this.selectAll = function() {
+ var lastRow = this.doc.getLength() - 1;
+ this.setSelectionAnchor(0, 0);
+ this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);
+ };
+
+ /**
+ * Sets the selection to the provided range.
+ * @param {Range} range The range of text to select
+ * @param {Boolean} reverse Indicates if the range should go backwards (`true`) or not
+ *
+ *
+ * @method setSelectionRange
+ * @alias setRange
+ **/
+ this.setRange =
+ this.setSelectionRange = function(range, reverse) {
+ if (reverse) {
+ this.setSelectionAnchor(range.end.row, range.end.column);
+ this.selectTo(range.start.row, range.start.column);
+ } else {
+ this.setSelectionAnchor(range.start.row, range.start.column);
+ this.selectTo(range.end.row, range.end.column);
+ }
+ if (this.getRange().isEmpty())
+ this.$isEmpty = true;
+ this.$desiredColumn = null;
+ };
+
+ this.$moveSelection = function(mover) {
+ var lead = this.lead;
+ if (this.$isEmpty)
+ this.setSelectionAnchor(lead.row, lead.column);
+
+ mover.call(this);
+ };
+
+ /**
+ * Moves the selection cursor to the indicated row and column.
+ * @param {Number} row The row to select to
+ * @param {Number} column The column to select to
+ *
+ *
+ *
+ **/
+ this.selectTo = function(row, column) {
+ this.$moveSelection(function() {
+ this.moveCursorTo(row, column);
+ });
+ };
+
+ /**
+ * Moves the selection cursor to the row and column indicated by `pos`.
+ * @param {Object} pos An object containing the row and column
+ *
+ *
+ *
+ **/
+ this.selectToPosition = function(pos) {
+ this.$moveSelection(function() {
+ this.moveCursorToPosition(pos);
+ });
+ };
+
+ /**
+ *
+ * Moves the selection up one row.
+ **/
+ this.selectUp = function() {
+ this.$moveSelection(this.moveCursorUp);
+ };
+
+ /**
+ *
+ * Moves the selection down one row.
+ **/
+ this.selectDown = function() {
+ this.$moveSelection(this.moveCursorDown);
+ };
+
+ /**
+ *
+ *
+ * Moves the selection right one column.
+ **/
+ this.selectRight = function() {
+ this.$moveSelection(this.moveCursorRight);
+ };
+
+ /**
+ *
+ * Moves the selection left one column.
+ **/
+ this.selectLeft = function() {
+ this.$moveSelection(this.moveCursorLeft);
+ };
+
+ /**
+ *
+ * Moves the selection to the beginning of the current line.
+ **/
+ this.selectLineStart = function() {
+ this.$moveSelection(this.moveCursorLineStart);
+ };
+
+ /**
+ *
+ * Moves the selection to the end of the current line.
+ **/
+ this.selectLineEnd = function() {
+ this.$moveSelection(this.moveCursorLineEnd);
+ };
+
+ /**
+ *
+ * Moves the selection to the end of the file.
+ **/
+ this.selectFileEnd = function() {
+ this.$moveSelection(this.moveCursorFileEnd);
+ };
+
+ /**
+ *
+ * Moves the selection to the start of the file.
+ **/
+ this.selectFileStart = function() {
+ this.$moveSelection(this.moveCursorFileStart);
+ };
+
+ /**
+ *
+ * Moves the selection to the first word on the right.
+ **/
+ this.selectWordRight = function() {
+ this.$moveSelection(this.moveCursorWordRight);
+ };
+
+ /**
+ *
+ * Moves the selection to the first word on the left.
+ **/
+ this.selectWordLeft = function() {
+ this.$moveSelection(this.moveCursorWordLeft);
+ };
+
+ /**
+ * Moves the selection to highlight the entire word.
+ * @related EditSession.getWordRange
+ **/
+ this.getWordRange = function(row, column) {
+ if (typeof column == "undefined") {
+ var cursor = row || this.lead;
+ row = cursor.row;
+ column = cursor.column;
+ }
+ return this.session.getWordRange(row, column);
+ };
+
+ /**
+ *
+ * Selects an entire word boundary.
+ **/
+ this.selectWord = function() {
+ this.setSelectionRange(this.getWordRange());
+ };
+
+ /**
+ * Selects a word, including its right whitespace.
+ * @related EditSession.getAWordRange
+ **/
+ this.selectAWord = function() {
+ var cursor = this.getCursor();
+ var range = this.session.getAWordRange(cursor.row, cursor.column);
+ this.setSelectionRange(range);
+ };
+
+ this.getLineRange = function(row, excludeLastChar) {
+ var rowStart = typeof row == "number" ? row : this.lead.row;
+ var rowEnd;
+
+ var foldLine = this.session.getFoldLine(rowStart);
+ if (foldLine) {
+ rowStart = foldLine.start.row;
+ rowEnd = foldLine.end.row;
+ } else {
+ rowEnd = rowStart;
+ }
+ if (excludeLastChar === true)
+ return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);
+ else
+ return new Range(rowStart, 0, rowEnd + 1, 0);
+ };
+
+ /**
+ * Selects the entire line.
+ **/
+ this.selectLine = function() {
+ this.setSelectionRange(this.getLineRange());
+ };
+
+ /**
+ *
+ * Moves the cursor up one row.
+ **/
+ this.moveCursorUp = function() {
+ this.moveCursorBy(-1, 0);
+ };
+
+ /**
+ *
+ * Moves the cursor down one row.
+ **/
+ this.moveCursorDown = function() {
+ this.moveCursorBy(1, 0);
+ };
+
+ /**
+ *
+ * Moves the cursor left one column.
+ **/
+ this.moveCursorLeft = function() {
+ var cursor = this.lead.getPosition(),
+ fold;
+
+ if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {
+ this.moveCursorTo(fold.start.row, fold.start.column);
+ } else if (cursor.column == 0) {
+ // cursor is a line (start
+ if (cursor.row > 0) {
+ this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);
+ }
+ }
+ else {
+ var tabSize = this.session.getTabSize();
+ if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize)
+ this.moveCursorBy(0, -tabSize);
+ else
+ this.moveCursorBy(0, -1);
+ }
+ };
+
+ /**
+ *
+ * Moves the cursor right one column.
+ **/
+ this.moveCursorRight = function() {
+ var cursor = this.lead.getPosition(),
+ fold;
+ if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {
+ this.moveCursorTo(fold.end.row, fold.end.column);
+ }
+ else if (this.lead.column == this.doc.getLine(this.lead.row).length) {
+ if (this.lead.row < this.doc.getLength() - 1) {
+ this.moveCursorTo(this.lead.row + 1, 0);
+ }
+ }
+ else {
+ var tabSize = this.session.getTabSize();
+ var cursor = this.lead;
+ if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize)
+ this.moveCursorBy(0, tabSize);
+ else
+ this.moveCursorBy(0, 1);
+ }
+ };
+
+ /**
+ *
+ * Moves the cursor to the start of the line.
+ **/
+ this.moveCursorLineStart = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var screenRow = this.session.documentToScreenRow(row, column);
+
+ // Determ the doc-position of the first character at the screen line.
+ var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);
+
+ // Determ the line
+ var beforeCursor = this.session.getDisplayLine(
+ row, null, firstColumnPosition.row,
+ firstColumnPosition.column
+ );
+
+ var leadingSpace = beforeCursor.match(/^\s*/);
+ // TODO find better way for emacs mode to override selection behaviors
+ if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)
+ firstColumnPosition.column += leadingSpace[0].length;
+ this.moveCursorToPosition(firstColumnPosition);
+ };
+
+ /**
+ *
+ * Moves the cursor to the end of the line.
+ **/
+ this.moveCursorLineEnd = function() {
+ var lead = this.lead;
+ var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);
+ if (this.lead.column == lineEnd.column) {
+ var line = this.session.getLine(lineEnd.row);
+ if (lineEnd.column == line.length) {
+ var textEnd = line.search(/\s+$/);
+ if (textEnd > 0)
+ lineEnd.column = textEnd;
+ }
+ }
+
+ this.moveCursorTo(lineEnd.row, lineEnd.column);
+ };
+
+ /**
+ *
+ * Moves the cursor to the end of the file.
+ **/
+ this.moveCursorFileEnd = function() {
+ var row = this.doc.getLength() - 1;
+ var column = this.doc.getLine(row).length;
+ this.moveCursorTo(row, column);
+ };
+
+ /**
+ *
+ * Moves the cursor to the start of the file.
+ **/
+ this.moveCursorFileStart = function() {
+ this.moveCursorTo(0, 0);
+ };
+
+ /**
+ *
+ * Moves the cursor to the word on the right.
+ **/
+ this.moveCursorLongWordRight = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var line = this.doc.getLine(row);
+ var rightOfCursor = line.substring(column);
+
+ var match;
+ this.session.nonTokenRe.lastIndex = 0;
+ this.session.tokenRe.lastIndex = 0;
+
+ // skip folds
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold) {
+ this.moveCursorTo(fold.end.row, fold.end.column);
+ return;
+ }
+
+ // first skip space
+ if (match = this.session.nonTokenRe.exec(rightOfCursor)) {
+ column += this.session.nonTokenRe.lastIndex;
+ this.session.nonTokenRe.lastIndex = 0;
+ rightOfCursor = line.substring(column);
+ }
+
+ // if at line end proceed with next line
+ if (column >= line.length) {
+ this.moveCursorTo(row, line.length);
+ this.moveCursorRight();
+ if (row < this.doc.getLength() - 1)
+ this.moveCursorWordRight();
+ return;
+ }
+
+ // advance to the end of the next token
+ if (match = this.session.tokenRe.exec(rightOfCursor)) {
+ column += this.session.tokenRe.lastIndex;
+ this.session.tokenRe.lastIndex = 0;
+ }
+
+ this.moveCursorTo(row, column);
+ };
+
+ /**
+ *
+ * Moves the cursor to the word on the left.
+ **/
+ this.moveCursorLongWordLeft = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+
+ // skip folds
+ var fold;
+ if (fold = this.session.getFoldAt(row, column, -1)) {
+ this.moveCursorTo(fold.start.row, fold.start.column);
+ return;
+ }
+
+ var str = this.session.getFoldStringAt(row, column, -1);
+ if (str == null) {
+ str = this.doc.getLine(row).substring(0, column)
+ }
+
+ var leftOfCursor = lang.stringReverse(str);
+ var match;
+ this.session.nonTokenRe.lastIndex = 0;
+ this.session.tokenRe.lastIndex = 0;
+
+ // skip whitespace
+ if (match = this.session.nonTokenRe.exec(leftOfCursor)) {
+ column -= this.session.nonTokenRe.lastIndex;
+ leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);
+ this.session.nonTokenRe.lastIndex = 0;
+ }
+
+ // if at begin of the line proceed in line above
+ if (column <= 0) {
+ this.moveCursorTo(row, 0);
+ this.moveCursorLeft();
+ if (row > 0)
+ this.moveCursorWordLeft();
+ return;
+ }
+
+ // move to the begin of the word
+ if (match = this.session.tokenRe.exec(leftOfCursor)) {
+ column -= this.session.tokenRe.lastIndex;
+ this.session.tokenRe.lastIndex = 0;
+ }
+
+ this.moveCursorTo(row, column);
+ };
+
+ this.$shortWordEndIndex = function(rightOfCursor) {
+ var match, index = 0, ch;
+ var whitespaceRe = /\s/;
+ var tokenRe = this.session.tokenRe;
+
+ tokenRe.lastIndex = 0;
+ if (match = this.session.tokenRe.exec(rightOfCursor)) {
+ index = this.session.tokenRe.lastIndex;
+ } else {
+ while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+ index ++;
+
+ if (index < 1) {
+ tokenRe.lastIndex = 0;
+ while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {
+ tokenRe.lastIndex = 0;
+ index ++;
+ if (whitespaceRe.test(ch)) {
+ if (index > 2) {
+ index--
+ break;
+ } else {
+ while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))
+ index ++;
+ if (index > 2)
+ break
+ }
+ }
+ }
+ }
+ }
+ tokenRe.lastIndex = 0;
+
+ return index;
+ };
+
+ this.moveCursorShortWordRight = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+ var line = this.doc.getLine(row);
+ var rightOfCursor = line.substring(column);
+
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold)
+ return this.moveCursorTo(fold.end.row, fold.end.column);
+
+ if (column == line.length) {
+ var l = this.doc.getLength();
+ do {
+ row++;
+ rightOfCursor = this.doc.getLine(row)
+ } while (row < l && /^\s*$/.test(rightOfCursor))
+
+ if (!/^\s+/.test(rightOfCursor))
+ rightOfCursor = ""
+ column = 0;
+ }
+
+ var index = this.$shortWordEndIndex(rightOfCursor);
+
+ this.moveCursorTo(row, column + index);
+ };
+
+ this.moveCursorShortWordLeft = function() {
+ var row = this.lead.row;
+ var column = this.lead.column;
+
+ var fold;
+ if (fold = this.session.getFoldAt(row, column, -1))
+ return this.moveCursorTo(fold.start.row, fold.start.column);
+
+ var line = this.session.getLine(row).substring(0, column);
+ if (column == 0) {
+ do {
+ row--;
+ line = this.doc.getLine(row);
+ } while (row > 0 && /^\s*$/.test(line))
+
+ column = line.length;
+ if (!/\s+$/.test(line))
+ line = ""
+ }
+
+ var leftOfCursor = lang.stringReverse(line);
+ var index = this.$shortWordEndIndex(leftOfCursor);
+
+ return this.moveCursorTo(row, column - index);
+ };
+
+ this.moveCursorWordRight = function() {
+ if (this.session.$selectLongWords)
+ this.moveCursorLongWordRight();
+ else
+ this.moveCursorShortWordRight();
+ };
+
+ this.moveCursorWordLeft = function() {
+ if (this.session.$selectLongWords)
+ this.moveCursorLongWordLeft();
+ else
+ this.moveCursorShortWordLeft();
+ };
+
+ /**
+ * Moves the cursor to position indicated by the parameters. Negative numbers move the cursor backwards in the document.
+ * @param {Number} rows The number of rows to move by
+ * @param {Number} chars The number of characters to move by
+ *
+ *
+ * @related EditSession.documentToScreenPosition
+ **/
+ this.moveCursorBy = function(rows, chars) {
+ var screenPos = this.session.documentToScreenPosition(
+ this.lead.row,
+ this.lead.column
+ );
+
+ if (chars === 0) {
+ if (this.$desiredColumn)
+ screenPos.column = this.$desiredColumn;
+ else
+ this.$desiredColumn = screenPos.column;
+ }
+
+ var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column);
+
+ // move the cursor and update the desired column
+ this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);
+ };
+
+ /**
+ * Moves the selection to the position indicated by its `row` and `column`.
+ * @param {Object} position The position to move to
+ *
+ *
+ **/
+ this.moveCursorToPosition = function(position) {
+ this.moveCursorTo(position.row, position.column);
+ };
+
+ /**
+ * Moves the cursor to the row and column provided. [If `preventUpdateDesiredColumn` is `true`, then the cursor stays in the same column position as its original point.]{: #preventUpdateBoolDesc}
+ * @param {Number} row The row to move to
+ * @param {Number} column The column to move to
+ * @param {Boolean} keepDesiredColumn [If `true`, the cursor move does not respect the previous column]{: #preventUpdateBool}
+ *
+ *
+ **/
+ this.moveCursorTo = function(row, column, keepDesiredColumn) {
+ // Ensure the row/column is not inside of a fold.
+ var fold = this.session.getFoldAt(row, column, 1);
+ if (fold) {
+ row = fold.start.row;
+ column = fold.start.column;
+ }
+
+ this.$keepDesiredColumnOnChange = true;
+ this.lead.setPosition(row, column);
+ this.$keepDesiredColumnOnChange = false;
+
+ if (!keepDesiredColumn)
+ this.$desiredColumn = null;
+ };
+
+ /**
+ * Moves the cursor to the screen position indicated by row and column. {:preventUpdateBoolDesc}
+ * @param {Number} row The row to move to
+ * @param {Number} column The column to move to
+ * @param {Boolean} keepDesiredColumn {:preventUpdateBool}
+ *
+ *
+ **/
+ this.moveCursorToScreen = function(row, column, keepDesiredColumn) {
+ var pos = this.session.screenToDocumentPosition(row, column);
+ this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);
+ };
+
+ // remove listeners from document
+ this.detach = function() {
+ this.lead.detach();
+ this.anchor.detach();
+ this.session = this.doc = null;
+ }
+
+ this.fromOrientedRange = function(range) {
+ this.setSelectionRange(range, range.cursor == range.start);
+ this.$desiredColumn = range.desiredColumn || this.$desiredColumn;
+ }
+
+ this.toOrientedRange = function(range) {
+ var r = this.getRange();
+ if (range) {
+ range.start.column = r.start.column;
+ range.start.row = r.start.row;
+ range.end.column = r.end.column;
+ range.end.row = r.end.row;
+ } else {
+ range = r;
+ }
+
+ range.cursor = this.isBackwards() ? range.start : range.end;
+ range.desiredColumn = this.$desiredColumn;
+ return range;
+ }
+
+ this.toJSON = function() {
+ if (this.rangeCount) {
+ var data = this.ranges.map(function(r) {
+ var r1 = r.clone();
+ r1.isBackwards = r.cursor == r.start;
+ return r1;
+ });
+ } else {
+ var data = this.getRange();
+ data.isBackwards = this.isBackwards();
+ }
+ return data;
+ };
+
+ this.fromJSON = function(data) {
+ if (data.start == undefined) {
+ if (this.rangeList) {
+ this.toSingleRange(data[0]);
+ for (var i = data.length; i--; ) {
+ var r = Range.fromPoints(data[i].start, data[i].end);
+ if (data.isBackwards)
+ r.cursor = r.start;
+ this.addRange(r, true);
+ }
+ return;
+ } else
+ data = data[0];
+ }
+ if (this.rangeList)
+ this.toSingleRange(data);
+ this.setSelectionRange(data, data.isBackwards);
+ };
+
+ this.isEqual = function(data) {
+ if ((data.length || this.rangeCount) && data.length != this.rangeCount)
+ return false;
+ if (!data.length || !this.ranges)
+ return this.getRange().isEqual(data);
+
+ for (var i = this.ranges.length; i--; ) {
+ if (!this.ranges[i].isEqual(data[i]))
+ return false
+ }
+ return true;
+ }
+
+}).call(Selection.prototype);
+
+exports.Selection = Selection;
+});
diff --git a/src/fauxton/assets/js/libs/ace/selection_test.js b/src/fauxton/assets/js/libs/ace/selection_test.js
new file mode 100644
index 000000000..e1a67669f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/selection_test.js
@@ -0,0 +1,480 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var assert = require("./test/assertions");
+
+module.exports = {
+ createSession : function(rows, cols) {
+ var line = new Array(cols + 1).join("a");
+ var text = new Array(rows).join(line + "\n") + line;
+ return new EditSession(text);
+ },
+
+ "test: move cursor to end of file should place the cursor on last row and column" : function() {
+ var session = this.createSession(200, 10);
+ var selection = session.getSelection();
+
+ selection.moveCursorFileEnd();
+ assert.position(selection.getCursor(), 199, 10);
+ },
+
+ "test: moveCursor to start of file should place the cursor on the first row and column" : function() {
+ var session = this.createSession(200, 10);
+ var selection = session.getSelection();
+
+ selection.moveCursorFileStart();
+ assert.position(selection.getCursor(), 0, 0);
+ },
+
+ "test: move selection lead to end of file" : function() {
+ var session = this.createSession(200, 10);
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(100, 5);
+ selection.selectFileEnd();
+
+ var range = selection.getRange();
+
+ assert.position(range.start, 100, 5);
+ assert.position(range.end, 199, 10);
+ },
+
+ "test: move selection lead to start of file" : function() {
+ var session = this.createSession(200, 10);
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(100, 5);
+ selection.selectFileStart();
+
+ var range = selection.getRange();
+
+ assert.position(range.start, 0, 0);
+ assert.position(range.end, 100, 5);
+ },
+
+ "test: move cursor word right" : function() {
+ var session = new EditSession([
+ "ab",
+ " Juhu Kinners (abc, 12)",
+ " cde"
+ ].join("\n"));
+
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorDown();
+ assert.position(selection.getCursor(), 1, 0);
+
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 1, 5);
+
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 1, 13);
+
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 1, 18);
+
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 1, 22);
+
+ // wrap line
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 2, 4);
+
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 2, 4);
+ },
+
+ "test: select word right if cursor in word" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 2);
+ selection.moveCursorWordRight();
+
+ assert.position(selection.getCursor(), 0, 4);
+ },
+
+ "test: moveCursor word left" : function() {
+ var session = new EditSession([
+ "ab",
+ " Juhu Kinners (abc, 12)",
+ " cde"
+ ].join("\n"));
+
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorDown();
+ selection.moveCursorLineEnd();
+ assert.position(selection.getCursor(), 1, 23);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 1, 20);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 1, 15);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 1, 6);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 1, 1);
+
+ // wrap line
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 0);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 0);
+ },
+
+ "test: moveCursor word left with umlauts" : function() {
+ var session = new EditSession(" Fuß Füße");
+ session.$selectLongWords = true;
+
+ var selection = session.getSelection();
+ selection.moveCursorTo(0, 9)
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 5);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 1);
+ },
+
+ "test: select word left if cursor in word" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 8);
+
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 5);
+ },
+
+ "test: select word right and select" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 0);
+ selection.selectWordRight();
+
+ var range = selection.getRange();
+
+ assert.position(range.start, 0, 0);
+ assert.position(range.end, 0, 4);
+ },
+
+ "test: select word left and select" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 3);
+ selection.selectWordLeft();
+
+ var range = selection.getRange();
+
+ assert.position(range.start, 0, 0);
+ assert.position(range.end, 0, 3);
+ },
+
+ "test: select word with cursor in word should select the word" : function() {
+ var session = new EditSession("Juhu Kinners 123");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 8);
+ selection.selectWord();
+
+ var range = selection.getRange();
+ assert.position(range.start, 0, 5);
+ assert.position(range.end, 0, 12);
+ },
+
+ "test: select word with cursor in word including right whitespace should select the word" : function() {
+ var session = new EditSession("Juhu Kinners 123");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 8);
+ selection.selectAWord();
+
+ var range = selection.getRange();
+ assert.position(range.start, 0, 5);
+ assert.position(range.end, 0, 18);
+ },
+
+ "test: select word with cursor betwen white space and word should select the word" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 4);
+ selection.selectWord();
+
+ var range = selection.getRange();
+ assert.position(range.start, 0, 0);
+ assert.position(range.end, 0, 4);
+
+ selection.moveCursorTo(0, 5);
+ selection.selectWord();
+
+ var range = selection.getRange();
+ assert.position(range.start, 0, 5);
+ assert.position(range.end, 0, 12);
+ },
+
+ "test: select word with cursor in white space should select white space" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 5);
+ selection.selectWord();
+
+ var range = selection.getRange();
+ assert.position(range.start, 0, 4);
+ assert.position(range.end, 0, 6);
+ },
+
+ "test: moving cursor should fire a 'changeCursor' event" : function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 5);
+
+ var called = false;
+ selection.addEventListener("changeCursor", function() {
+ called = true;
+ });
+
+ selection.moveCursorTo(0, 6);
+ assert.ok(called);
+ },
+
+ "test: calling setCursor with the same position should not fire an event": function() {
+ var session = new EditSession("Juhu Kinners");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 5);
+
+ var called = false;
+ selection.addEventListener("changeCursor", function() {
+ called = true;
+ });
+
+ selection.moveCursorTo(0, 5);
+ assert.notOk(called);
+ },
+
+ "test: moveWordright should move past || and [": function() {
+ var session = new EditSession("||foo[");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ // Move behind ||foo
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 0, 5);
+
+ // Move behind [
+ selection.moveCursorWordRight();
+ assert.position(selection.getCursor(), 0, 6);
+ },
+
+ "test: moveWordLeft should move past || and [": function() {
+ var session = new EditSession("||foo[");
+ var selection = session.getSelection();
+ session.$selectLongWords = true;
+
+ selection.moveCursorTo(0, 6);
+
+ // Move behind [foo
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 2);
+
+ // Move behind ||
+ selection.moveCursorWordLeft();
+ assert.position(selection.getCursor(), 0, 0);
+ },
+
+ "test: move cursor to line start should move cursor to end of the indentation first": function() {
+ var session = new EditSession("12\n Juhu\n12");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(1, 6);
+ selection.moveCursorLineStart();
+
+ assert.position(selection.getCursor(), 1, 4);
+ },
+
+ "test: move cursor to line start when the cursor is at the end of the indentation should move cursor to column 0": function() {
+ var session = new EditSession("12\n Juhu\n12");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(1, 4);
+ selection.moveCursorLineStart();
+
+ assert.position(selection.getCursor(), 1, 0);
+ },
+
+ "test: move cursor to line start when the cursor is at column 0 should move cursor to the end of the indentation": function() {
+ var session = new EditSession("12\n Juhu\n12");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(1, 0);
+ selection.moveCursorLineStart();
+
+ assert.position(selection.getCursor(), 1, 4);
+ },
+
+ // Eclipse style
+ "test: move cursor to line start when the cursor is before the initial indentation should move cursor to the end of the indentation": function() {
+ var session = new EditSession("12\n Juhu\n12");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(1, 2);
+ selection.moveCursorLineStart();
+
+ assert.position(selection.getCursor(), 1, 4);
+ },
+
+ "test go line up when in the middle of the first line should go to document start": function() {
+ var session = new EditSession("juhu kinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 4);
+ selection.moveCursorUp();
+
+ assert.position(selection.getCursor(), 0, 0);
+ },
+
+ "test: (wrap) go line up when in the middle of the first line should go to document start": function() {
+ var session = new EditSession("juhu kinners");
+ session.setWrapLimitRange(5, 5);
+ session.adjustWrapLimit(80);
+
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 4);
+ selection.moveCursorUp();
+
+ assert.position(selection.getCursor(), 0, 0);
+ },
+
+
+ "test go line down when in the middle of the last line should go to document end": function() {
+ var session = new EditSession("juhu kinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 4);
+ selection.moveCursorDown();
+
+ assert.position(selection.getCursor(), 0, 12);
+ },
+
+ "test (wrap) go line down when in the middle of the last line should go to document end": function() {
+ var session = new EditSession("juhu kinners");
+ session.setWrapLimitRange(8, 8);
+ session.adjustWrapLimit(80);
+
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 10);
+ selection.moveCursorDown();
+
+ assert.position(selection.getCursor(), 0, 12);
+ },
+
+ "test go line up twice and then once down when in the second should go back to the previous column": function() {
+ var session = new EditSession("juhu\nkinners");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(1, 4);
+ selection.moveCursorUp();
+ selection.moveCursorUp();
+ selection.moveCursorDown();
+
+ assert.position(selection.getCursor(), 1, 4);
+ },
+
+ "test (keyboard navigation) when curLine is not EOL and targetLine is all whitespace new column should be current column": function() {
+ var session = new EditSession("function (a) {\n \n}");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(2, 0);
+ selection.moveCursorUp();
+
+ assert.position(selection.getCursor(), 1, 0);
+ },
+
+ "test (keyboard navigation) when curLine is EOL and targetLine is shorter than current column, new column should be targetLine's EOL": function() {
+ var session = new EditSession("function (a) {\n \n}");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 14);
+ selection.moveCursorDown();
+
+ assert.position(selection.getCursor(), 1, 4);
+ },
+
+ "test fromJSON/toJSON": function() {
+ var session = new EditSession("function (a) {\n \n}");
+ var selection = session.getSelection();
+
+ selection.moveCursorTo(0, 14);
+ selection.moveCursorDown();
+ assert.position(selection.getCursor(), 1, 4);
+ var data = selection.toJSON();
+ data = JSON.parse(JSON.stringify(data))
+ selection.moveCursorDown();
+ assert.position(selection.getCursor(), 2, 1);
+
+ assert.ok(!selection.isEqual(data));
+
+ selection.fromJSON(data);
+ assert.position(selection.getCursor(), 1, 4);
+ assert.ok(selection.isEqual(data));
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/snippets.js b/src/fauxton/assets/js/libs/ace/snippets.js
new file mode 100644
index 000000000..50c32383c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets.js
@@ -0,0 +1,844 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+var lang = require("./lib/lang")
+var Range = require("./range").Range
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var Tokenizer = require("./tokenizer").Tokenizer;
+var comparePoints = Range.comparePoints;
+
+var SnippetManager = function() {
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+};
+
+(function() {
+ this.getTokenizer = function() {
+ function TabstopToken(str, _, stack) {
+ str = str.substr(1);
+ if (/^\d+$/.test(str) && !stack.inFormatString)
+ return [{tabstopId: parseInt(str, 10)}];
+ return [{text: str}]
+ }
+ function escape(ch) {
+ return "(?:[^\\\\" + ch + "]|\\\\.)";
+ }
+ SnippetManager.$tokenizer = new Tokenizer({
+ start: [
+ {regex: /:/, onMatch: function(val, state, stack) {
+ if (stack.length && stack[0].expectIf) {
+ stack[0].expectIf = false;
+ stack[0].elseBranch = stack[0];
+ return [stack[0]];
+ }
+ return ":";
+ }},
+ {regex: /\\./, onMatch: function(val, state, stack) {
+ var ch = val[1];
+ if (ch == "}" && stack.length) {
+ val = ch;
+ }else if ("`$\\".indexOf(ch) != -1) {
+ val = ch;
+ } else if (stack.inFormatString) {
+ if (ch == "n")
+ val = "\n";
+ else if (ch == "t")
+ val = "\n";
+ else if ("ulULE".indexOf(ch) != -1) {
+ val = {changeCase: ch, local: ch > "a"};
+ }
+ }
+
+ return [val];
+ }},
+ {regex: /}/, onMatch: function(val, state, stack) {
+ return [stack.length ? stack.shift() : val];
+ }},
+ {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
+ {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
+ var t = TabstopToken(str.substr(1), state, stack);
+ stack.unshift(t[0]);
+ return t;
+ }, next: "snippetVar"},
+ {regex: /\n/, token: "newline", merge: false}
+ ],
+ snippetVar: [
+ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
+ stack[0].choices = val.slice(1, -1).split(",");
+ }, next: "start"},
+ {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
+ onMatch: function(val, state, stack) {
+ var ts = stack[0];
+ ts.fmtString = val;
+
+ val = this.splitRegex.exec(val);
+ ts.guard = val[1];
+ ts.fmt = val[2];
+ ts.flag = val[3];
+ return "";
+ }, next: "start"},
+ {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
+ stack[0].code = val.splice(1, -1);
+ return "";
+ }, next: "start"},
+ {regex: "\\?", onMatch: function(val, state, stack) {
+ if (stack[0])
+ stack[0].expectIf = true;
+ }, next: "start"},
+ {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
+ ],
+ formatString: [
+ {regex: "/(" + escape("/") + "+)/", token: "regex"},
+ {regex: "", onMatch: function(val, state, stack) {
+ stack.inFormatString = true;
+ }, next: "start"}
+ ]
+ });
+ SnippetManager.prototype.getTokenizer = function() {
+ return SnippetManager.$tokenizer;
+ }
+ return SnippetManager.$tokenizer;
+ };
+
+ this.tokenizeTmSnippet = function(str, startState) {
+ return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
+ return x.value || x;
+ });
+ };
+
+ this.$getDefaultValue = function(editor, name) {
+ if (/^[A-Z]\d+$/.test(name)) {
+ var i = name.substr(1);
+ return (this.variables[name[0] + "__"] || {})[i];
+ }
+ if (/^\d+$/.test(name)) {
+ return (this.variables.__ || {})[name];
+ }
+ name = name.replace(/^TM_/, "");
+
+ if (!editor)
+ return;
+ var s = editor.session;
+ switch(name) {
+ case "CURRENT_WORD":
+ var r = s.getWordRange();
+ case "SELECTION":
+ case "SELECTED_TEXT":
+ return s.getTextRange(r);
+ case "CURRENT_LINE":
+ return s.getLine(editor.getCursorPosition().row);
+ case "PREV_LINE": // not possible in textmate
+ return s.getLine(editor.getCursorPosition().row - 1);
+ case "LINE_INDEX":
+ return editor.getCursorPosition().column;
+ case "LINE_NUMBER":
+ return editor.getCursorPosition().row + 1;
+ case "SOFT_TABS":
+ return s.getUseSoftTabs() ? "YES" : "NO";
+ case "TAB_SIZE":
+ return s.getTabSize();
+ // defult but can't fill :(
+ case "FILENAME":
+ case "FILEPATH":
+ return "ace.ajax.org";
+ case "FULLNAME":
+ return "Ace";
+ }
+ };
+ this.variables = {};
+ this.getVariableValue = function(editor, varName) {
+ if (this.variables.hasOwnProperty(varName))
+ return this.variables[varName](editor, varName) || "";
+ return this.$getDefaultValue(editor, varName) || "";
+ };
+
+ // returns string formatted according to http://manual.macromates.com/en/regular_expressions#replacement_string_syntax_format_strings
+ this.tmStrFormat = function(str, ch, editor) {
+ var flag = ch.flag || "";
+ var re = ch.guard;
+ re = new RegExp(re, flag.replace(/[^gi]/, ""));
+ var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
+ var _self = this;
+ var formatted = str.replace(re, function() {
+ _self.variables.__ = arguments;
+ var fmtParts = _self.resolveVariables(fmtTokens, editor);
+ var gChangeCase = "E";
+ for (var i = 0; i < fmtParts.length; i++) {
+ var ch = fmtParts[i];
+ if (typeof ch == "object") {
+ fmtParts[i] = "";
+ if (ch.changeCase && ch.local) {
+ var next = fmtParts[i + 1];
+ if (next && typeof next == "string") {
+ if (ch.changeCase == "u")
+ fmtParts[i] = next[0].toUpperCase();
+ else
+ fmtParts[i] = next[0].toLowerCase();
+ fmtParts[i + 1] = next.substr(1);
+ }
+ } else if (ch.changeCase) {
+ gChangeCase = ch.changeCase;
+ }
+ } else if (gChangeCase == "U") {
+ fmtParts[i] = ch.toUpperCase();
+ } else if (gChangeCase == "L") {
+ fmtParts[i] = ch.toLowerCase();
+ }
+ }
+ return fmtParts.join("");
+ });
+ this.variables.__ = null;
+ return formatted;
+ };
+
+ this.resolveVariables = function(snippet, editor) {
+ var result = [];
+ for (var i = 0; i < snippet.length; i++) {
+ var ch = snippet[i];
+ if (typeof ch == "string") {
+ result.push(ch);
+ } else if (typeof ch != "object") {
+ continue;
+ } else if (ch.skip) {
+ gotoNext(ch);
+ } else if (ch.processed < i) {
+ continue;
+ } else if (ch.text) {
+ var value = this.getVariableValue(editor, ch.text);
+ if (value && ch.fmtString)
+ value = this.tmStrFormat(value, ch);
+ ch.processed = i;
+ if (ch.expectIf == null) {
+ if (value) {
+ result.push(value);
+ gotoNext(ch);
+ }
+ } else {
+ if (value) {
+ ch.skip = ch.elseBranch;
+ } else
+ gotoNext(ch);
+ }
+ } else if (ch.tabstopId != null) {
+ result.push(ch);
+ } else if (ch.changeCase != null) {
+ result.push(ch);
+ }
+ }
+ function gotoNext(ch) {
+ var i1 = snippet.indexOf(ch, i + 1);
+ if (i1 != -1)
+ i = i1;
+ }
+ return result;
+ };
+
+ this.insertSnippet = function(editor, snippetText) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var indentString = line.match(/^\s*/)[0];
+ var tabString = editor.session.getTabString();
+
+ var tokens = this.tokenizeTmSnippet(snippetText);
+ tokens = this.resolveVariables(tokens, editor);
+ // indent
+ tokens = tokens.map(function(x) {
+ if (x == "\n")
+ return x + indentString;
+ if (typeof x == "string")
+ return x.replace(/\t/g, tabString);
+ return x;
+ });
+ // tabstop values
+ var tabstops = [];
+ tokens.forEach(function(p, i) {
+ if (typeof p != "object")
+ return;
+ var id = p.tabstopId;
+ var ts = tabstops[id];
+ if (!ts) {
+ ts = tabstops[id] = [];
+ ts.index = id;
+ ts.value = "";
+ }
+ if (ts.indexOf(p) !== -1)
+ return;
+ ts.push(p);
+ var i1 = tokens.indexOf(p, i + 1);
+ if (i1 === -1)
+ return;
+
+ var value = tokens.slice(i + 1, i1);
+ var isNested = value.some(function(t) {return typeof t === "object"});
+ if (isNested && !ts.value) {
+ ts.value = value;
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
+ ts.value = value.join("");
+ }
+ });
+
+ // expand tabstop values
+ tabstops.forEach(function(ts) {ts.length = 0});
+ var expanding = {};
+ function copyValue(val) {
+ var copy = []
+ for (var i = 0; i < val.length; i++) {
+ var p = val[i];
+ if (typeof p == "object") {
+ if (expanding[p.tabstopId])
+ continue;
+ var j = val.lastIndexOf(p, i - 1);
+ p = copy[j] || {tabstopId: p.tabstopId};
+ }
+ copy[i] = p;
+ }
+ return copy;
+ }
+ for (var i = 0; i < tokens.length; i++) {
+ var p = tokens[i];
+ if (typeof p != "object")
+ continue;
+ var id = p.tabstopId;
+ var i1 = tokens.indexOf(p, i + 1);
+ if (expanding[id] == p) {
+ expanding[id] = null;
+ continue;
+ }
+
+ var ts = tabstops[id];
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
+ arg.unshift(i + 1, Math.max(0, i1 - i));
+ arg.push(p);
+ expanding[id] = p;
+ tokens.splice.apply(tokens, arg);
+
+ if (ts.indexOf(p) === -1)
+ ts.push(p);
+ };
+
+ // convert to plain text
+ var row = 0, column = 0;
+ var text = "";
+ tokens.forEach(function(t) {
+ if (typeof t === "string") {
+ if (t[0] === "\n"){
+ column = t.length - 1;
+ row ++;
+ } else
+ column += t.length;
+ text += t;
+ } else {
+ if (!t.start)
+ t.start = {row: row, column: column};
+ else
+ t.end = {row: row, column: column};
+ }
+ });
+ var range = editor.getSelectionRange();
+ var end = editor.session.replace(range, text);
+
+ var tabstopManager = new TabstopManager(editor);
+ tabstopManager.addTabstops(tabstops, range.start, end);
+ tabstopManager.tabNext();
+ };
+
+ this.$getScope = function(editor) {
+ var scope = editor.session.$mode.$id || "";
+ scope = scope.split("/").pop();
+ if (scope === "html" || scope === "php") {
+ // PHP is actually HTML
+ if (scope === "php")
+ scope = "html";
+ var c = editor.getCursorPosition()
+ var state = editor.session.getState(c.row);
+ if (typeof state === "object") {
+ state = state[0];
+ }
+ if (state.substring) {
+ if (state.substring(0, 3) == "js-")
+ scope = "javascript";
+ else if (state.substring(0, 4) == "css-")
+ scope = "css";
+ else if (state.substring(0, 4) == "php-")
+ scope = "php";
+ }
+ }
+
+ return scope;
+ };
+
+ this.expandWithTab = function(editor) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var before = line.substring(0, cursor.column);
+ var after = line.substr(cursor.column);
+
+ var scope = this.$getScope(editor);
+ var snippetMap = this.snippetMap;
+ var snippet;
+ [scope, "_"].some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = this.findMatchingSnippet(snippets, before, after);
+ return !!snippet;
+ }, this);
+ if (!snippet)
+ return false;
+
+ editor.session.doc.removeInLine(cursor.row,
+ cursor.column - snippet.replaceBefore.length,
+ cursor.column + snippet.replaceAfter.length
+ );
+
+ this.variables.M__ = snippet.matchBefore;
+ this.variables.T__ = snippet.matchAfter;
+ this.insertSnippet(editor, snippet.content);
+
+ this.variables.M__ = this.variables.T__ = null;
+ return true;
+ };
+
+ this.findMatchingSnippet = function(snippetList, before, after) {
+ for (var i = snippetList.length; i--;) {
+ var s = snippetList[i];
+ if (s.startRe && !s.startRe.test(before))
+ continue;
+ if (s.endRe && !s.endRe.test(after))
+ continue;
+ if (!s.startRe && !s.endRe)
+ continue;
+
+ s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
+ s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
+ s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
+ s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
+ return s;
+ }
+ };
+
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+ this.register = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+ var self = this;
+ function wrapRegexp(src) {
+ if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
+ src = "(?:" + src + ")"
+
+ return src || "";
+ }
+ function guardedRegexp(re, guard, opening) {
+ re = wrapRegexp(re);
+ guard = wrapRegexp(guard);
+ if (opening) {
+ re = guard + re;
+ if (re && re[re.length - 1] != "$")
+ re = re + "$";
+ } else {
+ re = re + guard;
+ if (re && re[0] != "^")
+ re = "^" + re;
+ }
+ return new RegExp(re);
+ }
+
+ function addSnippet(s) {
+ if (!s.scope)
+ s.scope = scope || "_";
+ scope = s.scope
+ if (!snippetMap[scope]) {
+ snippetMap[scope] = [];
+ snippetNameMap[scope] = {};
+ }
+
+ var map = snippetNameMap[scope];
+ if (s.name) {
+ var old = map[s.name];
+ if (old)
+ self.unregister(old);
+ map[s.name] = s;
+ }
+ snippetMap[scope].push(s);
+
+ if (s.tabTrigger && !s.trigger) {
+ if (!s.guard && /^\w/.test(s.tabTrigger))
+ s.guard = "\\b";
+ s.trigger = lang.escapeRegExp(s.tabTrigger);
+ }
+
+ s.startRe = guardedRegexp(s.trigger, s.guard, true);
+ s.triggerRe = new RegExp(s.trigger, "", true);
+
+ s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
+ s.endTriggerRe = new RegExp(s.endTrigger, "", true);
+ };
+
+ if (snippets.content)
+ addSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(addSnippet);
+ };
+ this.unregister = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+
+ function removeSnippet(s) {
+ var nameMap = snippetNameMap[s.scope||scope];
+ if (nameMap && nameMap[s.name]) {
+ delete nameMap[s.name];
+ var map = snippetMap[s.scope||scope];
+ var i = map && map.indexOf(s);
+ if (i >= 0)
+ map.splice(i, 1);
+ }
+ }
+ if (snippets.content)
+ removeSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(removeSnippet);
+ };
+ this.parseSnippetFile = function(str) {
+ str = str.replace(/\r/g, "");
+ var list = [], snippet = {};
+ var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
+ var m;
+ while (m = re.exec(str)) {
+ if (m[1]) {
+ try {
+ snippet = JSON.parse(m[1])
+ list.push(snippet);
+ } catch (e) {}
+ } if (m[4]) {
+ snippet.content = m[4].replace(/^\t/gm, "");
+ list.push(snippet);
+ snippet = {};
+ } else {
+ var key = m[2], val = m[3];
+ if (key == "regex") {
+ var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
+ snippet.guard = guardRe.exec(val)[1];
+ snippet.trigger = guardRe.exec(val)[1];
+ snippet.endTrigger = guardRe.exec(val)[1];
+ snippet.endGuard = guardRe.exec(val)[1];
+ } else if (key == "snippet") {
+ snippet.tabTrigger = val.match(/^\S*/)[0];
+ if (!snippet.name)
+ snippet.name = val;
+ } else {
+ snippet[key] = val;
+ }
+ }
+ }
+ return list;
+ };
+ this.getSnippetByName = function(name, editor) {
+ var scope = editor && this.$getScope(editor);
+ var snippetMap = this.snippetNameMap;
+ var snippet;
+ [scope, "_"].some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = snippets[name];
+ return !!snippet;
+ }, this);
+ return snippet;
+ };
+
+}).call(SnippetManager.prototype);
+
+
+var TabstopManager = function(editor) {
+ if (editor.tabstopManager)
+ return editor.tabstopManager;
+ editor.tabstopManager = this;
+ this.$onChange = this.onChange.bind(this);
+ this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
+ this.$onChangeSession = this.onChangeSession.bind(this);
+ this.$onAfterExec = this.onAfterExec.bind(this);
+ this.attach(editor);
+};
+(function() {
+ this.attach = function(editor) {
+ this.index = -1;
+ this.ranges = [];
+ this.tabstops = [];
+ this.selectedTabstop = null;
+
+ this.editor = editor;
+ this.editor.on("change", this.$onChange);
+ this.editor.on("changeSelection", this.$onChangeSelection);
+ this.editor.on("changeSession", this.$onChangeSession);
+ this.editor.commands.on("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.detach = function() {
+ this.tabstops.forEach(this.removeTabstopMarkers, this);
+ this.ranges = null;
+ this.tabstops = null;
+ this.selectedTabstop = null;
+ this.editor.removeListener("change", this.$onChange);
+ this.editor.removeListener("changeSelection", this.$onChangeSelection);
+ this.editor.removeListener("changeSession", this.$onChangeSession);
+ this.editor.commands.removeListener("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.tabstopManager = null;
+ this.editor = null;
+ };
+
+ this.onChange = function(e) {
+ var changeRange = e.data.range;
+ var isRemove = e.data.action[0] == "r";
+ var start = changeRange.start;
+ var end = changeRange.end;
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+ var colDiff = end.column - start.column;
+
+ if (isRemove) {
+ lineDif = -lineDif;
+ colDiff = -colDiff;
+ }
+ if (!this.$inChange && isRemove) {
+ var ts = this.selectedTabstop;
+ var changedOutside = !ts.some(function(r) {
+ return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
+ });
+ if (changedOutside)
+ return this.detach();
+ }
+ var ranges = this.ranges;
+ for (var i = 0; i < ranges.length; i++) {
+ var r = ranges[i];
+ if (r.end.row < start.row)
+ continue;
+
+ if (comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
+ this.removeRange(r);
+ i--;
+ continue;
+ }
+
+ if (r.start.row == startRow && r.start.column > start.column)
+ r.start.column += colDiff;
+ if (r.end.row == startRow && r.end.column >= start.column)
+ r.end.column += colDiff;
+ if (r.start.row >= startRow)
+ r.start.row += lineDif;
+ if (r.end.row >= startRow)
+ r.end.row += lineDif;
+
+ if (comparePoints(r.start, r.end) > 0)
+ this.removeRange(r);
+ }
+ if (!ranges.length)
+ this.detach();
+ };
+ this.updateLinkedFields = function() {
+ var ts = this.selectedTabstop;
+ if (!ts.hasLinkedRanges)
+ return;
+ this.$inChange = true;
+ var session = this.editor.session;
+ var text = session.getTextRange(ts.firstNonLinked);
+ for (var i = ts.length; i--;) {
+ var range = ts[i];
+ if (!range.linked)
+ continue;
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original)
+ session.replace(range, fmt);
+ }
+ this.$inChange = false;
+ };
+ this.onAfterExec = function(e) {
+ if (e.command && !e.command.readOnly)
+ this.updateLinkedFields();
+ };
+ this.onChangeSelection = function() {
+ if (!this.editor)
+ return
+ var lead = this.editor.selection.lead;
+ var anchor = this.editor.selection.anchor;
+ var isEmpty = this.editor.selection.isEmpty();
+ for (var i = this.ranges.length; i--;) {
+ if (this.ranges[i].linked)
+ continue;
+ var containsLead = this.ranges[i].contains(lead.row, lead.column);
+ var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
+ if (containsLead && containsAnchor)
+ return;
+ }
+ this.detach();
+ };
+ this.onChangeSession = function() {
+ this.detach();
+ };
+ this.tabNext = function(dir) {
+ var max = this.tabstops.length - 1;
+ var index = this.index + (dir || 1);
+ index = Math.min(Math.max(index, 0), max);
+ this.selectTabstop(index);
+ if (index == max)
+ this.detach();
+ };
+ this.selectTabstop = function(index) {
+ var ts = this.tabstops[this.index];
+ if (ts)
+ this.addTabstopMarkers(ts);
+ this.index = index;
+ ts = this.tabstops[this.index];
+ if (!ts || !ts.length)
+ return;
+
+ this.selectedTabstop = ts;
+ if (!this.editor.inVirtualSelectionMode) {
+ var sel = this.editor.multiSelect;
+ sel.toSingleRange(ts.firstNonLinked.clone());
+ for (var i = ts.length; i--;) {
+ if (ts.hasLinkedRanges && ts[i].linked)
+ continue;
+ sel.addRange(ts[i].clone(), true);
+ }
+ } else {
+ this.editor.selection.setRange(ts.firstNonLinked);
+ }
+
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.addTabstops = function(tabstops, start, end) {
+ // add final tabstop if missing
+ if (!tabstops[0]) {
+ var p = Range.fromPoints(end, end);
+ moveRelative(p.start, start);
+ moveRelative(p.end, start);
+ tabstops[0] = [p];
+ tabstops[0].index = 0;
+ }
+
+ var i = this.index;
+ var arg = [i, 0];
+ var ranges = this.ranges;
+ var editor = this.editor;
+ tabstops.forEach(function(ts) {
+ for (var i = ts.length; i--;) {
+ var p = ts[i];
+ var range = Range.fromPoints(p.start, p.end || p.start);
+ movePoint(range.start, start);
+ movePoint(range.end, start);
+ range.original = p;
+ range.tabstop = ts;
+ ranges.push(range);
+ ts[i] = range;
+ if (p.fmtString) {
+ range.linked = true;
+ ts.hasLinkedRanges = true;
+ } else if (!ts.firstNonLinked)
+ ts.firstNonLinked = range;
+ }
+ if (!ts.firstNonLinked)
+ ts.hasLinkedRanges = false;
+ arg.push(ts);
+ this.addTabstopMarkers(ts);
+ }, this);
+ // tabstop 0 is the last one
+ arg.push(arg.splice(2, 1)[0]);
+ this.tabstops.splice.apply(this.tabstops, arg);
+ };
+
+ this.addTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ if (!range.markerId)
+ range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
+ });
+ };
+ this.removeTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ session.removeMarker(range.markerId);
+ range.markerId = null;
+ });
+ };
+ this.removeRange = function(range) {
+ var i = range.tabstop.indexOf(range);
+ range.tabstop.splice(i, 1);
+ i = this.ranges.indexOf(range);
+ this.ranges.splice(i, 1);
+ this.editor.session.removeMarker(range.markerId);
+ };
+
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys({
+ "Tab": function(ed) {
+ ed.tabstopManager.tabNext(1);
+ },
+ "Shift-Tab": function(ed) {
+ ed.tabstopManager.tabNext(-1);
+ },
+ "Esc": function(ed) {
+ ed.tabstopManager.detach();
+ },
+ "Return": function(ed) {
+ //ed.tabstopManager.tabNext(1);
+ return false;
+ }
+ });
+}).call(TabstopManager.prototype);
+
+
+var movePoint = function(point, diff) {
+ if (point.row == 0)
+ point.column += diff.column;
+ point.row += diff.row;
+};
+
+var moveRelative = function(point, start) {
+ if (point.row == start.row)
+ point.column -= start.column;
+ point.row -= start.row;
+};
+
+
+require("./lib/dom").importCssString("\
+.ace_snippet-marker {\
+ -moz-box-sizing: border-box;\
+ box-sizing: border-box;\
+ background: rgba(194, 193, 208, 0.09);\
+ border: 1px dotted rgba(211, 208, 235, 0.62);\
+ position: absolute;\
+}");
+
+exports.snippetManager = new SnippetManager();
+
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/_.snippets b/src/fauxton/assets/js/libs/ace/snippets/_.snippets
new file mode 100644
index 000000000..d553449d0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/_.snippets
@@ -0,0 +1,240 @@
+# Global snippets
+
+# (c) holds no legal value ;)
+snippet c)
+ Copyright `&enc[:2] == "utf" ? "©" : "(c)"` `strftime("%Y")` ${1:`g:snips_author`}. All Rights Reserved.${2}
+snippet date
+ `strftime("%Y-%m-%d")`
+snippet ddate
+ `strftime("%B %d, %Y")`
+snippet time
+ `strftime("%H:%M")`
+snippet lorem
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+snippet GPL2
+ ${1:One line to give the program's name and a brief description.}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ ${3}
+snippet LGPL2
+ ${1:One line to give the program's name and a brief description.}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ ${3}
+snippet GPL3
+ ${1:one line to give the program's name and a brief description.}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ ${3}
+snippet LGPL3
+ ${1:One line to give the program's name and a brief description.}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this library; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ ${3}
+snippet BSD2
+ ${1:one line to give the program's name and a brief description}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ The views and conclusions contained in the software and documentation
+ are those of the authors and should not be interpreted as representing
+ official policies, either expressedor implied, of $2.
+
+ ${4}
+snippet BSD3
+ ${1:one line to give the program's name and a brief description}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the ${3:organization} nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ${4}
+snippet BSD4
+ ${1:one line to give the program's name and a brief description}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. All advertising materials mentioning features or use of this software
+ must display the following acknowledgement:
+ This product includes software developed by the ${3:organization}.
+ 4. Neither the name of the $3 nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY $2 ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL $2 BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ ${4}
+snippet MIT
+ ${1:one line to give the program's name and a brief description}
+ Copyright (C) `strftime("%Y")` ${2:copyright holder}
+
+ 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:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ 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.
+
+ ${3}
+snippet APACHE
+ ${1:one line to give the program's name and a brief description}
+ Copyright `strftime("%Y")` ${2:copyright holder}
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ ${3}
+snippet BEERWARE
+ ${2:one line to give the program's name and a brief description}
+ Copyright `strftime("%Y")` ${3:copyright holder}
+
+ Licensed under the "THE BEER-WARE LICENSE" (Revision 42):
+ ${1:`g:snips_author`} wrote this file. As long as you retain this notice you
+ can do whatever you want with this stuff. If we meet some day, and you think
+ this stuff is worth it, you can buy me a beer or coffee in return
+
+ ${4}
+
+snippet WTFPL
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ Version 2, December 2004
+
+ Copyright `strftime("%Y")` ${1:copyright holder}
+
+ Everyone is permitted to copy and distribute verbatim or modified
+ copies of this license document, and changing it is allowed as long
+ as the name is changed.
+
+ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
diff --git a/src/fauxton/assets/js/libs/ace/snippets/abap.js b/src/fauxton/assets/js/libs/ace/snippets/abap.js
new file mode 100644
index 000000000..902cb1bbc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/abap.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./abap.snippets");
+exports.scope = "abap";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/abap.snippets b/src/fauxton/assets/js/libs/ace/snippets/abap.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/abap.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/actionscript.js b/src/fauxton/assets/js/libs/ace/snippets/actionscript.js
new file mode 100644
index 000000000..5d4e21686
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/actionscript.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./actionscript.snippets");
+exports.scope = "actionscript";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/actionscript.snippets b/src/fauxton/assets/js/libs/ace/snippets/actionscript.snippets
new file mode 100644
index 000000000..af9611c3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/actionscript.snippets
@@ -0,0 +1,157 @@
+snippet main
+ package {
+ import flash.display.*;
+ import flash.Events.*;
+
+ public class Main extends Sprite {
+ public function Main ( ) {
+ trace("start");
+ stage.scaleMode = StageScaleMode.NO_SCALE;
+ stage.addEventListener(Event.RESIZE, resizeListener);
+ }
+
+ private function resizeListener (e:Event):void {
+ trace("The application window changed size!");
+ trace("New width: " + stage.stageWidth);
+ trace("New height: " + stage.stageHeight);
+ }
+
+ }
+
+ }
+snippet class
+ ${1:public|internal} class ${2:name} ${3:extends } {
+ public function $2 ( ) {
+ ("start");
+ }
+ }
+snippet all
+ package name {
+
+ ${1:public|internal|final} class ${2:name} ${3:extends } {
+ private|public| static const FOO = "abc";
+ private|public| static var BAR = "abc";
+
+ // class initializer - no JIT !! one time setup
+ if Cababilities.os == "Linux|MacOS" {
+ FOO = "other";
+ }
+
+ // constructor:
+ public function $2 ( ){
+ super2();
+ trace("start");
+ }
+ public function name (a, b...){
+ super.name(..);
+ lable:break
+ }
+ }
+ }
+
+ function A(){
+ // A can only be accessed within this file
+ }
+snippet switch
+ switch(${1}){
+ case ${2}:
+ ${3}
+ break;
+ default:
+ }
+snippet case
+ case ${1}:
+ ${2}
+ break;
+snippet package
+ package ${1:package}{
+ ${2}
+ }
+snippet wh
+ while ${1:cond}{
+ ${2}
+ }
+snippet do
+ do {
+ ${2}
+ } while (${1:cond})
+snippet while
+ while ${1:cond}{
+ ${2}
+ }
+snippet for enumerate names
+ for (${1:var} in ${2:object}){
+ ${3}
+ }
+snippet for enumerate values
+ for each (${1:var} in ${2:object}){
+ ${3}
+ }
+snippet get_set
+ function get ${1:name} {
+ return ${2}
+ }
+ function set $1 (newValue) {
+ ${3}
+ }
+snippet interface
+ interface name {
+ function method(${1}):${2:returntype};
+ }
+snippet try
+ try {
+ ${1}
+ } catch (error:ErrorType) {
+ ${2}
+ } finally {
+ ${3}
+ }
+# For Loop (same as c.snippet)
+snippet for for (..) {..}
+ for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
+ ${4:/* code */}
+ }
+# Custom For Loop
+snippet forr
+ for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
+ ${5:/* code */}
+ }
+# If Condition
+snippet if
+ if (${1:/* condition */}) {
+ ${2:/* code */}
+ }
+snippet el
+ else {
+ ${1}
+ }
+# Ternary conditional
+snippet t
+ ${1:/* condition */} ? ${2:a} : ${3:b}
+snippet fun
+ function ${1:function_name}(${2})${3}
+ {
+ ${4:/* code */}
+ }
+# FlxSprite (usefull when using the flixel library)
+snippet FlxSprite
+ package
+ {
+ import org.flixel.*
+
+ public class ${1:ClassName} extends ${2:FlxSprite}
+ {
+ public function $1(${3: X:Number, Y:Number}):void
+ {
+ super(X,Y);
+ ${4: //code...}
+ }
+
+ override public function update():void
+ {
+ super.update();
+ ${5: //code...}
+ }
+ }
+ }
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ada.js b/src/fauxton/assets/js/libs/ace/snippets/ada.js
new file mode 100644
index 000000000..5b3ea2150
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ada.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ada.snippets");
+exports.scope = "ada";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ada.snippets b/src/fauxton/assets/js/libs/ace/snippets/ada.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ada.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/apache.snippets b/src/fauxton/assets/js/libs/ace/snippets/apache.snippets
new file mode 100644
index 000000000..a9e53e197
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/apache.snippets
@@ -0,0 +1,35 @@
+# Snippets for code blocks used oftenly in Apache files.
+# <Directory>
+snippet dir
+ <Directory ${1:/}>
+ DirectoryIndex ${2:index.html}
+ Order Deny,Allow
+ Deny from All
+ </Directory>
+# <FilesMatch>
+snippet filesmatch
+ <FilesMatch "${1:regex}">
+ ${2}
+ </FilesMatch>
+# <IfModule>
+snippet ifmodule
+ <IfModule ${1:mod_example.c}>
+ ${2}
+ </IfModule>
+# <LimitExcept>
+snippet limitexcept
+ <LimitExcept ${1:POST GET}>
+ ${2}
+ </LimitExcept>
+# <Proxy>
+snippet proxy
+ <Proxy ${1:*}>
+ ${2}
+ </Proxy>
+# <VirtualHost>
+snippet virtualhost
+ <VirtualHost ${1:*}:${2:80}>
+ ServerAdmin ${3:webmaster@example.com}
+ DocumentRoot ${4:/www/example.com}
+ ServerName ${5:www.example.com}
+ </VirtualHost>
diff --git a/src/fauxton/assets/js/libs/ace/snippets/asciidoc.js b/src/fauxton/assets/js/libs/ace/snippets/asciidoc.js
new file mode 100644
index 000000000..7857020cc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/asciidoc.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./asciidoc.snippets");
+exports.scope = "asciidoc";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/asciidoc.snippets b/src/fauxton/assets/js/libs/ace/snippets/asciidoc.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/asciidoc.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.js b/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.js
new file mode 100644
index 000000000..747335be0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./assembly_x86.snippets");
+exports.scope = "assembly_x86";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.snippets b/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/assembly_x86.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/autohotkey.js b/src/fauxton/assets/js/libs/ace/snippets/autohotkey.js
new file mode 100644
index 000000000..064647e3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/autohotkey.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./autohotkey.snippets");
+exports.scope = "autohotkey";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/autohotkey.snippets b/src/fauxton/assets/js/libs/ace/snippets/autohotkey.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/autohotkey.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/autoit.snippets b/src/fauxton/assets/js/libs/ace/snippets/autoit.snippets
new file mode 100644
index 000000000..690018ce9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/autoit.snippets
@@ -0,0 +1,66 @@
+snippet if
+ If ${1:condition} Then
+ ${2:; True code}
+ EndIf
+snippet el
+ Else
+ ${1}
+snippet elif
+ ElseIf ${1:condition} Then
+ ${2:; True code}
+# If/Else block
+snippet ifel
+ If ${1:condition} Then
+ ${2:; True code}
+ Else
+ ${3:; Else code}
+ EndIf
+# If/ElseIf/Else block
+snippet ifelif
+ If ${1:condition 1} Then
+ ${2:; True code}
+ ElseIf ${3:condition 2} Then
+ ${4:; True code}
+ Else
+ ${5:; Else code}
+ EndIf
+# Switch block
+snippet switch
+ Switch (${1:condition})
+ Case {$2:case1}:
+ {$3:; Case 1 code}
+ Case Else:
+ {$4:; Else code}
+ EndSwitch
+# Select block
+snippet select
+ Select (${1:condition})
+ Case {$2:case1}:
+ {$3:; Case 1 code}
+ Case Else:
+ {$4:; Else code}
+ EndSelect
+# While loop
+snippet while
+ While (${1:condition})
+ ${2:; code...}
+ WEnd
+# For loop
+snippet for
+ For ${1:n} = ${3:1} to ${2:count}
+ ${4:; code...}
+ Next
+# New Function
+snippet func
+ Func ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
+ ${4:Return}
+ EndFunc
+# Message box
+snippet msg
+ MsgBox(${3:MsgType}, ${1:"Title"}, ${2:"Message Text"})
+# Debug Message
+snippet debug
+ MsgBox(0, "Debug", ${1:"Debug Message"})
+# Show Variable Debug Message
+snippet showvar
+ MsgBox(0, "${1:VarName}", $1)
diff --git a/src/fauxton/assets/js/libs/ace/snippets/batchfile.js b/src/fauxton/assets/js/libs/ace/snippets/batchfile.js
new file mode 100644
index 000000000..ec949d961
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/batchfile.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./batchfile.snippets");
+exports.scope = "batchfile";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/batchfile.snippets b/src/fauxton/assets/js/libs/ace/snippets/batchfile.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/batchfile.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/c.snippets b/src/fauxton/assets/js/libs/ace/snippets/c.snippets
new file mode 100644
index 000000000..c476de4ab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/c.snippets
@@ -0,0 +1,235 @@
+## Main
+# main
+snippet main
+ int main(int argc, const char *argv[])
+ {
+ ${1}
+ return 0;
+ }
+# main(void)
+snippet mainn
+ int main(void)
+ {
+ ${1}
+ return 0;
+ }
+##
+## Preprocessor
+# #include <...>
+snippet inc
+ #include <${1:stdio}.h>${2}
+# #include "..."
+snippet Inc
+ #include "${1:`Filename("$1.h")`}"${2}
+# ifndef...define...endif
+snippet ndef
+ #ifndef $1
+ #define ${1:SYMBOL} ${2:value}
+ #endif${3}
+# define
+snippet def
+ #define
+# ifdef...endif
+snippet ifdef
+ #ifdef ${1:FOO}
+ ${2:#define }
+ #endif${3}
+# if
+snippet #if
+ #if ${1:FOO}
+ ${2}
+ #endif
+# header include guard
+snippet once
+ #ifndef ${1:`toupper(Filename('$1_H', 'UNTITLED_H'))`}
+
+ #define $1
+
+ ${2}
+
+ #endif /* end of include guard: $1 */
+##
+## Control Statements
+# if
+snippet if
+ if (${1:/* condition */}) {
+ ${2:/* code */}
+ }${3}
+# else
+snippet el
+ else {
+ ${1}
+ }${3}
+# else if
+snippet elif
+ else if (${1:/* condition */}) {
+ ${2:/* code */}
+ }${3}
+# ternary
+snippet t
+ ${1:/* condition */} ? ${2:a} : ${3:b}
+# switch
+snippet switch
+ switch (${1:/* variable */}) {
+ case ${2:/* variable case */}:
+ ${3}
+ ${4:break;}${5}
+ default:
+ ${6}
+ }${7}
+# switch without default
+snippet switchndef
+ switch (${1:/* variable */}) {
+ case ${2:/* variable case */}:
+ ${3}
+ ${4:break;}${5}
+ }${6}
+# case
+snippet case
+ case ${1:/* variable case */}:
+ ${2}
+ ${3:break;}${4}
+##
+## Loops
+# for
+snippet for
+ for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
+ ${4:/* code */}
+ }${5}
+# for (custom)
+snippet forr
+ for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {
+ ${5:/* code */}
+ }${6}
+# while
+snippet wh
+ while (${1:/* condition */}) {
+ ${2:/* code */}
+ }${3}
+# do... while
+snippet do
+ do {
+ ${2:/* code */}
+ } while (${1:/* condition */});${3}
+##
+## Functions
+# function definition
+snippet fun
+ ${1:void} ${2:function_name}(${3})
+ {
+ ${4:/* code */}
+ }${5}
+# function declaration
+snippet fund
+ ${1:void} ${2:function_name}(${3});${4}
+##
+## Types
+# typedef
+snippet td
+ typedef ${1:int} ${2:MyCustomType};${3}
+# struct
+snippet st
+ struct ${1:`Filename('$1_t', 'name')`} {
+ ${2:/* data */}
+ }${3: /* optional variable list */};${4}
+# typedef struct
+snippet tds
+ typedef struct ${2:_$1 }{
+ ${3:/* data */}
+ } ${1:`Filename('$1_t', 'name')`};${4}
+# typedef enum
+snippet tde
+ typedef enum {
+ ${1:/* data */}
+ } ${2:foo};${3}
+##
+## Input/Output
+# printf
+snippet pr
+ printf("${1:%s}\n"${2});${3}
+# fprintf (again, this isn't as nice as TextMate's version, but it works)
+snippet fpr
+ fprintf(${1:stderr}, "${2:%s}\n"${3});${4}
+# getopt
+snippet getopt
+ int choice;
+ while (1)
+ {
+ static struct option long_options[] =
+ {
+ /* Use flags like so:
+ {"verbose", no_argument, &verbose_flag, 'V'}*/
+ /* Argument styles: no_argument, required_argument, optional_argument */
+ {"version", no_argument, 0, 'v'},
+ {"help", no_argument, 0, 'h'},
+ ${1}
+ {0,0,0,0}
+ };
+
+ int option_index = 0;
+
+ /* Argument parameters:
+ no_argument: " "
+ required_argument: ":"
+ optional_argument: "::" */
+
+ choice = getopt_long( argc, argv, "vh",
+ long_options, &option_index);
+
+ if (choice == -1)
+ break;
+
+ switch( choice )
+ {
+ case 'v':
+ ${2}
+ break;
+
+ case 'h':
+ ${3}
+ break;
+
+ case '?':
+ /* getopt_long will have already printed an error */
+ break;
+
+ default:
+ /* Not sure how to get here... */
+ return EXIT_FAILURE;
+ }
+ }
+
+ /* Deal with non-option arguments here */
+ if ( optind < argc )
+ {
+ while ( optind < argc )
+ {
+ ${4}
+ }
+ }
+##
+## Miscellaneous
+# This is kind of convenient
+snippet .
+ [${1}]${2}
+# GPL
+snippet gpl
+ /*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright (C) ${1:Author}, `strftime("%Y")`
+ */
+
+ ${2}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/c9search.js b/src/fauxton/assets/js/libs/ace/snippets/c9search.js
new file mode 100644
index 000000000..62bc4403a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/c9search.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./c9search.snippets");
+exports.scope = "c9search";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/c9search.snippets b/src/fauxton/assets/js/libs/ace/snippets/c9search.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/c9search.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/c_cpp.js b/src/fauxton/assets/js/libs/ace/snippets/c_cpp.js
new file mode 100644
index 000000000..cf37a62a6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/c_cpp.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./c_cpp.snippets");
+exports.scope = "c_cpp";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/c_cpp.snippets b/src/fauxton/assets/js/libs/ace/snippets/c_cpp.snippets
new file mode 100644
index 000000000..c3e19fe93
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/c_cpp.snippets
@@ -0,0 +1,131 @@
+## STL Collections
+# std::array
+snippet array
+ std::array<${1:T}, ${2:N}> ${3};${4}
+# std::vector
+snippet vector
+ std::vector<${1:T}> ${2};${3}
+# std::deque
+snippet deque
+ std::deque<${1:T}> ${2};${3}
+# std::forward_list
+snippet flist
+ std::forward_list<${1:T}> ${2};${3}
+# std::list
+snippet list
+ std::list<${1:T}> ${2};${3}
+# std::set
+snippet set
+ std::set<${1:T}> ${2};${3}
+# std::map
+snippet map
+ std::map<${1:Key}, ${2:T}> ${3};${4}
+# std::multiset
+snippet mset
+ std::multiset<${1:T}> ${2};${3}
+# std::multimap
+snippet mmap
+ std::multimap<${1:Key}, ${2:T}> ${3};${4}
+# std::unordered_set
+snippet uset
+ std::unordered_set<${1:T}> ${2};${3}
+# std::unordered_map
+snippet umap
+ std::unordered_map<${1:Key}, ${2:T}> ${3};${4}
+# std::unordered_multiset
+snippet umset
+ std::unordered_multiset<${1:T}> ${2};${3}
+# std::unordered_multimap
+snippet ummap
+ std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}
+# std::stack
+snippet stack
+ std::stack<${1:T}> ${2};${3}
+# std::queue
+snippet queue
+ std::queue<${1:T}> ${2};${3}
+# std::priority_queue
+snippet pqueue
+ std::priority_queue<${1:T}> ${2};${3}
+##
+## Access Modifiers
+# private
+snippet pri
+ private
+# protected
+snippet pro
+ protected
+# public
+snippet pub
+ public
+# friend
+snippet fr
+ friend
+# mutable
+snippet mu
+ mutable
+##
+## Class
+# class
+snippet cl
+ class ${1:`Filename('$1', 'name')`}
+ {
+ public:
+ $1(${2});
+ ~$1();
+
+ private:
+ ${3:/* data */}
+ };
+# member function implementation
+snippet mfun
+ ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {
+ ${5:/* code */}
+ }
+# namespace
+snippet ns
+ namespace ${1:`Filename('', 'my')`} {
+ ${2}
+ } /* namespace $1 */
+##
+## Input/Output
+# std::cout
+snippet cout
+ std::cout << ${1} << std::endl;${2}
+# std::cin
+snippet cin
+ std::cin >> ${1};${2}
+##
+## Iteration
+# for i
+snippet fori
+ for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {
+ ${4:/* code */}
+ }${5}
+
+# foreach
+snippet fore
+ for (${1:auto} ${2:i} : ${3:container}) {
+ ${4:/* code */}
+ }${5}
+# iterator
+snippet iter
+ for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {
+ ${6}
+ }${7}
+
+# auto iterator
+snippet itera
+ for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {
+ ${2:std::cout << *$1 << std::endl;}
+ }${3}
+##
+## Lambdas
+# lamda (one line)
+snippet ld
+ [${1}](${2}){${3:/* code */}}${4}
+# lambda (multi-line)
+snippet lld
+ [${1}](${2}){
+ ${3:/* code */}
+ }${4}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/chef.snippets b/src/fauxton/assets/js/libs/ace/snippets/chef.snippets
new file mode 100644
index 000000000..51036135a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/chef.snippets
@@ -0,0 +1,204 @@
+# Opscode Chef Cookbook Recipe Resources
+# Snippet by: Mike Smullin <mike@smullindesign.com>
+# Based on: http://wiki.opscode.com/display/chef/Resources
+
+# @TODO: Include Meta attributes and actions in all snippets
+# @TODO: Finish writing snippets for remaining Resources
+
+snippet cookbook_file
+ # Cookbook File resource
+ cookbook_file ${1:"/path/to/file"} do # The remote path where the file will reside
+ ${2:#}backup ${3} # How many backups of this file to keep. Set to false if you want no backups
+ ${4:#}group ${5} # The group owner of the file (string or id)
+ ${6:#}mode ${7} # The octal mode of the file - e.g. 0755
+ ${8:#}owner ${9} # The owner for the file
+ ${10:#}source ${11} # The basename of the source file
+ ${12:#}cookbook ${13} # The cookbook this file is stored in
+
+ ${14:#}${15: action :create} # Create this file (Default)
+ ${16:#}${17: action :create_if_missing} # Create only if it doesn't exist yet
+ ${18:#}${19: action :delete} # Delete this file
+ end
+
+snippet execute
+ # Execute resource
+ execute ${1:"command to execute"} do # The command to execute
+ ${2:#}creates ${3:nil} # A file this command creates - if the file exists, the command will not be run.
+ ${4:#}cwd ${5:nil} # Current working directory to run the command from.
+ ${6:#}environment ${7:nil} # A hash of environment variables to set before running this command.
+ ${8:#}group ${9:nil} # A group name or group ID that we should change to before running this command.
+ ${10:#}path ${11:nil} # An array of paths to use when searching for the command. Nil uses system path.
+ ${12:#}returns ${13:0} # The return value of the command - this resource raises an exception if the return value does not match.
+ ${14:#}timeout ${15:nil} # How many seconds to let the command run before timing it out.
+ ${16:#}user ${17:nil} # A user name or user ID that we should change to before running this command.
+ ${18:#}umask ${19:nil} # Umask for files created by the command
+
+ ${20:#}${21:action :run} # Run this command (Default)
+ ${22:#}${23:action :nothing} # Do not run this command
+ end
+
+snippet link
+ # Link resource
+ link ${1:"/target/file"} do # The file name of the link
+ ${2:#}to ${3} # The real file you want to link to
+ ${4:#}link_type ${5:symbolic} # Either :symbolic or :hard
+ ${6:#}owner ${7} # The owner of the symlink
+ ${8:#}group ${9} # The group of the symlink
+
+ ${10:#}${11:action :create} # Create a link (Default)
+ ${12:#}${13:action :delete} # Delete a link
+ end
+
+snippet package
+ # Package resource
+ package ${1:"package_name"} do # Name of the package to install
+ ${2:#}version ${3:nil} # The version of the package to install/upgrade
+ ${4:#}response_file ${5:nil} # An optional response file - used to pre-seed packages (note: the file is fetched by Remote File)
+ ${6:#}source ${7} # Used to provide an optional package source for providers that use a local file (rubygems, dpkg and rpm)
+ ${8:#}options ${9:nil} # Add additional options to the underlying package command
+ ${10:#}gem_binary ${11:gem} # A gem_package attribut to specify a gem binary. Useful for installing ruby 1.9 gems while running chef in ruby 1.8
+
+ ${12:#}${13:action :install} # Install a package - if version is provided, install that specific version (Default)
+ ${14:#}${15:action :upgrade} # Upgrade a package - if version is provided, upgrade to that specific version
+ ${16:#}${17:action :remove} # Remove a package
+ ${18:#}${19:action :purge} # Purge a package (this usually entails removing configuration files as well as the package itself)
+ end
+
+snippet service
+ # Service resource
+ service ${1:"service_name"} do # Name of the service
+ ${2:#}enabled ${3:nil} # Whether the service is enabled at boot time
+ ${4:#}running ${5:nil} # Make sure the service is running. Start if stopped
+ ${6:#}pattern ${7} # Pattern to look for in the process table
+ ${8:#}start_command ${9:nil} # Command used to start this service
+ ${10:#}stop_command ${11:nil} # Command used to stop this service
+ ${12:#}status_command ${13:nil} # Command used to check the service run status
+ ${14:#}restart_command ${15:nil} # Command used to restart this service
+ ${16:#}reload_command ${17:nil} # Command used to tell this service to reload its configuration
+ ${18:#}supports ${19:false} # Features this service supports, ie :restart, :reload, :status
+
+ ${20:#}${21:action :enable} # Enable this service
+ ${22:#}${23:action :disable} # Disable this service
+ ${24:#}${25:action :nothing} # Don't do anything with this service (Default)
+ ${26:#}${27:action :start} # Start this service
+ ${28:#}${29:action :stop} # Stop this service
+ ${30:#}${31:action :restart} # Restart this service
+ ${32:#}${33:action :reload} # Reload the configuration for this service
+ end
+
+snippet file
+ # File resource
+ file ${1:"/path/to/file"} do # Path to the file
+ ${2:#}backup ${3:5} # How many backups of this file to keep. Set to false if you want no backups.
+ ${4:#}owner ${5} # The owner for the file
+ ${6:#}group ${7} # The group owner of the file (string or id)
+ ${8:#}mode ${9} # The octal mode of the file (4-digit format)
+ ${10:#}content ${11:nil} # A string to write to the file. This will replace any previous content if set
+
+ ${12:#}${13:action :create} # Create this file (Default)
+ ${14:#}${15:action :delete} # Delete this file
+ ${16:#}${17:action :touch} # Touch this file (update the mtime/atime)
+ end
+
+snippet directory
+ # Directory resource
+ directory ${1:"/path/to/dir"} do # The path to the directory
+ ${2:#}group ${3} # The group owner of the directory (string or id)
+ ${4:#}mode ${5} # The octal mode of the directory, eg 0755
+ ${6:#}owner ${7} # The owner for the directory
+ ${10:#}recursive ${11:false} # When deleting the directory, delete it recursively. When creating the directory, create recursively (ie, mkdir -p)
+
+ ${12:#}${13:action :create} # Create this directory (Default)
+ ${14:#}${15:action :delete} # Delete this directory
+ end
+
+snippet template
+ # Template resource
+ template ${1:"/path/to/file"} do # Path to the file
+ ${2:#}cookbook ${3:nil} # Specify the cookbook where the template is located, default is current cookbook
+ ${4:#}source ${5:nil} # Template source file. Found in templates/default for the cookbook
+ ${6:#}variables ${7} # Variables to use in the template
+ ${8:#}local ${9:false} # Is the template already present on the node?
+ ${10:#}backup ${11:5} # How many backups of this file to keep. Set to false if you want no backups.
+ ${12:#}owner ${13} # The owner for the file
+ ${14:#}group ${15} # The group owner of the file (string or id)
+ ${16:#}mode ${17} # The octal mode of the file (4-digit format)
+ ${18:#}content ${19:nil} # A string to write to the file. This will replace any previous content if set
+
+ ${20:#}${21:action :create} # Create the file (Default)
+ ${22:#}${23:action :delete} # Delete this file
+ ${24:#}${25:action :touch} # Touch this file (update the mtime/atime)
+ end
+
+snippet svn
+ # SCM Resource, Chef::Provider::Subversion
+ svn ${1:"/destination/path"} do # Path to clone/checkout/export the source to
+ ${2:#}repository ${3} # URI of the repository
+ ${4:#}revision ${5:"HEAD"} # revision to checkout. can be symbolic, like "HEAD" or an SCM specific revision id
+ ${6:#}reference ${7} # (Git only) alias for revision
+ ${8:#}user ${9:nil} # System user to own the checked out code
+ ${10:#}group ${11:nil} # System group to own the checked out code
+ ${12:#}svn_username ${13} # (Subversion only) Username for Subversion operations
+ ${14:#}svn_password ${15} # (Subversion only) Password for Subversion operations
+ ${16:#}svn_arguments ${17} # (Subversion only) Extra arguments passed to the subversion command
+
+ ${18:#}${19:action :sync} # Update the source to the specified revision, or get a new checkout (Default)
+ ${20:#}${21:action :checkout} # Checkout the source. Does nothing if a checkout is available
+ ${22:#}${23:action :export} # Export the source, excluding or removing any version control artifacts
+ end
+
+snippet git
+ # SCM Resource, Chef::Provider::Git
+ git ${1:"/destination/path"} do # Path to clone/checkout/export the source to
+ ${2:#}repository ${3} # URI of the repository
+ ${4:#}revision ${5:"HEAD"} # revision to checkout. can be symbolic, like "HEAD" or an SCM specific revision id
+ ${6:#}reference ${7} # (Git only) alias for revision
+ ${8:#}user ${9:nil} # System user to own the checked out code
+ ${10:#}group ${11:nil} # System group to own the checked out code
+ ${12:#}depth ${13:nil} # (Git only) Number of past revisions to include in Git shallow clone
+ ${14:#}enable_submodules ${15:"false"} # (Git only) performs a submodule init and submodule update
+ ${16:#}remote ${17:"origin"} # (Git only) remote repository to use for syncing an existing clone
+ ${18:#}ssh_wrapper ${19} # (Git only) path to a wrapper script for running SSH with git. GIT_SSH environment variable is set to this.
+
+ ${20:#}${21:action :sync} # Update the source to the specified revision, or get a new clone (Default)
+ ${22:#}${23:action :checkout} # Clone the source. Does nothing if a checkout is available
+ ${24:#}${25:action :export} # Export the source, excluding or removing any version control artifacts
+ end
+
+snippet deploy
+ # Deploy resource
+ deploy ${1:"/deploy/dir/"} do # Path to deploy to
+ ${2:#}deploy_to ${3} # The "meta root" for your application.
+ ${4:#}repository ${5} # URI of the repository
+ ${6:#}repo ${7} # alias for repository
+ ${8:#}revision ${9:"HEAD"} # revision to checkout. can be symbolic, like "HEAD" or an SCM specific revision id
+ ${10:#}branch ${11} # alias for revision
+ ${12:#}user ${13:nil} # System user to run the deploy as
+ ${14:#}group ${15:nil} # System group to run the deploy as
+ ${16:#}svn_username ${17} # (Subversion only) Username for Subversion operations}
+ ${18:#}svn_password ${19} # (Subversion only) Password for Subversion operations}
+ ${20:#}svn_arguments ${21} # (Subversion only) Extra arguments passed to the subversion command}
+ ${22:#}shallow_clone ${23:nil} # (Git only) boolean, true sets clone depth to 5
+ ${24:#}enable_submodules ${25:false} # (Git only) performs a submodule init and submodule update
+ ${26:#}remote ${27:"origin"} # (Git only) remote repository to use for syncing an existing clone
+ ${28:#}ssh_wrapper ${29} # (Git only) path to a wrapper script for running SSH with git. GIT_SSH environment variable is set to this.
+ ${30:#}git_ssh_wrapper ${31} # alias for ssh_wrapper
+ ${32:#}scm_provider ${33:Chef::Provider::Git} # SCM Provider to use.
+ ${34:#}repository_cache ${35: "cached-copy"} # Name of the subdirectory where the pristine copy of your app's source is kept
+ ${36:#}environment ${37} # A hash of the form {"ENV_VARIABLE"=>"VALUE"}}
+ ${38:#}purge_before_symlink ${39:%w(log tmp/pids public/system)} # An array of paths, relative to app root, to be removed from a checkout before symlinking
+ ${40:#}create_dirs_before_symlink ${41:%w(tmp public config)} # Directories to create before symlinking. Runs after purge_before_symlink
+ ${42:#}symlinks ${43:"system" => "public/system", "pids" => "tmp/pids", "log" => "log"} # A hash that maps files in the shared directory to their paths in the current release
+ ${44:#}symlink_before_migrate ${45:"config/database.yml" => "config/database.yml"} # A hash that maps files in the shared directory into the current release. Runs before migration
+ ${46:#}migrate ${47:false} # Should the migration command be executed? (true or false)
+ ${48:#}migration_command ${49} # A string containing a shell command to execute to run the migration
+ ${50:#}restart_command ${51:nil} # A code block to evaluate or a string containing a shell command
+ ${52:#}before_migrate ${53:"deploy/before_migrate.rb"} # A block or path to a file containing chef code to run before migrating
+ ${54:#}before_symlink ${55:"deploy/before_symlink.rb"} # A block or path to a file containing chef code to run before symlinking
+ ${56:#}before_restart ${57:"deploy/before_restart.rb"} # A block or path to a file containing chef code to run before restarting
+ ${58:#}after_restart ${59:"deploy/after_restart.rb"} # A block or path to a file containing chef code to run after restarting
+
+ ${60:#}${61::deploy} # Deploy the application (Default)
+ ${62:#}${63::force_deploy} # For the revision deploy strategy, this removes any existing release of the same code version and re-deploys in its place
+ ${64:#}${65::rollback} # Rollback the application to the previous release
+ end
diff --git a/src/fauxton/assets/js/libs/ace/snippets/clojure.js b/src/fauxton/assets/js/libs/ace/snippets/clojure.js
new file mode 100644
index 000000000..8f07e5fe2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/clojure.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./clojure.snippets");
+exports.scope = "clojure";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/clojure.snippets b/src/fauxton/assets/js/libs/ace/snippets/clojure.snippets
new file mode 100644
index 000000000..e247debf6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/clojure.snippets
@@ -0,0 +1,90 @@
+snippet comm
+ (comment
+ ${1}
+ )
+snippet condp
+ (condp ${1:pred} ${2:expr}
+ ${3})
+snippet def
+ (def ${1})
+snippet defm
+ (defmethod ${1:multifn} "${2:doc-string}" ${3:dispatch-val} [${4:args}]
+ ${5})
+snippet defmm
+ (defmulti ${1:name} "${2:doc-string}" ${3:dispatch-fn})
+snippet defma
+ (defmacro ${1:name} "${2:doc-string}" ${3:dispatch-fn})
+snippet defn
+ (defn ${1:name} "${2:doc-string}" [${3:arg-list}]
+ ${4})
+snippet defp
+ (defprotocol ${1:name}
+ ${2})
+snippet defr
+ (defrecord ${1:name} [${2:fields}]
+ ${3:protocol}
+ ${4})
+snippet deft
+ (deftest ${1:name}
+ (is (= ${2:assertion})))
+ ${3})
+snippet is
+ (is (= ${1} ${2}))
+snippet defty
+ (deftype ${1:Name} [${2:fields}]
+ ${3:Protocol}
+ ${4})
+snippet doseq
+ (doseq [${1:elem} ${2:coll}]
+ ${3})
+snippet fn
+ (fn [${1:arg-list}] ${2})
+snippet if
+ (if ${1:test-expr}
+ ${2:then-expr}
+ ${3:else-expr})
+snippet if-let
+ (if-let [${1:result} ${2:test-expr}]
+ (${3:then-expr} $1)
+ (${4:else-expr}))
+snippet imp
+ (:import [${1:package}])
+ & {:keys [${1:keys}] :or {${2:defaults}}}
+snippet let
+ (let [${1:name} ${2:expr}]
+ ${3})
+snippet letfn
+ (letfn [(${1:name) [${2:args}]
+ ${3})])
+snippet map
+ (map ${1:func} ${2:coll})
+snippet mapl
+ (map #(${1:lambda}) ${2:coll})
+snippet met
+ (${1:name} [${2:this} ${3:args}]
+ ${4})
+snippet ns
+ (ns ${1:name}
+ ${2})
+snippet dotimes
+ (dotimes [_ 10]
+ (time
+ (dotimes [_ ${1:times}]
+ ${2})))
+snippet pmethod
+ (${1:name} [${2:this} ${3:args}])
+snippet refer
+ (:refer-clojure :exclude [${1}])
+snippet require
+ (:require [${1:namespace} :as [${2}]])
+snippet use
+ (:use [${1:namespace} :only [${2}]])
+snippet print
+ (println ${1})
+snippet reduce
+ (reduce ${1:(fn [p n] ${3})} ${2})
+snippet when
+ (when ${1:test} ${2:body})
+snippet when-let
+ (when-let [${1:result} ${2:test}]
+ ${3:body})
diff --git a/src/fauxton/assets/js/libs/ace/snippets/cmake.snippets b/src/fauxton/assets/js/libs/ace/snippets/cmake.snippets
new file mode 100644
index 000000000..26aa9ac9d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/cmake.snippets
@@ -0,0 +1,58 @@
+snippet cmake
+ CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+ PROJECT(${1:ProjectName})
+
+ FIND_PACKAGE(${2:LIBRARY})
+
+ INCLUDE_DIRECTORIES(
+ ${$2_INCLUDE_DIR}
+ )
+
+ ADD_SUBDIRECTORY(${3:src})
+
+ ADD_EXECUTABLE($1)
+
+ TARGET_LINK_LIBRARIES($1
+ ${$2_LIBRARIES}
+ )
+
+snippet include
+ INCLUDE_DIRECTORIES(
+ ${${1:INCLUDE_DIR}}
+ )
+
+snippet find
+ FIND_PACKAGE(${1:LIBRARY})
+
+snippet glob
+ FILE(GLOB ${1:SRCS} *.${2:cpp})
+
+snippet subdir
+ ADD_SUBDIRECTORY(${1:src})
+
+snippet lib
+ ADD_LIBRARY(${1:lib} ${2:STATIC}
+ ${${3:SRCS}}
+ )
+
+snippet link
+ TARGET_LINK_LIBRARIES(${1:bin}
+ ${2:somelib}
+ )
+
+snippet bin
+ ADD_EXECUTABLE(${1:bin})
+
+snippet set
+ SET(${1:var} ${2:val})
+
+snippet dep
+ ADD_DEPENDENCIES(${1:target}
+ ${2:dep}
+ )
+
+snippet props
+ SET_TARGET_PROPERTIES(${1:target}
+ ${2:PROPERTIES} ${3:COMPILE_FLAGS}
+ ${4:"-O3 -Wall -pedantic"}
+ )
diff --git a/src/fauxton/assets/js/libs/ace/snippets/cobol.js b/src/fauxton/assets/js/libs/ace/snippets/cobol.js
new file mode 100644
index 000000000..885f1c46e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/cobol.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./cobol.snippets");
+exports.scope = "cobol";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/cobol.snippets b/src/fauxton/assets/js/libs/ace/snippets/cobol.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/cobol.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/coffee.js b/src/fauxton/assets/js/libs/ace/snippets/coffee.js
new file mode 100644
index 000000000..5511ed11e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/coffee.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./coffee.snippets");
+exports.scope = "coffee";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/coffee.snippets b/src/fauxton/assets/js/libs/ace/snippets/coffee.snippets
new file mode 100644
index 000000000..83b77ebab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/coffee.snippets
@@ -0,0 +1,95 @@
+# Closure loop
+snippet forindo
+ for ${1:name} in ${2:array}
+ do ($1) ->
+ ${3:// body}
+# Array comprehension
+snippet fora
+ for ${1:name} in ${2:array}
+ ${3:// body...}
+# Object comprehension
+snippet foro
+ for ${1:key}, ${2:value} of ${3:object}
+ ${4:// body...}
+# Range comprehension (inclusive)
+snippet forr
+ for ${1:name} in [${2:start}..${3:finish}]
+ ${4:// body...}
+snippet forrb
+ for ${1:name} in [${2:start}..${3:finish}] by ${4:step}
+ ${5:// body...}
+# Range comprehension (exclusive)
+snippet forrex
+ for ${1:name} in [${2:start}...${3:finish}]
+ ${4:// body...}
+snippet forrexb
+ for ${1:name} in [${2:start}...${3:finish}] by ${4:step}
+ ${5:// body...}
+# Function
+snippet fun
+ (${1:args}) ->
+ ${2:// body...}
+# Function (bound)
+snippet bfun
+ (${1:args}) =>
+ ${2:// body...}
+# Class
+snippet cla class ..
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ ${2}
+snippet cla class .. constructor: ..
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ constructor: (${2:args}) ->
+ ${3}
+
+ ${4}
+snippet cla class .. extends ..
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
+ ${3}
+snippet cla class .. extends .. constructor: ..
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} extends ${2:ParentClass}
+ constructor: (${3:args}) ->
+ ${4}
+
+ ${5}
+# If
+snippet if
+ if ${1:condition}
+ ${2:// body...}
+# If __ Else
+snippet ife
+ if ${1:condition}
+ ${2:// body...}
+ else
+ ${3:// body...}
+# Else if
+snippet elif
+ else if ${1:condition}
+ ${2:// body...}
+# Ternary If
+snippet ifte
+ if ${1:condition} then ${2:value} else ${3:other}
+# Unless
+snippet unl
+ ${1:action} unless ${2:condition}
+# Switch
+snippet swi
+ switch ${1:object}
+ when ${2:value}
+ ${3:// body...}
+
+# Log
+snippet log
+ console.log ${1}
+# Try __ Catch
+snippet try
+ try
+ ${1}
+ catch ${2:error}
+ ${3}
+# Require
+snippet req
+ ${2:$1} = require '${1:sys}'${3}
+# Export
+snippet exp
+ ${1:root} = exports ? this
diff --git a/src/fauxton/assets/js/libs/ace/snippets/coldfusion.js b/src/fauxton/assets/js/libs/ace/snippets/coldfusion.js
new file mode 100644
index 000000000..6f44f9f75
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/coldfusion.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./coldfusion.snippets");
+exports.scope = "coldfusion";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/coldfusion.snippets b/src/fauxton/assets/js/libs/ace/snippets/coldfusion.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/coldfusion.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/cs.snippets b/src/fauxton/assets/js/libs/ace/snippets/cs.snippets
new file mode 100644
index 000000000..725f8b7d3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/cs.snippets
@@ -0,0 +1,374 @@
+# cs.snippets
+# ===========
+#
+# Standard C-Sharp snippets for snipmate.
+#
+# Largely ported over from Visual Studio 2010 snippets plus
+# a few snippets from Resharper plus a few widely known snippets.
+#
+# Most snippets on elements (i.e. classes, properties)
+# follow suffix conventions. The order of suffixes to a snippet
+# is fixed.
+#
+# Snippet Suffix Order
+# --------------------
+# 1. Access Modifiers
+# 2. Class Modifiers
+#
+# Access Modifier Suffix Table
+# ----------------------------
+# + = public
+# & = internal
+# | = protected
+# - = private
+#
+# Example: `cls&` expands to `internal class $1`.
+# Access modifiers might be doubled to indicate
+# different modifiers for get/set on properties.
+# Example: `pb+-` expands to `public bool $1 { get; private set; }`
+#
+# Class Modifier Table
+# --------------------
+# ^ = static
+# % = abstract
+#
+# Example: `cls|%` expands to `protected abstract class $1`
+#
+# On method and property snippets, you can directly set
+# one of the common types int, string and bool, if desired,
+# just by appending the type modifier.
+#
+# Type Modifier Table
+# -------------------
+# i = integer
+# s = string
+# b = bool
+#
+# Example: `pi+&` expands to `public int $1 { get; internal set; }`
+#
+# I'll most propably add more stuff in here like
+# * List/Array constructio
+# * Mostly used generics
+# * Linq
+# * Funcs, Actions, Predicates
+# * Lambda
+# * Events
+#
+# Feedback is welcome!
+#
+# entry point
+snippet sim
+ public static int Main(string[] args) {
+ ${1}
+ return 0;
+ }
+snippet simc
+ public class Application {
+ public static int Main(string[] args) {
+ ${1}
+ return 0;
+ }
+ }
+# if condition
+snippet if
+ if (${1}) {
+ ${2}
+ }
+snippet el
+ else {
+ ${1}
+ }
+snippet ifs
+ if (${1})
+ ${2}
+# ternary conditional
+snippet t
+ ${1} ? ${2} : ${3}
+snippet ?
+ ${1} ? ${2} : ${3}
+# do while loop
+snippet do
+ do {
+ ${2}
+ } while (${1});
+# while loop
+snippet wh
+ while (${1}) {
+ ${2}
+ }
+# for loop
+snippet for
+ for (int ${1:i} = 0; $1 < ${2:count}; $1${3:++}) {
+ ${4}
+ }
+# foreach
+snippet fore
+ foreach (var ${1:entry} in ${2}) {
+ ${3}
+ }
+snippet foreach
+ foreach (var ${1:entry} in ${2}) {
+ ${3}
+ }
+snippet each
+ foreach (var ${1:entry} in ${2}) {
+ ${3}
+ }
+# interfaces
+snippet interface
+ public interface ${1:`Filename()`} {
+ ${2}
+ }
+snippet if+
+ public interface ${1:`Filename()`} {
+ ${2}
+ }
+# class bodies
+snippet class
+ public class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls
+ ${2:public} class ${1:`Filename()`} {
+ ${3}
+ }
+snippet cls+
+ public class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls+^
+ public static class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls&
+ internal class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls&^
+ internal static class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls|
+ protected class ${1:`Filename()`} {
+ ${2}
+ }
+snippet cls|%
+ protected abstract class ${1:`Filename()`} {
+ ${2}
+ }
+# constructor
+snippet ctor
+ public ${1:`Filename()`}() {
+ ${2}
+ }
+# properties - auto properties by default.
+# default type is int with layout get / set.
+snippet prop
+ ${1:public} ${2:int} ${3:} { get; set; }${4}
+snippet p
+ ${1:public} ${2:int} ${3:} { get; set; }${4}
+snippet p+
+ public ${1:int} ${2:} { get; set; }${3}
+snippet p+&
+ public ${1:int} ${2:} { get; internal set; }${3}
+snippet p+|
+ public ${1:int} ${2:} { get; protected set; }${3}
+snippet p+-
+ public ${1:int} ${2:} { get; private set; }${3}
+snippet p&
+ internal ${1:int} ${2:} { get; set; }${3}
+snippet p&|
+ internal ${1:int} ${2:} { get; protected set; }${3}
+snippet p&-
+ internal ${1:int} ${2:} { get; private set; }${3}
+snippet p|
+ protected ${1:int} ${2:} { get; set; }${3}
+snippet p|-
+ protected ${1:int} ${2:} { get; private set; }${3}
+snippet p-
+ private ${1:int} ${2:} { get; set; }${3}
+# property - bool
+snippet pi
+ ${1:public} int ${2:} { get; set; }${3}
+snippet pi+
+ public int ${1} { get; set; }${2}
+snippet pi+&
+ public int ${1} { get; internal set; }${2}
+snippet pi+|
+ public int ${1} { get; protected set; }${2}
+snippet pi+-
+ public int ${1} { get; private set; }${2}
+snippet pi&
+ internal int ${1} { get; set; }${2}
+snippet pi&|
+ internal int ${1} { get; protected set; }${2}
+snippet pi&-
+ internal int ${1} { get; private set; }${2}
+snippet pi|
+ protected int ${1} { get; set; }${2}
+snippet pi|-
+ protected int ${1} { get; private set; }${2}
+snippet pi-
+ private int ${1} { get; set; }${2}
+# property - bool
+snippet pb
+ ${1:public} bool ${2:} { get; set; }${3}
+snippet pb+
+ public bool ${1} { get; set; }${2}
+snippet pb+&
+ public bool ${1} { get; internal set; }${2}
+snippet pb+|
+ public bool ${1} { get; protected set; }${2}
+snippet pb+-
+ public bool ${1} { get; private set; }${2}
+snippet pb&
+ internal bool ${1} { get; set; }${2}
+snippet pb&|
+ internal bool ${1} { get; protected set; }${2}
+snippet pb&-
+ internal bool ${1} { get; private set; }${2}
+snippet pb|
+ protected bool ${1} { get; set; }${2}
+snippet pb|-
+ protected bool ${1} { get; private set; }${2}
+snippet pb-
+ private bool ${1} { get; set; }${2}
+# property - string
+snippet ps
+ ${1:public} string ${2:} { get; set; }${3}
+snippet ps+
+ public string ${1} { get; set; }${2}
+snippet ps+&
+ public string ${1} { get; internal set; }${2}
+snippet ps+|
+ public string ${1} { get; protected set; }${2}
+snippet ps+-
+ public string ${1} { get; private set; }${2}
+snippet ps&
+ internal string ${1} { get; set; }${2}
+snippet ps&|
+ internal string ${1} { get; protected set; }${2}
+snippet ps&-
+ internal string ${1} { get; private set; }${2}
+snippet ps|
+ protected string ${1} { get; set; }${2}
+snippet ps|-
+ protected string ${1} { get; private set; }${2}
+snippet ps-
+ private string ${1} { get; set; }${2}
+# members - void
+snippet m
+ ${1:public} ${2:void} ${3:}(${4:}) {
+ ${5:}
+ }
+snippet m+
+ public ${1:void} ${2:}(${3:}) {
+ ${4:}
+ }
+snippet m&
+ internal ${1:void} ${2:}(${3:}) {
+ ${4:}
+ }
+snippet m|
+ protected ${1:void} ${2:}(${3:}) {
+ ${4:}
+ }
+snippet m-
+ private ${1:void} ${2:}(${3:}) {
+ ${4:}
+ }
+# members - int
+snippet mi
+ ${1:public} int ${2:}(${3:}) {
+ ${4:return 0;}
+ }
+snippet mi+
+ public int ${1:}(${2:}) {
+ ${3:return 0;}
+ }
+snippet mi&
+ internal int ${1:}(${2:}) {
+ ${3:return 0;}
+ }
+snippet mi|
+ protected int ${1:}(${2:}) {
+ ${3:return 0;}
+ }
+snippet mi-
+ private int ${1:}(${2:}) {
+ ${3:return 0;}
+ }
+# members - bool
+snippet mb
+ ${1:public} bool ${2:}(${3:}) {
+ ${4:return false;}
+ }
+snippet mb+
+ public bool ${1:}(${2:}) {
+ ${3:return false;}
+ }
+snippet mb&
+ internal bool ${1:}(${2:}) {
+ ${3:return false;}
+ }
+snippet mb|
+ protected bool ${1:}(${2:}) {
+ ${3:return false;}
+ }
+snippet mb-
+ private bool ${1:}(${2:}) {
+ ${3:return false;}
+ }
+# members - string
+snippet ms
+ ${1:public} string ${2:}(${3:}) {
+ ${4:return "";}
+ }
+snippet ms+
+ public string ${1:}(${2:}) {
+ ${3:return "";}
+ }
+snippet ms&
+ internal string ${1:}(${2:}) {
+ ${3:return "";}
+ }
+snippet ms|
+ protected string ${1:}(${2:}) {
+ ${3:return "";}
+ }
+snippet ms-
+ private string ${1:}(${2:}) {
+ ${3:return "";}
+ }
+# structure
+snippet struct
+ public struct ${1:`Filename()`} {
+ ${2}
+ }
+# enumeration
+snippet enum
+ public enum ${1} {
+ ${2}
+ }
+# preprocessor directives
+snippet #if
+ #if
+ ${1}
+ #endif
+# inline xml documentation
+snippet ///
+ /// <summary>
+ /// ${1}
+ /// </summary>
+snippet <p
+ <param name="${1}">${2:$1}</param>${3}
+snippet <ex
+ <exception cref="${1:System.Exception}">${2}</exception>${3}
+snippet <r
+ <returns>${1}</returns>{${2}
+snippet <s
+ <see cref="${1}"/>${2}
+snippet <rem
+ <remarks>${1}</remarks>${2}
+snippet <c
+ <code>${1}</code>${2}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/csharp.js b/src/fauxton/assets/js/libs/ace/snippets/csharp.js
new file mode 100644
index 000000000..3aafdf855
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/csharp.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./csharp.snippets");
+exports.scope = "csharp";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/csharp.snippets b/src/fauxton/assets/js/libs/ace/snippets/csharp.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/csharp.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/css.js b/src/fauxton/assets/js/libs/ace/snippets/css.js
new file mode 100644
index 000000000..5d7e66ed3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/css.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./css.snippets");
+exports.scope = "css";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/css.snippets b/src/fauxton/assets/js/libs/ace/snippets/css.snippets
new file mode 100644
index 000000000..72212d2d8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/css.snippets
@@ -0,0 +1,967 @@
+snippet .
+ ${1} {
+ ${2}
+ }
+snippet !
+ !important
+snippet bdi:m+
+ -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};
+snippet bdi:m
+ -moz-border-image: ${1};
+snippet bdrz:m
+ -moz-border-radius: ${1};
+snippet bxsh:m+
+ -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};
+snippet bxsh:m
+ -moz-box-shadow: ${1};
+snippet bdi:w+
+ -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};
+snippet bdi:w
+ -webkit-border-image: ${1};
+snippet bdrz:w
+ -webkit-border-radius: ${1};
+snippet bxsh:w+
+ -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};
+snippet bxsh:w
+ -webkit-box-shadow: ${1};
+snippet @f
+ @font-face {
+ font-family: ${1};
+ src: url(${2});
+ }
+snippet @i
+ @import url(${1});
+snippet @m
+ @media ${1:print} {
+ ${2}
+ }
+snippet bg+
+ background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};
+snippet bga
+ background-attachment: ${1};
+snippet bga:f
+ background-attachment: fixed;
+snippet bga:s
+ background-attachment: scroll;
+snippet bgbk
+ background-break: ${1};
+snippet bgbk:bb
+ background-break: bounding-box;
+snippet bgbk:c
+ background-break: continuous;
+snippet bgbk:eb
+ background-break: each-box;
+snippet bgcp
+ background-clip: ${1};
+snippet bgcp:bb
+ background-clip: border-box;
+snippet bgcp:cb
+ background-clip: content-box;
+snippet bgcp:nc
+ background-clip: no-clip;
+snippet bgcp:pb
+ background-clip: padding-box;
+snippet bgc
+ background-color: #${1:FFF};
+snippet bgc:t
+ background-color: transparent;
+snippet bgi
+ background-image: url(${1});
+snippet bgi:n
+ background-image: none;
+snippet bgo
+ background-origin: ${1};
+snippet bgo:bb
+ background-origin: border-box;
+snippet bgo:cb
+ background-origin: content-box;
+snippet bgo:pb
+ background-origin: padding-box;
+snippet bgpx
+ background-position-x: ${1};
+snippet bgpy
+ background-position-y: ${1};
+snippet bgp
+ background-position: ${1:0} ${2:0};
+snippet bgr
+ background-repeat: ${1};
+snippet bgr:n
+ background-repeat: no-repeat;
+snippet bgr:x
+ background-repeat: repeat-x;
+snippet bgr:y
+ background-repeat: repeat-y;
+snippet bgr:r
+ background-repeat: repeat;
+snippet bgz
+ background-size: ${1};
+snippet bgz:a
+ background-size: auto;
+snippet bgz:ct
+ background-size: contain;
+snippet bgz:cv
+ background-size: cover;
+snippet bg
+ background: ${1};
+snippet bg:ie
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');
+snippet bg:n
+ background: none;
+snippet bd+
+ border: ${1:1px} ${2:solid} #${3:000};
+snippet bdb+
+ border-bottom: ${1:1px} ${2:solid} #${3:000};
+snippet bdbc
+ border-bottom-color: #${1:000};
+snippet bdbi
+ border-bottom-image: url(${1});
+snippet bdbi:n
+ border-bottom-image: none;
+snippet bdbli
+ border-bottom-left-image: url(${1});
+snippet bdbli:c
+ border-bottom-left-image: continue;
+snippet bdbli:n
+ border-bottom-left-image: none;
+snippet bdblrz
+ border-bottom-left-radius: ${1};
+snippet bdbri
+ border-bottom-right-image: url(${1});
+snippet bdbri:c
+ border-bottom-right-image: continue;
+snippet bdbri:n
+ border-bottom-right-image: none;
+snippet bdbrrz
+ border-bottom-right-radius: ${1};
+snippet bdbs
+ border-bottom-style: ${1};
+snippet bdbs:n
+ border-bottom-style: none;
+snippet bdbw
+ border-bottom-width: ${1};
+snippet bdb
+ border-bottom: ${1};
+snippet bdb:n
+ border-bottom: none;
+snippet bdbk
+ border-break: ${1};
+snippet bdbk:c
+ border-break: close;
+snippet bdcl
+ border-collapse: ${1};
+snippet bdcl:c
+ border-collapse: collapse;
+snippet bdcl:s
+ border-collapse: separate;
+snippet bdc
+ border-color: #${1:000};
+snippet bdci
+ border-corner-image: url(${1});
+snippet bdci:c
+ border-corner-image: continue;
+snippet bdci:n
+ border-corner-image: none;
+snippet bdf
+ border-fit: ${1};
+snippet bdf:c
+ border-fit: clip;
+snippet bdf:of
+ border-fit: overwrite;
+snippet bdf:ow
+ border-fit: overwrite;
+snippet bdf:r
+ border-fit: repeat;
+snippet bdf:sc
+ border-fit: scale;
+snippet bdf:sp
+ border-fit: space;
+snippet bdf:st
+ border-fit: stretch;
+snippet bdi
+ border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};
+snippet bdi:n
+ border-image: none;
+snippet bdl+
+ border-left: ${1:1px} ${2:solid} #${3:000};
+snippet bdlc
+ border-left-color: #${1:000};
+snippet bdli
+ border-left-image: url(${1});
+snippet bdli:n
+ border-left-image: none;
+snippet bdls
+ border-left-style: ${1};
+snippet bdls:n
+ border-left-style: none;
+snippet bdlw
+ border-left-width: ${1};
+snippet bdl
+ border-left: ${1};
+snippet bdl:n
+ border-left: none;
+snippet bdlt
+ border-length: ${1};
+snippet bdlt:a
+ border-length: auto;
+snippet bdrz
+ border-radius: ${1};
+snippet bdr+
+ border-right: ${1:1px} ${2:solid} #${3:000};
+snippet bdrc
+ border-right-color: #${1:000};
+snippet bdri
+ border-right-image: url(${1});
+snippet bdri:n
+ border-right-image: none;
+snippet bdrs
+ border-right-style: ${1};
+snippet bdrs:n
+ border-right-style: none;
+snippet bdrw
+ border-right-width: ${1};
+snippet bdr
+ border-right: ${1};
+snippet bdr:n
+ border-right: none;
+snippet bdsp
+ border-spacing: ${1};
+snippet bds
+ border-style: ${1};
+snippet bds:ds
+ border-style: dashed;
+snippet bds:dtds
+ border-style: dot-dash;
+snippet bds:dtdtds
+ border-style: dot-dot-dash;
+snippet bds:dt
+ border-style: dotted;
+snippet bds:db
+ border-style: double;
+snippet bds:g
+ border-style: groove;
+snippet bds:h
+ border-style: hidden;
+snippet bds:i
+ border-style: inset;
+snippet bds:n
+ border-style: none;
+snippet bds:o
+ border-style: outset;
+snippet bds:r
+ border-style: ridge;
+snippet bds:s
+ border-style: solid;
+snippet bds:w
+ border-style: wave;
+snippet bdt+
+ border-top: ${1:1px} ${2:solid} #${3:000};
+snippet bdtc
+ border-top-color: #${1:000};
+snippet bdti
+ border-top-image: url(${1});
+snippet bdti:n
+ border-top-image: none;
+snippet bdtli
+ border-top-left-image: url(${1});
+snippet bdtli:c
+ border-corner-image: continue;
+snippet bdtli:n
+ border-corner-image: none;
+snippet bdtlrz
+ border-top-left-radius: ${1};
+snippet bdtri
+ border-top-right-image: url(${1});
+snippet bdtri:c
+ border-top-right-image: continue;
+snippet bdtri:n
+ border-top-right-image: none;
+snippet bdtrrz
+ border-top-right-radius: ${1};
+snippet bdts
+ border-top-style: ${1};
+snippet bdts:n
+ border-top-style: none;
+snippet bdtw
+ border-top-width: ${1};
+snippet bdt
+ border-top: ${1};
+snippet bdt:n
+ border-top: none;
+snippet bdw
+ border-width: ${1};
+snippet bd
+ border: ${1};
+snippet bd:n
+ border: none;
+snippet b
+ bottom: ${1};
+snippet b:a
+ bottom: auto;
+snippet bxsh+
+ box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};
+snippet bxsh
+ box-shadow: ${1};
+snippet bxsh:n
+ box-shadow: none;
+snippet bxz
+ box-sizing: ${1};
+snippet bxz:bb
+ box-sizing: border-box;
+snippet bxz:cb
+ box-sizing: content-box;
+snippet cps
+ caption-side: ${1};
+snippet cps:b
+ caption-side: bottom;
+snippet cps:t
+ caption-side: top;
+snippet cl
+ clear: ${1};
+snippet cl:b
+ clear: both;
+snippet cl:l
+ clear: left;
+snippet cl:n
+ clear: none;
+snippet cl:r
+ clear: right;
+snippet cp
+ clip: ${1};
+snippet cp:a
+ clip: auto;
+snippet cp:r
+ clip: rect(${1:0} ${2:0} ${3:0} ${4:0});
+snippet c
+ color: #${1:000};
+snippet ct
+ content: ${1};
+snippet ct:a
+ content: attr(${1});
+snippet ct:cq
+ content: close-quote;
+snippet ct:c
+ content: counter(${1});
+snippet ct:cs
+ content: counters(${1});
+snippet ct:ncq
+ content: no-close-quote;
+snippet ct:noq
+ content: no-open-quote;
+snippet ct:n
+ content: normal;
+snippet ct:oq
+ content: open-quote;
+snippet coi
+ counter-increment: ${1};
+snippet cor
+ counter-reset: ${1};
+snippet cur
+ cursor: ${1};
+snippet cur:a
+ cursor: auto;
+snippet cur:c
+ cursor: crosshair;
+snippet cur:d
+ cursor: default;
+snippet cur:ha
+ cursor: hand;
+snippet cur:he
+ cursor: help;
+snippet cur:m
+ cursor: move;
+snippet cur:p
+ cursor: pointer;
+snippet cur:t
+ cursor: text;
+snippet d
+ display: ${1};
+snippet d:mib
+ display: -moz-inline-box;
+snippet d:mis
+ display: -moz-inline-stack;
+snippet d:b
+ display: block;
+snippet d:cp
+ display: compact;
+snippet d:ib
+ display: inline-block;
+snippet d:itb
+ display: inline-table;
+snippet d:i
+ display: inline;
+snippet d:li
+ display: list-item;
+snippet d:n
+ display: none;
+snippet d:ri
+ display: run-in;
+snippet d:tbcp
+ display: table-caption;
+snippet d:tbc
+ display: table-cell;
+snippet d:tbclg
+ display: table-column-group;
+snippet d:tbcl
+ display: table-column;
+snippet d:tbfg
+ display: table-footer-group;
+snippet d:tbhg
+ display: table-header-group;
+snippet d:tbrg
+ display: table-row-group;
+snippet d:tbr
+ display: table-row;
+snippet d:tb
+ display: table;
+snippet ec
+ empty-cells: ${1};
+snippet ec:h
+ empty-cells: hide;
+snippet ec:s
+ empty-cells: show;
+snippet exp
+ expression()
+snippet fl
+ float: ${1};
+snippet fl:l
+ float: left;
+snippet fl:n
+ float: none;
+snippet fl:r
+ float: right;
+snippet f+
+ font: ${1:1em} ${2:Arial},${3:sans-serif};
+snippet fef
+ font-effect: ${1};
+snippet fef:eb
+ font-effect: emboss;
+snippet fef:eg
+ font-effect: engrave;
+snippet fef:n
+ font-effect: none;
+snippet fef:o
+ font-effect: outline;
+snippet femp
+ font-emphasize-position: ${1};
+snippet femp:a
+ font-emphasize-position: after;
+snippet femp:b
+ font-emphasize-position: before;
+snippet fems
+ font-emphasize-style: ${1};
+snippet fems:ac
+ font-emphasize-style: accent;
+snippet fems:c
+ font-emphasize-style: circle;
+snippet fems:ds
+ font-emphasize-style: disc;
+snippet fems:dt
+ font-emphasize-style: dot;
+snippet fems:n
+ font-emphasize-style: none;
+snippet fem
+ font-emphasize: ${1};
+snippet ff
+ font-family: ${1};
+snippet ff:c
+ font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;
+snippet ff:f
+ font-family: ${1:Capitals,Impact},fantasy;
+snippet ff:m
+ font-family: ${1:Monaco,'Courier New'},monospace;
+snippet ff:ss
+ font-family: ${1:Helvetica,Arial},sans-serif;
+snippet ff:s
+ font-family: ${1:Georgia,'Times New Roman'},serif;
+snippet fza
+ font-size-adjust: ${1};
+snippet fza:n
+ font-size-adjust: none;
+snippet fz
+ font-size: ${1};
+snippet fsm
+ font-smooth: ${1};
+snippet fsm:aw
+ font-smooth: always;
+snippet fsm:a
+ font-smooth: auto;
+snippet fsm:n
+ font-smooth: never;
+snippet fst
+ font-stretch: ${1};
+snippet fst:c
+ font-stretch: condensed;
+snippet fst:e
+ font-stretch: expanded;
+snippet fst:ec
+ font-stretch: extra-condensed;
+snippet fst:ee
+ font-stretch: extra-expanded;
+snippet fst:n
+ font-stretch: normal;
+snippet fst:sc
+ font-stretch: semi-condensed;
+snippet fst:se
+ font-stretch: semi-expanded;
+snippet fst:uc
+ font-stretch: ultra-condensed;
+snippet fst:ue
+ font-stretch: ultra-expanded;
+snippet fs
+ font-style: ${1};
+snippet fs:i
+ font-style: italic;
+snippet fs:n
+ font-style: normal;
+snippet fs:o
+ font-style: oblique;
+snippet fv
+ font-variant: ${1};
+snippet fv:n
+ font-variant: normal;
+snippet fv:sc
+ font-variant: small-caps;
+snippet fw
+ font-weight: ${1};
+snippet fw:b
+ font-weight: bold;
+snippet fw:br
+ font-weight: bolder;
+snippet fw:lr
+ font-weight: lighter;
+snippet fw:n
+ font-weight: normal;
+snippet f
+ font: ${1};
+snippet h
+ height: ${1};
+snippet h:a
+ height: auto;
+snippet l
+ left: ${1};
+snippet l:a
+ left: auto;
+snippet lts
+ letter-spacing: ${1};
+snippet lh
+ line-height: ${1};
+snippet lisi
+ list-style-image: url(${1});
+snippet lisi:n
+ list-style-image: none;
+snippet lisp
+ list-style-position: ${1};
+snippet lisp:i
+ list-style-position: inside;
+snippet lisp:o
+ list-style-position: outside;
+snippet list
+ list-style-type: ${1};
+snippet list:c
+ list-style-type: circle;
+snippet list:dclz
+ list-style-type: decimal-leading-zero;
+snippet list:dc
+ list-style-type: decimal;
+snippet list:d
+ list-style-type: disc;
+snippet list:lr
+ list-style-type: lower-roman;
+snippet list:n
+ list-style-type: none;
+snippet list:s
+ list-style-type: square;
+snippet list:ur
+ list-style-type: upper-roman;
+snippet lis
+ list-style: ${1};
+snippet lis:n
+ list-style: none;
+snippet mb
+ margin-bottom: ${1};
+snippet mb:a
+ margin-bottom: auto;
+snippet ml
+ margin-left: ${1};
+snippet ml:a
+ margin-left: auto;
+snippet mr
+ margin-right: ${1};
+snippet mr:a
+ margin-right: auto;
+snippet mt
+ margin-top: ${1};
+snippet mt:a
+ margin-top: auto;
+snippet m
+ margin: ${1};
+snippet m:4
+ margin: ${1:0} ${2:0} ${3:0} ${4:0};
+snippet m:3
+ margin: ${1:0} ${2:0} ${3:0};
+snippet m:2
+ margin: ${1:0} ${2:0};
+snippet m:0
+ margin: 0;
+snippet m:a
+ margin: auto;
+snippet mah
+ max-height: ${1};
+snippet mah:n
+ max-height: none;
+snippet maw
+ max-width: ${1};
+snippet maw:n
+ max-width: none;
+snippet mih
+ min-height: ${1};
+snippet miw
+ min-width: ${1};
+snippet op
+ opacity: ${1};
+snippet op:ie
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});
+snippet op:ms
+ -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';
+snippet orp
+ orphans: ${1};
+snippet o+
+ outline: ${1:1px} ${2:solid} #${3:000};
+snippet oc
+ outline-color: ${1:#000};
+snippet oc:i
+ outline-color: invert;
+snippet oo
+ outline-offset: ${1};
+snippet os
+ outline-style: ${1};
+snippet ow
+ outline-width: ${1};
+snippet o
+ outline: ${1};
+snippet o:n
+ outline: none;
+snippet ovs
+ overflow-style: ${1};
+snippet ovs:a
+ overflow-style: auto;
+snippet ovs:mq
+ overflow-style: marquee;
+snippet ovs:mv
+ overflow-style: move;
+snippet ovs:p
+ overflow-style: panner;
+snippet ovs:s
+ overflow-style: scrollbar;
+snippet ovx
+ overflow-x: ${1};
+snippet ovx:a
+ overflow-x: auto;
+snippet ovx:h
+ overflow-x: hidden;
+snippet ovx:s
+ overflow-x: scroll;
+snippet ovx:v
+ overflow-x: visible;
+snippet ovy
+ overflow-y: ${1};
+snippet ovy:a
+ overflow-y: auto;
+snippet ovy:h
+ overflow-y: hidden;
+snippet ovy:s
+ overflow-y: scroll;
+snippet ovy:v
+ overflow-y: visible;
+snippet ov
+ overflow: ${1};
+snippet ov:a
+ overflow: auto;
+snippet ov:h
+ overflow: hidden;
+snippet ov:s
+ overflow: scroll;
+snippet ov:v
+ overflow: visible;
+snippet pb
+ padding-bottom: ${1};
+snippet pl
+ padding-left: ${1};
+snippet pr
+ padding-right: ${1};
+snippet pt
+ padding-top: ${1};
+snippet p
+ padding: ${1};
+snippet p:4
+ padding: ${1:0} ${2:0} ${3:0} ${4:0};
+snippet p:3
+ padding: ${1:0} ${2:0} ${3:0};
+snippet p:2
+ padding: ${1:0} ${2:0};
+snippet p:0
+ padding: 0;
+snippet pgba
+ page-break-after: ${1};
+snippet pgba:aw
+ page-break-after: always;
+snippet pgba:a
+ page-break-after: auto;
+snippet pgba:l
+ page-break-after: left;
+snippet pgba:r
+ page-break-after: right;
+snippet pgbb
+ page-break-before: ${1};
+snippet pgbb:aw
+ page-break-before: always;
+snippet pgbb:a
+ page-break-before: auto;
+snippet pgbb:l
+ page-break-before: left;
+snippet pgbb:r
+ page-break-before: right;
+snippet pgbi
+ page-break-inside: ${1};
+snippet pgbi:a
+ page-break-inside: auto;
+snippet pgbi:av
+ page-break-inside: avoid;
+snippet pos
+ position: ${1};
+snippet pos:a
+ position: absolute;
+snippet pos:f
+ position: fixed;
+snippet pos:r
+ position: relative;
+snippet pos:s
+ position: static;
+snippet q
+ quotes: ${1};
+snippet q:en
+ quotes: '\201C' '\201D' '\2018' '\2019';
+snippet q:n
+ quotes: none;
+snippet q:ru
+ quotes: '\00AB' '\00BB' '\201E' '\201C';
+snippet rz
+ resize: ${1};
+snippet rz:b
+ resize: both;
+snippet rz:h
+ resize: horizontal;
+snippet rz:n
+ resize: none;
+snippet rz:v
+ resize: vertical;
+snippet r
+ right: ${1};
+snippet r:a
+ right: auto;
+snippet tbl
+ table-layout: ${1};
+snippet tbl:a
+ table-layout: auto;
+snippet tbl:f
+ table-layout: fixed;
+snippet tal
+ text-align-last: ${1};
+snippet tal:a
+ text-align-last: auto;
+snippet tal:c
+ text-align-last: center;
+snippet tal:l
+ text-align-last: left;
+snippet tal:r
+ text-align-last: right;
+snippet ta
+ text-align: ${1};
+snippet ta:c
+ text-align: center;
+snippet ta:l
+ text-align: left;
+snippet ta:r
+ text-align: right;
+snippet td
+ text-decoration: ${1};
+snippet td:l
+ text-decoration: line-through;
+snippet td:n
+ text-decoration: none;
+snippet td:o
+ text-decoration: overline;
+snippet td:u
+ text-decoration: underline;
+snippet te
+ text-emphasis: ${1};
+snippet te:ac
+ text-emphasis: accent;
+snippet te:a
+ text-emphasis: after;
+snippet te:b
+ text-emphasis: before;
+snippet te:c
+ text-emphasis: circle;
+snippet te:ds
+ text-emphasis: disc;
+snippet te:dt
+ text-emphasis: dot;
+snippet te:n
+ text-emphasis: none;
+snippet th
+ text-height: ${1};
+snippet th:a
+ text-height: auto;
+snippet th:f
+ text-height: font-size;
+snippet th:m
+ text-height: max-size;
+snippet th:t
+ text-height: text-size;
+snippet ti
+ text-indent: ${1};
+snippet ti:-
+ text-indent: -9999px;
+snippet tj
+ text-justify: ${1};
+snippet tj:a
+ text-justify: auto;
+snippet tj:d
+ text-justify: distribute;
+snippet tj:ic
+ text-justify: inter-cluster;
+snippet tj:ii
+ text-justify: inter-ideograph;
+snippet tj:iw
+ text-justify: inter-word;
+snippet tj:k
+ text-justify: kashida;
+snippet tj:t
+ text-justify: tibetan;
+snippet to+
+ text-outline: ${1:0} ${2:0} #${3:000};
+snippet to
+ text-outline: ${1};
+snippet to:n
+ text-outline: none;
+snippet tr
+ text-replace: ${1};
+snippet tr:n
+ text-replace: none;
+snippet tsh+
+ text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};
+snippet tsh
+ text-shadow: ${1};
+snippet tsh:n
+ text-shadow: none;
+snippet tt
+ text-transform: ${1};
+snippet tt:c
+ text-transform: capitalize;
+snippet tt:l
+ text-transform: lowercase;
+snippet tt:n
+ text-transform: none;
+snippet tt:u
+ text-transform: uppercase;
+snippet tw
+ text-wrap: ${1};
+snippet tw:no
+ text-wrap: none;
+snippet tw:n
+ text-wrap: normal;
+snippet tw:s
+ text-wrap: suppress;
+snippet tw:u
+ text-wrap: unrestricted;
+snippet t
+ top: ${1};
+snippet t:a
+ top: auto;
+snippet va
+ vertical-align: ${1};
+snippet va:bl
+ vertical-align: baseline;
+snippet va:b
+ vertical-align: bottom;
+snippet va:m
+ vertical-align: middle;
+snippet va:sub
+ vertical-align: sub;
+snippet va:sup
+ vertical-align: super;
+snippet va:tb
+ vertical-align: text-bottom;
+snippet va:tt
+ vertical-align: text-top;
+snippet va:t
+ vertical-align: top;
+snippet v
+ visibility: ${1};
+snippet v:c
+ visibility: collapse;
+snippet v:h
+ visibility: hidden;
+snippet v:v
+ visibility: visible;
+snippet whsc
+ white-space-collapse: ${1};
+snippet whsc:ba
+ white-space-collapse: break-all;
+snippet whsc:bs
+ white-space-collapse: break-strict;
+snippet whsc:k
+ white-space-collapse: keep-all;
+snippet whsc:l
+ white-space-collapse: loose;
+snippet whsc:n
+ white-space-collapse: normal;
+snippet whs
+ white-space: ${1};
+snippet whs:n
+ white-space: normal;
+snippet whs:nw
+ white-space: nowrap;
+snippet whs:pl
+ white-space: pre-line;
+snippet whs:pw
+ white-space: pre-wrap;
+snippet whs:p
+ white-space: pre;
+snippet wid
+ widows: ${1};
+snippet w
+ width: ${1};
+snippet w:a
+ width: auto;
+snippet wob
+ word-break: ${1};
+snippet wob:ba
+ word-break: break-all;
+snippet wob:bs
+ word-break: break-strict;
+snippet wob:k
+ word-break: keep-all;
+snippet wob:l
+ word-break: loose;
+snippet wob:n
+ word-break: normal;
+snippet wos
+ word-spacing: ${1};
+snippet wow
+ word-wrap: ${1};
+snippet wow:no
+ word-wrap: none;
+snippet wow:n
+ word-wrap: normal;
+snippet wow:s
+ word-wrap: suppress;
+snippet wow:u
+ word-wrap: unrestricted;
+snippet z
+ z-index: ${1};
+snippet z:a
+ z-index: auto;
+snippet zoo
+ zoom: 1;
diff --git a/src/fauxton/assets/js/libs/ace/snippets/curly.js b/src/fauxton/assets/js/libs/ace/snippets/curly.js
new file mode 100644
index 000000000..aa59f2863
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/curly.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./curly.snippets");
+exports.scope = "curly";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/curly.snippets b/src/fauxton/assets/js/libs/ace/snippets/curly.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/curly.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/d.js b/src/fauxton/assets/js/libs/ace/snippets/d.js
new file mode 100644
index 000000000..79446fdc8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/d.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./d.snippets");
+exports.scope = "d";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/d.snippets b/src/fauxton/assets/js/libs/ace/snippets/d.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/d.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/dart.js b/src/fauxton/assets/js/libs/ace/snippets/dart.js
new file mode 100644
index 000000000..949fcaa3b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/dart.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./dart.snippets");
+exports.scope = "dart";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/dart.snippets b/src/fauxton/assets/js/libs/ace/snippets/dart.snippets
new file mode 100644
index 000000000..14a1c3e59
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/dart.snippets
@@ -0,0 +1,83 @@
+snippet lib
+ library ${1};
+ ${2}
+snippet im
+ import '${1}';
+ ${2}
+snippet pa
+ part '${1}';
+ ${2}
+snippet pao
+ part of ${1};
+ ${2}
+snippet main
+ void main() {
+ ${1:/* code */}
+ }
+snippet st
+ static ${1}
+snippet fi
+ final ${1}
+snippet re
+ return ${1}
+snippet br
+ break;
+snippet th
+ throw ${1}
+snippet cl
+ class ${1:`Filename("", "untitled")`} ${2}
+snippet imp
+ implements ${1}
+snippet ext
+ extends ${1}
+snippet if
+ if (${1:true}) {
+ ${2}
+ }
+snippet ife
+ if (${1:true}) {
+ ${2}
+ } else {
+ ${3}
+ }
+snippet el
+ else
+snippet sw
+ switch (${1}) {
+ ${2}
+ }
+snippet cs
+ case ${1}:
+ ${2}
+snippet de
+ default:
+ ${1}
+snippet for
+ for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {
+ ${4:$1[$2]}
+ }
+snippet fore
+ for (final ${2:item} in ${1:itemList}) {
+ ${3:/* code */}
+ }
+snippet wh
+ while (${1:/* condition */}) {
+ ${2:/* code */}
+ }
+snippet dowh
+ do {
+ ${2:/* code */}
+ } while (${1:/* condition */});
+snippet as
+ assert(${1:/* condition */});
+snippet try
+ try {
+ ${2}
+ } catch (${1:Exception e}) {
+ }
+snippet tryf
+ try {
+ ${2}
+ } catch (${1:Exception e}) {
+ } finally {
+ }
diff --git a/src/fauxton/assets/js/libs/ace/snippets/diff.js b/src/fauxton/assets/js/libs/ace/snippets/diff.js
new file mode 100644
index 000000000..eb48cbc19
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/diff.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./diff.snippets");
+exports.scope = "diff";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/diff.snippets b/src/fauxton/assets/js/libs/ace/snippets/diff.snippets
new file mode 100644
index 000000000..7ba288ded
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/diff.snippets
@@ -0,0 +1,11 @@
+# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header
+snippet header DEP-3 style header
+ Description: ${1}
+ Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}
+ Bug: ${4:url in upstream bugtracker}
+ Forwarded: ${5:no|not-needed|url}
+ Author: ${6:`g:snips_author`}
+ Reviewed-by: ${7:name and email}
+ Last-Update: ${8:`strftime("%Y-%m-%d")`}
+ Applied-Upstream: ${9:upstream version|url|commit}
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/django.js b/src/fauxton/assets/js/libs/ace/snippets/django.js
new file mode 100644
index 000000000..b5af7a73b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/django.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./django.snippets");
+exports.scope = "django";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/django.snippets b/src/fauxton/assets/js/libs/ace/snippets/django.snippets
new file mode 100644
index 000000000..8296cce25
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/django.snippets
@@ -0,0 +1,108 @@
+# Model Fields
+
+# Note: Optional arguments are using defaults that match what Django will use
+# as a default, e.g. with max_length fields. Doing this as a form of self
+# documentation and to make it easy to know whether you should override the
+# default or not.
+
+# Note: Optional arguments that are booleans will use the opposite since you
+# can either not specify them, or override them, e.g. auto_now_add=False.
+
+snippet auto
+ ${1:FIELDNAME} = models.AutoField(${2})
+snippet bool
+ ${1:FIELDNAME} = models.BooleanField(${2:default=True})
+snippet char
+ ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})
+snippet comma
+ ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})
+snippet date
+ ${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})
+snippet datetime
+ ${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})
+snippet decimal
+ ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})
+snippet email
+ ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})
+snippet file
+ ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})
+snippet filepath
+ ${1:FIELDNAME} = models.FilePathField(path=${2:"/abs/path/to/dir"}${3:, max_length=100}${4:, match="*.ext"}${5:, recursive=True}${6:, blank=True, })
+snippet float
+ ${1:FIELDNAME} = models.FloatField(${2})
+snippet image
+ ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})
+snippet int
+ ${1:FIELDNAME} = models.IntegerField(${2})
+snippet ip
+ ${1:FIELDNAME} = models.IPAddressField(${2})
+snippet nullbool
+ ${1:FIELDNAME} = models.NullBooleanField(${2})
+snippet posint
+ ${1:FIELDNAME} = models.PositiveIntegerField(${2})
+snippet possmallint
+ ${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})
+snippet slug
+ ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})
+snippet smallint
+ ${1:FIELDNAME} = models.SmallIntegerField(${2})
+snippet text
+ ${1:FIELDNAME} = models.TextField(${2:blank=True})
+snippet time
+ ${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})
+snippet url
+ ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})
+snippet xml
+ ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})
+# Relational Fields
+snippet fk
+ ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})
+snippet m2m
+ ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})
+snippet o2o
+ ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})
+
+# Code Skeletons
+
+snippet form
+ class ${1:FormName}(forms.Form):
+ """${2:docstring}"""
+ ${3}
+
+snippet model
+ class ${1:ModelName}(models.Model):
+ """${2:docstring}"""
+ ${3}
+
+ class Meta:
+ ${4}
+
+ def __unicode__(self):
+ ${5}
+
+ def save(self, force_insert=False, force_update=False):
+ ${6}
+
+ @models.permalink
+ def get_absolute_url(self):
+ return ('${7:view_or_url_name}' ${8})
+
+snippet modeladmin
+ class ${1:ModelName}Admin(admin.ModelAdmin):
+ ${2}
+
+ admin.site.register($1, $1Admin)
+
+snippet tabularinline
+ class ${1:ModelName}Inline(admin.TabularInline):
+ model = $1
+
+snippet stackedinline
+ class ${1:ModelName}Inline(admin.StackedInline):
+ model = $1
+
+snippet r2r
+ return render_to_response('${1:template.html}', {
+ ${2}
+ }${3:, context_instance=RequestContext(request)}
+ )
diff --git a/src/fauxton/assets/js/libs/ace/snippets/dot.js b/src/fauxton/assets/js/libs/ace/snippets/dot.js
new file mode 100644
index 000000000..420f4f017
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/dot.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./dot.snippets");
+exports.scope = "dot";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/dot.snippets b/src/fauxton/assets/js/libs/ace/snippets/dot.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/dot.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ejs.js b/src/fauxton/assets/js/libs/ace/snippets/ejs.js
new file mode 100644
index 000000000..be4777388
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ejs.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ejs.snippets");
+exports.scope = "ejs";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ejs.snippets b/src/fauxton/assets/js/libs/ace/snippets/ejs.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ejs.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/erlang.js b/src/fauxton/assets/js/libs/ace/snippets/erlang.js
new file mode 100644
index 000000000..212e36405
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/erlang.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./erlang.snippets");
+exports.scope = "erlang";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/erlang.snippets b/src/fauxton/assets/js/libs/ace/snippets/erlang.snippets
new file mode 100644
index 000000000..acc6fd195
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/erlang.snippets
@@ -0,0 +1,160 @@
+# module and export all
+snippet mod
+ -module(${1:`Filename('', 'my')`}).
+
+ -compile([export_all]).
+
+ start() ->
+ ${2}
+
+ stop() ->
+ ok.
+# define directive
+snippet def
+ -define(${1:macro}, ${2:body}).${3}
+# export directive
+snippet exp
+ -export([${1:function}/${2:arity}]).
+# include directive
+snippet inc
+ -include("${1:file}").${2}
+# behavior directive
+snippet beh
+ -behaviour(${1:behaviour}).${2}
+# if expression
+snippet if
+ if
+ ${1:guard} ->
+ ${2:body}
+ end
+# case expression
+snippet case
+ case ${1:expression} of
+ ${2:pattern} ->
+ ${3:body};
+ end
+# anonymous function
+snippet fun
+ fun (${1:Parameters}) -> ${2:body} end${3}
+# try...catch
+snippet try
+ try
+ ${1}
+ catch
+ ${2:_:_} -> ${3:got_some_exception}
+ end
+# record directive
+snippet rec
+ -record(${1:record}, {
+ ${2:field}=${3:value}}).${4}
+# todo comment
+snippet todo
+ %% TODO: ${1}
+## Snippets below (starting with '%') are in EDoc format.
+## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details
+# doc comment
+snippet %d
+ %% @doc ${1}
+# end of doc comment
+snippet %e
+ %% @end
+# specification comment
+snippet %s
+ %% @spec ${1}
+# private function marker
+snippet %p
+ %% @private
+# OTP application
+snippet application
+ -module(${1:`Filename('', 'my')`}).
+
+ -behaviour(application).
+
+ -export([start/2, stop/1]).
+
+ start(_Type, _StartArgs) ->
+ case ${2:root_supervisor}:start_link() of
+ {ok, Pid} ->
+ {ok, Pid};
+ Other ->
+ {error, Other}
+ end.
+
+ stop(_State) ->
+ ok.
+# OTP supervisor
+snippet supervisor
+ -module(${1:`Filename('', 'my')`}).
+
+ -behaviour(supervisor).
+
+ %% API
+ -export([start_link/0]).
+
+ %% Supervisor callbacks
+ -export([init/1]).
+
+ -define(SERVER, ?MODULE).
+
+ start_link() ->
+ supervisor:start_link({local, ?SERVER}, ?MODULE, []).
+
+ init([]) ->
+ Server = {${2:my_server}, {$2, start_link, []},
+ permanent, 2000, worker, [$2]},
+ Children = [Server],
+ RestartStrategy = {one_for_one, 0, 1},
+ {ok, {RestartStrategy, Children}}.
+# OTP gen_server
+snippet gen_server
+ -module(${1:`Filename('', 'my')`}).
+
+ -behaviour(gen_server).
+
+ %% API
+ -export([
+ start_link/0
+ ]).
+
+ %% gen_server callbacks
+ -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
+ terminate/2, code_change/3]).
+
+ -define(SERVER, ?MODULE).
+
+ -record(state, {}).
+
+ %%%===================================================================
+ %%% API
+ %%%===================================================================
+
+ start_link() ->
+ gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
+
+ %%%===================================================================
+ %%% gen_server callbacks
+ %%%===================================================================
+
+ init([]) ->
+ {ok, #state{}}.
+
+ handle_call(_Request, _From, State) ->
+ Reply = ok,
+ {reply, Reply, State}.
+
+ handle_cast(_Msg, State) ->
+ {noreply, State}.
+
+ handle_info(_Info, State) ->
+ {noreply, State}.
+
+ terminate(_Reason, _State) ->
+ ok.
+
+ code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+ %%%===================================================================
+ %%% Internal functions
+ %%%===================================================================
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/eruby.snippets b/src/fauxton/assets/js/libs/ace/snippets/eruby.snippets
new file mode 100644
index 000000000..f96ca8462
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/eruby.snippets
@@ -0,0 +1,113 @@
+# .erb and .rhmtl files
+
+# Includes html.snippets
+
+# Rails *****************************
+snippet rc
+ <% ${1} %>
+snippet rce
+ <%= ${1} %>${2}
+snippet %
+ <% ${1} %>
+snippet =
+ <%= ${1} %>${2}
+snippet end
+ <% end %>${1}
+snippet ead
+ <% ${1}.each do |${2}| %>
+ ${3}
+ <% end %>
+snippet for
+ <% for ${2:item} in ${1} %>
+ ${3}
+ <% end %>
+snippet rp
+ <%= render :partial => '${1:item}' %>
+snippet rpl
+ <%= render :partial => '${1:item}', :locals => { :${2:name} => '${3:value}'$4 } %>
+snippet rps
+ <%= render :partial => '${1:item}', :status => ${2:500} %>
+snippet rpc
+ <%= render :partial => '${1:item}', :collection => ${2:items} %>
+snippet lia
+ <%= link_to '${1:link text...}', :action => '${2:index}' %>
+snippet liai
+ <%= link_to '${1:link text...}', :action => '${2:edit}', :id => ${3:@item} %>
+snippet lic
+ <%= link_to '${1:link text...}', :controller => '${2:items}' %>
+snippet lica
+ <%= link_to '${1:link text...}', :controller => '${2:items}', :action => '${3:index}' %>
+snippet licai
+ <%= link_to '${1:link text...}', :controller => '${2:items}', :action => '${3:edit}', :id => ${4:@item} %>
+snippet yield
+ <%= yield ${1::content_symbol} %>${2}
+snippet conf
+ <% content_for :${1:head} do %>
+ ${2}
+ <% end %>
+snippet cs
+ <%= collection_select <+object+>, <+method+>, <+collection+>, <+value_method+>, <+text_method+><+, <+[options]+>, <+[html_options]+>+> %>
+snippet ct
+ <%= content_tag '${1:DIV}', ${2:content}${3:,options} %>
+snippet ff
+ <% form_for @${1:model} do |f| %>
+ ${2}
+ <% end %>
+snippet ffcb
+ <%= ${1:f}.check_box :${2:attribute} %>
+snippet ffe
+ <% error_messages_for :${1:model} %>
+
+ <% form_for @${2:model} do |f| %>
+ ${3}
+ <% end %>
+snippet ffff
+ <%= ${1:f}.file_field :${2:attribute} %>
+snippet ffhf
+ <%= ${1:f}.hidden_field :${2:attribute} %>
+snippet ffl
+ <%= ${1:f}.label :${2:attribute}, '${3:$2}' %>
+snippet ffpf
+ <%= ${1:f}.password_field :${2:attribute} %>
+snippet ffrb
+ <%= ${1:f}.radio_button :${2:attribute}, :${3:tag_value} %>
+snippet ffs
+ <%= ${1:f}.submit "${2:submit}" %>
+snippet ffta
+ <%= ${1:f}.text_area :${2:attribute} %>
+snippet fftf
+ <%= ${1:f}.text_field :${2:attribute} %>
+snippet fields
+ <% fields_for :${1:model}, @$1 do |${2:f}| %>
+ ${3}
+ <% end %>
+snippet i18
+ I18n.t('${1:type.key}')${2}
+snippet it
+ <%= image_tag "${1}"${2} %>
+snippet jit
+ <%= javascript_include_tag ${1::all} %>
+snippet jsit
+ <%= javascript_include_tag "${1}" %>
+snippet lim
+ <%= link_to ${1:model}.${2:name}, ${3:$1}_path(${4:$1}) %>
+snippet linp
+ <%= link_to "${1:Link text...}", ${2:parent}_${3:child}_path(${4:@$2}, ${5:@$3}) %>
+snippet linpp
+ <%= link_to "${1:Link text...}", ${2:parent}_${3:child}_path(${4:@$2}) %>
+snippet lip
+ <%= link_to "${1:Link text...}", ${2:model}_path(${3:@$2}) %>
+snippet lipp
+ <%= link_to "${1:Link text...}", ${2:model}s_path %>
+snippet lt
+ <%= link_to "${1:name}", ${2:dest} %>
+snippet ofcfs
+ <%= options_from_collection_for_select ${1:collection}, ${2:value_method}, ${3:text_method}, ${4:selected_value} %>
+snippet rf
+ <%= render :file => "${1:file}"${2} %>
+snippet rt
+ <%= render :template => "${1:file}"${2} %>
+snippet slt
+ <%= stylesheet_link_tag ${1::all}, :cache => ${2:true} %>
+snippet sslt
+ <%= stylesheet_link_tag "${1}" %>
diff --git a/src/fauxton/assets/js/libs/ace/snippets/falcon.snippets b/src/fauxton/assets/js/libs/ace/snippets/falcon.snippets
new file mode 100644
index 000000000..85fb918dd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/falcon.snippets
@@ -0,0 +1,71 @@
+snippet #!
+ #!/usr/bin/env falcon
+
+# Import
+snippet imp
+ import ${1:module}
+
+# Function
+snippet fun
+ function ${2:function_name}(${3})
+ ${4:/* code */}
+ end
+
+# Class
+snippet class
+ class ${1:class_name}(${2:class_params})
+ ${3:/* members/methods */}
+ end
+
+# If
+snippet if
+ if ${1:condition}
+ ${2:/* code */}
+ end
+
+# If else
+snippet ife
+ if ${1:condition}
+ ${2:/* code */}
+ else
+ ${1}
+ end
+
+# If else if
+snippet elif
+ elif ${1:condition}
+ ${2:/* code */}
+
+# Switch case
+snippet switch
+ switch ${1:expression}
+ case ${2:item}
+ case ${3:item}
+ default
+ end
+
+# Select
+snippet select
+ select ${1:variable}
+ case ${2:TypeSpec}
+ case ${3:TypeSpec}
+ default
+ end
+
+# For/in Loop
+snippet forin
+ for ${1:element} in ${2:container}
+ ${3:/* code */}
+ end
+
+# For/to Loop
+snippet forto
+ for ${1:lowerbound} to ${2:upperbound}
+ ${3:/* code */}
+ end
+
+# While Loop
+snippet while
+ while ${1:conidition}
+ ${2:/* code */}
+ end
diff --git a/src/fauxton/assets/js/libs/ace/snippets/forth.js b/src/fauxton/assets/js/libs/ace/snippets/forth.js
new file mode 100644
index 000000000..c2bf91079
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/forth.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./forth.snippets");
+exports.scope = "forth";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/forth.snippets b/src/fauxton/assets/js/libs/ace/snippets/forth.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/forth.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ftl.js b/src/fauxton/assets/js/libs/ace/snippets/ftl.js
new file mode 100644
index 000000000..1cbcc0be6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ftl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ftl.snippets");
+exports.scope = "ftl";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ftl.snippets b/src/fauxton/assets/js/libs/ace/snippets/ftl.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ftl.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/glsl.js b/src/fauxton/assets/js/libs/ace/snippets/glsl.js
new file mode 100644
index 000000000..d9c5fc256
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/glsl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./glsl.snippets");
+exports.scope = "glsl";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/glsl.snippets b/src/fauxton/assets/js/libs/ace/snippets/glsl.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/glsl.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/go.snippets b/src/fauxton/assets/js/libs/ace/snippets/go.snippets
new file mode 100644
index 000000000..0e4fe61d0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/go.snippets
@@ -0,0 +1,201 @@
+# append
+snippet ap
+ append(${1:slice}, ${2:value})
+# bool
+snippet bl
+ bool
+# byte
+snippet bt
+ byte
+# break
+snippet br
+ break
+# channel
+snippet ch
+ chan ${1:int}
+# case
+snippet cs
+ case ${1:value}:
+ ${2:/* code */}
+# const
+snippet c
+ const ${1:NAME} = ${2:0}
+# constants with iota
+snippet co
+ const (
+ ${1:NAME1} = iota
+ ${2:NAME2}
+ )
+# continue
+snippet cn
+ continue
+# defer
+snippet df
+ defer ${1:func}()
+# defer recover
+snippet dfr
+ defer func() {
+ if err := recover(); err != nil {
+ ${1:/* code */}
+ }
+ }()
+# gpl
+snippet gpl
+ /*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Copyright (C) ${1:Author}, `strftime("%Y")`
+ */
+
+ ${2}
+# int
+snippet i
+ int
+# import
+snippet im
+ import (
+ "${1:package}"
+ )
+# interface
+snippet in
+ interface{}
+# full interface snippet
+snippet inf
+ interface ${1:name} {
+ ${2:/* methods */}
+ }${3}
+# if condition
+snippet if
+ if ${1:/* condition */} {
+ ${2:/* code */}
+ }
+# else snippet
+snippet el
+ else {
+ ${1}
+ }
+# error snippet
+snippet ir
+ if err != nil {
+ return err
+ }
+ ${1}
+# false
+snippet f
+ false
+# fallthrough
+snippet ft
+ fallthrough
+# float
+snippet fl
+ float32
+# float32
+snippet f3
+ float32
+# float64
+snippet f6
+ float64
+# if else
+snippet ie
+ if ${1:/* condition */} {
+ ${2:/* code */}
+ } else {
+ ${3}
+ }
+# for loop
+snippet fo
+ for ${2:i} = 0; $2 < ${1:count}; $2${3:++} {
+ ${4:/* code */}
+ }
+# for range loop
+snippet fr
+ for ${1:k}, ${2:v} := range ${3} {
+ ${4:/* code */}
+ }
+# function simple
+snippet fun
+ func ${1:funcName}(${2}) ${3:os.Error} {
+ ${4:/* code */}
+ }
+# function on receiver
+snippet fum
+ func (self ${1:type}) ${2:funcName}(${3}) ${4:os.Error} {
+ ${5:/* code */}
+ }
+# make
+snippet mk
+ make(${1:[]string}, ${2:0})
+# map
+snippet mp
+ map[${1:string}]${2:int}
+# main()
+snippet main
+ func main() {
+ ${1:/* code */}
+ }
+# new
+snippet nw
+ new(${1:type})
+# panic
+snippet pn
+ panic("${1:msg}")
+# print
+snippet pr
+ fmt.Printf("${1:%s}\n", ${2:var})${3}
+# range
+snippet rn
+ range ${1}
+# return
+snippet rt
+ return ${1}
+# result
+snippet rs
+ result
+# select
+snippet sl
+ select {
+ case ${1:v1} := <-${2:chan1}
+ ${3:/* code */}
+ case ${4:v2} := <-${5:chan2}
+ ${6:/* code */}
+ default:
+ ${7:/* code */}
+ }
+# string
+snippet sr
+ string
+# struct
+snippet st
+ struct ${1:name} {
+ ${2:/* data */}
+ }${4}
+# switch
+snippet sw
+ switch ${1:var} {
+ case ${2:value1}:
+ ${3:/* code */}
+ case ${4:value2}:
+ ${5:/* code */}
+ default:
+ ${6:/* code */}
+ }
+snippet sp
+ fmt.Sprintf("${1:%s}", ${2:var})${3}
+# true
+snippet t
+ true
+# variable declaration
+snippet v
+ var ${1:t} ${2:string}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/golang.js b/src/fauxton/assets/js/libs/ace/snippets/golang.js
new file mode 100644
index 000000000..f7b0eeccd
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/golang.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./golang.snippets");
+exports.scope = "golang";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/golang.snippets b/src/fauxton/assets/js/libs/ace/snippets/golang.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/golang.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/groovy.js b/src/fauxton/assets/js/libs/ace/snippets/groovy.js
new file mode 100644
index 000000000..2fe4e1116
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/groovy.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./groovy.snippets");
+exports.scope = "groovy";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/groovy.snippets b/src/fauxton/assets/js/libs/ace/snippets/groovy.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/groovy.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haml.js b/src/fauxton/assets/js/libs/ace/snippets/haml.js
new file mode 100644
index 000000000..efa8eb9cc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./haml.snippets");
+exports.scope = "haml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haml.snippets b/src/fauxton/assets/js/libs/ace/snippets/haml.snippets
new file mode 100644
index 000000000..61e9cf287
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haml.snippets
@@ -0,0 +1,20 @@
+snippet t
+ %table
+ %tr
+ %th
+ ${1:headers}
+ %tr
+ %td
+ ${2:headers}
+snippet ul
+ %ul
+ %li
+ ${1:item}
+ %li
+snippet =rp
+ = render :partial => '${1:partial}'
+snippet =rpl
+ = render :partial => '${1:partial}', :locals => {}
+snippet =rpc
+ = render :partial => '${1:partial}', :collection => @$1
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/handlebars.js b/src/fauxton/assets/js/libs/ace/snippets/handlebars.js
new file mode 100644
index 000000000..64ba39b3e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/handlebars.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./handlebars.snippets");
+exports.scope = "handlebars";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/handlebars.snippets b/src/fauxton/assets/js/libs/ace/snippets/handlebars.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/handlebars.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haskell.js b/src/fauxton/assets/js/libs/ace/snippets/haskell.js
new file mode 100644
index 000000000..8c583f1c1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haskell.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./haskell.snippets");
+exports.scope = "haskell";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haskell.snippets b/src/fauxton/assets/js/libs/ace/snippets/haskell.snippets
new file mode 100644
index 000000000..bcda8a5b4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haskell.snippets
@@ -0,0 +1,82 @@
+snippet lang
+ {-# LANGUAGE ${1:OverloadedStrings} #-}
+snippet info
+ -- |
+ -- Module : ${1:Module.Namespace}
+ -- Copyright : ${2:Author} ${3:2011-2012}
+ -- License : ${4:BSD3}
+ --
+ -- Maintainer : ${5:email@something.com}
+ -- Stability : ${6:experimental}
+ -- Portability : ${7:unknown}
+ --
+ -- ${8:Description}
+ --
+snippet import
+ import ${1:Data.Text}
+snippet import2
+ import ${1:Data.Text} (${2:head})
+snippet importq
+ import qualified ${1:Data.Text} as ${2:T}
+snippet inst
+ instance ${1:Monoid} ${2:Type} where
+ ${3}
+snippet type
+ type ${1:Type} = ${2:Type}
+snippet data
+ data ${1:Type} = ${2:$1} ${3:Int}
+snippet newtype
+ newtype ${1:Type} = ${2:$1} ${3:Int}
+snippet class
+ class ${1:Class} a where
+ ${2}
+snippet module
+ module `substitute(substitute(expand('%:r'), '[/\\]','.','g'),'^\%(\l*\.\)\?','','')` (
+ ) where
+ `expand('%') =~ 'Main' ? "\n\nmain = do\n print \"hello world\"" : ""`
+
+snippet const
+ ${1:name} :: ${2:a}
+ $1 = ${3:undefined}
+snippet fn
+ ${1:fn} :: ${2:a} -> ${3:a}
+ $1 ${4} = ${5:undefined}
+snippet fn2
+ ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}
+ $1 ${5} = ${6:undefined}
+snippet ap
+ ${1:map} ${2:fn} ${3:list}
+snippet do
+ do
+
+snippet λ
+ \${1:x} -> ${2}
+snippet \
+ \${1:x} -> ${2}
+snippet <-
+ ${1:a} <- ${2:m a}
+snippet ←
+ ${1:a} <- ${2:m a}
+snippet ->
+ ${1:m a} -> ${2:a}
+snippet →
+ ${1:m a} -> ${2:a}
+snippet tup
+ (${1:a}, ${2:b})
+snippet tup2
+ (${1:a}, ${2:b}, ${3:c})
+snippet tup3
+ (${1:a}, ${2:b}, ${3:c}, ${4:d})
+snippet rec
+ ${1:Record} { ${2:recFieldA} = ${3:undefined}
+ , ${4:recFieldB} = ${5:undefined}
+ }
+snippet case
+ case ${1:something} of
+ ${2} -> ${3}
+snippet let
+ let ${1} = ${2}
+ in ${3}
+snippet where
+ where
+ ${1:fn} = ${2:undefined}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haxe.js b/src/fauxton/assets/js/libs/ace/snippets/haxe.js
new file mode 100644
index 000000000..b67f91eb0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haxe.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./haxe.snippets");
+exports.scope = "haxe";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/haxe.snippets b/src/fauxton/assets/js/libs/ace/snippets/haxe.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/haxe.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/html.js b/src/fauxton/assets/js/libs/ace/snippets/html.js
new file mode 100644
index 000000000..bac3bea37
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/html.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./html.snippets");
+exports.scope = "html";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/html.snippets b/src/fauxton/assets/js/libs/ace/snippets/html.snippets
new file mode 100644
index 000000000..0f75efd08
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/html.snippets
@@ -0,0 +1,828 @@
+# Some useful Unicode entities
+# Non-Breaking Space
+snippet nbs
+ &nbsp;
+# ←
+snippet left
+ &#x2190;
+# →
+snippet right
+ &#x2192;
+# ↑
+snippet up
+ &#x2191;
+# ↓
+snippet down
+ &#x2193;
+# ↩
+snippet return
+ &#x21A9;
+# ⇤
+snippet backtab
+ &#x21E4;
+# ⇥
+snippet tab
+ &#x21E5;
+# ⇧
+snippet shift
+ &#x21E7;
+# ⌃
+snippet ctrl
+ &#x2303;
+# ⌅
+snippet enter
+ &#x2305;
+# ⌘
+snippet cmd
+ &#x2318;
+# ⌥
+snippet option
+ &#x2325;
+# ⌦
+snippet delete
+ &#x2326;
+# ⌫
+snippet backspace
+ &#x232B;
+# ⎋
+snippet esc
+ &#x238B;
+# Generic Doctype
+snippet doctype HTML 4.01 Strict
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+snippet doctype HTML 4.01 Transitional
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+snippet doctype HTML 5
+ <!DOCTYPE HTML>
+snippet doctype XHTML 1.0 Frameset
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+snippet doctype XHTML 1.0 Strict
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+snippet doctype XHTML 1.0 Transitional
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+snippet doctype XHTML 1.1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+# HTML Doctype 4.01 Strict
+snippet docts
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+# HTML Doctype 4.01 Transitional
+snippet doct
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+# HTML Doctype 5
+snippet doct5
+ <!DOCTYPE HTML>
+# XHTML Doctype 1.0 Frameset
+snippet docxf
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+# XHTML Doctype 1.0 Strict
+snippet docxs
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+# XHTML Doctype 1.0 Transitional
+snippet docxt
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+# XHTML Doctype 1.1
+snippet docx
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+# Attributes
+snippet attr
+ ${1:attribute}="${2:property}"
+snippet attr+
+ ${1:attribute}="${2:property}" attr+${3}
+snippet .
+ class="${1}"${2}
+snippet #
+ id="${1}"${2}
+snippet alt
+ alt="${1}"${2}
+snippet charset
+ charset="${1:utf-8}"${2}
+snippet data
+ data-${1}="${2:$1}"${3}
+snippet for
+ for="${1}"${2}
+snippet height
+ height="${1}"${2}
+snippet href
+ href="${1:#}"${2}
+snippet lang
+ lang="${1:en}"${2}
+snippet media
+ media="${1}"${2}
+snippet name
+ name="${1}"${2}
+snippet rel
+ rel="${1}"${2}
+snippet scope
+ scope="${1:row}"${2}
+snippet src
+ src="${1}"${2}
+snippet title=
+ title="${1}"${2}
+snippet type
+ type="${1}"${2}
+snippet value
+ value="${1}"${2}
+snippet width
+ width="${1}"${2}
+# Elements
+snippet a
+ <a href="${1:#}">${2:$1}</a>
+snippet a.
+ <a class="${1}" href="${2:#}">${3:$1}</a>
+snippet a#
+ <a id="${1}" href="${2:#}">${3:$1}</a>
+snippet a:ext
+ <a href="http://${1:example.com}">${2:$1}</a>
+snippet a:mail
+ <a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
+snippet abbr
+ <abbr title="${1}">${2}</abbr>
+snippet address
+ <address>
+ ${1}
+ </address>
+snippet area
+ <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />
+snippet area+
+ <area shape="${1:rect}" coords="${2}" href="${3}" alt="${4}" />
+ area+${5}
+snippet area:c
+ <area shape="circle" coords="${1}" href="${2}" alt="${3}" />
+snippet area:d
+ <area shape="default" coords="${1}" href="${2}" alt="${3}" />
+snippet area:p
+ <area shape="poly" coords="${1}" href="${2}" alt="${3}" />
+snippet area:r
+ <area shape="rect" coords="${1}" href="${2}" alt="${3}" />
+snippet article
+ <article>
+ ${1}
+ </article>
+snippet article.
+ <article class="${1}">
+ ${2}
+ </article>
+snippet article#
+ <article id="${1}">
+ ${2}
+ </article>
+snippet aside
+ <aside>
+ ${1}
+ </aside>
+snippet aside.
+ <aside class="${1}">
+ ${2}
+ </aside>
+snippet aside#
+ <aside id="${1}">
+ ${2}
+ </aside>
+snippet audio
+ <audio src="${1}>${2}</audio>
+snippet b
+ <b>${1}</b>
+snippet base
+ <base href="${1}" target="${2}" />
+snippet bdi
+ <bdi>${1}</bdo>
+snippet bdo
+ <bdo dir="${1}">${2}</bdo>
+snippet bdo:l
+ <bdo dir="ltr">${1}</bdo>
+snippet bdo:r
+ <bdo dir="rtl">${1}</bdo>
+snippet blockquote
+ <blockquote>
+ ${1}
+ </blockquote>
+snippet body
+ <body>
+ ${1}
+ </body>
+snippet br
+ <br />${1}
+snippet button
+ <button type="${1:submit}">${2}</button>
+snippet button.
+ <button class="${1:button}" type="${2:submit}">${3}</button>
+snippet button#
+ <button id="${1}" type="${2:submit}">${3}</button>
+snippet button:s
+ <button type="submit">${1}</button>
+snippet button:r
+ <button type="reset">${1}</button>
+snippet canvas
+ <canvas>
+ ${1}
+ </canvas>
+snippet caption
+ <caption>${1}</caption>
+snippet cite
+ <cite>${1}</cite>
+snippet code
+ <code>${1}</code>
+snippet col
+ <col />${1}
+snippet col+
+ <col />
+ col+${1}
+snippet colgroup
+ <colgroup>
+ ${1}
+ </colgroup>
+snippet colgroup+
+ <colgroup>
+ <col />
+ col+${1}
+ </colgroup>
+snippet command
+ <command type="command" label="${1}" icon="${2}" />
+snippet command:c
+ <command type="checkbox" label="${1}" icon="${2}" />
+snippet command:r
+ <command type="radio" radiogroup="${1}" label="${2}" icon="${3}" />
+snippet datagrid
+ <datagrid>
+ ${1}
+ </datagrid>
+snippet datalist
+ <datalist>
+ ${1}
+ </datalist>
+snippet datatemplate
+ <datatemplate>
+ ${1}
+ </datatemplate>
+snippet dd
+ <dd>${1}</dd>
+snippet dd.
+ <dd class="${1}">${2}</dd>
+snippet dd#
+ <dd id="${1}">${2}</dd>
+snippet del
+ <del>${1}</del>
+snippet details
+ <details>${1}</details>
+snippet dfn
+ <dfn>${1}</dfn>
+snippet dialog
+ <dialog>
+ ${1}
+ </dialog>
+snippet div
+ <div>
+ ${1}
+ </div>
+snippet div.
+ <div class="${1}">
+ ${2}
+ </div>
+snippet div#
+ <div id="${1}">
+ ${2}
+ </div>
+snippet dl
+ <dl>
+ ${1}
+ </dl>
+snippet dl.
+ <dl class="${1}">
+ ${2}
+ </dl>
+snippet dl#
+ <dl id="${1}">
+ ${2}
+ </dl>
+snippet dl+
+ <dl>
+ <dt>${1}</dt>
+ <dd>${2}</dd>
+ dt+${3}
+ </dl>
+snippet dt
+ <dt>${1}</dt>
+snippet dt.
+ <dt class="${1}">${2}</dt>
+snippet dt#
+ <dt id="${1}">${2}</dt>
+snippet dt+
+ <dt>${1}</dt>
+ <dd>${2}</dd>
+ dt+${3}
+snippet em
+ <em>${1}</em>
+snippet embed
+ <embed src=${1} type="${2} />
+snippet fieldset
+ <fieldset>
+ ${1}
+ </fieldset>
+snippet fieldset.
+ <fieldset class="${1}">
+ ${2}
+ </fieldset>
+snippet fieldset#
+ <fieldset id="${1}">
+ ${2}
+ </fieldset>
+snippet fieldset+
+ <fieldset>
+ <legend><span>${1}</span></legend>
+ ${2}
+ </fieldset>
+ fieldset+${3}
+snippet figcaption
+ <figcaption>${1}</figcaption>
+snippet figure
+ <figure>${1}</figure>
+snippet footer
+ <footer>
+ ${1}
+ </footer>
+snippet footer.
+ <footer class="${1}">
+ ${2}
+ </footer>
+snippet footer#
+ <footer id="${1}">
+ ${2}
+ </footer>
+snippet form
+ <form action="${1}" method="${2:get}" accept-charset="utf-8">
+ ${3}
+ </form>
+snippet form.
+ <form class="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">
+ ${4}
+ </form>
+snippet form#
+ <form id="${1}" action="${2}" method="${3:get}" accept-charset="utf-8">
+ ${4}
+ </form>
+snippet h1
+ <h1>${1}</h1>
+snippet h1.
+ <h1 class="${1}">${2}</h1>
+snippet h1#
+ <h1 id="${1}">${2}</h1>
+snippet h2
+ <h2>${1}</h2>
+snippet h2.
+ <h2 class="${1}">${2}</h2>
+snippet h2#
+ <h2 id="${1}">${2}</h2>
+snippet h3
+ <h3>${1}</h3>
+snippet h3.
+ <h3 class="${1}">${2}</h3>
+snippet h3#
+ <h3 id="${1}">${2}</h3>
+snippet h4
+ <h4>${1}</h4>
+snippet h4.
+ <h4 class="${1}">${2}</h4>
+snippet h4#
+ <h4 id="${1}">${2}</h4>
+snippet h5
+ <h5>${1}</h5>
+snippet h5.
+ <h5 class="${1}">${2}</h5>
+snippet h5#
+ <h5 id="${1}">${2}</h5>
+snippet h6
+ <h6>${1}</h6>
+snippet h6.
+ <h6 class="${1}">${2}</h6>
+snippet h6#
+ <h6 id="${1}">${2}</h6>
+snippet head
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
+ ${2}
+ </head>
+snippet header
+ <header>
+ ${1}
+ </header>
+snippet header.
+ <header class="${1}">
+ ${2}
+ </header>
+snippet header#
+ <header id="${1}">
+ ${2}
+ </header>
+snippet hgroup
+ <hgroup>
+ ${1}
+ </hgroup>
+snippet hgroup.
+ <hgroup class="${1}>
+ ${2}
+ </hgroup>
+snippet hr
+ <hr />${1}
+snippet html
+ <html>
+ ${1}
+ </html>
+snippet xhtml
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ ${1}
+ </html>
+snippet html5
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
+ ${2:meta}
+ </head>
+ <body>
+ ${3:body}
+ </body>
+ </html>
+snippet i
+ <i>${1}</i>
+snippet iframe
+ <iframe src="${1}" frameborder="0"></iframe>${2}
+snippet iframe.
+ <iframe class="${1}" src="${2}" frameborder="0"></iframe>${3}
+snippet iframe#
+ <iframe id="${1}" src="${2}" frameborder="0"></iframe>${3}
+snippet img
+ <img src="${1}" alt="${2}" />${3}
+snippet img.
+ <img class="${1}" src="${2}" alt="${3}" />${4}
+snippet img#
+ <img id="${1}" src="${2}" alt="${3}" />${4}
+snippet input
+ <input type="${1:text/submit/hidden/button/image}" name="${2}" id="${3:$2}" value="${4}" />${5}
+snippet input.
+ <input class="${1}" type="${2:text/submit/hidden/button/image}" name="${3}" id="${4:$3}" value="${5}" />${6}
+snippet input:text
+ <input type="text" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:submit
+ <input type="submit" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:hidden
+ <input type="hidden" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:button
+ <input type="button" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:image
+ <input type="image" name="${1}" id="${2:$1}" src="${3}" alt="${4}" />${5}
+snippet input:checkbox
+ <input type="checkbox" name="${1}" id="${2:$1}" />${3}
+snippet input:radio
+ <input type="radio" name="${1}" id="${2:$1}" />${3}
+snippet input:color
+ <input type="color" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:date
+ <input type="date" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:datetime
+ <input type="datetime" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:datetime-local
+ <input type="datetime-local" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:email
+ <input type="email" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:file
+ <input type="file" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:month
+ <input type="month" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:number
+ <input type="number" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:password
+ <input type="password" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:range
+ <input type="range" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:reset
+ <input type="reset" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:search
+ <input type="search" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:time
+ <input type="time" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:url
+ <input type="url" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet input:week
+ <input type="week" name="${1}" id="${2:$1}" value="${3}" />${4}
+snippet ins
+ <ins>${1}</ins>
+snippet kbd
+ <kbd>${1}</kbd>
+snippet keygen
+ <keygen>${1}</keygen>
+snippet label
+ <label for="${2:$1}">${1}</label>
+snippet label:i
+ <label for="${2:$1}">${1}</label>
+ <input type="${3:text/submit/hidden/button}" name="${4:$2}" id="${5:$2}" value="${6}" />${7}
+snippet label:s
+ <label for="${2:$1}">${1}</label>
+ <select name="${3:$2}" id="${4:$2}">
+ <option value="${5}">${6:$5}</option>
+ </select>
+snippet legend
+ <legend>${1}</legend>
+snippet legend+
+ <legend><span>${1}</span></legend>
+snippet li
+ <li>${1}</li>
+snippet li.
+ <li class="${1}">${2}</li>
+snippet li+
+ <li>${1}</li>
+ li+${2}
+snippet lia
+ <li><a href="${2:#}">${1}</a></li>
+snippet lia+
+ <li><a href="${2:#}">${1}</a></li>
+ lia+${3}
+snippet link
+ <link rel="${1}" href="${2}" title="${3}" type="${4}" />${5}
+snippet link:atom
+ <link rel="alternate" href="${1:atom.xml}" title="Atom" type="application/atom+xml" />${2}
+snippet link:css
+ <link rel="stylesheet" href="${2:style.css}" type="text/css" media="${3:all}" />${4}
+snippet link:favicon
+ <link rel="shortcut icon" href="${1:favicon.ico}" type="image/x-icon" />${2}
+snippet link:rss
+ <link rel="alternate" href="${1:rss.xml}" title="RSS" type="application/atom+xml" />${2}
+snippet link:touch
+ <link rel="apple-touch-icon" href="${1:favicon.png}" />${2}
+snippet map
+ <map name="${1}">
+ ${2}
+ </map>
+snippet map.
+ <map class="${1}" name="${2}">
+ ${3}
+ </map>
+snippet map#
+ <map name="${1}" id="${2:$1}>
+ ${3}
+ </map>
+snippet map+
+ <map name="${1}">
+ <area shape="${2}" coords="${3}" href="${4}" alt="${5}" />${6}
+ </map>${7}
+snippet mark
+ <mark>${1}</mark>
+snippet menu
+ <menu>
+ ${1}
+ </menu>
+snippet menu:c
+ <menu type="context">
+ ${1}
+ </menu>
+snippet menu:t
+ <menu type="toolbar">
+ ${1}
+ </menu>
+snippet meta
+ <meta http-equiv="${1}" content="${2}" />${3}
+snippet meta:compat
+ <meta http-equiv="X-UA-Compatible" content="IE=${1:7,8,edge}" />${3}
+snippet meta:refresh
+ <meta http-equiv="refresh" content="text/html;charset=UTF-8" />${3}
+snippet meta:utf
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />${3}
+snippet meter
+ <meter>${1}</meter>
+snippet nav
+ <nav>
+ ${1}
+ </nav>
+snippet nav.
+ <nav class="${1}">
+ ${2}
+ </nav>
+snippet nav#
+ <nav id="${1}">
+ ${2}
+ </nav>
+snippet noscript
+ <noscript>
+ ${1}
+ </noscript>
+snippet object
+ <object data="${1}" type="${2}">
+ ${3}
+ </object>${4}
+# Embed QT Movie
+snippet movie
+ <object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
+ codebase="http://www.apple.com/qtactivex/qtplugin.cab">
+ <param name="src" value="$1" />
+ <param name="controller" value="$4" />
+ <param name="autoplay" value="$5" />
+ <embed src="${1:movie.mov}"
+ width="${2:320}" height="${3:240}"
+ controller="${4:true}" autoplay="${5:true}"
+ scale="tofit" cache="true"
+ pluginspage="http://www.apple.com/quicktime/download/" />
+ </object>${6}
+snippet ol
+ <ol>
+ ${1}
+ </ol>
+snippet ol.
+ <ol class="${1}>
+ ${2}
+ </ol>
+snippet ol#
+ <ol id="${1}>
+ ${2}
+ </ol>
+snippet ol+
+ <ol>
+ <li>${1}</li>
+ li+${2}
+ </ol>
+snippet opt
+ <option value="${1}">${2:$1}</option>
+snippet opt+
+ <option value="${1}">${2:$1}</option>
+ opt+${3}
+snippet optt
+ <option>${1}</option>
+snippet optgroup
+ <optgroup>
+ <option value="${1}">${2:$1}</option>
+ opt+${3}
+ </optgroup>
+snippet output
+ <output>${1}</output>
+snippet p
+ <p>${1}</p>
+snippet param
+ <param name="${1}" value="${2}" />${3}
+snippet pre
+ <pre>
+ ${1}
+ </pre>
+snippet progress
+ <progress>${1}</progress>
+snippet q
+ <q>${1}</q>
+snippet rp
+ <rp>${1}</rp>
+snippet rt
+ <rt>${1}</rt>
+snippet ruby
+ <ruby>
+ <rp><rt>${1}</rt></rp>
+ </ruby>
+snippet s
+ <s>${1}</s>
+snippet samp
+ <samp>
+ ${1}
+ </samp>
+snippet script
+ <script type="text/javascript" charset="utf-8">
+ ${1}
+ </script>
+snippet scriptsrc
+ <script src="${1}.js" type="text/javascript" charset="utf-8"></script>
+snippet section
+ <section>
+ ${1}
+ </section>
+snippet section.
+ <section class="${1}">
+ ${2}
+ </section>
+snippet section#
+ <section id="${1}">
+ ${2}
+ </section>
+snippet select
+ <select name="${1}" id="${2:$1}">
+ ${3}
+ </select>
+snippet select.
+ <select name="${1}" id="${2:$1}" class="${3}>
+ ${4}
+ </select>
+snippet select+
+ <select name="${1}" id="${2:$1}">
+ <option value="${3}">${4:$3}</option>
+ opt+${5}
+ </select>
+snippet small
+ <small>${1}</small>
+snippet source
+ <source src="${1}" type="${2}" media="${3}" />
+snippet span
+ <span>${1}</span>
+snippet strong
+ <strong>${1}</strong>
+snippet style
+ <style type="text/css" media="${1:all}">
+ ${2}
+ </style>
+snippet sub
+ <sub>${1}</sub>
+snippet summary
+ <summary>
+ ${1}
+ </summary>
+snippet sup
+ <sup>${1}</sup>
+snippet table
+ <table border="${1:0}">
+ ${2}
+ </table>
+snippet table.
+ <table class="${1}" border="${2:0}">
+ ${3}
+ </table>
+snippet table#
+ <table id="${1}" border="${2:0}">
+ ${3}
+ </table>
+snippet tbody
+ <tbody>
+ ${1}
+ </tbody>
+snippet td
+ <td>${1}</td>
+snippet td.
+ <td class="${1}">${2}</td>
+snippet td#
+ <td id="${1}">${2}</td>
+snippet td+
+ <td>${1}</td>
+ td+${2}
+snippet textarea
+ <textarea name="${1}" id=${2:$1} rows="${3:8}" cols="${4:40}">${5}</textarea>${6}
+snippet tfoot
+ <tfoot>
+ ${1}
+ </tfoot>
+snippet th
+ <th>${1}</th>
+snippet th.
+ <th class="${1}">${2}</th>
+snippet th#
+ <th id="${1}">${2}</th>
+snippet th+
+ <th>${1}</th>
+ th+${2}
+snippet thead
+ <thead>
+ ${1}
+ </thead>
+snippet time
+ <time datetime="${1}" pubdate="${2:$1}>${3:$1}</time>
+snippet title
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
+snippet tr
+ <tr>
+ ${1}
+ </tr>
+snippet tr+
+ <tr>
+ <td>${1}</td>
+ td+${2}
+ </tr>
+snippet track
+ <track src="${1}" srclang="${2}" label="${3}" default="${4:default}>${5}</track>${6}
+snippet ul
+ <ul>
+ ${1}
+ </ul>
+snippet ul.
+ <ul class="${1}">
+ ${2}
+ </ul>
+snippet ul#
+ <ul id="${1}">
+ ${2}
+ </ul>
+snippet ul+
+ <ul>
+ <li>${1}</li>
+ li+${2}
+ </ul>
+snippet var
+ <var>${1}</var>
+snippet video
+ <video src="${1} height="${2}" width="${3}" preload="${5:none}" autoplay="${6:autoplay}>${7}</video>${8}
+snippet wbr
+ <wbr />${1}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/html_ruby.js b/src/fauxton/assets/js/libs/ace/snippets/html_ruby.js
new file mode 100644
index 000000000..d985d568f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/html_ruby.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./html_ruby.snippets");
+exports.scope = "html_ruby";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/html_ruby.snippets b/src/fauxton/assets/js/libs/ace/snippets/html_ruby.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/html_ruby.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/htmldjango.snippets b/src/fauxton/assets/js/libs/ace/snippets/htmldjango.snippets
new file mode 100644
index 000000000..38f836bf8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/htmldjango.snippets
@@ -0,0 +1,136 @@
+# Generic tags
+
+snippet %
+ {% ${1} %}${2}
+snippet %%
+ {% ${1:tag_name} %}
+ ${2}
+ {% end$1 %}
+snippet {
+ {{ ${1} }}${2}
+# Template Tags
+
+snippet autoescape
+ {% autoescape ${1:off} %}
+ ${2}
+ {% endautoescape %}
+snippet block
+ {% block ${1} %}
+ ${2}
+ {% endblock %}
+snippet #
+ {# ${1:comment} #}
+snippet comment
+ {% comment %}
+ ${1}
+ {% endcomment %}
+snippet cycle
+ {% cycle ${1:val1} ${2:val2} ${3:as ${4}} %}
+snippet debug
+ {% debug %}
+snippet extends
+ {% extends "${1:base.html}" %}
+snippet filter
+ {% filter ${1} %}
+ ${2}
+ {% endfilter %}
+snippet firstof
+ {% firstof ${1} %}
+snippet for
+ {% for ${1} in ${2} %}
+ ${3}
+ {% endfor %}
+snippet empty
+ {% empty %}
+ ${1}
+snippet if
+ {% if ${1} %}
+ ${2}
+ {% endif %}
+snippet else
+ {% else %}
+ ${1}
+snippet ifchanged
+ {% ifchanged %}${1}{% endifchanged %}
+snippet ifequal
+ {% ifequal ${1} ${2} %}
+ ${3}
+ {% endifequal %}
+snippet ifnotequal
+ {% ifnotequal ${1} ${2} %}
+ ${3}
+ {% endifnotequal %}
+snippet include
+ {% include "${1}" %}
+snippet load
+ {% load ${1} %}
+snippet now
+ {% now "${1:jS F Y H:i}" %}
+snippet regroup
+ {% regroup ${1} by ${2} as ${3} %}
+snippet spaceless
+ {% spaceless %}${1}{% endspaceless %}
+snippet ssi
+ {% ssi ${1} %}
+snippet trans
+ {% trans "${1:string}" %}
+snippet url
+ {% url ${1} as ${2} %}
+snippet widthratio
+ {% widthratio ${1:this_value} ${2:max_value} ${3:100} %}
+snippet with
+ {% with ${1} as ${2} %}
+
+# Template Filters
+
+# Note: Since SnipMate can't determine which template filter you are
+# expanding without the "|" character, these do not add the "|"
+# character. These save a few keystrokes still.
+
+# Note: Template tags that take no arguments are not implemented.
+
+snippet add
+ add:"${1}"
+snippet center
+ center:"${1}"
+snippet cut
+ cut:"${1}"
+snippet date
+ date:"${1}"
+snippet default
+ default:"${1}"
+snippet defaultifnone
+ default_if_none:"${1}"
+snippet dictsort
+ dictsort:"${1}"
+snippet dictsortrev
+ dictsortreversed:"${1}"
+snippet divisibleby
+ divisibleby:"${1}"
+snippet floatformat
+ floatformat:"${1}"
+snippet getdigit
+ get_digit:"${1}"
+snippet join
+ join:"${1}"
+snippet lengthis
+ length_is:"${1}"
+snippet pluralize
+ pluralize:"${1}"
+snippet removetags
+ removetags:"${1}"
+snippet slice
+ slice:"${1}"
+snippet stringformat
+ stringformat:"${1}"
+snippet time
+ time:"${1}"
+snippet truncatewords
+ truncatewords:${1}
+snippet truncatewordshtml
+ truncatewords_html:${1}
+snippet urlizetrunc
+ urlizetrunc:${1}
+snippet wordwrap
+ wordwrap:${1}
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/htmltornado.snippets b/src/fauxton/assets/js/libs/ace/snippets/htmltornado.snippets
new file mode 100644
index 000000000..de9915363
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/htmltornado.snippets
@@ -0,0 +1,55 @@
+# Generic tags
+
+snippet {
+ {{ ${1} }}
+
+# Template tags
+
+snippet extends
+ {% extends "${1:base.html}" %}
+snippet autoescape
+ {% autoescape ${1:xhtml_escape | None} %}
+snippet apply
+ {% apply ${1:function} %}
+ ${2}
+ {% end %}
+snippet block
+ {% block ${1} %}
+ ${2}
+ {% end %}
+snippet for
+ {% for ${1:item} in ${2} %}
+ ${3}
+ {% end %}
+snippet from
+ {% from ${1:x} import ${2:y} %}
+snippet if
+ {% if ${1:condition} %}
+ ${2}
+ {% end %}
+snippet elif
+ {% elif ${1:condition} %}
+snippet else
+ {% else %}
+snippet import
+ {% import ${1:module} %}
+snippet include
+ {% include "${1:filename}" %}
+snippet module
+ {% module ${1:expression} %}
+snippet raw
+ {% raw ${1:expression} %}
+snippet set
+ {% set ${1:x} = ${2:y} %}
+snippet try
+ {% try %}
+ ${1}
+ {% except %}
+ ${2}
+ {% finallly %}
+ ${3}
+ {% end %}
+snippet while
+ {% while ${1:condition} %}
+ ${2}
+ {% end %}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ini.js b/src/fauxton/assets/js/libs/ace/snippets/ini.js
new file mode 100644
index 000000000..df09d575c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ini.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ini.snippets");
+exports.scope = "ini";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ini.snippets b/src/fauxton/assets/js/libs/ace/snippets/ini.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ini.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jade.js b/src/fauxton/assets/js/libs/ace/snippets/jade.js
new file mode 100644
index 000000000..ca83d4836
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jade.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./jade.snippets");
+exports.scope = "jade";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jade.snippets b/src/fauxton/assets/js/libs/ace/snippets/jade.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jade.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/java.js b/src/fauxton/assets/js/libs/ace/snippets/java.js
new file mode 100644
index 000000000..7d05e84a6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/java.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./java.snippets");
+exports.scope = "java";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/java.snippets b/src/fauxton/assets/js/libs/ace/snippets/java.snippets
new file mode 100644
index 000000000..854f14ac2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/java.snippets
@@ -0,0 +1,240 @@
+## Access Modifiers
+snippet po
+ protected
+snippet pu
+ public
+snippet pr
+ private
+##
+## Annotations
+snippet before
+ @Before
+ static void ${1:intercept}(${2:args}) { ${3} }
+snippet mm
+ @ManyToMany
+ ${1}
+snippet mo
+ @ManyToOne
+ ${1}
+snippet om
+ @OneToMany${1:(cascade=CascadeType.ALL)}
+ ${2}
+snippet oo
+ @OneToOne
+ ${1}
+##
+## Basic Java packages and import
+snippet im
+ import
+snippet j.b
+ java.beans.
+snippet j.i
+ java.io.
+snippet j.m
+ java.math.
+snippet j.n
+ java.net.
+snippet j.u
+ java.util.
+##
+## Class
+snippet cl
+ class ${1:`Filename("", "untitled")`} ${2}
+snippet in
+ interface ${1:`Filename("", "untitled")`} ${2:extends Parent}${3}
+snippet tc
+ public class ${1:`Filename()`} extends ${2:TestCase}
+##
+## Class Enhancements
+snippet ext
+ extends
+snippet imp
+ implements
+##
+## Comments
+snippet /*
+ /*
+ * ${1}
+ */
+##
+## Constants
+snippet co
+ static public final ${1:String} ${2:var} = ${3};${4}
+snippet cos
+ static public final String ${1:var} = "${2}";${3}
+##
+## Control Statements
+snippet case
+ case ${1}:
+ ${2}
+snippet def
+ default:
+ ${2}
+snippet el
+ else
+snippet elif
+ else if (${1}) ${2}
+snippet if
+ if (${1}) ${2}
+snippet sw
+ switch (${1}) {
+ ${2}
+ }
+##
+## Create a Method
+snippet m
+ ${1:void} ${2:method}(${3}) ${4:throws }${5}
+##
+## Create a Variable
+snippet v
+ ${1:String} ${2:var}${3: = null}${4};${5}
+##
+## Enhancements to Methods, variables, classes, etc.
+snippet ab
+ abstract
+snippet fi
+ final
+snippet st
+ static
+snippet sy
+ synchronized
+##
+## Error Methods
+snippet err
+ System.err.print("${1:Message}");
+snippet errf
+ System.err.printf("${1:Message}", ${2:exception});
+snippet errln
+ System.err.println("${1:Message}");
+##
+## Exception Handling
+snippet as
+ assert ${1:test} : "${2:Failure message}";${3}
+snippet ca
+ catch(${1:Exception} ${2:e}) ${3}
+snippet thr
+ throw
+snippet ths
+ throws
+snippet try
+ try {
+ ${3}
+ } catch(${1:Exception} ${2:e}) {
+ }
+snippet tryf
+ try {
+ ${3}
+ } catch(${1:Exception} ${2:e}) {
+ } finally {
+ }
+##
+## Find Methods
+snippet findall
+ List<${1:listName}> ${2:items} = ${1}.findAll();${3}
+snippet findbyid
+ ${1:var} ${2:item} = ${1}.findById(${3});${4}
+##
+## Javadocs
+snippet /**
+ /**
+ * ${1}
+ */
+snippet @au
+ @author `system("grep \`id -un\` /etc/passwd | cut -d \":\" -f5 | cut -d \",\" -f1")`
+snippet @br
+ @brief ${1:Description}
+snippet @fi
+ @file ${1:`Filename()`}.java
+snippet @pa
+ @param ${1:param}
+snippet @re
+ @return ${1:param}
+##
+## Logger Methods
+snippet debug
+ Logger.debug(${1:param});${2}
+snippet error
+ Logger.error(${1:param});${2}
+snippet info
+ Logger.info(${1:param});${2}
+snippet warn
+ Logger.warn(${1:param});${2}
+##
+## Loops
+snippet enfor
+ for (${1} : ${2}) ${3}
+snippet for
+ for (${1}; ${2}; ${3}) ${4}
+snippet wh
+ while (${1}) ${2}
+##
+## Main method
+snippet main
+ public static void main (String[] args) {
+ ${1:/* code */}
+ }
+##
+## Print Methods
+snippet print
+ System.out.print("${1:Message}");
+snippet printf
+ System.out.printf("${1:Message}", ${2:args});
+snippet println
+ System.out.println(${1});
+##
+## Render Methods
+snippet ren
+ render(${1:param});${2}
+snippet rena
+ renderArgs.put("${1}", ${2});${3}
+snippet renb
+ renderBinary(${1:param});${2}
+snippet renj
+ renderJSON(${1:param});${2}
+snippet renx
+ renderXml(${1:param});${2}
+##
+## Setter and Getter Methods
+snippet set
+ ${1:public} void set${3:}(${2:String} ${4:}){
+ this.$4 = $4;
+ }
+snippet get
+ ${1:public} ${2:String} get${3:}(){
+ return this.${4:};
+ }
+##
+## Terminate Methods or Loops
+snippet re
+ return
+snippet br
+ break;
+##
+## Test Methods
+snippet t
+ public void test${1:Name}() throws Exception {
+ ${2}
+ }
+snippet test
+ @Test
+ public void test${1:Name}() throws Exception {
+ ${2}
+ }
+##
+## Utils
+snippet Sc
+ Scanner
+##
+## Miscellaneous
+snippet action
+ public static void ${1:index}(${2:args}) { ${3} }
+snippet rnf
+ notFound(${1:param});${2}
+snippet rnfin
+ notFoundIfNull(${1:param});${2}
+snippet rr
+ redirect(${1:param});${2}
+snippet ru
+ unauthorized(${1:param});${2}
+snippet unless
+ (unless=${1:param});${2}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/javascript-jquery.snippets b/src/fauxton/assets/js/libs/ace/snippets/javascript-jquery.snippets
new file mode 100644
index 000000000..ce247a005
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/javascript-jquery.snippets
@@ -0,0 +1,589 @@
+snippet add
+ ${1:obj}.add('${2:selector expression}')${3}
+snippet addClass
+ ${1:obj}.addClass('${2:class name}')${3}
+snippet after
+ ${1:obj}.after('${2:Some text <b>and bold!</b>}')${3}
+snippet ajax
+ $.ajax({
+ url: '${1:mydomain.com/url}',
+ type: '${2:POST}',
+ dataType: '${3:xml/html/script/json}',
+ data: $.param( $('${4:Element or Expression}') ),
+ complete: function (jqXHR, textStatus) {
+ ${5:// callback}
+ },
+ success: function (data, textStatus, jqXHR) {
+ ${6:// success callback}
+ },
+ error: function (jqXHR, textStatus, errorThrown) {
+ ${7:// error callback}
+ }
+ });
+snippet ajaxcomplete
+ ${1:obj}.ajaxComplete(function (${1:e}, xhr, settings) {
+ ${2:// callback}
+ });
+snippet ajaxerror
+ ${1:obj}.ajaxError(function (${1:e}, xhr, settings, thrownError) {
+ ${2:// error callback}
+ });
+ ${3}
+snippet ajaxget
+ $.get('${1:mydomain.com/url}',
+ ${2:{ param1: value1 },}
+ function (data, textStatus, jqXHR) {
+ ${3:// success callback}
+ }
+ );
+snippet ajaxpost
+ $.post('${1:mydomain.com/url}',
+ ${2:{ param1: value1 },}
+ function (data, textStatus, jqXHR) {
+ ${3:// success callback}
+ }
+ );
+snippet ajaxprefilter
+ $.ajaxPrefilter(function (${1:options}, ${2:originalOptions}, jqXHR) {
+ ${3: // Modify options, control originalOptions, store jqXHR, etc}
+ });
+snippet ajaxsend
+ ${1:obj}.ajaxSend(function (${1:request, settings}) {
+ ${2:// error callback}
+ });
+ ${3}
+snippet ajaxsetup
+ $.ajaxSetup({
+ url: "${1:mydomain.com/url}",
+ type: "${2:POST}",
+ dataType: "${3:xml/html/script/json}",
+ data: $.param( $("${4:Element or Expression}") ),
+ complete: function (jqXHR, textStatus) {
+ ${5:// callback}
+ },
+ success: function (data, textStatus, jqXHR) {
+ ${6:// success callback}
+ },
+ error: function (jqXHR, textStatus, errorThrown) {
+ ${7:// error callback}
+ }
+ });
+snippet ajaxstart
+ $.ajaxStart(function () {
+ ${1:// handler for when an AJAX call is started and no other AJAX calls are in progress};
+ });
+ ${2}
+snippet ajaxstop
+ $.ajaxStop(function () {
+ ${1:// handler for when all AJAX calls have been completed};
+ });
+ ${2}
+snippet ajaxsuccess
+ $.ajaxSuccess(function (${1:e}, xhr, settings) {
+ ${2:// handler for when any AJAX call is successfully completed};
+ });
+ ${2}
+snippet andself
+ ${1:obj}.andSelf()${2}
+snippet animate
+ ${1:obj}.animate({${2:param1: value1, param2: value2}}, ${3:speed})${4}
+snippet append
+ ${1:obj}.append('${2:Some text <b>and bold!</b>}')${3}
+snippet appendTo
+ ${1:obj}.appendTo('${2:selector expression}')${3}
+snippet attr
+ ${1:obj}.attr('${2:attribute}', '${3:value}')${4}
+snippet attrm
+ ${1:obj}.attr({'${2:attr1}': '${3:value1}', '${4:attr2}': '${5:value2}'})${6}
+snippet before
+ ${1:obj}.before('${2:Some text <b>and bold!</b>}')${3}
+snippet bind
+ ${1:obj}.bind('${2:event name}', function (${3:e}) {
+ ${4:// event handler}
+ });
+snippet blur
+ ${1:obj}.blur(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet C
+ $.Callbacks()${1}
+snippet Cadd
+ ${1:callbacks}.add(${2:callbacks})${3}
+snippet Cdis
+ ${1:callbacks}.disable()${2}
+snippet Cempty
+ ${1:callbacks}.empty()${2}
+snippet Cfire
+ ${1:callbacks}.fire(${2:args})${3}
+snippet Cfired
+ ${1:callbacks}.fired()${2}
+snippet Cfirew
+ ${1:callbacks}.fireWith(${2:this}, ${3:args})${4}
+snippet Chas
+ ${1:callbacks}.has(${2:callback})${3}
+snippet Clock
+ ${1:callbacks}.lock()${2}
+snippet Clocked
+ ${1:callbacks}.locked()${2}
+snippet Crem
+ ${1:callbacks}.remove(${2:callbacks})${3}
+snippet change
+ ${1:obj}.change(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet children
+ ${1:obj}.children('${2:selector expression}')${3}
+snippet clearq
+ ${1:obj}.clearQueue(${2:'queue name'})${3}
+snippet click
+ ${1:obj}.click(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet clone
+ ${1:obj}.clone()${2}
+snippet contains
+ $.contains(${1:container}, ${2:contents});
+snippet css
+ ${1:obj}.css('${2:attribute}', '${3:value}')${4}
+snippet csshooks
+ $.cssHooks['${1:CSS prop}'] = {
+ get: function (elem, computed, extra) {
+ ${2: // handle getting the CSS property}
+ },
+ set: function (elem, value) {
+ ${3: // handle setting the CSS value}
+ }
+ };
+snippet cssm
+ ${1:obj}.css({${2:attribute1}: '${3:value1}', ${4:attribute2}: '${5:value2}'})${6}
+snippet D
+ $.Deferred()${1}
+snippet Dalways
+ ${1:deferred}.always(${2:callbacks})${3}
+snippet Ddone
+ ${1:deferred}.done(${2:callbacks})${3}
+snippet Dfail
+ ${1:deferred}.fail(${2:callbacks})${3}
+snippet Disrej
+ ${1:deferred}.isRejected()${2}
+snippet Disres
+ ${1:deferred}.isResolved()${2}
+snippet Dnotify
+ ${1:deferred}.notify(${2:args})${3}
+snippet Dnotifyw
+ ${1:deferred}.notifyWith(${2:this}, ${3:args})${4}
+snippet Dpipe
+ ${1:deferred}.then(${2:doneFilter}, ${3:failFilter}, ${4:progressFilter})${5}
+snippet Dprog
+ ${1:deferred}.progress(${2:callbacks})${3}
+snippet Dprom
+ ${1:deferred}.promise(${2:target})${3}
+snippet Drej
+ ${1:deferred}.reject(${2:args})${3}
+snippet Drejw
+ ${1:deferred}.rejectWith(${2:this}, ${3:args})${4}
+snippet Dres
+ ${1:deferred}.resolve(${2:args})${3}
+snippet Dresw
+ ${1:deferred}.resolveWith(${2:this}, ${3:args})${4}
+snippet Dstate
+ ${1:deferred}.state()${2}
+snippet Dthen
+ ${1:deferred}.then(${2:doneCallbacks}, ${3:failCallbacks}, ${4:progressCallbacks})${5}
+snippet Dwhen
+ $.when(${1:deferreds})${2}
+snippet data
+ ${1:obj}.data(${2:obj})${3}
+snippet dataa
+ $.data('${1:selector expression}', '${2:key}'${3:, 'value'})${4}
+snippet dblclick
+ ${1:obj}.dblclick(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet delay
+ ${1:obj}.delay('${2:slow/400/fast}'${3:, 'queue name'})${4}
+snippet dele
+ ${1:obj}.delegate('${2:selector expression}', '${3:event name}', function (${4:e}) {
+ ${5:// event handler}
+ });
+snippet deq
+ ${1:obj}.dequeue(${2:'queue name'})${3}
+snippet deqq
+ $.dequeue('${1:selector expression}'${2:, 'queue name'})${3}
+snippet detach
+ ${1:obj}.detach('${2:selector expression}')${3}
+snippet die
+ ${1:obj}.die(${2:event}, ${3:handler})${4}
+snippet each
+ ${1:obj}.each(function (index) {
+ ${2:this.innerHTML = this + " is the element, " + index + " is the position";}
+ });
+snippet el
+ $('<${1}/>'${2:, {}})${3}
+snippet eltrim
+ $.trim('${1:string}')${2}
+snippet empty
+ ${1:obj}.empty()${2}
+snippet end
+ ${1:obj}.end()${2}
+snippet eq
+ ${1:obj}.eq(${2:element index})${3}
+snippet error
+ ${1:obj}.error(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet eventsmap
+ {
+ :f${1}
+ }
+snippet extend
+ $.extend(${1:true, }${2:target}, ${3:obj})${4}
+snippet fadein
+ ${1:obj}.fadeIn('${2:slow/400/fast}')${3}
+snippet fadeinc
+ ${1:obj}.fadeIn('slow/400/fast', function () {
+ ${2:// callback};
+ });
+snippet fadeout
+ ${1:obj}.fadeOut('${2:slow/400/fast}')${3}
+snippet fadeoutc
+ ${1:obj}.fadeOut('slow/400/fast', function () {
+ ${2:// callback};
+ });
+snippet fadeto
+ ${1:obj}.fadeTo('${2:slow/400/fast}', ${3:0.5})${4}
+snippet fadetoc
+ ${1:obj}.fadeTo('slow/400/fast', ${2:0.5}, function () {
+ ${3:// callback};
+ });
+snippet filter
+ ${1:obj}.filter('${2:selector expression}')${3}
+snippet filtert
+ ${1:obj}.filter(function (${2:index}) {
+ ${3:// test code}
+ })${4}
+snippet find
+ ${1:obj}.find('${2:selector expression}')${3}
+snippet focus
+ ${1:obj}.focus(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet focusin
+ ${1:obj}.focusIn(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet focusout
+ ${1:obj}.focusOut(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet get
+ ${1:obj}.get(${2:element index})${3}
+snippet getjson
+ $.getJSON('${1:mydomain.com/url}',
+ ${2:{ param1: value1 },}
+ function (data, textStatus, jqXHR) {
+ ${3:// success callback}
+ }
+ );
+snippet getscript
+ $.getScript('${1:mydomain.com/url}', function (script, textStatus, jqXHR) {
+ ${2:// callback}
+ });
+snippet grep
+ $.grep(${1:array}, function (item, index) {
+ ${2:// test code}
+ }${3:, true});
+snippet hasc
+ ${1:obj}.hasClass('${2:className}')${3}
+snippet hasd
+ $.hasData('${1:selector expression}');
+snippet height
+ ${1:obj}.height(${2:integer})${3}
+snippet hide
+ ${1:obj}.hide('${2:slow/400/fast}')${3}
+snippet hidec
+ ${1:obj}.hide('${2:slow/400/fast}', function () {
+ ${3:// callback}
+ });
+snippet hover
+ ${1:obj}.hover(function (${2:e}) {
+ ${3:// event handler}
+ }, function ($2) {
+ ${4:// event handler}
+ });${5}
+snippet html
+ ${1:obj}.html('${2:Some text <b>and bold!</b>}')${3}
+snippet inarr
+ $.inArray(${1:value}, ${2:array});
+snippet insa
+ ${1:obj}.insertAfter('${2:selector expression}')${3}
+snippet insb
+ ${1:obj}.insertBefore('${2:selector expression}')${3}
+snippet is
+ ${1:obj}.is('${2:selector expression}')${3}
+snippet isarr
+ $.isArray(${1:obj})${2}
+snippet isempty
+ $.isEmptyObject(${1:obj})${2}
+snippet isfunc
+ $.isFunction(${1:obj})${2}
+snippet isnum
+ $.isNumeric(${1:value})${2}
+snippet isobj
+ $.isPlainObject(${1:obj})${2}
+snippet iswin
+ $.isWindow(${1:obj})${2}
+snippet isxml
+ $.isXMLDoc(${1:node})${2}
+snippet jj
+ $('${1:selector}')${2}
+snippet kdown
+ ${1:obj}.keydown(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet kpress
+ ${1:obj}.keypress(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet kup
+ ${1:obj}.keyup(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet last
+ ${1:obj}.last('${1:selector expression}')${3}
+snippet live
+ ${1:obj}.live('${2:events}', function (${3:e}) {
+ ${4:// event handler}
+ });
+snippet load
+ ${1:obj}.load(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet loadf
+ ${1:obj}.load('${2:mydomain.com/url}',
+ ${2:{ param1: value1 },}
+ function (responseText, textStatus, xhr) {
+ ${3:// success callback}
+ }
+ });
+snippet makearray
+ $.makeArray(${1:obj});
+snippet map
+ ${1:obj}.map(function (${2:index}, ${3:element}) {
+ ${4:// callback}
+ });
+snippet mapp
+ $.map(${1:arrayOrObject}, function (${2:value}, ${3:indexOrKey}) {
+ ${4:// callback}
+ });
+snippet merge
+ $.merge(${1:target}, ${2:original});
+snippet mdown
+ ${1:obj}.mousedown(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet menter
+ ${1:obj}.mouseenter(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet mleave
+ ${1:obj}.mouseleave(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet mmove
+ ${1:obj}.mousemove(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet mout
+ ${1:obj}.mouseout(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet mover
+ ${1:obj}.mouseover(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet mup
+ ${1:obj}.mouseup(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet next
+ ${1:obj}.next('${2:selector expression}')${3}
+snippet nexta
+ ${1:obj}.nextAll('${2:selector expression}')${3}
+snippet nextu
+ ${1:obj}.nextUntil('${2:selector expression}'${3:, 'filter expression'})${4}
+snippet not
+ ${1:obj}.not('${2:selector expression}')${3}
+snippet off
+ ${1:obj}.off('${2:events}', '${3:selector expression}'${4:, handler})${5}
+snippet offset
+ ${1:obj}.offset()${2}
+snippet offsetp
+ ${1:obj}.offsetParent()${2}
+snippet on
+ ${1:obj}.on('${2:events}', '${3:selector expression}', function (${4:e}) {
+ ${5:// event handler}
+ });
+snippet one
+ ${1:obj}.one('${2:event name}', function (${3:e}) {
+ ${4:// event handler}
+ });
+snippet outerh
+ ${1:obj}.outerHeight()${2}
+snippet outerw
+ ${1:obj}.outerWidth()${2}
+snippet param
+ $.param(${1:obj})${2}
+snippet parent
+ ${1:obj}.parent('${2:selector expression}')${3}
+snippet parents
+ ${1:obj}.parents('${2:selector expression}')${3}
+snippet parentsu
+ ${1:obj}.parentsUntil('${2:selector expression}'${3:, 'filter expression'})${4}
+snippet parsejson
+ $.parseJSON(${1:data})${2}
+snippet parsexml
+ $.parseXML(${1:data})${2}
+snippet pos
+ ${1:obj}.position()${2}
+snippet prepend
+ ${1:obj}.prepend('${2:Some text <b>and bold!</b>}')${3}
+snippet prependto
+ ${1:obj}.prependTo('${2:selector expression}')${3}
+snippet prev
+ ${1:obj}.prev('${2:selector expression}')${3}
+snippet preva
+ ${1:obj}.prevAll('${2:selector expression}')${3}
+snippet prevu
+ ${1:obj}.prevUntil('${2:selector expression}'${3:, 'filter expression'})${4}
+snippet promise
+ ${1:obj}.promise(${2:'fx'}, ${3:target})${4}
+snippet prop
+ ${1:obj}.prop('${2:property name}')${3}
+snippet proxy
+ $.proxy(${1:function}, ${2:this})${3}
+snippet pushstack
+ ${1:obj}.pushStack(${2:elements})${3}
+snippet queue
+ ${1:obj}.queue(${2:name}${3:, newQueue})${4}
+snippet queuee
+ $.queue(${1:element}${2:, name}${3:, newQueue})${4}
+snippet ready
+ $(function () {
+ ${1}
+ });
+snippet rem
+ ${1:obj}.remove()${2}
+snippet rema
+ ${1:obj}.removeAttr('${2:attribute name}')${3}
+snippet remc
+ ${1:obj}.removeClass('${2:class name}')${3}
+snippet remd
+ ${1:obj}.removeData('${2:key name}')${3}
+snippet remdd
+ $.removeData(${1:element}${2:, 'key name}')${3}
+snippet remp
+ ${1:obj}.removeProp('${2:property name}')${3}
+snippet repa
+ ${1:obj}.replaceAll(${2:target})${3}
+snippet repw
+ ${1:obj}.replaceWith(${2:content})${3}
+snippet reset
+ ${1:obj}.reset(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet resize
+ ${1:obj}.resize(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet scroll
+ ${1:obj}.scroll(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet scrolll
+ ${1:obj}.scrollLeft(${2:value})${3}
+snippet scrollt
+ ${1:obj}.scrollTop(${2:value})${3}
+snippet sdown
+ ${1:obj}.slideDown('${2:slow/400/fast}')${3}
+snippet sdownc
+ ${1:obj}.slideDown('${2:slow/400/fast}', function () {
+ ${3:// callback};
+ });
+snippet select
+ ${1:obj}.select(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet serialize
+ ${1:obj}.serialize()${2}
+snippet serializea
+ ${1:obj}.serializeArray()${2}
+snippet show
+ ${1:obj}.show('${2:slow/400/fast}')${3}
+snippet showc
+ ${1:obj}.show('${2:slow/400/fast}', function () {
+ ${3:// callback}
+ });
+snippet sib
+ ${1:obj}.siblings('${2:selector expression}')${3}
+snippet size
+ ${1:obj}.size()${2}
+snippet slice
+ ${1:obj}.slice(${2:start}${3:, end})${4}
+snippet stoggle
+ ${1:obj}.slideToggle('${2:slow/400/fast}')${3}
+snippet stop
+ ${1:obj}.stop('${2:queue}', ${3:false}, ${4:false})${5}
+snippet submit
+ ${1:obj}.submit(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet sup
+ ${1:obj}.slideUp('${2:slow/400/fast}')${3}
+snippet supc
+ ${1:obj}.slideUp('${2:slow/400/fast}', function () {
+ ${3:// callback};
+ });
+snippet text
+ ${1:obj}.text(${2:'some text'})${3}
+snippet this
+ $(this)${1}
+snippet toarr
+ ${1:obj}.toArray()
+snippet tog
+ ${1:obj}.toggle(function (${2:e}) {
+ ${3:// event handler}
+ }, function ($2) {
+ ${4:// event handler}
+ });
+ ${4}
+snippet togclass
+ ${1:obj}.toggleClass('${2:class name}')${3}
+snippet togsh
+ ${1:obj}.toggle('${2:slow/400/fast}')${3}
+snippet trig
+ ${1:obj}.trigger('${2:event name}')${3}
+snippet trigh
+ ${1:obj}.triggerHandler('${2:event name}')${3}
+snippet $trim
+ $.trim(${1:str})${2}
+snippet $type
+ $.type(${1:obj})${2}
+snippet unbind
+ ${1:obj}.unbind('${2:event name}')${3}
+snippet undele
+ ${1:obj}.undelegate(${2:selector expression}, ${3:event}, ${4:handler})${5}
+snippet uniq
+ $.unique(${1:array})${2}
+snippet unload
+ ${1:obj}.unload(function (${2:e}) {
+ ${3:// event handler}
+ });
+snippet unwrap
+ ${1:obj}.unwrap()${2}
+snippet val
+ ${1:obj}.val('${2:text}')${3}
+snippet width
+ ${1:obj}.width(${2:integer})${3}
+snippet wrap
+ ${1:obj}.wrap('${2:&lt;div class="extra-wrapper"&gt;&lt;/div&gt;}')${3}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/javascript.js b/src/fauxton/assets/js/libs/ace/snippets/javascript.js
new file mode 100644
index 000000000..bf59ba85c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/javascript.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./javascript.snippets");
+exports.scope = "javascript";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/javascript.snippets b/src/fauxton/assets/js/libs/ace/snippets/javascript.snippets
new file mode 100644
index 000000000..83b15aab6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/javascript.snippets
@@ -0,0 +1,195 @@
+# Prototype
+snippet proto
+ ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {
+ ${4:// body...}
+ };
+# Function
+snippet fun
+ function ${1?:function_name}(${2:argument}) {
+ ${3:// body...}
+ }
+# Anonymous Function
+regex /((=)\s*|(:)\s*|(\()|\b)/f/(\))?/
+snippet f
+ function${M1?: ${1:functionName}}($2) {
+ ${0:$TM_SELECTED_TEXT}
+ }${M2?;}${M3?,}${M4?)}
+# Immediate function
+trigger \(?f\(
+endTrigger \)?
+snippet f(
+ (function(${1}) {
+ ${0:${TM_SELECTED_TEXT:/* code */}}
+ }(${1}));
+# if
+snippet if
+ if (${1:true}) {
+ ${0}
+ }
+# if ... else
+snippet ife
+ if (${1:true}) {
+ ${2}
+ } else {
+ ${0}
+ }
+# tertiary conditional
+snippet ter
+ ${1:/* condition */} ? ${2:a} : ${3:b}
+# switch
+snippet switch
+ switch (${1:expression}) {
+ case '${3:case}':
+ ${4:// code}
+ break;
+ ${5}
+ default:
+ ${2:// code}
+ }
+# case
+snippet case
+ case '${1:case}':
+ ${2:// code}
+ break;
+ ${3}
+
+# while (...) {...}
+snippet wh
+ while (${1:/* condition */}) {
+ ${0:/* code */}
+ }
+# try
+snippet try
+ try {
+ ${0:/* code */}
+ } catch (e) {}
+# do...while
+snippet do
+ do {
+ ${2:/* code */}
+ } while (${1:/* condition */});
+# Object Method
+snippet :f
+regex /([,{[])|^\s*/:f/
+ ${1:method_name}: function(${2:attribute}) {
+ ${0}
+ }${3:,}
+# setTimeout function
+snippet setTimeout
+regex /\b/st|timeout|setTimeo?u?t?/
+ setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});
+# Get Elements
+snippet gett
+ getElementsBy${1:TagName}('${2}')${3}
+# Get Element
+snippet get
+ getElementBy${1:Id}('${2}')${3}
+# console.log (Firebug)
+snippet cl
+ console.log(${1});
+# return
+snippet ret
+ return ${1:result}
+# for (property in object ) { ... }
+snippet fori
+ for (var ${1:prop} in ${2:Things}) {
+ ${0:$2[$1]}
+ }
+# hasOwnProperty
+snippet has
+ hasOwnProperty(${1})
+# docstring
+snippet /**
+ /**
+ * ${1:description}
+ *
+ */
+snippet @par
+regex /^\s*\*\s*/@(para?m?)?/
+ @param {${1:type}} ${2:name} ${3:description}
+snippet @ret
+ @return {${1:type}} ${2:description}
+# JSON.parse
+snippet jsonp
+ JSON.parse(${1:jstr});
+# JSON.stringify
+snippet jsons
+ JSON.stringify(${1:object});
+# self-defining function
+snippet sdf
+ var ${1:function_name} = function(${2:argument}) {
+ ${3:// initial code ...}
+
+ $1 = function($2) {
+ ${4:// main code}
+ };
+ }
+# singleton
+snippet sing
+ function ${1:Singleton} (${2:argument}) {
+ // the cached instance
+ var instance;
+
+ // rewrite the constructor
+ $1 = function $1($2) {
+ return instance;
+ };
+
+ // carry over the prototype properties
+ $1.prototype = this;
+
+ // the instance
+ instance = new $1();
+
+ // reset the constructor pointer
+ instance.constructor = $1;
+
+ ${3:// code ...}
+
+ return instance;
+ }
+# class
+snippet class
+regex /^\s*/clas{0,2}/
+ var ${1:class} = function(${20}) {
+ $40$0
+ };
+
+ (function() {
+ ${60:this.prop = ""}
+ }).call(${1:class}.prototype);
+
+ exports.${1:class} = ${1:class};
+#
+snippet for-
+ for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {
+ ${0:${2:Things}[${1:i}];}
+ }
+# for (...) {...}
+snippet for
+ for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {
+ ${3:$2[$1]}$0
+ }
+# for (...) {...} (Improved Native For-Loop)
+snippet forr
+ for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {
+ ${3:$2[$1]}$0
+ }
+
+
+#modules
+snippet def
+ define(function(require, exports, module) {
+ "use strict";
+ var ${1/.*\///} = require("${1}");
+
+ $TM_SELECTED_TEXT
+ });
+snippet req
+guard ^\s*
+ var ${1/.*\///} = require("${1}");
+ $0
+snippet requ
+guard ^\s*
+ var ${1/.*\/(.)/\u$1/} = require("${1}").${1/.*\/(.)/\u$1/};
+ $0
diff --git a/src/fauxton/assets/js/libs/ace/snippets/json.js b/src/fauxton/assets/js/libs/ace/snippets/json.js
new file mode 100644
index 000000000..d57fe6c50
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/json.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./json.snippets");
+exports.scope = "json";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/json.snippets b/src/fauxton/assets/js/libs/ace/snippets/json.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/json.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsoniq.js b/src/fauxton/assets/js/libs/ace/snippets/jsoniq.js
new file mode 100644
index 000000000..9bde24cf6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsoniq.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./jsoniq.snippets");
+exports.scope = "jsoniq";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsoniq.snippets b/src/fauxton/assets/js/libs/ace/snippets/jsoniq.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsoniq.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsp.js b/src/fauxton/assets/js/libs/ace/snippets/jsp.js
new file mode 100644
index 000000000..2324c5418
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsp.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./jsp.snippets");
+exports.scope = "jsp";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsp.snippets b/src/fauxton/assets/js/libs/ace/snippets/jsp.snippets
new file mode 100644
index 000000000..a5239f5eb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsp.snippets
@@ -0,0 +1,99 @@
+snippet @page
+ <%@page contentType="text/html" pageEncoding="UTF-8"%>
+snippet jstl
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+snippet jstl:c
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+snippet jstl:fn
+ <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+snippet cpath
+ ${pageContext.request.contextPath}
+snippet cout
+ <c:out value="${1}" default="${2}" />
+snippet cset
+ <c:set var="${1}" value="${2}" />
+snippet cremove
+ <c:remove var="${1}" scope="${2:page}" />
+snippet ccatch
+ <c:catch var="${1}" />
+snippet cif
+ <c:if test="${${1}}">
+ ${2}
+ </c:if>
+snippet cchoose
+ <c:choose>
+ ${1}
+ </c:choose>
+snippet cwhen
+ <c:when test="${${1}}">
+ ${2}
+ </c:when>
+snippet cother
+ <c:otherwise>
+ ${1}
+ </c:otherwise>
+snippet cfore
+ <c:forEach items="${${1}}" var="${2}" varStatus="${3}">
+ ${4:<c:out value="$2" />}
+ </c:forEach>
+snippet cfort
+ <c:set var="${1}">${2:item1,item2,item3}</c:set>
+ <c:forTokens var="${3}" items="${$1}" delims="${4:,}">
+ ${5:<c:out value="$3" />}
+ </c:forTokens>
+snippet cparam
+ <c:param name="${1}" value="${2}" />
+snippet cparam+
+ <c:param name="${1}" value="${2}" />
+ cparam+${3}
+snippet cimport
+ <c:import url="${1}" />
+snippet cimport+
+ <c:import url="${1}">
+ <c:param name="${2}" value="${3}" />
+ cparam+${4}
+ </c:import>
+snippet curl
+ <c:url value="${1}" var="${2}" />
+ <a href="${$2}">${3}</a>
+snippet curl+
+ <c:url value="${1}" var="${2}">
+ <c:param name="${4}" value="${5}" />
+ cparam+${6}
+ </c:url>
+ <a href="${$2}">${3}</a>
+snippet credirect
+ <c:redirect url="${1}" />
+snippet contains
+ ${fn:contains(${1:string}, ${2:substr})}
+snippet contains:i
+ ${fn:containsIgnoreCase(${1:string}, ${2:substr})}
+snippet endswith
+ ${fn:endsWith(${1:string}, ${2:suffix})}
+snippet escape
+ ${fn:escapeXml(${1:string})}
+snippet indexof
+ ${fn:indexOf(${1:string}, ${2:substr})}
+snippet join
+ ${fn:join(${1:collection}, ${2:delims})}
+snippet length
+ ${fn:length(${1:collection_or_string})}
+snippet replace
+ ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}
+snippet split
+ ${fn:split(${1:string}, ${2:delims})}
+snippet startswith
+ ${fn:startsWith(${1:string}, ${2:prefix})}
+snippet substr
+ ${fn:substring(${1:string}, ${2:begin}, ${3:end})}
+snippet substr:a
+ ${fn:substringAfter(${1:string}, ${2:substr})}
+snippet substr:b
+ ${fn:substringBefore(${1:string}, ${2:substr})}
+snippet lc
+ ${fn:toLowerCase(${1:string})}
+snippet uc
+ ${fn:toUpperCase(${1:string})}
+snippet trim
+ ${fn:trim(${1:string})}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsx.js b/src/fauxton/assets/js/libs/ace/snippets/jsx.js
new file mode 100644
index 000000000..9792a7a00
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsx.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./jsx.snippets");
+exports.scope = "jsx";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/jsx.snippets b/src/fauxton/assets/js/libs/ace/snippets/jsx.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/jsx.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/julia.js b/src/fauxton/assets/js/libs/ace/snippets/julia.js
new file mode 100644
index 000000000..f83777efa
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/julia.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./julia.snippets");
+exports.scope = "julia";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/julia.snippets b/src/fauxton/assets/js/libs/ace/snippets/julia.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/julia.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/latex.js b/src/fauxton/assets/js/libs/ace/snippets/latex.js
new file mode 100644
index 000000000..44bef3691
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/latex.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./latex.snippets");
+exports.scope = "latex";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/latex.snippets b/src/fauxton/assets/js/libs/ace/snippets/latex.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/latex.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ledger.snippets b/src/fauxton/assets/js/libs/ace/snippets/ledger.snippets
new file mode 100644
index 000000000..293d4b65c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ledger.snippets
@@ -0,0 +1,5 @@
+# Ledger <http://ledger-cli.org/>
+snippet ent
+ `strftime("%Y/%m/%d")` ${1:transaction}
+ ${2:account} ${3:value}
+ ${4:account}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/less.js b/src/fauxton/assets/js/libs/ace/snippets/less.js
new file mode 100644
index 000000000..7acf02f29
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/less.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./less.snippets");
+exports.scope = "less";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/less.snippets b/src/fauxton/assets/js/libs/ace/snippets/less.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/less.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/liquid.js b/src/fauxton/assets/js/libs/ace/snippets/liquid.js
new file mode 100644
index 000000000..2e3207551
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/liquid.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./liquid.snippets");
+exports.scope = "liquid";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/liquid.snippets b/src/fauxton/assets/js/libs/ace/snippets/liquid.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/liquid.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lisp.js b/src/fauxton/assets/js/libs/ace/snippets/lisp.js
new file mode 100644
index 000000000..2b6870bc4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lisp.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./lisp.snippets");
+exports.scope = "lisp";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lisp.snippets b/src/fauxton/assets/js/libs/ace/snippets/lisp.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lisp.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/livescript.js b/src/fauxton/assets/js/libs/ace/snippets/livescript.js
new file mode 100644
index 000000000..ba20e7e42
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/livescript.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./livescript.snippets");
+exports.scope = "livescript";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/livescript.snippets b/src/fauxton/assets/js/libs/ace/snippets/livescript.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/livescript.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/logiql.js b/src/fauxton/assets/js/libs/ace/snippets/logiql.js
new file mode 100644
index 000000000..7d0167dab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/logiql.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./logiql.snippets");
+exports.scope = "logiql";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/logiql.snippets b/src/fauxton/assets/js/libs/ace/snippets/logiql.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/logiql.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lsl.js b/src/fauxton/assets/js/libs/ace/snippets/lsl.js
new file mode 100644
index 000000000..678ba41f6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lsl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./lsl.snippets");
+exports.scope = "lsl";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lsl.snippets b/src/fauxton/assets/js/libs/ace/snippets/lsl.snippets
new file mode 100644
index 000000000..e65f77716
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lsl.snippets
@@ -0,0 +1,887 @@
+snippet @
+ @${1:label}
+snippet CAMERA_ACTIVE
+ CAMERA_ACTIVE, ${1:integer isActive},
+snippet CAMERA_BEHINDNESS_ANGLE
+ CAMERA_BEHINDNESS_ANGLE, ${1:float degrees},
+snippet CAMERA_BEHINDNESS_LAG
+ CAMERA_BEHINDNESS_LAG, ${1:float seconds},
+snippet CAMERA_DISTANCE
+ CAMERA_DISTANCE, ${1:float meters},
+snippet CAMERA_FOCUS
+ CAMERA_FOCUS, ${1:vector position},
+snippet CAMERA_FOCUS_LAG
+ CAMERA_FOCUS_LAG, ${1:float seconds},
+snippet CAMERA_FOCUS_LOCKED
+ CAMERA_FOCUS_LOCKED, ${1:integer isLocked},
+snippet CAMERA_FOCUS_OFFSET
+ CAMERA_FOCUS_OFFSET, ${1:vector meters},
+snippet CAMERA_FOCUS_THRESHOLD
+ CAMERA_FOCUS_THRESHOLD, ${1:float meters},
+snippet CAMERA_PITCH
+ CAMERA_PITCH, ${1:float degrees},
+snippet CAMERA_POSITION
+ CAMERA_POSITION, ${1:vector position},
+snippet CAMERA_POSITION_LAG
+ CAMERA_POSITION_LAG, ${1:float seconds},
+snippet CAMERA_POSITION_LOCKED
+ CAMERA_POSITION_LOCKED, ${1:integer isLocked},
+snippet CAMERA_POSITION_THRESHOLD
+ CAMERA_POSITION_THRESHOLD, ${1:float meters},
+snippet CHARACTER_AVOIDANCE_MODE
+ CHARACTER_AVOIDANCE_MODE, ${1:integer flags},
+snippet CHARACTER_DESIRED_SPEED
+ CHARACTER_DESIRED_SPEED, ${1:float speed},
+snippet CHARACTER_DESIRED_TURN_SPEED
+ CHARACTER_DESIRED_TURN_SPEED, ${1:float speed},
+snippet CHARACTER_LENGTH
+ CHARACTER_LENGTH, ${1:float length},
+snippet CHARACTER_MAX_TURN_RADIUS
+ CHARACTER_MAX_TURN_RADIUS, ${1:float radius},
+snippet CHARACTER_ORIENTATION
+ CHARACTER_ORIENTATION, ${1:integer orientation},
+snippet CHARACTER_RADIUS
+ CHARACTER_RADIUS, ${1:float radius},
+snippet CHARACTER_STAY_WITHIN_PARCEL
+ CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay},
+snippet CHARACTER_TYPE
+ CHARACTER_TYPE, ${1:integer type},
+snippet HTTP_BODY_MAXLENGTH
+ HTTP_BODY_MAXLENGTH, ${1:integer length},
+snippet HTTP_CUSTOM_HEADER
+ HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value},
+snippet HTTP_METHOD
+ HTTP_METHOD, ${1:string method},
+snippet HTTP_MIMETYPE
+ HTTP_MIMETYPE, ${1:string mimeType},
+snippet HTTP_PRAGMA_NO_CACHE
+ HTTP_PRAGMA_NO_CACHE, ${1:integer send_header},
+snippet HTTP_VERBOSE_THROTTLE
+ HTTP_VERBOSE_THROTTLE, ${1:integer noisy},
+snippet HTTP_VERIFY_CERT
+ HTTP_VERIFY_CERT, ${1:integer verify},
+snippet RC_DATA_FLAGS
+ RC_DATA_FLAGS, ${1:integer flags},
+snippet RC_DETECT_PHANTOM
+ RC_DETECT_PHANTOM, ${1:integer dectedPhantom},
+snippet RC_MAX_HITS
+ RC_MAX_HITS, ${1:integer maxHits},
+snippet RC_REJECT_TYPES
+ RC_REJECT_TYPES, ${1:integer filterMask},
+snippet at_rot_target
+ at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})
+ {
+ $0
+ }
+snippet at_target
+ at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})
+ {
+ $0
+ }
+snippet attach
+ attach(${1:key id})
+ {
+ $0
+ }
+snippet changed
+ changed(${1:integer change})
+ {
+ $0
+ }
+snippet collision
+ collision(${1:integer index})
+ {
+ $0
+ }
+snippet collision_end
+ collision_end(${1:integer index})
+ {
+ $0
+ }
+snippet collision_start
+ collision_start(${1:integer index})
+ {
+ $0
+ }
+snippet control
+ control(${1:key id}, ${2:integer level}, ${3:integer edge})
+ {
+ $0
+ }
+snippet dataserver
+ dataserver(${1:key query_id}, ${2:string data})
+ {
+ $0
+ }
+snippet do
+ do
+ {
+ $0
+ }
+ while (${1:condition});
+snippet else
+ else
+ {
+ $0
+ }
+snippet else if
+ else if (${1:condition})
+ {
+ $0
+ }
+snippet email
+ email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})
+ {
+ $0
+ }
+snippet for
+ for (${1:start}; ${3:condition}; ${3:step})
+ {
+ $0
+ }
+snippet http_request
+ http_request(${1:key request_id}, ${2:string method}, ${3:string body})
+ {
+ $0
+ }
+snippet http_response
+ http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})
+ {
+ $0
+ }
+snippet if
+ if (${1:condition})
+ {
+ $0
+ }
+snippet jump
+ jump ${1:label};
+snippet land_collision
+ land_collision(${1:vector pos})
+ {
+ $0
+ }
+snippet land_collision_end
+ land_collision_end(${1:vector pos})
+ {
+ $0
+ }
+snippet land_collision_start
+ land_collision_start(${1:vector pos})
+ {
+ $0
+ }
+snippet link_message
+ link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})
+ {
+ $0
+ }
+snippet listen
+ listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})
+ {
+ $0
+ }
+snippet llAbs
+ llAbs(${1:integer val})
+snippet llAcos
+ llAcos(${1:float val})
+snippet llAddToLandBanList
+ llAddToLandBanList(${1:key avatar}, ${2:float hours})
+snippet llAddToLandPassList
+ llAddToLandPassList(${1:key avatar}, ${2:float hours})
+snippet llAdjustSoundVolume
+ llAdjustSoundVolume(${1:float volume})
+snippet llAllowInventoryDrop
+ llAllowInventoryDrop(${1:integer add})
+snippet llAngleBetween
+ llAngleBetween(${1:rotation a}, ${2:rotation b})
+snippet llApplyImpulse
+ llApplyImpulse(${1:vector force}, ${2:integer local})
+snippet llApplyRotationalImpulse
+ llApplyRotationalImpulse(${1:vector force}, ${2:integer local})
+snippet llAsin
+ llAsin(${1:float val})
+snippet llAtan2
+ llAtan2(${1:float y}, ${2:float x})
+snippet llAttachToAvatar
+ llAttachToAvatar(${1:integer attach_point})
+snippet llAttachToAvatarTemp
+ llAttachToAvatarTemp(${1:integer attach_point})
+snippet llAvatarOnLinkSitTarget
+ llAvatarOnLinkSitTarget(${1:integer link})
+snippet llAxes2Rot
+ llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})
+snippet llAxisAngle2Rot
+ llAxisAngle2Rot(${1:vector axis}, ${2:float angle})
+snippet llBase64ToInteger
+ llBase64ToInteger(${1:string str})
+snippet llBase64ToString
+ llBase64ToString(${1:string str})
+snippet llBreakLink
+ llBreakLink(${1:integer link})
+snippet llCastRay
+ llCastRay(${1:vector start}, ${2:vector end}, ${3:list options})
+snippet llCeil
+ llCeil(${1:float val})
+snippet llClearLinkMedia
+ llClearLinkMedia(${1:integer link}, ${2:integer face})
+snippet llClearPrimMedia
+ llClearPrimMedia(${1:integer link}, ${2:integer face})
+snippet llCloseRemoteDataChannel
+ llCloseRemoteDataChannel(${1:key channel})
+snippet llCollisionFilter
+ llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept})
+snippet llCollisionSound
+ llCollisionSound(${1:string impact_sound}, ${2:float impact_volume})
+snippet llCollisionSprite
+ llCollisionSprite(${1:string impact_sprite})
+snippet llCos
+ llCos(${1:float theta})
+snippet llCreateCharacter
+ llCreateCharacter(${1:list options})
+snippet llCreateLink
+ llCreateLink(${1:key target}, ${2:integer parent})
+snippet llCSV2List
+ llCSV2List(${1:string src})
+snippet llDeleteSubList
+ llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})
+snippet llDeleteSubString
+ llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+snippet llDetectedGrab
+ llDetectedGrab(${1:integer number})
+snippet llDetectedGroup
+ llDetectedGroup(${1:integer number})
+snippet llDetectedKey
+ llDetectedKey(${1:integer number})
+snippet llDetectedLinkNumber
+ llDetectedLinkNumber(${1:integer number})
+snippet llDetectedName
+ llDetectedName(${1:integer number})
+snippet llDetectedOwner
+ llDetectedOwner(${1:integer number})
+snippet llDetectedPos
+ llDetectedPos(${1:integer number})
+snippet llDetectedRot
+ llDetectedRot(${1:integer number})
+snippet llDetectedTouchBinormal
+ llDetectedTouchBinormal(${1:integer number})
+snippet llDetectedTouchFace
+ llDetectedTouchFace(${1:integer number})
+snippet llDetectedTouchNormal
+ llDetectedTouchNormal(${1:integer number})
+snippet llDetectedTouchPos
+ llDetectedTouchPos(${1:integer number})
+snippet llDetectedTouchST
+ llDetectedTouchST(${1:integer number})
+snippet llDetectedTouchUV
+ llDetectedTouchUV(${1:integer number})
+snippet llDetectedType
+ llDetectedType(${1:integer number})
+snippet llDetectedVel
+ llDetectedVel(${1:integer number})
+snippet llDialog
+ llDialog(${1:key avatar}, ${2:string message}, ${3:list buttons}, ${4:integer channel})
+snippet llDumpList2String
+ llDumpList2String(${1:list src}, ${2:string separator})
+snippet llEdgeOfWorld
+ llEdgeOfWorld(${1:vector pos}, ${2:vector dir})
+snippet llEjectFromLand
+ llEjectFromLand(${1:key avatar})
+snippet llEmail
+ llEmail(${1:string address}, ${2:string subject}, ${3:string message})
+snippet llEscapeURL
+ llEscapeURL(${1:string url})
+snippet llEuler2Rot
+ llEuler2Rot(${1:vector v})
+snippet llExecCharacterCmd
+ llExecCharacterCmd(${1:integer command}, ${2:list options})
+snippet llEvade
+ llEvade(${1:key target}, ${2:list options})
+snippet llFabs
+ llFabs(${1:float val})
+snippet llFleeFrom
+ llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options})
+snippet llFloor
+ llFloor(${1:float val})
+snippet llForceMouselook
+ llForceMouselook(${1:integer mouselook})
+snippet llFrand
+ llFrand(${1:float mag})
+snippet llGetAgentInfo
+ llGetAgentInfo(${1:key id})
+snippet llGetAgentLanguage
+ llGetAgentLanguage(${1:key avatar})
+snippet llGetAgentList
+ llGetAgentList(${1:integer scope}, ${2:list options})
+snippet llGetAgentSize
+ llGetAgentSize(${1:key avatar})
+snippet llGetAlpha
+ llGetAlpha(${1:integer face})
+snippet llGetAnimation
+ llGetAnimation(${1:key id})
+snippet llGetAnimationList
+ llGetAnimationList(${1:key avatar})
+snippet llGetAnimationOverride
+ llGetAnimationOverride(${1:string anim_state})
+snippet llGetBoundingBox
+ llGetBoundingBox(${1:key object})
+snippet llGetClosestNavPoint
+ llGetClosestNavPoint(${1:vector point}, ${2:list options})
+snippet llGetColor
+ llGetColor(${1:integer face})
+snippet llGetDisplayName
+ llGetDisplayName(${1:key id})
+snippet llGetEnv
+ llGetEnv(${1:string name})
+snippet llGetHTTPHeader
+ llGetHTTPHeader(${1:key request_id}, ${2:string header})
+snippet llGetInventoryCreator
+ llGetInventoryCreator(${1:string item})
+snippet llGetInventoryKey
+ llGetInventoryKey(${1:string name})
+snippet llGetInventoryName
+ llGetInventoryName(${1:integer type}, ${2:integer number})
+snippet llGetInventoryNumber
+ llGetInventoryNumber(${1:integer type})
+snippet llGetInventoryPermMask
+ llGetInventoryPermMask(${1:string item}, ${2:integer mask})
+snippet llGetInventoryType
+ llGetInventoryType(${1:string name})
+snippet llGetLandOwnerAt
+ llGetLandOwnerAt(${1:vector pos})
+snippet llGetLinkKey
+ llGetLinkKey(${1:integer link})
+snippet llGetLinkMedia
+ llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})
+snippet llGetLinkName
+ llGetLinkName(${1:integer link})
+snippet llGetLinkNumberOfSides
+ llGetLinkNumberOfSides(${1:integer link})
+snippet llGetLinkPrimitiveParams
+ llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})
+snippet llGetListEntryType
+ llGetListEntryType(${1:list src}, ${2:integer index})
+snippet llGetListLength
+ llGetListLength(${1:list src})
+snippet llGetNextEmail
+ llGetNextEmail(${1:string address}, ${2:string subject})
+snippet llGetNotecardLine
+ llGetNotecardLine(${1:string name}, ${2:integer line})
+snippet llGetNumberOfNotecardLines
+ llGetNumberOfNotecardLines(${1:string name})
+snippet llGetObjectDetails
+ llGetObjectDetails(${1:key id}, ${2:list params})
+snippet llGetObjectMass
+ llGetObjectMass(${1:key id})
+snippet llGetObjectPermMask
+ llGetObjectPermMask(${1:integer mask})
+snippet llGetObjectPrimCount
+ llGetObjectPrimCount(${1:key prim})
+snippet llGetOwnerKey
+ llGetOwnerKey(${1:key id})
+snippet llGetParcelDetails
+ llGetParcelDetails(${1:vector pos}, ${2:list params})
+snippet llGetParcelFlags
+ llGetParcelFlags(${1:vector pos})
+snippet llGetParcelMaxPrims
+ llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})
+snippet llGetParcelPrimCount
+ llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})
+snippet llGetParcelPrimOwners
+ llGetParcelPrimOwners(${1:vector pos})
+snippet llGetPrimitiveParams
+ llGetPrimitiveParams(${1:list params})
+snippet llGetPrimMediaParams
+ llGetPrimMediaParams(${1:integer face}, ${2:list params})
+snippet llGetScriptState
+ llGetScriptState(${1:string script})
+snippet llGetSimStats
+ llGetSimStats(${1:integer stat_type})
+snippet llGetStaticPath
+ llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})
+snippet llGetStatus
+ llGetStatus(${1:integer status})
+snippet llGetSubString
+ llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})
+snippet llGetTexture
+ llGetTexture(${1:integer face})
+snippet llGetTextureOffset
+ llGetTextureOffset(${1:integer face})
+snippet llGetTextureRot
+ llGetTextureRot(${1:integer face})
+snippet llGetTextureScale
+ llGetTextureScale(${1:integer face})
+snippet llGetUsername
+ llGetUsername(${1:key id})
+snippet llGiveInventory
+ llGiveInventory(${1:key destination}, ${2:string inventory})
+snippet llGiveInventoryList
+ llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory})
+snippet llGiveMoney
+ llGiveMoney(${1:key destination}, ${2:integer amount})
+snippet llGround
+ llGround(${1:vector offset})
+snippet llGroundContour
+ llGroundContour(${1:vector offset})
+snippet llGroundNormal
+ llGroundNormal(${1:vector offset})
+snippet llGroundRepel
+ llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau})
+snippet llGroundSlope
+ llGroundSlope(${1:vector offset})
+snippet llHTTPRequest
+ llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})
+snippet llHTTPResponse
+ llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body})
+snippet llInsertString
+ llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})
+snippet llInstantMessage
+ llInstantMessage(${1:key user}, ${2:string message})
+snippet llIntegerToBase64
+ llIntegerToBase64(${1:integer number})
+snippet llJson2List
+ llJson2List(${1:string json})
+snippet llJsonGetValue
+ llJsonGetValue(${1:string json}, ${2:list specifiers})
+snippet llJsonSetValue
+ llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})
+snippet llJsonValueType
+ llJsonValueType(${1:string json}, ${2:list specifiers})
+snippet llKey2Name
+ llKey2Name(${1:key id})
+snippet llLinkParticleSystem
+ llLinkParticleSystem(${1:integer link}, ${2:list rules})
+snippet llLinkSitTarget
+ llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot})
+snippet llList2CSV
+ llList2CSV(${1:list src})
+snippet llList2Float
+ llList2Float(${1:list src}, ${2:integer index})
+snippet llList2Integer
+ llList2Integer(${1:list src}, ${2:integer index})
+snippet llList2Json
+ llList2Json(${1:string type}, ${2:list values})
+snippet llList2Key
+ llList2Key(${1:list src}, ${2:integer index})
+snippet llList2List
+ llList2List(${1:list src}, ${2:integer start}, ${3:integer end})
+snippet llList2ListStrided
+ llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})
+snippet llList2Rot
+ llList2Rot(${1:list src}, ${2:integer index})
+snippet llList2String
+ llList2String(${1:list src}, ${2:integer index})
+snippet llList2Vector
+ llList2Vector(${1:list src}, ${2:integer index})
+snippet llListen
+ llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})
+snippet llListenControl
+ llListenControl(${1:integer handle}, ${2:integer active})
+snippet llListenRemove
+ llListenRemove(${1:integer handle})
+snippet llListFindList
+ llListFindList(${1:list src}, ${2:list test})
+snippet llListInsertList
+ llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})
+snippet llListRandomize
+ llListRandomize(${1:list src}, ${2:integer stride})
+snippet llListReplaceList
+ llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})
+snippet llListSort
+ llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})
+snippet llListStatistics
+ llListStatistics(${1:integer operation}, ${2:list src})
+snippet llLoadURL
+ llLoadURL(${1:key avatar}, ${2:string message}, ${3:string url})
+snippet llLog
+ llLog(${1:float val})
+snippet llLog10
+ llLog10(${1:float val})
+snippet llLookAt
+ llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping})
+snippet llLoopSound
+ llLoopSound(${1:string sound}, ${2:float volume})
+snippet llLoopSoundMaster
+ llLoopSoundMaster(${1:string sound}, ${2:float volume})
+snippet llLoopSoundSlave
+ llLoopSoundSlave(${1:string sound}, ${2:float volume})
+snippet llManageEstateAccess
+ llManageEstateAccess(${1:integer action}, ${2:key avatar})
+snippet llMapDestination
+ llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at})
+snippet llMD5String
+ llMD5String(${1:string src}, ${2:integer nonce})
+snippet llMessageLinked
+ llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id})
+snippet llMinEventDelay
+ llMinEventDelay(${1:float delay})
+snippet llModifyLand
+ llModifyLand(${1:integer action}, ${2:integer brush})
+snippet llModPow
+ llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})
+snippet llMoveToTarget
+ llMoveToTarget(${1:vector target}, ${2:float tau})
+snippet llNavigateTo
+ llNavigateTo(${1:vector pos}, ${2:list options})
+snippet llOffsetTexture
+ llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face})
+snippet llOverMyLand
+ llOverMyLand(${1:key id})
+snippet llOwnerSay
+ llOwnerSay(${1:string msg})
+snippet llParcelMediaCommandList
+ llParcelMediaCommandList(${1:list commandList})
+snippet llParcelMediaQuery
+ llParcelMediaQuery(${1:list query})
+snippet llParseString2List
+ llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})
+snippet llParseStringKeepNulls
+ llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})
+snippet llParticleSystem
+ llParticleSystem(${1:list rules})
+snippet llPassCollisions
+ llPassCollisions(${1:integer pass})
+snippet llPassTouches
+ llPassTouches(${1:integer pass})
+snippet llPatrolPoints
+ llPatrolPoints(${1:list patrolPoints}, ${2:list options})
+snippet llPlaySound
+ llPlaySound(${1:string sound}, ${2:float volume})
+snippet llPlaySoundSlave
+ llPlaySoundSlave(${1:string sound}, ${2:float volume})
+snippet llPow
+ llPow(${1:float base}, ${2:float exponent})
+snippet llPreloadSound
+ llPreloadSound(${1:string sound})
+snippet llPursue
+ llPursue(${1:key target}, ${2:list options})
+snippet llPushObject
+ llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local})
+snippet llRegionSay
+ llRegionSay(${1:integer channel}, ${2:string msg})
+snippet llRegionSayTo
+ llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg})
+snippet llReleaseURL
+ llReleaseURL(${1:string url})
+snippet llRemoteDataReply
+ llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata})
+snippet llRemoteLoadScriptPin
+ llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param})
+snippet llRemoveFromLandBanList
+ llRemoveFromLandBanList(${1:key avatar})
+snippet llRemoveFromLandPassList
+ llRemoveFromLandPassList(${1:key avatar})
+snippet llRemoveInventory
+ llRemoveInventory(${1:string item})
+snippet llRemoveVehicleFlags
+ llRemoveVehicleFlags(${1:integer flags})
+snippet llRequestAgentData
+ llRequestAgentData(${1:key id}, ${2:integer data})
+snippet llRequestDisplayName
+ llRequestDisplayName(${1:key id})
+snippet llRequestInventoryData
+ llRequestInventoryData(${1:string name})
+snippet llRequestPermissions
+ llRequestPermissions(${1:key agent}, ${2:integer permissions})
+snippet llRequestSimulatorData
+ llRequestSimulatorData(${1:string region}, ${2:integer data})
+snippet llRequestUsername
+ llRequestUsername(${1:key id})
+snippet llResetAnimationOverride
+ llResetAnimationOverride(${1:string anim_state})
+snippet llResetOtherScript
+ llResetOtherScript(${1:string name})
+snippet llReturnObjectsByID
+ llReturnObjectsByID(${1:list objects})
+snippet llReturnObjectsByOwner
+ llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})
+snippet llRezAtRoot
+ llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param})
+snippet llRezObject
+ llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param})
+snippet llRot2Angle
+ llRot2Angle(${1:rotation rot})
+snippet llRot2Axis
+ llRot2Axis(${1:rotation rot})
+snippet llRot2Euler
+ llRot2Euler(${1:rotation quat})
+snippet llRot2Fwd
+ llRot2Fwd(${1:rotation q})
+snippet llRot2Left
+ llRot2Left(${1:rotation q})
+snippet llRot2Up
+ llRot2Up(${1:rotation q})
+snippet llRotateTexture
+ llRotateTexture(${1:float angle}, ${2:integer face})
+snippet llRotBetween
+ llRotBetween(${1:vector start}, ${2:vector end})
+snippet llRotLookAt
+ llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping})
+snippet llRotTarget
+ llRotTarget(${1:rotation rot}, ${2:float error})
+snippet llRotTargetRemove
+ llRotTargetRemove(${1:integer handle})
+snippet llRound
+ llRound(${1:float val})
+snippet llSameGroup
+ llSameGroup(${1:key uuid})
+snippet llSay
+ llSay(${1:integer channel}, ${2:string msg})
+snippet llScaleTexture
+ llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face})
+snippet llScriptDanger
+ llScriptDanger(${1:vector pos})
+snippet llScriptProfiler
+ llScriptProfiler(${1:integer flags})
+snippet llSendRemoteData
+ llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})
+snippet llSensor
+ llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc})
+snippet llSensorRepeat
+ llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate})
+snippet llSetAlpha
+ llSetAlpha(${1:float alpha}, ${2:integer face})
+snippet llSetAngularVelocity
+ llSetAngularVelocity(${1:vector force}, ${2:integer local})
+snippet llSetAnimationOverride
+ llSetAnimationOverride(${1:string anim_state}, ${2:string anim})
+snippet llSetBuoyancy
+ llSetBuoyancy(${1:float buoyancy})
+snippet llSetCameraAtOffset
+ llSetCameraAtOffset(${1:vector offset})
+snippet llSetCameraEyeOffset
+ llSetCameraEyeOffset(${1:vector offset})
+snippet llSetCameraParams
+ llSetCameraParams(${1:list rules})
+snippet llSetClickAction
+ llSetClickAction(${1:integer action})
+snippet llSetColor
+ llSetColor(${1:vector color}, ${2:integer face})
+snippet llSetContentType
+ llSetContentType(${1:key request_id}, ${2:integer content_type})
+snippet llSetDamage
+ llSetDamage(${1:float damage})
+snippet llSetForce
+ llSetForce(${1:vector force}, ${2:integer local})
+snippet llSetForceAndTorque
+ llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local})
+snippet llSetHoverHeight
+ llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau})
+snippet llSetKeyframedMotion
+ llSetKeyframedMotion(${1:list keyframes}, ${2:list options})
+snippet llSetLinkAlpha
+ llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face})
+snippet llSetLinkCamera
+ llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at})
+snippet llSetLinkColor
+ llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face})
+snippet llSetLinkMedia
+ llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})
+snippet llSetLinkPrimitiveParams
+ llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules})
+snippet llSetLinkPrimitiveParamsFast
+ llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules})
+snippet llSetLinkTexture
+ llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face})
+snippet llSetLinkTextureAnim
+ llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate})
+snippet llSetLocalRot
+ llSetLocalRot(${1:rotation rot})
+snippet llSetMemoryLimit
+ llSetMemoryLimit(${1:integer limit})
+snippet llSetObjectDesc
+ llSetObjectDesc(${1:string description})
+snippet llSetObjectName
+ llSetObjectName(${1:string name})
+snippet llSetParcelMusicURL
+ llSetParcelMusicURL(${1:string url})
+snippet llSetPayPrice
+ llSetPayPrice(${1:integer price}, ${2:list quick_pay_buttons})
+snippet llSetPhysicsMaterial
+ llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density})
+snippet llSetPos
+ llSetPos(${1:vector pos})
+snippet llSetPrimitiveParams
+ llSetPrimitiveParams(${1:list rules})
+snippet llSetPrimMediaParams
+ llSetPrimMediaParams(${1:integer face}, ${2:list params})
+snippet llSetRegionPos
+ llSetRegionPos(${1:vector position})
+snippet llSetRemoteScriptAccessPin
+ llSetRemoteScriptAccessPin(${1:integer pin})
+snippet llSetRot
+ llSetRot(${1:rotation rot})
+snippet llSetScale
+ llSetScale(${1:vector size})
+snippet llSetScriptState
+ llSetScriptState(${1:string name}, ${2:integer run})
+snippet llSetSitText
+ llSetSitText(${1:string text})
+snippet llSetSoundQueueing
+ llSetSoundQueueing(${1:integer queue})
+snippet llSetSoundRadius
+ llSetSoundRadius(${1:float radius})
+snippet llSetStatus
+ llSetStatus(${1:integer status}, ${2:integer value})
+snippet llSetText
+ llSetText(${1:string text}, ${2:vector color}, ${3:float alpha})
+snippet llSetTexture
+ llSetTexture(${1:string texture}, ${2:integer face})
+snippet llSetTextureAnim
+ llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate})
+snippet llSetTimerEvent
+ llSetTimerEvent(${1:float sec})
+snippet llSetTorque
+ llSetTorque(${1:vector torque}, ${2:integer local})
+snippet llSetTouchText
+ llSetTouchText(${1:string text})
+snippet llSetVehicleFlags
+ llSetVehicleFlags(${1:integer flags})
+snippet llSetVehicleFloatParam
+ llSetVehicleFloatParam(${1:integer param}, ${2:float value})
+snippet llSetVehicleRotationParam
+ llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot})
+snippet llSetVehicleType
+ llSetVehicleType(${1:integer type})
+snippet llSetVehicleVectorParam
+ llSetVehicleVectorParam(${1:integer param}, ${2:vector vec})
+snippet llSetVelocity
+ llSetVelocity(${1:vector force}, ${2:integer local})
+snippet llSHA1String
+ llSHA1String(${1:string src})
+snippet llShout
+ llShout(${1:integer channel}, ${2:string msg})
+snippet llSin
+ llSin(${1:float theta})
+snippet llSitTarget
+ llSitTarget(${1:vector offset}, ${2:rotation rot})
+snippet llSleep
+ llSleep(${1:float sec})
+snippet llSqrt
+ llSqrt(${1:float val})
+snippet llStartAnimation
+ llStartAnimation(${1:string anim})
+snippet llStopAnimation
+ llStopAnimation(${1:string anim})
+snippet llStringLength
+ llStringLength(${1:string str})
+snippet llStringToBase64
+ llStringToBase64(${1:string str})
+snippet llStringTrim
+ llStringTrim(${1:string src}, ${2:integer type})
+snippet llSubStringIndex
+ llSubStringIndex(${1:string source}, ${2:string pattern})
+snippet llTakeControls
+ llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on})
+snippet llTan
+ llTan(${1:float theta})
+snippet llTarget
+ llTarget(${1:vector position}, ${2:float range})
+snippet llTargetOmega
+ llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain})
+snippet llTargetRemove
+ llTargetRemove(${1:integer handle})
+snippet llTeleportAgent
+ llTeleportAgent(${1:key avatar}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at})
+snippet llTeleportAgentGlobalCoords
+ llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at})
+snippet llTeleportAgentHome
+ llTeleportAgentHome(${1:key avatar})
+snippet llTextBox
+ llTextBox(${1:key avatar}, ${2:string message}, ${3:integer channel})
+snippet llToLower
+ llToLower(${1:string src})
+snippet llToUpper
+ llToUpper(${1:string src})
+snippet llTransferLindenDollars
+ llTransferLindenDollars(${1:key destination}, ${2:integer amount})
+snippet llTriggerSound
+ llTriggerSound(${1:string sound}, ${2:float volume})
+snippet llTriggerSoundLimited
+ llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west})
+snippet llUnescapeURL
+ llUnescapeURL(${1:string url})
+snippet llUnSit
+ llUnSit(${1:key id})
+snippet llUpdateCharacter
+ llUpdateCharacter(${1:list options})
+snippet llVecDist
+ llVecDist(${1:vector vec_a}, ${2:vector vec_b})
+snippet llVecMag
+ llVecMag(${1:vector vec})
+snippet llVecNorm
+ llVecNorm(${1:vector vec})
+snippet llVolumeDetect
+ llVolumeDetect(${1:integer detect})
+snippet llWanderWithin
+ llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options})
+snippet llWater
+ llWater(${1:vector offset})
+snippet llWhisper
+ llWhisper(${1:integer channel}, ${2:string msg})
+snippet llWind
+ llWind(${1:vector offset})
+snippet llXorBase64
+ llXorBase64(${1:string str1}, ${2:string str2}
+snippet money
+ money(${1:key id}, ${2:integer amount})
+ {
+ $0
+ }
+snippet object_rez
+ object_rez(${1:key id})
+ {
+ $0
+ }
+snippet on_rez
+ on_rez(${1:integer start_param})
+ {
+ $0
+ }
+snippet path_update
+ path_update(${1:integer type}, ${2:list reserved})
+ {
+ $0
+ }
+snippet remote_data
+ remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})
+ {
+ $0
+ }
+snippet run_time_permissions
+ run_time_permissions(${1:integer perm})
+ {
+ $0
+ }
+snippet sensor
+ sensor(${1:integer index})
+ {
+ $0
+ }
+snippet state
+ state ${1:name}
+snippet touch
+ touch(${1:integer index})
+ {
+ $0
+ }
+snippet touch_end
+ touch_end(${1:integer index})
+ {
+ $0
+ }
+snippet touch_start
+ touch_start(${1:integer index})
+ {
+ $0
+ }
+snippet transaction_result
+ transaction_result(${1:key id}, ${2:integer success}, ${3:string data})
+ {
+ $0
+ }
+snippet while
+ while (${1:condition})
+ {
+ $0
+ }
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lua.js b/src/fauxton/assets/js/libs/ace/snippets/lua.js
new file mode 100644
index 000000000..0ab6fdcd1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lua.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./lua.snippets");
+exports.scope = "lua";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lua.snippets b/src/fauxton/assets/js/libs/ace/snippets/lua.snippets
new file mode 100644
index 000000000..34ae25eb6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lua.snippets
@@ -0,0 +1,21 @@
+snippet #!
+ #!/usr/bin/env lua
+ $1
+snippet local
+ local ${1:x} = ${2:1}
+snippet fun
+ function ${1:fname}(${2:...})
+ ${3:-- body}
+ end
+snippet for
+ for ${1:i}=${2:1},${3:10} do
+ ${4:print(i)}
+ end
+snippet forp
+ for ${1:i},${2:v} in pairs(${3:table_name}) do
+ ${4:-- body}
+ end
+snippet fori
+ for ${1:i},${2:v} in ipairs(${3:table_name}) do
+ ${4:-- body}
+ end
diff --git a/src/fauxton/assets/js/libs/ace/snippets/luapage.js b/src/fauxton/assets/js/libs/ace/snippets/luapage.js
new file mode 100644
index 000000000..86b228427
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/luapage.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./luapage.snippets");
+exports.scope = "luapage";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/luapage.snippets b/src/fauxton/assets/js/libs/ace/snippets/luapage.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/luapage.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lucene.js b/src/fauxton/assets/js/libs/ace/snippets/lucene.js
new file mode 100644
index 000000000..01edb07de
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lucene.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./lucene.snippets");
+exports.scope = "lucene";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/lucene.snippets b/src/fauxton/assets/js/libs/ace/snippets/lucene.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/lucene.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/makefile.js b/src/fauxton/assets/js/libs/ace/snippets/makefile.js
new file mode 100644
index 000000000..0ec05ac08
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/makefile.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./makefile.snippets");
+exports.scope = "makefile";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/makefile.snippets b/src/fauxton/assets/js/libs/ace/snippets/makefile.snippets
new file mode 100644
index 000000000..436481363
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/makefile.snippets
@@ -0,0 +1,4 @@
+snippet ifeq
+ ifeq (${1:cond0},${2:cond1})
+ ${3:code}
+ endif
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mako.snippets b/src/fauxton/assets/js/libs/ace/snippets/mako.snippets
new file mode 100644
index 000000000..2a0aef9ce
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mako.snippets
@@ -0,0 +1,54 @@
+snippet def
+ <%def name="${1:name}">
+ ${2:}
+ </%def>
+snippet call
+ <%call expr="${1:name}">
+ ${2:}
+ </%call>
+snippet doc
+ <%doc>
+ ${1:}
+ </%doc>
+snippet text
+ <%text>
+ ${1:}
+ </%text>
+snippet for
+ % for ${1:i} in ${2:iter}:
+ ${3:}
+ % endfor
+snippet if if
+ % if ${1:condition}:
+ ${2:}
+ % endif
+snippet if if/else
+ % if ${1:condition}:
+ ${2:}
+ % else:
+ ${3:}
+ % endif
+snippet try
+ % try:
+ ${1:}
+ % except${2:}:
+ ${3:pass}
+ % endtry
+snippet wh
+ % while ${1:}:
+ ${2:}
+ % endwhile
+snippet $
+ ${ ${1:} }
+snippet <%
+ <% ${1:} %>
+snippet <!%
+ <!% ${1:} %>
+snippet inherit
+ <%inherit file="${1:filename}" />
+snippet include
+ <%include file="${1:filename}" />
+snippet namespace
+ <%namespace file="${1:name}" />
+snippet page
+ <%page args="${1:}" />
diff --git a/src/fauxton/assets/js/libs/ace/snippets/markdown.js b/src/fauxton/assets/js/libs/ace/snippets/markdown.js
new file mode 100644
index 000000000..3940bc90f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/markdown.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./markdown.snippets");
+exports.scope = "markdown";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/markdown.snippets b/src/fauxton/assets/js/libs/ace/snippets/markdown.snippets
new file mode 100644
index 000000000..a5110fc9a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/markdown.snippets
@@ -0,0 +1,88 @@
+# Markdown
+
+# Includes octopress (http://octopress.org/) snippets
+
+snippet [
+ [${1:text}](http://${2:address} "${3:title}")
+snippet [*
+ [${1:link}](${2:`@*`} "${3:title}")${4}
+
+snippet [:
+ [${1:id}]: http://${2:url} "${3:title}"
+snippet [:*
+ [${1:id}]: ${2:`@*`} "${3:title}"
+
+snippet ![
+ ![${1:alttext}](${2:/images/image.jpg} "${3:title}")
+snippet ![*
+ ![${1:alt}](${2:`@*`} "${3:title}")${4}
+
+snippet ![:
+ ![${1:id}]: ${2:url} "${3:title}"
+snippet ![:*
+ ![${1:id}]: ${2:`@*`} "${3:title}"
+
+snippet ===
+regex /^/=+/=*//
+ ${PREV_LINE/./=/g}
+
+ ${0}
+snippet ---
+regex /^/-+/-*//
+ ${PREV_LINE/./-/g}
+
+ ${0}
+snippet blockquote
+ {% blockquote %}
+ ${1:quote}
+ {% endblockquote %}
+
+snippet blockquote-author
+ {% blockquote ${1:author}, ${2:title} %}
+ ${3:quote}
+ {% endblockquote %}
+
+snippet blockquote-link
+ {% blockquote ${1:author} ${2:URL} ${3:link_text} %}
+ ${4:quote}
+ {% endblockquote %}
+
+snippet bt-codeblock-short
+ ```
+ ${1:code_snippet}
+ ```
+
+snippet bt-codeblock-full
+ ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}
+ ${5:code_snippet}
+ ```
+
+snippet codeblock-short
+ {% codeblock %}
+ ${1:code_snippet}
+ {% endcodeblock %}
+
+snippet codeblock-full
+ {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}
+ ${5:code_snippet}
+ {% endcodeblock %}
+
+snippet gist-full
+ {% gist ${1:gist_id} ${2:filename} %}
+
+snippet gist-short
+ {% gist ${1:gist_id} %}
+
+snippet img
+ {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}
+
+snippet youtube
+ {% youtube ${1:video_id} %}
+
+# The quote should appear only once in the text. It is inherently part of it.
+# See http://octopress.org/docs/plugins/pullquote/ for more info.
+
+snippet pullquote
+ {% pullquote %}
+ ${1:text} {" ${2:quote} "} ${3:text}
+ {% endpullquote %}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/matlab.js b/src/fauxton/assets/js/libs/ace/snippets/matlab.js
new file mode 100644
index 000000000..698366ba4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/matlab.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./matlab.snippets");
+exports.scope = "matlab";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/matlab.snippets b/src/fauxton/assets/js/libs/ace/snippets/matlab.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/matlab.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mushcode.js b/src/fauxton/assets/js/libs/ace/snippets/mushcode.js
new file mode 100644
index 000000000..8b0d2dcb0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mushcode.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./mushcode.snippets");
+exports.scope = "mushcode";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mushcode.snippets b/src/fauxton/assets/js/libs/ace/snippets/mushcode.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mushcode.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.js b/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.js
new file mode 100644
index 000000000..25d428274
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./mushcode_high_rules.snippets");
+exports.scope = "mushcode_high_rules";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.snippets b/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mushcode_high_rules.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mysql.js b/src/fauxton/assets/js/libs/ace/snippets/mysql.js
new file mode 100644
index 000000000..e5462390b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mysql.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./mysql.snippets");
+exports.scope = "mysql";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/mysql.snippets b/src/fauxton/assets/js/libs/ace/snippets/mysql.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/mysql.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/nix.js b/src/fauxton/assets/js/libs/ace/snippets/nix.js
new file mode 100644
index 000000000..583abf85b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/nix.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./nix.snippets");
+exports.scope = "nix";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/nix.snippets b/src/fauxton/assets/js/libs/ace/snippets/nix.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/nix.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/objc.snippets b/src/fauxton/assets/js/libs/ace/snippets/objc.snippets
new file mode 100644
index 000000000..5517b0621
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/objc.snippets
@@ -0,0 +1,247 @@
+# #import <...>
+snippet Imp
+ #import <${1:Cocoa/Cocoa.h}>${2}
+# #import "..."
+snippet imp
+ #import "${1:`Filename()`.h}"${2}
+# @selector(...)
+snippet sel
+ @selector(${1:method}:)${3}
+# @"..." string
+snippet s
+ @"${1}"${2}
+# Object
+snippet o
+ ${1:NSObject} *${2:foo} = [${3:$1 alloc}]${4};${5}
+# NSLog(...)
+snippet log
+ NSLog(@"${1:%@}"${2});${3}
+# Class
+snippet objc
+ @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
+ {
+ }
+ @end
+
+ @implementation $1
+ ${3}
+ @end
+# Class Interface
+snippet int
+ @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
+ {${3}
+ }
+ ${4}
+ @end
+snippet @interface
+ @interface ${1:`Filename('', 'someClass')`} : ${2:NSObject}
+ {${3}
+ }
+ ${4}
+ @end
+# Class Implementation
+snippet impl
+ @implementation ${1:`Filename('', 'someClass')`}
+ ${2}
+ @end
+snippet @implementation
+ @implementation ${1:`Filename('', 'someClass')`}
+ ${2}
+ @end
+# Protocol
+snippet pro
+ @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:<NSObject>}
+ ${3}
+ @end
+snippet @protocol
+ @protocol ${1:`Filename('$1Delegate', 'MyProtocol')`} ${2:<NSObject>}
+ ${3}
+ @end
+# init Definition
+snippet init
+ - (id)init
+ {
+ if (self = [super init]) {
+ ${1}
+ }
+ return self;
+ }
+# dealloc Definition
+snippet dealloc
+ - (void) dealloc
+ {
+ ${1:deallocations}
+ [super dealloc];
+ }
+snippet su
+ [super ${1:init}]${2}
+snippet ibo
+ IBOutlet ${1:NSSomeClass} *${2:$1};${3}
+# Category
+snippet cat
+ @interface ${1:NSObject} (${2:MyCategory})
+ @end
+
+ @implementation $1 ($2)
+ ${3}
+ @end
+# Category Interface
+snippet cath
+ @interface ${1:`Filename('$1', 'NSObject')`} (${2:MyCategory})
+ ${3}
+ @end
+# Method
+snippet m
+ - (${1:id})${2:method}
+ {
+ ${3}
+ }
+# Method declaration
+snippet md
+ - (${1:id})${2:method};${3}
+# IBAction declaration
+snippet ibad
+ - (IBAction)${1:method}:(${2:id})sender;${3}
+# IBAction method
+snippet iba
+ - (IBAction)${1:method}:(${2:id})sender
+ {
+ ${3}
+ }
+# awakeFromNib method
+snippet wake
+ - (void)awakeFromNib
+ {
+ ${1}
+ }
+# Class Method
+snippet M
+ + (${1:id})${2:method}
+ {
+ ${3:return nil;}
+ }
+# Sub-method (Call super)
+snippet sm
+ - (${1:id})${2:method}
+ {
+ [super $2];${3}
+ return self;
+ }
+# Accessor Methods For:
+# Object
+snippet objacc
+ - (${1:id})${2:thing}
+ {
+ return $2;
+ }
+
+ - (void)set$2:($1)${3:new$2}
+ {
+ [$3 retain];
+ [$2 release];
+ $2 = $3;
+ }${4}
+# for (object in array)
+snippet forin
+ for (${1:Class} *${2:some$1} in ${3:array}) {
+ ${4}
+ }
+snippet fore
+ for (${1:object} in ${2:array}) {
+ ${3:statements}
+ }
+snippet forarray
+ unsigned int ${1:object}Count = [${2:array} count];
+
+ for (unsigned int index = 0; index < $1Count; index++) {
+ ${3:id} $1 = [$2 $1AtIndex:index];
+ ${4}
+ }
+snippet fora
+ unsigned int ${1:object}Count = [${2:array} count];
+
+ for (unsigned int index = 0; index < $1Count; index++) {
+ ${3:id} $1 = [$2 $1AtIndex:index];
+ ${4}
+ }
+# Try / Catch Block
+snippet @try
+ @try {
+ ${1:statements}
+ }
+ @catch (NSException * e) {
+ ${2:handler}
+ }
+ @finally {
+ ${3:statements}
+ }
+snippet @catch
+ @catch (${1:exception}) {
+ ${2:handler}
+ }
+snippet @finally
+ @finally {
+ ${1:statements}
+ }
+# IBOutlet
+# @property (Objective-C 2.0)
+snippet prop
+ @property (${1:retain}) ${2:NSSomeClass} ${3:*$2};${4}
+# @synthesize (Objective-C 2.0)
+snippet syn
+ @synthesize ${1:property};${2}
+# [[ alloc] init]
+snippet alloc
+ [[${1:foo} alloc] init${2}];${3}
+snippet a
+ [[${1:foo} alloc] init${2}];${3}
+# retain
+snippet ret
+ [${1:foo} retain];${2}
+# release
+snippet rel
+ [${1:foo} release];
+# autorelease
+snippet arel
+ [${1:foo} autorelease];
+# autorelease pool
+snippet pool
+ NSAutoreleasePool *${1:pool} = [[NSAutoreleasePool alloc] init];
+ ${2:/* code */}
+ [$1 drain];
+# Throw an exception
+snippet except
+ NSException *${1:badness};
+ $1 = [NSException exceptionWithName:@"${2:$1Name}"
+ reason:@"${3}"
+ userInfo:nil];
+ [$1 raise];
+snippet prag
+ #pragma mark ${1:-}
+snippet cl
+ @class ${1:Foo};${2}
+snippet color
+ [[NSColor ${1:blackColor}] set];
+# NSArray
+snippet array
+ NSMutableArray *${1:array} = [NSMutable array];${2}
+snippet nsa
+ NSArray ${1}
+snippet nsma
+ NSMutableArray ${1}
+snippet aa
+ NSArray * array;${1}
+snippet ma
+ NSMutableArray * array;${1}
+# NSDictionary
+snippet dict
+ NSMutableDictionary *${1:dict} = [NSMutableDictionary dictionary];${2}
+snippet nsd
+ NSDictionary ${1}
+snippet nsmd
+ NSMutableDictionary ${1}
+# NSString
+snippet nss
+ NSString ${1}
+snippet nsms
+ NSMutableString ${1}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/objectivec.js b/src/fauxton/assets/js/libs/ace/snippets/objectivec.js
new file mode 100644
index 000000000..ed5d5fa83
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/objectivec.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./objectivec.snippets");
+exports.scope = "objectivec";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/objectivec.snippets b/src/fauxton/assets/js/libs/ace/snippets/objectivec.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/objectivec.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ocaml.js b/src/fauxton/assets/js/libs/ace/snippets/ocaml.js
new file mode 100644
index 000000000..a6e6842e9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ocaml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ocaml.snippets");
+exports.scope = "ocaml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ocaml.snippets b/src/fauxton/assets/js/libs/ace/snippets/ocaml.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ocaml.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/pascal.js b/src/fauxton/assets/js/libs/ace/snippets/pascal.js
new file mode 100644
index 000000000..cd8f19fe2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/pascal.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./pascal.snippets");
+exports.scope = "pascal";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/pascal.snippets b/src/fauxton/assets/js/libs/ace/snippets/pascal.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/pascal.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/perl.js b/src/fauxton/assets/js/libs/ace/snippets/perl.js
new file mode 100644
index 000000000..9b1fbe8de
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/perl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./perl.snippets");
+exports.scope = "perl";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/perl.snippets b/src/fauxton/assets/js/libs/ace/snippets/perl.snippets
new file mode 100644
index 000000000..9cebedeac
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/perl.snippets
@@ -0,0 +1,347 @@
+# #!/usr/bin/perl
+snippet #!
+ #!/usr/bin/env perl
+
+# Hash Pointer
+snippet .
+ =>
+# Function
+snippet sub
+ sub ${1:function_name} {
+ ${2:#body ...}
+ }
+# Conditional
+snippet if
+ if (${1}) {
+ ${2:# body...}
+ }
+# Conditional if..else
+snippet ife
+ if (${1}) {
+ ${2:# body...}
+ }
+ else {
+ ${3:# else...}
+ }
+# Conditional if..elsif..else
+snippet ifee
+ if (${1}) {
+ ${2:# body...}
+ }
+ elsif (${3}) {
+ ${4:# elsif...}
+ }
+ else {
+ ${5:# else...}
+ }
+# Conditional One-line
+snippet xif
+ ${1:expression} if ${2:condition};${3}
+# Unless conditional
+snippet unless
+ unless (${1}) {
+ ${2:# body...}
+ }
+# Unless conditional One-line
+snippet xunless
+ ${1:expression} unless ${2:condition};${3}
+# Try/Except
+snippet eval
+ local $@;
+ eval {
+ ${1:# do something risky...}
+ };
+ if (my $e = $@) {
+ ${2:# handle failure...}
+ }
+# While Loop
+snippet wh
+ while (${1}) {
+ ${2:# body...}
+ }
+# While Loop One-line
+snippet xwh
+ ${1:expression} while ${2:condition};${3}
+# C-style For Loop
+snippet cfor
+ for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {
+ ${4:# body...}
+ }
+# For loop one-line
+snippet xfor
+ ${1:expression} for @${2:array};${3}
+# Foreach Loop
+snippet for
+ foreach my $${1:x} (@${2:array}) {
+ ${3:# body...}
+ }
+# Foreach Loop One-line
+snippet fore
+ ${1:expression} foreach @${2:array};${3}
+# Package
+snippet package
+ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`};
+
+ ${2}
+
+ 1;
+
+ __END__
+# Package syntax perl >= 5.14
+snippet packagev514
+ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`} ${2:0.99};
+
+ ${3}
+
+ 1;
+
+ __END__
+#moose
+snippet moose
+ use Moose;
+ use namespace::autoclean;
+ ${1:#}BEGIN {extends '${2:ParentClass}'};
+
+ ${3}
+# parent
+snippet parent
+ use parent qw(${1:Parent Class});
+# Read File
+snippet slurp
+ my $${1:var} = do { local $/; open my $file, '<', "${2:file}"; <$file> };
+ ${3}
+# strict warnings
+snippet strwar
+ use strict;
+ use warnings;
+# older versioning with perlcritic bypass
+snippet vers
+ ## no critic
+ our $VERSION = '${1:version}';
+ eval $VERSION;
+ ## use critic
+# new 'switch' like feature
+snippet switch
+ use feature 'switch';
+
+# Anonymous subroutine
+snippet asub
+ sub {
+ ${1:# body }
+ }
+
+
+
+# Begin block
+snippet begin
+ BEGIN {
+ ${1:# begin body}
+ }
+
+# call package function with some parameter
+snippet pkgmv
+ __PACKAGE__->${1:package_method}(${2:var})
+
+# call package function without a parameter
+snippet pkgm
+ __PACKAGE__->${1:package_method}()
+
+# call package "get_" function without a parameter
+snippet pkget
+ __PACKAGE__->get_${1:package_method}()
+
+# call package function with a parameter
+snippet pkgetv
+ __PACKAGE__->get_${1:package_method}(${2:var})
+
+# complex regex
+snippet qrx
+ qr/
+ ${1:regex}
+ /xms
+
+#simpler regex
+snippet qr/
+ qr/${1:regex}/x
+
+#given
+snippet given
+ given ($${1:var}) {
+ ${2:# cases}
+ ${3:# default}
+ }
+
+# switch-like case
+snippet when
+ when (${1:case}) {
+ ${2:# body}
+ }
+
+# hash slice
+snippet hslice
+ @{ ${1:hash} }{ ${2:array} }
+
+
+# map
+snippet map
+ map { ${2: body } } ${1: @array } ;
+
+
+
+# Pod stub
+snippet ppod
+ =head1 NAME
+
+ ${1:ClassName} - ${2:ShortDesc}
+
+ =head1 SYNOPSIS
+
+ use $1;
+
+ ${3:# synopsis...}
+
+ =head1 DESCRIPTION
+
+ ${4:# longer description...}
+
+
+ =head1 INTERFACE
+
+
+ =head1 DEPENDENCIES
+
+
+ =head1 SEE ALSO
+
+
+# Heading for a subroutine stub
+snippet psub
+ =head2 ${1:MethodName}
+
+ ${2:Summary....}
+
+# Heading for inline subroutine pod
+snippet psubi
+ =head2 ${1:MethodName}
+
+ ${2:Summary...}
+
+
+ =cut
+# inline documented subroutine
+snippet subpod
+ =head2 $1
+
+ Summary of $1
+
+ =cut
+
+ sub ${1:subroutine_name} {
+ ${2:# body...}
+ }
+# Subroutine signature
+snippet parg
+ =over 2
+
+ =item
+ Arguments
+
+
+ =over 3
+
+ =item
+ C<${1:DataStructure}>
+
+ ${2:Sample}
+
+
+ =back
+
+
+ =item
+ Return
+
+ =over 3
+
+
+ =item
+ C<${3:...return data}>
+
+
+ =back
+
+
+ =back
+
+
+
+# Moose has
+snippet has
+ has ${1:attribute} => (
+ is => '${2:ro|rw}',
+ isa => '${3:Str|Int|HashRef|ArrayRef|etc}',
+ default => sub {
+ ${4:defaultvalue}
+ },
+ ${5:# other attributes}
+ );
+
+
+# override
+snippet override
+ override ${1:attribute} => sub {
+ ${2:# my $self = shift;};
+ ${3:# my ($self, $args) = @_;};
+ };
+
+
+# use test classes
+snippet tuse
+ use Test::More;
+ use Test::Deep; # (); # uncomment to stop prototype errors
+ use Test::Exception;
+
+# local test lib
+snippet tlib
+ use lib qw{ ./t/lib };
+
+#test methods
+snippet tmeths
+ $ENV{TEST_METHOD} = '${1:regex}';
+
+# runtestclass
+snippet trunner
+ use ${1:test_class};
+ $1->runtests();
+
+# Test::Class-style test
+snippet tsub
+ sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {
+ my $self = shift;
+ ${4:# body}
+
+ }
+
+# Test::Routine-style test
+snippet trsub
+ test ${1:test_name} => { description => '${2:Description of test.}'} => sub {
+ my ($self) = @_;
+ ${3:# test code}
+ };
+
+#prep test method
+snippet tprep
+ sub prep${1:number}_${2:test_case} :Test(startup) {
+ my $self = shift;
+ ${4:# body}
+ }
+
+# cause failures to print stack trace
+snippet debug_trace
+ use Carp; # 'verbose';
+ # cloak "die"
+ # warn "warning"
+ $SIG{'__DIE__'} = sub {
+ require Carp; Carp::confess
+ };
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/pgsql.js b/src/fauxton/assets/js/libs/ace/snippets/pgsql.js
new file mode 100644
index 000000000..9bbd9012e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/pgsql.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./pgsql.snippets");
+exports.scope = "pgsql";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/pgsql.snippets b/src/fauxton/assets/js/libs/ace/snippets/pgsql.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/pgsql.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/php.js b/src/fauxton/assets/js/libs/ace/snippets/php.js
new file mode 100644
index 000000000..b8f8ce0ea
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/php.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./php.snippets");
+exports.scope = "php";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/php.snippets b/src/fauxton/assets/js/libs/ace/snippets/php.snippets
new file mode 100644
index 000000000..8d11a2815
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/php.snippets
@@ -0,0 +1,377 @@
+snippet <?
+ <?php
+
+ ${1}
+snippet ec
+ echo ${1};
+snippet <?e
+ <?php echo ${1} ?>
+# this one is for php5.4
+snippet <?=
+ <?=${1}?>
+snippet ns
+ namespace ${1:Foo\Bar\Baz};
+ ${2}
+snippet use
+ use ${1:Foo\Bar\Baz};
+ ${2}
+snippet c
+ ${1:abstract }class ${2:$FILENAME}
+ {
+ ${3}
+ }
+snippet i
+ interface ${1:$FILENAME}
+ {
+ ${2}
+ }
+snippet t.
+ $this->${1}
+snippet f
+ function ${1:foo}(${2:array }${3:$bar})
+ {
+ ${4}
+ }
+# method
+snippet m
+ ${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})
+ {
+ ${7}
+ }
+# setter method
+snippet sm
+ /**
+ * Sets the value of ${1:foo}
+ *
+ * @param ${2:$1} $$1 ${3:description}
+ *
+ * @return ${4:$FILENAME}
+ */
+ ${5:public} function set${6:$2}(${7:$2 }$$1)
+ {
+ $this->${8:$1} = $$1;
+ return $this;
+ }${9}
+# getter method
+snippet gm
+ /**
+ * Gets the value of ${1:foo}
+ *
+ * @return ${2:$1}
+ */
+ ${3:public} function get${4:$2}()
+ {
+ return $this->${5:$1};
+ }${6}
+#setter
+snippet $s
+ ${1:$foo}->set${2:Bar}(${3});
+#getter
+snippet $g
+ ${1:$foo}->get${2:Bar}();
+
+# Tertiary conditional
+snippet =?:
+ $${1:foo} = ${2:true} ? ${3:a} : ${4};
+snippet ?:
+ ${1:true} ? ${2:a} : ${3}
+
+snippet C
+ $_COOKIE['${1:variable}']${2}
+snippet E
+ $_ENV['${1:variable}']${2}
+snippet F
+ $_FILES['${1:variable}']${2}
+snippet G
+ $_GET['${1:variable}']${2}
+snippet P
+ $_POST['${1:variable}']${2}
+snippet R
+ $_REQUEST['${1:variable}']${2}
+snippet S
+ $_SERVER['${1:variable}']${2}
+snippet SS
+ $_SESSION['${1:variable}']${2}
+
+# the following are old ones
+snippet inc
+ include '${1:file}';${2}
+snippet inc1
+ include_once '${1:file}';${2}
+snippet req
+ require '${1:file}';${2}
+snippet req1
+ require_once '${1:file}';${2}
+# Start Docblock
+snippet /*
+ /**
+ * ${1}
+ */
+# Class - post doc
+snippet doc_cp
+ /**
+ * ${1:undocumented class}
+ *
+ * @package ${2:default}
+ * @subpackage ${3:default}
+ * @author ${4:`g:snips_author`}
+ */${5}
+# Class Variable - post doc
+snippet doc_vp
+ /**
+ * ${1:undocumented class variable}
+ *
+ * @var ${2:string}
+ */${3}
+# Class Variable
+snippet doc_v
+ /**
+ * ${3:undocumented class variable}
+ *
+ * @var ${4:string}
+ */
+ ${1:var} $${2};${5}
+# Class
+snippet doc_c
+ /**
+ * ${3:undocumented class}
+ *
+ * @package ${4:default}
+ * @subpackage ${5:default}
+ * @author ${6:`g:snips_author`}
+ */
+ ${1:}class ${2:}
+ {
+ ${7}
+ } // END $1class $2
+# Constant Definition - post doc
+snippet doc_dp
+ /**
+ * ${1:undocumented constant}
+ */${2}
+# Constant Definition
+snippet doc_d
+ /**
+ * ${3:undocumented constant}
+ */
+ define(${1}, ${2});${4}
+# Function - post doc
+snippet doc_fp
+ /**
+ * ${1:undocumented function}
+ *
+ * @return ${2:void}
+ * @author ${3:`g:snips_author`}
+ */${4}
+# Function signature
+snippet doc_s
+ /**
+ * ${4:undocumented function}
+ *
+ * @return ${5:void}
+ * @author ${6:`g:snips_author`}
+ */
+ ${1}function ${2}(${3});${7}
+# Function
+snippet doc_f
+ /**
+ * ${4:undocumented function}
+ *
+ * @return ${5:void}
+ * @author ${6:`g:snips_author`}
+ */
+ ${1}function ${2}(${3})
+ {${7}
+ }
+# Header
+snippet doc_h
+ /**
+ * ${1}
+ *
+ * @author ${2:`g:snips_author`}
+ * @version ${3:$Id$}
+ * @copyright ${4:$2}, `strftime('%d %B, %Y')`
+ * @package ${5:default}
+ */
+
+# Interface
+snippet interface
+ /**
+ * ${2:undocumented class}
+ *
+ * @package ${3:default}
+ * @author ${4:`g:snips_author`}
+ */
+ interface ${1:$FILENAME}
+ {
+ ${5}
+ }
+# class ...
+snippet class
+ /**
+ * ${1}
+ */
+ class ${2:$FILENAME}
+ {
+ ${3}
+ /**
+ * ${4}
+ */
+ ${5:public} function ${6:__construct}(${7:argument})
+ {
+ ${8:// code...}
+ }
+ }
+# define(...)
+snippet def
+ define('${1}'${2});${3}
+# defined(...)
+snippet def?
+ ${1}defined('${2}')${3}
+snippet wh
+ while (${1:/* condition */}) {
+ ${2:// code...}
+ }
+# do ... while
+snippet do
+ do {
+ ${2:// code... }
+ } while (${1:/* condition */});
+snippet if
+ if (${1:/* condition */}) {
+ ${2:// code...}
+ }
+snippet ifil
+ <?php if (${1:/* condition */}): ?>
+ ${2:<!-- code... -->}
+ <?php endif; ?>
+snippet ife
+ if (${1:/* condition */}) {
+ ${2:// code...}
+ } else {
+ ${3:// code...}
+ }
+ ${4}
+snippet ifeil
+ <?php if (${1:/* condition */}): ?>
+ ${2:<!-- html... -->}
+ <?php else: ?>
+ ${3:<!-- html... -->}
+ <?php endif; ?>
+ ${4}
+snippet else
+ else {
+ ${1:// code...}
+ }
+snippet elseif
+ elseif (${1:/* condition */}) {
+ ${2:// code...}
+ }
+snippet switch
+ switch ($${1:variable}) {
+ case '${2:value}':
+ ${3:// code...}
+ break;
+ ${5}
+ default:
+ ${4:// code...}
+ break;
+ }
+snippet case
+ case '${1:value}':
+ ${2:// code...}
+ break;${3}
+snippet for
+ for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {
+ ${4: // code...}
+ }
+snippet foreach
+ foreach ($${1:variable} as $${2:value}) {
+ ${3:// code...}
+ }
+snippet foreachil
+ <?php foreach ($${1:variable} as $${2:value}): ?>
+ ${3:<!-- html... -->}
+ <?php endforeach; ?>
+snippet foreachk
+ foreach ($${1:variable} as $${2:key} => $${3:value}) {
+ ${4:// code...}
+ }
+snippet foreachkil
+ <?php foreach ($${1:variable} as $${2:key} => $${3:value}): ?>
+ ${4:<!-- html... -->}
+ <?php endforeach; ?>
+# $... = array (...)
+snippet array
+ $${1:arrayName} = array('${2}' => ${3});${4}
+snippet try
+ try {
+ ${2}
+ } catch (${1:Exception} $e) {
+ }
+# lambda with closure
+snippet lambda
+ ${1:static }function (${2:args}) use (${3:&$x, $y /*put vars in scope (closure) */}) {
+ ${4}
+ };
+# pre_dump();
+snippet pd
+ echo '<pre>'; var_dump(${1}); echo '</pre>';
+# pre_dump(); die();
+snippet pdd
+ echo '<pre>'; var_dump(${1}); echo '</pre>'; die(${2:});
+snippet vd
+ var_dump(${1});
+snippet vdd
+ var_dump(${1}); die(${2:});
+snippet http_redirect
+ header ("HTTP/1.1 301 Moved Permanently");
+ header ("Location: ".URL);
+ exit();
+# Getters & Setters
+snippet gs
+ /**
+ * Gets the value of ${1:foo}
+ *
+ * @return ${2:$1}
+ */
+ public function get${3:$2}()
+ {
+ return $this->${4:$1};
+ }
+
+ /**
+ * Sets the value of $1
+ *
+ * @param $2 $$1 ${5:description}
+ *
+ * @return ${6:$FILENAME}
+ */
+ public function set$3(${7:$2 }$$1)
+ {
+ $this->$4 = $$1;
+ return $this;
+ }${8}
+# anotation, get, and set, useful for doctrine
+snippet ags
+ /**
+ * ${1:description}
+ *
+ * @${7}
+ */
+ ${2:protected} $${3:foo};
+
+ public function get${4:$3}()
+ {
+ return $this->$3;
+ }
+
+ public function set$4(${5:$4 }$${6:$3})
+ {
+ $this->$3 = $$6;
+ return $this;
+ }
+snippet rett
+ return true;
+snippet retf
+ return false;
diff --git a/src/fauxton/assets/js/libs/ace/snippets/powershell.js b/src/fauxton/assets/js/libs/ace/snippets/powershell.js
new file mode 100644
index 000000000..4639a304b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/powershell.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./powershell.snippets");
+exports.scope = "powershell";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/powershell.snippets b/src/fauxton/assets/js/libs/ace/snippets/powershell.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/powershell.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/prolog.js b/src/fauxton/assets/js/libs/ace/snippets/prolog.js
new file mode 100644
index 000000000..7c9d0fbc9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/prolog.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./prolog.snippets");
+exports.scope = "prolog";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/prolog.snippets b/src/fauxton/assets/js/libs/ace/snippets/prolog.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/prolog.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/properties.js b/src/fauxton/assets/js/libs/ace/snippets/properties.js
new file mode 100644
index 000000000..18bd38830
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/properties.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./properties.snippets");
+exports.scope = "properties";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/properties.snippets b/src/fauxton/assets/js/libs/ace/snippets/properties.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/properties.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/protobuf.js b/src/fauxton/assets/js/libs/ace/snippets/protobuf.js
new file mode 100644
index 000000000..248555454
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/protobuf.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "";
+exports.scope = "protobuf";
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/snippets/python.js b/src/fauxton/assets/js/libs/ace/snippets/python.js
new file mode 100644
index 000000000..48ddba28d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/python.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./python.snippets");
+exports.scope = "python";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/python.snippets b/src/fauxton/assets/js/libs/ace/snippets/python.snippets
new file mode 100644
index 000000000..dd2e8123d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/python.snippets
@@ -0,0 +1,158 @@
+snippet #!
+ #!/usr/bin/env python
+snippet imp
+ import ${1:module}
+snippet from
+ from ${1:package} import ${2:module}
+# Module Docstring
+snippet docs
+ '''
+ File: ${1:`Filename('$1.py', 'foo.py')`}
+ Author: ${2:`g:snips_author`}
+ Description: ${3}
+ '''
+snippet wh
+ while ${1:condition}:
+ ${2:# TODO: write code...}
+# dowh - does the same as do...while in other languages
+snippet dowh
+ while True:
+ ${1:# TODO: write code...}
+ if ${2:condition}:
+ break
+snippet with
+ with ${1:expr} as ${2:var}:
+ ${3:# TODO: write code...}
+# New Class
+snippet cl
+ class ${1:ClassName}(${2:object}):
+ """${3:docstring for $1}"""
+ def __init__(self, ${4:arg}):
+ ${5:super($1, self).__init__()}
+ self.$4 = $4
+ ${6}
+# New Function
+snippet def
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
+ """${3:docstring for $1}"""
+ ${4:# TODO: write code...}
+snippet deff
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):
+ ${3:# TODO: write code...}
+# New Method
+snippet defs
+ def ${1:mname}(self, ${2:arg}):
+ ${3:# TODO: write code...}
+# New Property
+snippet property
+ def ${1:foo}():
+ doc = "${2:The $1 property.}"
+ def fget(self):
+ ${3:return self._$1}
+ def fset(self, value):
+ ${4:self._$1 = value}
+# Ifs
+snippet if
+ if ${1:condition}:
+ ${2:# TODO: write code...}
+snippet el
+ else:
+ ${1:# TODO: write code...}
+snippet ei
+ elif ${1:condition}:
+ ${2:# TODO: write code...}
+# For
+snippet for
+ for ${1:item} in ${2:items}:
+ ${3:# TODO: write code...}
+# Encodes
+snippet cutf8
+ # -*- coding: utf-8 -*-
+snippet clatin1
+ # -*- coding: latin-1 -*-
+snippet cascii
+ # -*- coding: ascii -*-
+# Lambda
+snippet ld
+ ${1:var} = lambda ${2:vars} : ${3:action}
+snippet .
+ self.
+snippet try Try/Except
+ try:
+ ${1:# TODO: write code...}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+snippet try Try/Except/Else
+ try:
+ ${1:# TODO: write code...}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ else:
+ ${5:# TODO: write code...}
+snippet try Try/Except/Finally
+ try:
+ ${1:# TODO: write code...}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ finally:
+ ${5:# TODO: write code...}
+snippet try Try/Except/Else/Finally
+ try:
+ ${1:# TODO: write code...}
+ except ${2:Exception}, ${3:e}:
+ ${4:raise $3}
+ else:
+ ${5:# TODO: write code...}
+ finally:
+ ${6:# TODO: write code...}
+# if __name__ == '__main__':
+snippet ifmain
+ if __name__ == '__main__':
+ ${1:main()}
+# __magic__
+snippet _
+ __${1:init}__${2}
+# python debugger (pdb)
+snippet pdb
+ import pdb; pdb.set_trace()
+# ipython debugger (ipdb)
+snippet ipdb
+ import ipdb; ipdb.set_trace()
+# ipython debugger (pdbbb)
+snippet pdbbb
+ import pdbpp; pdbpp.set_trace()
+snippet pprint
+ import pprint; pprint.pprint(${1})${2}
+snippet "
+ """
+ ${1:doc}
+ """
+# test function/method
+snippet test
+ def test_${1:description}(${2:`indent('.') ? 'self' : ''`}):
+ ${3:# TODO: write code...}
+# test case
+snippet testcase
+ class ${1:ExampleCase}(unittest.TestCase):
+
+ def test_${2:description}(self):
+ ${3:# TODO: write code...}
+snippet fut
+ from __future__ import ${1}
+#getopt
+snippet getopt
+ try:
+ # Short option syntax: "hv:"
+ # Long option syntax: "help" or "verbose="
+ opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])
+
+ except getopt.GetoptError, err:
+ # Print debug info
+ print str(err)
+ ${3:error_action}
+
+ for option, argument in opts:
+ if option in ("-h", "--help"):
+ ${4}
+ elif option in ("-v", "--verbose"):
+ verbose = argument
diff --git a/src/fauxton/assets/js/libs/ace/snippets/r.js b/src/fauxton/assets/js/libs/ace/snippets/r.js
new file mode 100644
index 000000000..6b3191947
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/r.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./r.snippets");
+exports.scope = "r";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/r.snippets b/src/fauxton/assets/js/libs/ace/snippets/r.snippets
new file mode 100644
index 000000000..cfe482bc5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/r.snippets
@@ -0,0 +1,121 @@
+snippet #!
+ #!/usr/bin/env Rscript
+
+# includes
+snippet lib
+ library(${1:package})
+snippet req
+ require(${1:package})
+snippet source
+ source('${1:file}')
+
+# conditionals
+snippet if
+ if (${1:condition}) {
+ ${2:code}
+ }
+snippet el
+ else {
+ ${1:code}
+ }
+snippet ei
+ else if (${1:condition}) {
+ ${2:code}
+ }
+
+# functions
+snippet fun
+ ${1:name} = function (${2:variables}) {
+ ${3:code}
+ }
+snippet ret
+ return(${1:code})
+
+# dataframes, lists, etc
+snippet df
+ ${1:name}[${2:rows}, ${3:cols}]
+snippet c
+ c(${1:items})
+snippet li
+ list(${1:items})
+snippet mat
+ matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})
+
+# apply functions
+snippet apply
+ apply(${1:array}, ${2:margin}, ${3:function})
+snippet lapply
+ lapply(${1:list}, ${2:function})
+snippet sapply
+ lapply(${1:list}, ${2:function})
+snippet vapply
+ vapply(${1:list}, ${2:function}, ${3:type})
+snippet mapply
+ mapply(${1:function}, ${2:...})
+snippet tapply
+ tapply(${1:vector}, ${2:index}, ${3:function})
+snippet rapply
+ rapply(${1:list}, ${2:function})
+
+# plyr functions
+snippet dd
+ ddply(${1:frame}, ${2:variables}, ${3:function})
+snippet dl
+ dlply(${1:frame}, ${2:variables}, ${3:function})
+snippet da
+ daply(${1:frame}, ${2:variables}, ${3:function})
+snippet d_
+ d_ply(${1:frame}, ${2:variables}, ${3:function})
+
+snippet ad
+ adply(${1:array}, ${2:margin}, ${3:function})
+snippet al
+ alply(${1:array}, ${2:margin}, ${3:function})
+snippet aa
+ aaply(${1:array}, ${2:margin}, ${3:function})
+snippet a_
+ a_ply(${1:array}, ${2:margin}, ${3:function})
+
+snippet ld
+ ldply(${1:list}, ${2:function})
+snippet ll
+ llply(${1:list}, ${2:function})
+snippet la
+ laply(${1:list}, ${2:function})
+snippet l_
+ l_ply(${1:list}, ${2:function})
+
+snippet md
+ mdply(${1:matrix}, ${2:function})
+snippet ml
+ mlply(${1:matrix}, ${2:function})
+snippet ma
+ maply(${1:matrix}, ${2:function})
+snippet m_
+ m_ply(${1:matrix}, ${2:function})
+
+# plot functions
+snippet pl
+ plot(${1:x}, ${2:y})
+snippet ggp
+ ggplot(${1:data}, aes(${2:aesthetics}))
+snippet img
+ ${1:(jpeg,bmp,png,tiff)}(filename="${2:filename}", width=${3}, height=${4}, unit="${5}")
+ ${6:plot}
+ dev.off()
+
+# statistical test functions
+snippet fis
+ fisher.test(${1:x}, ${2:y})
+snippet chi
+ chisq.test(${1:x}, ${2:y})
+snippet tt
+ t.test(${1:x}, ${2:y})
+snippet wil
+ wilcox.test(${1:x}, ${2:y})
+snippet cor
+ cor.test(${1:x}, ${2:y})
+snippet fte
+ var.test(${1:x}, ${2:y})
+snippet kvt
+ kv.test(${1:x}, ${2:y})
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rdoc.js b/src/fauxton/assets/js/libs/ace/snippets/rdoc.js
new file mode 100644
index 000000000..0d9e6c958
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rdoc.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./rdoc.snippets");
+exports.scope = "rdoc";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rdoc.snippets b/src/fauxton/assets/js/libs/ace/snippets/rdoc.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rdoc.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rhtml.js b/src/fauxton/assets/js/libs/ace/snippets/rhtml.js
new file mode 100644
index 000000000..96707f219
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rhtml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./rhtml.snippets");
+exports.scope = "rhtml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rhtml.snippets b/src/fauxton/assets/js/libs/ace/snippets/rhtml.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rhtml.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rst.snippets b/src/fauxton/assets/js/libs/ace/snippets/rst.snippets
new file mode 100644
index 000000000..97845de3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rst.snippets
@@ -0,0 +1,22 @@
+# rst
+
+snippet :
+ :${1:field name}: ${2:field body}
+snippet *
+ *${1:Emphasis}*
+snippet **
+ **${1:Strong emphasis}**
+snippet _
+ \`${1:hyperlink-name}\`_
+ .. _\`$1\`: ${2:link-block}
+snippet =
+ ${1:Title}
+ =====${2:=}
+ ${3}
+snippet -
+ ${1:Title}
+ -----${2:-}
+ ${3}
+snippet cont:
+ .. contents::
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ruby.js b/src/fauxton/assets/js/libs/ace/snippets/ruby.js
new file mode 100644
index 000000000..f70504499
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ruby.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./ruby.snippets");
+exports.scope = "ruby";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/ruby.snippets b/src/fauxton/assets/js/libs/ace/snippets/ruby.snippets
new file mode 100644
index 000000000..0500aaa13
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/ruby.snippets
@@ -0,0 +1,928 @@
+########################################
+# Ruby snippets - for Rails, see below #
+########################################
+
+# encoding for Ruby 1.9
+snippet enc
+ # encoding: utf-8
+
+# #!/usr/bin/env ruby
+snippet #!
+ #!/usr/bin/env ruby
+ # encoding: utf-8
+
+# New Block
+snippet =b
+ =begin rdoc
+ ${1}
+ =end
+snippet y
+ :yields: ${1:arguments}
+snippet rb
+ #!/usr/bin/env ruby -wKU
+snippet beg
+ begin
+ ${3}
+ rescue ${1:Exception} => ${2:e}
+ end
+
+snippet req require
+ require "${1}"${2}
+snippet #
+ # =>
+snippet end
+ __END__
+snippet case
+ case ${1:object}
+ when ${2:condition}
+ ${3}
+ end
+snippet when
+ when ${1:condition}
+ ${2}
+snippet def
+ def ${1:method_name}
+ ${2}
+ end
+snippet deft
+ def test_${1:case_name}
+ ${2}
+ end
+snippet if
+ if ${1:condition}
+ ${2}
+ end
+snippet ife
+ if ${1:condition}
+ ${2}
+ else
+ ${3}
+ end
+snippet elsif
+ elsif ${1:condition}
+ ${2}
+snippet unless
+ unless ${1:condition}
+ ${2}
+ end
+snippet while
+ while ${1:condition}
+ ${2}
+ end
+snippet for
+ for ${1:e} in ${2:c}
+ ${3}
+ end
+snippet until
+ until ${1:condition}
+ ${2}
+ end
+snippet cla class .. end
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ ${2}
+ end
+snippet cla class .. initialize .. end
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ def initialize(${2:args})
+ ${3}
+ end
+ end
+snippet cla class .. < ParentClass .. initialize .. end
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} < ${2:ParentClass}
+ def initialize(${3:args})
+ ${4}
+ end
+ end
+snippet cla ClassName = Struct .. do .. end
+ ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} = Struct.new(:${2:attr_names}) do
+ def ${3:method_name}
+ ${4}
+ end
+ end
+snippet cla class BlankSlate .. initialize .. end
+ class ${1:BlankSlate}
+ instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
+ end
+snippet cla class << self .. end
+ class << ${1:self}
+ ${2}
+ end
+# class .. < DelegateClass .. initialize .. end
+snippet cla-
+ class ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`} < DelegateClass(${2:ParentClass})
+ def initialize(${3:args})
+ super(${4:del_obj})
+
+ ${5}
+ end
+ end
+snippet mod module .. end
+ module ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ ${2}
+ end
+snippet mod module .. module_function .. end
+ module ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ module_function
+
+ ${2}
+ end
+snippet mod module .. ClassMethods .. end
+ module ${1:`substitute(Filename(), '\(_\|^\)\(.\)', '\u\2', 'g')`}
+ module ClassMethods
+ ${2}
+ end
+
+ module InstanceMethods
+
+ end
+
+ def self.included(receiver)
+ receiver.extend ClassMethods
+ receiver.send :include, InstanceMethods
+ end
+ end
+# attr_reader
+snippet r
+ attr_reader :${1:attr_names}
+# attr_writer
+snippet w
+ attr_writer :${1:attr_names}
+# attr_accessor
+snippet rw
+ attr_accessor :${1:attr_names}
+snippet atp
+ attr_protected :${1:attr_names}
+snippet ata
+ attr_accessible :${1:attr_names}
+# include Enumerable
+snippet Enum
+ include Enumerable
+
+ def each(&block)
+ ${1}
+ end
+# include Comparable
+snippet Comp
+ include Comparable
+
+ def <=>(other)
+ ${1}
+ end
+# extend Forwardable
+snippet Forw-
+ extend Forwardable
+# def self
+snippet defs
+ def self.${1:class_method_name}
+ ${2}
+ end
+# def method_missing
+snippet defmm
+ def method_missing(meth, *args, &blk)
+ ${1}
+ end
+snippet defd
+ def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}
+snippet defds
+ def_delegators :${1:@del_obj}, :${2:del_methods}
+snippet am
+ alias_method :${1:new_name}, :${2:old_name}
+snippet app
+ if __FILE__ == $PROGRAM_NAME
+ ${1}
+ end
+# usage_if()
+snippet usai
+ if ARGV.${1}
+ abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3}
+ end
+# usage_unless()
+snippet usau
+ unless ARGV.${1}
+ abort "Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}"${3}
+ end
+snippet array
+ Array.new(${1:10}) { |${2:i}| ${3} }
+snippet hash
+ Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }
+snippet file File.foreach() { |line| .. }
+ File.foreach(${1:"path/to/file"}) { |${2:line}| ${3} }
+snippet file File.read()
+ File.read(${1:"path/to/file"})${2}
+snippet Dir Dir.global() { |file| .. }
+ Dir.glob(${1:"dir/glob/*"}) { |${2:file}| ${3} }
+snippet Dir Dir[".."]
+ Dir[${1:"glob/**/*.rb"}]${2}
+snippet dir
+ Filename.dirname(__FILE__)
+snippet deli
+ delete_if { |${1:e}| ${2} }
+snippet fil
+ fill(${1:range}) { |${2:i}| ${3} }
+# flatten_once()
+snippet flao
+ inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}
+snippet zip
+ zip(${1:enums}) { |${2:row}| ${3} }
+# downto(0) { |n| .. }
+snippet dow
+ downto(${1:0}) { |${2:n}| ${3} }
+snippet ste
+ step(${1:2}) { |${2:n}| ${3} }
+snippet tim
+ times { |${1:n}| ${2} }
+snippet upt
+ upto(${1:1.0/0.0}) { |${2:n}| ${3} }
+snippet loo
+ loop { ${1} }
+snippet ea
+ each { |${1:e}| ${2} }
+snippet ead
+ each do |${1:e}|
+ ${2}
+ end
+snippet eab
+ each_byte { |${1:byte}| ${2} }
+snippet eac- each_char { |chr| .. }
+ each_char { |${1:chr}| ${2} }
+snippet eac- each_cons(..) { |group| .. }
+ each_cons(${1:2}) { |${2:group}| ${3} }
+snippet eai
+ each_index { |${1:i}| ${2} }
+snippet eaid
+ each_index do |${1:i}|
+ ${2}
+ end
+snippet eak
+ each_key { |${1:key}| ${2} }
+snippet eakd
+ each_key do |${1:key}|
+ ${2}
+ end
+snippet eal
+ each_line { |${1:line}| ${2} }
+snippet eald
+ each_line do |${1:line}|
+ ${2}
+ end
+snippet eap
+ each_pair { |${1:name}, ${2:val}| ${3} }
+snippet eapd
+ each_pair do |${1:name}, ${2:val}|
+ ${3}
+ end
+snippet eas-
+ each_slice(${1:2}) { |${2:group}| ${3} }
+snippet easd-
+ each_slice(${1:2}) do |${2:group}|
+ ${3}
+ end
+snippet eav
+ each_value { |${1:val}| ${2} }
+snippet eavd
+ each_value do |${1:val}|
+ ${2}
+ end
+snippet eawi
+ each_with_index { |${1:e}, ${2:i}| ${3} }
+snippet eawid
+ each_with_index do |${1:e},${2:i}|
+ ${3}
+ end
+snippet reve
+ reverse_each { |${1:e}| ${2} }
+snippet reved
+ reverse_each do |${1:e}|
+ ${2}
+ end
+snippet inj
+ inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }
+snippet injd
+ inject(${1:init}) do |${2:mem}, ${3:var}|
+ ${4}
+ end
+snippet map
+ map { |${1:e}| ${2} }
+snippet mapd
+ map do |${1:e}|
+ ${2}
+ end
+snippet mapwi-
+ enum_with_index.map { |${1:e}, ${2:i}| ${3} }
+snippet sor
+ sort { |a, b| ${1} }
+snippet sorb
+ sort_by { |${1:e}| ${2} }
+snippet ran
+ sort_by { rand }
+snippet all
+ all? { |${1:e}| ${2} }
+snippet any
+ any? { |${1:e}| ${2} }
+snippet cl
+ classify { |${1:e}| ${2} }
+snippet col
+ collect { |${1:e}| ${2} }
+snippet cold
+ collect do |${1:e}|
+ ${2}
+ end
+snippet det
+ detect { |${1:e}| ${2} }
+snippet detd
+ detect do |${1:e}|
+ ${2}
+ end
+snippet fet
+ fetch(${1:name}) { |${2:key}| ${3} }
+snippet fin
+ find { |${1:e}| ${2} }
+snippet find
+ find do |${1:e}|
+ ${2}
+ end
+snippet fina
+ find_all { |${1:e}| ${2} }
+snippet finad
+ find_all do |${1:e}|
+ ${2}
+ end
+snippet gre
+ grep(${1:/pattern/}) { |${2:match}| ${3} }
+snippet sub
+ ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }
+snippet sca
+ scan(${1:/pattern/}) { |${2:match}| ${3} }
+snippet scad
+ scan(${1:/pattern/}) do |${2:match}|
+ ${3}
+ end
+snippet max
+ max { |a, b| ${1} }
+snippet min
+ min { |a, b| ${1} }
+snippet par
+ partition { |${1:e}| ${2} }
+snippet pard
+ partition do |${1:e}|
+ ${2}
+ end
+snippet rej
+ reject { |${1:e}| ${2} }
+snippet rejd
+ reject do |${1:e}|
+ ${2}
+ end
+snippet sel
+ select { |${1:e}| ${2} }
+snippet seld
+ select do |${1:e}|
+ ${2}
+ end
+snippet lam
+ lambda { |${1:args}| ${2} }
+snippet doo
+ do
+ ${1}
+ end
+snippet dov
+ do |${1:variable}|
+ ${2}
+ end
+snippet :
+ :${1:key} => ${2:"value"}${3}
+snippet ope
+ open(${1:"path/or/url/or/pipe"}, "${2:w}") { |${3:io}| ${4} }
+# path_from_here()
+snippet fpath
+ File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}
+# unix_filter {}
+snippet unif
+ ARGF.each_line${1} do |${2:line}|
+ ${3}
+ end
+# option_parse {}
+snippet optp
+ require "optparse"
+
+ options = {${1:default => "args"}}
+
+ ARGV.options do |opts|
+ opts.banner = "Usage: #{File.basename($PROGRAM_NAME)}
+snippet opt
+ opts.on( "-${1:o}", "--${2:long-option-name}", ${3:String},
+ "${4:Option description.}") do |${5:opt}|
+ ${6}
+ end
+snippet tc
+ require "test/unit"
+
+ require "${1:library_file_name}"
+
+ class Test${2:$1} < Test::Unit::TestCase
+ def test_${3:case_name}
+ ${4}
+ end
+ end
+snippet ts
+ require "test/unit"
+
+ require "tc_${1:test_case_file}"
+ require "tc_${2:test_case_file}"${3}
+snippet as
+ assert ${1:test}, "${2:Failure message.}"${3}
+snippet ase
+ assert_equal ${1:expected}, ${2:actual}${3}
+snippet asne
+ assert_not_equal ${1:unexpected}, ${2:actual}${3}
+snippet asid
+ assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}
+snippet asio
+ assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}
+snippet asko
+ assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}
+snippet asn
+ assert_nil ${1:instance}${2}
+snippet asnn
+ assert_not_nil ${1:instance}${2}
+snippet asm
+ assert_match /${1:expected_pattern}/, ${2:actual_string}${3}
+snippet asnm
+ assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}
+snippet aso
+ assert_operator ${1:left}, :${2:operator}, ${3:right}${4}
+snippet asr
+ assert_raise ${1:Exception} { ${2} }
+snippet asrd
+ assert_raise ${1:Exception} do
+ ${2}
+ end
+snippet asnr
+ assert_nothing_raised ${1:Exception} { ${2} }
+snippet asnrd
+ assert_nothing_raised ${1:Exception} do
+ ${2}
+ end
+snippet asrt
+ assert_respond_to ${1:object}, :${2:method}${3}
+snippet ass assert_same(..)
+ assert_same ${1:expected}, ${2:actual}${3}
+snippet ass assert_send(..)
+ assert_send [${1:object}, :${2:message}, ${3:args}]${4}
+snippet asns
+ assert_not_same ${1:unexpected}, ${2:actual}${3}
+snippet ast
+ assert_throws :${1:expected} { ${2} }
+snippet astd
+ assert_throws :${1:expected} do
+ ${2}
+ end
+snippet asnt
+ assert_nothing_thrown { ${1} }
+snippet asntd
+ assert_nothing_thrown do
+ ${1}
+ end
+snippet fl
+ flunk "${1:Failure message.}"${2}
+# Benchmark.bmbm do .. end
+snippet bm-
+ TESTS = ${1:10_000}
+ Benchmark.bmbm do |results|
+ ${2}
+ end
+snippet rep
+ results.report("${1:name}:") { TESTS.times { ${2} }}
+# Marshal.dump(.., file)
+snippet Md
+ File.open(${1:"path/to/file.dump"}, "wb") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}
+# Mashal.load(obj)
+snippet Ml
+ File.open(${1:"path/to/file.dump"}, "rb") { |${2:file}| Marshal.load($2) }${3}
+# deep_copy(..)
+snippet deec
+ Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}
+snippet Pn-
+ PStore.new(${1:"file_name.pstore"})${2}
+snippet tra
+ transaction(${1:true}) { ${2} }
+# xmlread(..)
+snippet xml-
+ REXML::Document.new(File.read(${1:"path/to/file"}))${2}
+# xpath(..) { .. }
+snippet xpa
+ elements.each(${1:"//Xpath"}) do |${2:node}|
+ ${3}
+ end
+# class_from_name()
+snippet clafn
+ split("::").inject(Object) { |par, const| par.const_get(const) }
+# singleton_class()
+snippet sinc
+ class << self; self end
+snippet nam
+ namespace :${1:`Filename()`} do
+ ${2}
+ end
+snippet tas
+ desc "${1:Task description}"
+ task :${2:task_name => [:dependent, :tasks]} do
+ ${3}
+ end
+# block
+snippet b
+ { |${1:var}| ${2} }
+snippet begin
+ begin
+ raise 'A test exception.'
+ rescue Exception => e
+ puts e.message
+ puts e.backtrace.inspect
+ else
+ # other exception
+ ensure
+ # always executed
+ end
+
+#debugging
+snippet debug
+ require 'ruby-debug'; debugger; true;
+snippet pry
+ require 'pry'; binding.pry
+
+#############################################
+# Rails snippets - for pure Ruby, see above #
+#############################################
+snippet art
+ assert_redirected_to ${1::action => "${2:index}"}
+snippet artnp
+ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})
+snippet artnpp
+ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})
+snippet artp
+ assert_redirected_to ${1:model}_path(${2:@$1})
+snippet artpp
+ assert_redirected_to ${1:model}s_path
+snippet asd
+ assert_difference "${1:Model}.${2:count}", $1 do
+ ${3}
+ end
+snippet asnd
+ assert_no_difference "${1:Model}.${2:count}" do
+ ${3}
+ end
+snippet asre
+ assert_response :${1:success}, @response.body${2}
+snippet asrj
+ assert_rjs :${1:replace}, "${2:dom id}"
+snippet ass assert_select(..)
+ assert_select '${1:path}', :${2:text} => '${3:inner_html' ${4:do}
+snippet bf
+ before_filter :${1:method}
+snippet bt
+ belongs_to :${1:association}
+snippet crw
+ cattr_accessor :${1:attr_names}
+snippet defcreate
+ def create
+ @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])
+
+ respond_to do |wants|
+ if @$1.save
+ flash[:notice] = '$2 was successfully created.'
+ wants.html { redirect_to(@$1) }
+ wants.xml { render :xml => @$1, :status => :created, :location => @$1 }
+ else
+ wants.html { render :action => "new" }
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
+ end
+ end
+ end${3}
+snippet defdestroy
+ def destroy
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
+ @$1.destroy
+
+ respond_to do |wants|
+ wants.html { redirect_to($1s_url) }
+ wants.xml { head :ok }
+ end
+ end${3}
+snippet defedit
+ def edit
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
+ end
+snippet defindex
+ def index
+ @${1:model_class_name} = ${2:ModelClassName}.all
+
+ respond_to do |wants|
+ wants.html # index.html.erb
+ wants.xml { render :xml => @$1s }
+ end
+ end${3}
+snippet defnew
+ def new
+ @${1:model_class_name} = ${2:ModelClassName}.new
+
+ respond_to do |wants|
+ wants.html # new.html.erb
+ wants.xml { render :xml => @$1 }
+ end
+ end${3}
+snippet defshow
+ def show
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
+
+ respond_to do |wants|
+ wants.html # show.html.erb
+ wants.xml { render :xml => @$1 }
+ end
+ end${3}
+snippet defupdate
+ def update
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])
+
+ respond_to do |wants|
+ if @$1.update_attributes(params[:$1])
+ flash[:notice] = '$2 was successfully updated.'
+ wants.html { redirect_to(@$1) }
+ wants.xml { head :ok }
+ else
+ wants.html { render :action => "edit" }
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }
+ end
+ end
+ end${3}
+snippet flash
+ flash[:${1:notice}] = "${2}"
+snippet habtm
+ has_and_belongs_to_many :${1:object}, :join_table => "${2:table_name}", :foreign_key => "${3}_id"${4}
+snippet hm
+ has_many :${1:object}
+snippet hmd
+ has_many :${1:other}s, :class_name => "${2:$1}", :foreign_key => "${3:$1}_id", :dependent => :destroy${4}
+snippet hmt
+ has_many :${1:object}, :through => :${2:object}
+snippet ho
+ has_one :${1:object}
+snippet i18
+ I18n.t('${1:type.key}')${2}
+snippet ist
+ <%= image_submit_tag("${1:agree.png}", :id => "${2:id}"${3} %>
+snippet log
+ Rails.logger.${1:debug} ${2}
+snippet log2
+ RAILS_DEFAULT_LOGGER.${1:debug} ${2}
+snippet logd
+ logger.debug { "${1:message}" }${2}
+snippet loge
+ logger.error { "${1:message}" }${2}
+snippet logf
+ logger.fatal { "${1:message}" }${2}
+snippet logi
+ logger.info { "${1:message}" }${2}
+snippet logw
+ logger.warn { "${1:message}" }${2}
+snippet mapc
+ ${1:map}.${2:connect} '${3:controller/:action/:id}'
+snippet mapca
+ ${1:map}.catch_all "*${2:anything}", :controller => "${3:default}", :action => "${4:error}"${5}
+snippet mapr
+ ${1:map}.resource :${2:resource}
+snippet maprs
+ ${1:map}.resources :${2:resource}
+snippet mapwo
+ ${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|
+ ${4}
+ end
+snippet mbs
+ before_save :${1:method}
+snippet mcht
+ change_table :${1:table_name} do |t|
+ ${2}
+ end
+snippet mp
+ map(&:${1:id})
+snippet mrw
+ mattr_accessor :${1:attr_names}
+snippet oa
+ order("${1:field}")
+snippet od
+ order("${1:field} DESC")
+snippet pa
+ params[:${1:id}]${2}
+snippet ra
+ render :action => "${1:action}"
+snippet ral
+ render :action => "${1:action}", :layout => "${2:layoutname}"
+snippet rest
+ respond_to do |wants|
+ wants.${1:html} { ${2} }
+ end
+snippet rf
+ render :file => "${1:filepath}"
+snippet rfu
+ render :file => "${1:filepath}", :use_full_path => ${2:false}
+snippet ri
+ render :inline => "${1:<%= 'hello' %>}"
+snippet ril
+ render :inline => "${1:<%= 'hello' %>}", :locals => { ${2::name} => "${3:value}"${4} }
+snippet rit
+ render :inline => "${1:<%= 'hello' %>}", :type => ${2::rxml}
+snippet rjson
+ render :json => ${1:text to render}
+snippet rl
+ render :layout => "${1:layoutname}"
+snippet rn
+ render :nothing => ${1:true}
+snippet rns
+ render :nothing => ${1:true}, :status => ${2:401}
+snippet rp
+ render :partial => "${1:item}"
+snippet rpc
+ render :partial => "${1:item}", :collection => ${2:@$1s}
+snippet rpl
+ render :partial => "${1:item}", :locals => { :${2:$1} => ${3:@$1}
+snippet rpo
+ render :partial => "${1:item}", :object => ${2:@$1}
+snippet rps
+ render :partial => "${1:item}", :status => ${2:500}
+snippet rt
+ render :text => "${1:text to render}"
+snippet rtl
+ render :text => "${1:text to render}", :layout => "${2:layoutname}"
+snippet rtlt
+ render :text => "${1:text to render}", :layout => ${2:true}
+snippet rts
+ render :text => "${1:text to render}", :status => ${2:401}
+snippet ru
+ render :update do |${1:page}|
+ $1.${2}
+ end
+snippet rxml
+ render :xml => ${1:text to render}
+snippet sc
+ scope :${1:name}, :where(:@${2:field} => ${3:value})
+snippet sl
+ scope :${1:name}, lambda do |${2:value}|
+ where("${3:field = ?}", ${4:bind var})
+ end
+snippet sha1
+ Digest::SHA1.hexdigest(${1:string})
+snippet sweeper
+ class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper
+ observe $1
+
+ def after_save(${2:model_class_name})
+ expire_cache($2)
+ end
+
+ def after_destroy($2)
+ expire_cache($2)
+ end
+
+ def expire_cache($2)
+ expire_page
+ end
+ end
+snippet tcb
+ t.boolean :${1:title}
+ ${2}
+snippet tcbi
+ t.binary :${1:title}, :limit => ${2:2}.megabytes
+ ${3}
+snippet tcd
+ t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}
+ ${4}
+snippet tcda
+ t.date :${1:title}
+ ${2}
+snippet tcdt
+ t.datetime :${1:title}
+ ${2}
+snippet tcf
+ t.float :${1:title}
+ ${2}
+snippet tch
+ t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}
+ ${5}
+snippet tci
+ t.integer :${1:title}
+ ${2}
+snippet tcl
+ t.integer :lock_version, :null => false, :default => 0
+ ${1}
+snippet tcr
+ t.references :${1:taggable}, :polymorphic => { :default => '${2:Photo}' }
+ ${3}
+snippet tcs
+ t.string :${1:title}
+ ${2}
+snippet tct
+ t.text :${1:title}
+ ${2}
+snippet tcti
+ t.time :${1:title}
+ ${2}
+snippet tcts
+ t.timestamp :${1:title}
+ ${2}
+snippet tctss
+ t.timestamps
+ ${1}
+snippet va
+ validates_associated :${1:attribute}
+snippet vao
+ validates_acceptance_of :${1:terms}
+snippet vc
+ validates_confirmation_of :${1:attribute}
+snippet ve
+ validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}
+snippet vf
+ validates_format_of :${1:attribute}, :with => /${2:regex}/
+snippet vi
+ validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })
+snippet vl
+ validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}
+snippet vn
+ validates_numericality_of :${1:attribute}
+snippet vpo
+ validates_presence_of :${1:attribute}
+snippet vu
+ validates_uniqueness_of :${1:attribute}
+snippet wants
+ wants.${1:js|xml|html} { ${2} }
+snippet wc
+ where(${1:"conditions"}${2:, bind_var})
+snippet wh
+ where(${1:field} => ${2:value})
+snippet xdelete
+ xhr :delete, :${1:destroy}, :id => ${2:1}${3}
+snippet xget
+ xhr :get, :${1:show}, :id => ${2:1}${3}
+snippet xpost
+ xhr :post, :${1:create}, :${2:object} => { ${3} }
+snippet xput
+ xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}
+snippet test
+ test "should ${1:do something}" do
+ ${2}
+ end
+#migrations
+snippet mac
+ add_column :${1:table_name}, :${2:column_name}, :${3:data_type}
+snippet mrc
+ remove_column :${1:table_name}, :${2:column_name}
+snippet mrnc
+ rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}
+snippet mcc
+ change_column :${1:table}, :${2:column}, :${3:type}
+snippet mccc
+ t.column :${1:title}, :${2:string}
+snippet mct
+ create_table :${1:table_name} do |t|
+ t.column :${2:name}, :${3:type}
+ end
+snippet migration
+ class ${1:class_name} < ActiveRecord::Migration
+ def self.up
+ ${2}
+ end
+
+ def self.down
+ end
+ end
+
+snippet trc
+ t.remove :${1:column}
+snippet tre
+ t.rename :${1:old_column_name}, :${2:new_column_name}
+ ${3}
+snippet tref
+ t.references :${1:model}
+
+#rspec
+snippet it
+ it "${1:spec_name}" do
+ ${2}
+ end
+snippet itp
+ it "${1:spec_name}"
+ ${2}
+snippet desc
+ describe ${1:class_name} do
+ ${2}
+ end
+snippet cont
+ context "${1:message}" do
+ ${2}
+ end
+snippet bef
+ before :${1:each} do
+ ${2}
+ end
+snippet aft
+ after :${1:each} do
+ ${2}
+ end
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rust.js b/src/fauxton/assets/js/libs/ace/snippets/rust.js
new file mode 100644
index 000000000..556d9a6b1
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rust.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./rust.snippets");
+exports.scope = "rust";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/rust.snippets b/src/fauxton/assets/js/libs/ace/snippets/rust.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/rust.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sass.js b/src/fauxton/assets/js/libs/ace/snippets/sass.js
new file mode 100644
index 000000000..ba728ac2f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sass.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./sass.snippets");
+exports.scope = "sass";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sass.snippets b/src/fauxton/assets/js/libs/ace/snippets/sass.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sass.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scad.js b/src/fauxton/assets/js/libs/ace/snippets/scad.js
new file mode 100644
index 000000000..28db2155d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scad.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./scad.snippets");
+exports.scope = "scad";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scad.snippets b/src/fauxton/assets/js/libs/ace/snippets/scad.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scad.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scala.js b/src/fauxton/assets/js/libs/ace/snippets/scala.js
new file mode 100644
index 000000000..2e5a8c577
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scala.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./scala.snippets");
+exports.scope = "scala";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scala.snippets b/src/fauxton/assets/js/libs/ace/snippets/scala.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scala.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scheme.js b/src/fauxton/assets/js/libs/ace/snippets/scheme.js
new file mode 100644
index 000000000..7d3c6f65e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scheme.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./scheme.snippets");
+exports.scope = "scheme";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scheme.snippets b/src/fauxton/assets/js/libs/ace/snippets/scheme.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scheme.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scss.js b/src/fauxton/assets/js/libs/ace/snippets/scss.js
new file mode 100644
index 000000000..a940eabdb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scss.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./scss.snippets");
+exports.scope = "scss";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/scss.snippets b/src/fauxton/assets/js/libs/ace/snippets/scss.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/scss.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sh.js b/src/fauxton/assets/js/libs/ace/snippets/sh.js
new file mode 100644
index 000000000..c48dc17ff
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sh.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./sh.snippets");
+exports.scope = "sh";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sh.snippets b/src/fauxton/assets/js/libs/ace/snippets/sh.snippets
new file mode 100644
index 000000000..9a48eb514
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sh.snippets
@@ -0,0 +1,83 @@
+# Shebang. Executing bash via /usr/bin/env makes scripts more portable.
+snippet #!
+ #!/usr/bin/env bash
+
+snippet if
+ if [[ ${1:condition} ]]; then
+ ${2:#statements}
+ fi
+snippet elif
+ elif [[ ${1:condition} ]]; then
+ ${2:#statements}
+snippet for
+ for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do
+ ${3:#statements}
+ done
+snippet fori
+ for ${1:needle} in ${2:haystack} ; do
+ ${3:#statements}
+ done
+snippet wh
+ while [[ ${1:condition} ]]; do
+ ${2:#statements}
+ done
+snippet until
+ until [[ ${1:condition} ]]; do
+ ${2:#statements}
+ done
+snippet case
+ case ${1:word} in
+ ${2:pattern})
+ ${3};;
+ esac
+snippet go
+ while getopts '${1:o}' ${2:opts}
+ do
+ case $$2 in
+ ${3:o0})
+ ${4:#staments};;
+ esac
+ done
+# Set SCRIPT_DIR variable to directory script is located.
+snippet sdir
+ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+# getopt
+snippet getopt
+ __ScriptVersion="${1:version}"
+
+ #=== FUNCTION ================================================================
+ # NAME: usage
+ # DESCRIPTION: Display usage information.
+ #===============================================================================
+ function usage ()
+ {
+ cat <<- EOT
+
+ Usage : $${0:0} [options] [--]
+
+ Options:
+ -h|help Display this message
+ -v|version Display script version
+
+ EOT
+ } # ---------- end of function usage ----------
+
+ #-----------------------------------------------------------------------
+ # Handle command line arguments
+ #-----------------------------------------------------------------------
+
+ while getopts ":hv" opt
+ do
+ case $opt in
+
+ h|help ) usage; exit 0 ;;
+
+ v|version ) echo "$${0:0} -- Version $__ScriptVersion"; exit 0 ;;
+
+ \? ) echo -e "\n Option does not exist : $OPTARG\n"
+ usage; exit 1 ;;
+
+ esac # --- end of case ---
+ done
+ shift $(($OPTIND-1))
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/snippets.js b/src/fauxton/assets/js/libs/ace/snippets/snippets.js
new file mode 100644
index 000000000..0927805ba
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/snippets.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./snippets.snippets");
+exports.scope = "snippets";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/snippets.snippets b/src/fauxton/assets/js/libs/ace/snippets/snippets.snippets
new file mode 100644
index 000000000..4223fa394
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/snippets.snippets
@@ -0,0 +1,9 @@
+# snippets for making snippets :)
+snippet snip
+ snippet ${1:trigger}
+ ${2}
+snippet msnip
+ snippet ${1:trigger} ${2:description}
+ ${3}
+snippet v
+ {VISUAL}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/soy_template.js b/src/fauxton/assets/js/libs/ace/snippets/soy_template.js
new file mode 100644
index 000000000..194da7574
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/soy_template.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./soy_template.snippets");
+exports.scope = "soy_template";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/soy_template.snippets b/src/fauxton/assets/js/libs/ace/snippets/soy_template.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/soy_template.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sql.js b/src/fauxton/assets/js/libs/ace/snippets/sql.js
new file mode 100644
index 000000000..c96f6cb24
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sql.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./sql.snippets");
+exports.scope = "sql";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/sql.snippets b/src/fauxton/assets/js/libs/ace/snippets/sql.snippets
new file mode 100644
index 000000000..eb4b37caf
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/sql.snippets
@@ -0,0 +1,26 @@
+snippet tbl
+ create table ${1:table} (
+ ${2:columns}
+ );
+snippet col
+ ${1:name} ${2:type} ${3:default ''} ${4:not null}
+snippet ccol
+ ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}
+snippet ncol
+ ${1:name} number ${3:default 0} ${4:not null}
+snippet dcol
+ ${1:name} date ${3:default sysdate} ${4:not null}
+snippet ind
+ create index ${3:$1_$2} on ${1:table}(${2:column});
+snippet uind
+ create unique index ${1:name} on ${2:table}(${3:column});
+snippet tblcom
+ comment on table ${1:table} is '${2:comment}';
+snippet colcom
+ comment on column ${1:table}.${2:column} is '${3:comment}';
+snippet addcol
+ alter table ${1:table} add (${2:column} ${3:type});
+snippet seq
+ create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};
+snippet s*
+ select * from ${1:table}
diff --git a/src/fauxton/assets/js/libs/ace/snippets/stylus.js b/src/fauxton/assets/js/libs/ace/snippets/stylus.js
new file mode 100644
index 000000000..86a79f7ac
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/stylus.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./stylus.snippets");
+exports.scope = "stylus";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/stylus.snippets b/src/fauxton/assets/js/libs/ace/snippets/stylus.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/stylus.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/svg.js b/src/fauxton/assets/js/libs/ace/snippets/svg.js
new file mode 100644
index 000000000..aeb624561
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/svg.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./svg.snippets");
+exports.scope = "svg";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/svg.snippets b/src/fauxton/assets/js/libs/ace/snippets/svg.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/svg.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/tcl.js b/src/fauxton/assets/js/libs/ace/snippets/tcl.js
new file mode 100644
index 000000000..53482fc7b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/tcl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./tcl.snippets");
+exports.scope = "tcl";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/tcl.snippets b/src/fauxton/assets/js/libs/ace/snippets/tcl.snippets
new file mode 100644
index 000000000..1fe1cb960
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/tcl.snippets
@@ -0,0 +1,92 @@
+# #!/usr/bin/env tclsh
+snippet #!
+ #!/usr/bin/env tclsh
+
+# Process
+snippet pro
+ proc ${1:function_name} {${2:args}} {
+ ${3:#body ...}
+ }
+#xif
+snippet xif
+ ${1:expr}? ${2:true} : ${3:false}
+# Conditional
+snippet if
+ if {${1}} {
+ ${2:# body...}
+ }
+# Conditional if..else
+snippet ife
+ if {${1}} {
+ ${2:# body...}
+ } else {
+ ${3:# else...}
+ }
+# Conditional if..elsif..else
+snippet ifee
+ if {${1}} {
+ ${2:# body...}
+ } elseif {${3}} {
+ ${4:# elsif...}
+ } else {
+ ${5:# else...}
+ }
+# If catch then
+snippet ifc
+ if { [catch {${1:#do something...}} ${2:err}] } {
+ ${3:# handle failure...}
+ }
+# Catch
+snippet catch
+ catch {${1}} ${2:err} ${3:options}
+# While Loop
+snippet wh
+ while {${1}} {
+ ${2:# body...}
+ }
+# For Loop
+snippet for
+ for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {
+ ${4:# body...}
+ }
+# Foreach Loop
+snippet fore
+ foreach ${1:x} {${2:#list}} {
+ ${3:# body...}
+ }
+# after ms script...
+snippet af
+ after ${1:ms} ${2:#do something}
+# after cancel id
+snippet afc
+ after cancel ${1:id or script}
+# after idle
+snippet afi
+ after idle ${1:script}
+# after info id
+snippet afin
+ after info ${1:id}
+# Expr
+snippet exp
+ expr {${1:#expression here}}
+# Switch
+snippet sw
+ switch ${1:var} {
+ ${3:pattern 1} {
+ ${4:#do something}
+ }
+ default {
+ ${2:#do something}
+ }
+ }
+# Case
+snippet ca
+ ${1:pattern} {
+ ${2:#do something}
+ }${3}
+# Namespace eval
+snippet ns
+ namespace eval ${1:path} {${2:#script...}}
+# Namespace current
+snippet nsc
+ namespace current
diff --git a/src/fauxton/assets/js/libs/ace/snippets/tex.js b/src/fauxton/assets/js/libs/ace/snippets/tex.js
new file mode 100644
index 000000000..267b6b690
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/tex.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./tex.snippets");
+exports.scope = "tex";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/tex.snippets b/src/fauxton/assets/js/libs/ace/snippets/tex.snippets
new file mode 100644
index 000000000..10fa82eff
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/tex.snippets
@@ -0,0 +1,191 @@
+#PREAMBLE
+#newcommand
+snippet nc
+ \newcommand{\${1:cmd}}[${2:opt}]{${3:realcmd}}${4}
+#usepackage
+snippet up
+ \usepackage[${1:[options}]{${2:package}}
+#newunicodechar
+snippet nuc
+ \newunicodechar{${1}}{${2:\ensuremath}${3:tex-substitute}}}
+#DeclareMathOperator
+snippet dmo
+ \DeclareMathOperator{${1}}{${2}}
+
+#DOCUMENT
+# \begin{}...\end{}
+snippet begin
+ \begin{${1:env}}
+ ${2}
+ \end{$1}
+# Tabular
+snippet tab
+ \begin{${1:tabular}}{${2:c}}
+ ${3}
+ \end{$1}
+snippet thm
+ \begin[${1:author}]{${2:thm}}
+ ${3}
+ \end{$1}
+snippet center
+ \begin{center}
+ ${1}
+ \end{center}
+# Align(ed)
+snippet ali
+ \begin{align${1:ed}}
+ ${2}
+ \end{align$1}
+# Gather(ed)
+snippet gat
+ \begin{gather${1:ed}}
+ ${2}
+ \end{gather$1}
+# Equation
+snippet eq
+ \begin{equation}
+ ${1}
+ \end{equation}
+# Equation
+snippet eq*
+ \begin{equation*}
+ ${1}
+ \end{equation*}
+# Unnumbered Equation
+snippet \
+ \[
+ ${1}
+ \]
+# Enumerate
+snippet enum
+ \begin{enumerate}
+ \item ${1}
+ \end{enumerate}
+# Itemize
+snippet itemize
+ \begin{itemize}
+ \item ${1}
+ \end{itemize}
+# Description
+snippet desc
+ \begin{description}
+ \item[${1}] ${2}
+ \end{description}
+# Matrix
+snippet mat
+ \begin{${1:p/b/v/V/B/small}matrix}
+ ${2}
+ \end{$1matrix}
+# Cases
+snippet cas
+ \begin{cases}
+ ${1:equation}, &\text{ if }${2:case}\\
+ ${3}
+ \end{cases}
+# Split
+snippet spl
+ \begin{split}
+ ${1}
+ \end{split}
+# Part
+snippet part
+ \part{${1:part name}} % (fold)
+ \label{prt:${2:$1}}
+ ${3}
+ % part $2 (end)
+# Chapter
+snippet cha
+ \chapter{${1:chapter name}}
+ \label{cha:${2:$1}}
+ ${3}
+# Section
+snippet sec
+ \section{${1:section name}}
+ \label{sec:${2:$1}}
+ ${3}
+# Sub Section
+snippet sub
+ \subsection{${1:subsection name}}
+ \label{sub:${2:$1}}
+ ${3}
+# Sub Sub Section
+snippet subs
+ \subsubsection{${1:subsubsection name}}
+ \label{ssub:${2:$1}}
+ ${3}
+# Paragraph
+snippet par
+ \paragraph{${1:paragraph name}}
+ \label{par:${2:$1}}
+ ${3}
+# Sub Paragraph
+snippet subp
+ \subparagraph{${1:subparagraph name}}
+ \label{subp:${2:$1}}
+ ${3}
+#References
+snippet itd
+ \item[${1:description}] ${2:item}
+snippet figure
+ ${1:Figure}~\ref{${2:fig:}}${3}
+snippet table
+ ${1:Table}~\ref{${2:tab:}}${3}
+snippet listing
+ ${1:Listing}~\ref{${2:list}}${3}
+snippet section
+ ${1:Section}~\ref{${2:sec:}}${3}
+snippet page
+ ${1:page}~\pageref{${2}}${3}
+snippet index
+ \index{${1:index}}${2}
+#Citations
+snippet cite
+ \cite[${1}]{${2}}${3}
+snippet fcite
+ \footcite[${1}]{${2}}${3}
+#Formating text: italic, bold, underline, small capital, emphase ..
+snippet it
+ \textit{${1:text}}
+snippet bf
+ \textbf{${1:text}}
+snippet under
+ \underline{${1:text}}
+snippet emp
+ \emph{${1:text}}
+snippet sc
+ \textsc{${1:text}}
+#Choosing font
+snippet sf
+ \textsf{${1:text}}
+snippet rm
+ \textrm{${1:text}}
+snippet tt
+ \texttt{${1:text}}
+#misc
+snippet ft
+ \footnote{${1:text}}
+snippet fig
+ \begin{figure}
+ \begin{center}
+ \includegraphics[scale=${1}]{Figures/${2}}
+ \end{center}
+ \caption{${3}}
+ \label{fig:${4}}
+ \end{figure}
+snippet tikz
+ \begin{figure}
+ \begin{center}
+ \begin{tikzpicture}[scale=${1:1}]
+ ${2}
+ \end{tikzpicture}
+ \end{center}
+ \caption{${3}}
+ \label{fig:${4}}
+ \end{figure}
+#math
+snippet stackrel
+ \stackrel{${1:above}}{${2:below}} ${3}
+snippet frac
+ \frac{${1:num}}{${2:denom}}
+snippet sum
+ \sum^{${1:n}}_{${2:i=1}}{${3}} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/snippets/text.js b/src/fauxton/assets/js/libs/ace/snippets/text.js
new file mode 100644
index 000000000..434d75bed
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/text.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./text.snippets");
+exports.scope = "text";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/text.snippets b/src/fauxton/assets/js/libs/ace/snippets/text.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/text.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/textile.js b/src/fauxton/assets/js/libs/ace/snippets/textile.js
new file mode 100644
index 000000000..f2622e057
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/textile.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./textile.snippets");
+exports.scope = "textile";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/textile.snippets b/src/fauxton/assets/js/libs/ace/snippets/textile.snippets
new file mode 100644
index 000000000..c78d6ec81
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/textile.snippets
@@ -0,0 +1,30 @@
+# Jekyll post header
+snippet header
+ ---
+ title: ${1:title}
+ layout: post
+ date: ${2:date} ${3:hour:minute:second} -05:00
+ ---
+
+# Image
+snippet img
+ !${1:url}(${2:title}):${3:link}!
+
+# Table
+snippet |
+ |${1}|${2}
+
+# Link
+snippet link
+ "${1:link text}":${2:url}
+
+# Acronym
+snippet (
+ (${1:Expand acronym})${2}
+
+# Footnote
+snippet fn
+ [${1:ref number}] ${3}
+
+ fn$1. ${2:footnote}
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/tmsnippet.snippets b/src/fauxton/assets/js/libs/ace/snippets/tmsnippet.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/tmsnippet.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/toml.js b/src/fauxton/assets/js/libs/ace/snippets/toml.js
new file mode 100644
index 000000000..419b06d83
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/toml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./toml.snippets");
+exports.scope = "toml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/toml.snippets b/src/fauxton/assets/js/libs/ace/snippets/toml.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/toml.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/twig.js b/src/fauxton/assets/js/libs/ace/snippets/twig.js
new file mode 100644
index 000000000..b08b884c5
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/twig.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./twig.snippets");
+exports.scope = "twig";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/twig.snippets b/src/fauxton/assets/js/libs/ace/snippets/twig.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/twig.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/typescript.js b/src/fauxton/assets/js/libs/ace/snippets/typescript.js
new file mode 100644
index 000000000..495da3f35
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/typescript.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./typescript.snippets");
+exports.scope = "typescript";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/typescript.snippets b/src/fauxton/assets/js/libs/ace/snippets/typescript.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/typescript.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/vbscript.js b/src/fauxton/assets/js/libs/ace/snippets/vbscript.js
new file mode 100644
index 000000000..5ab8e650d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/vbscript.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./vbscript.snippets");
+exports.scope = "vbscript";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/vbscript.snippets b/src/fauxton/assets/js/libs/ace/snippets/vbscript.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/vbscript.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/velocity.js b/src/fauxton/assets/js/libs/ace/snippets/velocity.js
new file mode 100644
index 000000000..ef59f621e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/velocity.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./velocity.snippets");
+exports.scope = "velocity";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/velocity.snippets b/src/fauxton/assets/js/libs/ace/snippets/velocity.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/velocity.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/verilog.js b/src/fauxton/assets/js/libs/ace/snippets/verilog.js
new file mode 100644
index 000000000..7360341e6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/verilog.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./verilog.snippets");
+exports.scope = "verilog";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/verilog.snippets b/src/fauxton/assets/js/libs/ace/snippets/verilog.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/verilog.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/vhdl.js b/src/fauxton/assets/js/libs/ace/snippets/vhdl.js
new file mode 100644
index 000000000..fe5e708fb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/vhdl.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./vhdl.snippets");
+exports.scope = "vhdl";
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/snippets/vhdl.snippets b/src/fauxton/assets/js/libs/ace/snippets/vhdl.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/vhdl.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/xml.js b/src/fauxton/assets/js/libs/ace/snippets/xml.js
new file mode 100644
index 000000000..83b1870c9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/xml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./xml.snippets");
+exports.scope = "xml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/xml.snippets b/src/fauxton/assets/js/libs/ace/snippets/xml.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/xml.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/xquery.js b/src/fauxton/assets/js/libs/ace/snippets/xquery.js
new file mode 100644
index 000000000..d96a0619d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/xquery.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./xquery.snippets");
+exports.scope = "xquery";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/xquery.snippets b/src/fauxton/assets/js/libs/ace/snippets/xquery.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/xquery.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets/xslt.snippets b/src/fauxton/assets/js/libs/ace/snippets/xslt.snippets
new file mode 100644
index 000000000..e7abdf3fc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/xslt.snippets
@@ -0,0 +1,97 @@
+snippet apply-templates with-param
+ <xsl:apply-templates select="${1:*}">
+ <xsl:with-param name="${2:param}">${3}</xsl:with-param>${4}
+ </xsl:apply-templates>${5}
+
+snippet apply-templates sort-by
+ <xsl:apply-templates select="${1:*}">
+ <xsl:sort select="${2:node}" order="${3:ascending}" data-type="${4:text}">${5}
+ </xsl:apply-templates>${6}
+
+snippet apply-templates plain
+ <xsl:apply-templates select="${1:*}" />${2}
+
+snippet attribute blank
+ <xsl:attribute name="${1:name}">${2}</xsl:attribute>${3}
+
+snippet attribute value-of
+ <xsl:attribute name="${1:name}">
+ <xsl:value-of select="${2:*}" />
+ </xsl:attribute>${3}
+
+snippet call-template
+ <xsl:call-template name="${1:template}" />
+
+snippet call-template with-param
+ <xsl:call-template name="${1:template}">
+ <xsl:with-param name="${2:param}">${3}</xsl:with-param>${4}
+ </xsl:call-template>${5}
+
+snippet choose
+ <xsl:choose>
+ <xsl:when test="${1:value}">
+ ${2}
+ </xsl:when>${3}
+ </xsl:choose>
+
+snippet copy-of
+ <xsl:copy-of select="${1:*}" />${2}
+
+snippet for-each
+ <xsl:for-each select="${1:*}">${2}
+ </xsl:for-each>${3}
+
+snippet if
+ <xsl:if test="${1:test}">${2}
+ </xsl:if>${3}
+
+snippet import
+ <xsl:import href="${1:stylesheet}" />${2}
+
+snippet include
+ <xsl:include href="${1:stylesheet}" />${2}
+
+snippet otherwise
+ <xsl:otherwise>${1}
+ </xsl:otherwise>
+
+snippet param
+ <xsl:param name="${1:name}">${2}
+ </xsl:param>${3}
+
+snippet stylesheet
+ <xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">${1}
+ </xsl:stylesheet>
+
+snippet template
+ <xsl:template match="${1:*}">${3}
+ </xsl:template>
+
+snippet template named
+ <xsl:template name="${1:name}">${2}
+ </xsl:template>
+
+snippet text
+ <xsl:text>${1}</xsl:text>
+
+snippet value-of
+ <xsl:value-of select="${1:*}" />${2}
+
+snippet variable blank
+ <xsl:variable name="${1:name}">${2}
+ </xsl:variable>
+
+snippet variable select
+ <xsl:variable select="${1:*}" />${2}
+
+snippet when
+ <xsl:when test="${1:test}">${2}
+ </xsl:when>
+
+snippet with-param
+ <xsl:with-param name="${1:name}">${2}</xsl:with-param>
+
+snippet with-param select
+ <xsl:with-param name="${1:name}" select="${2:*}" />
+
diff --git a/src/fauxton/assets/js/libs/ace/snippets/yaml.js b/src/fauxton/assets/js/libs/ace/snippets/yaml.js
new file mode 100644
index 000000000..17e70a3cb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/yaml.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./yaml.snippets");
+exports.scope = "yaml";
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/snippets/yaml.snippets b/src/fauxton/assets/js/libs/ace/snippets/yaml.snippets
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets/yaml.snippets
diff --git a/src/fauxton/assets/js/libs/ace/snippets_test.js b/src/fauxton/assets/js/libs/ace/snippets_test.js
new file mode 100644
index 000000000..1870d9508
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/snippets_test.js
@@ -0,0 +1,131 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+var EditSession = require("./edit_session").EditSession;
+var Editor = require("./editor").Editor;
+var MockRenderer = require("./test/mockrenderer").MockRenderer;
+var MultiSelect = require("./multi_select").MultiSelect;
+
+var snippetManager = require("./snippets").snippetManager;
+var assert = require("./test/assertions");
+
+module.exports = {
+ setUp : function(next) {
+ this.editor = new Editor(new MockRenderer());
+ next();
+ },
+
+ "test: textmate style format strings" : function() {
+ var fmt = snippetManager.tmStrFormat;
+ snippetManager.tmStrFormat("hello", {
+ guard: "(..)(.)(.)",
+ flag:"g",
+ fmt: "a\\UO\\l$1\\E$2"
+ }) == "aOHElo";
+ },
+ "test: parse snipmate file" : function() {
+ var expected = [{
+ name: "a",
+ guard: "(?:(=)|(:))?s*)",
+ trigger: "\\(?f",
+ endTrigger: "\\)",
+ endGuard: "",
+ content: "{$0}\n"
+ }, {
+ tabTrigger: "f",
+ name: "f function",
+ content: "function"
+ }];
+
+
+
+ var parsed = snippetManager.parseSnippetFile(
+ "name a\nregex /(?:(=)|(:))?\s*)/\\(?f/\\)/\n\t{$0}" +
+ "\n\t\n\n#function\nsnippet f function\n\tfunction"
+ );
+
+ assert.equal(JSON.stringify(expected, null, 4), JSON.stringify(parsed, null, 4))
+ },
+ "test: parse snippet": function() {
+ var content = "-\\$$2a${1:x${$2:y$3\\}\\n\\}$TM_SELECTION}";
+ var tokens = snippetManager.tokenizeTmSnippet(content);
+ assert.equal(tokens.length, 15);
+ assert.equal(tokens[4], tokens[14]);
+ assert.equal(tokens[2].tabstopId, 2);
+
+ var content = "\\}${var/as\\/d/\\ul\\//g:s}"
+ var tokens = snippetManager.tokenizeTmSnippet(content);
+ assert.equal(tokens.length, 4);
+ assert.equal(tokens[1], tokens[3]);
+ assert.equal(tokens[2], "s");
+ assert.equal(tokens[1].text, "var");
+ assert.equal(tokens[1].fmt, "\\ul\\/");
+ assert.equal(tokens[1].guard, "as\\/d");
+ assert.equal(tokens[1].flag, "g");
+ },
+ "test: expand snippet with nested tabstops": function() {
+ var content = "-${1}-${1:1}--${2:2 ${3} 2}-${3:3 $1 3}-${4:4 $2 4}";
+ this.editor.setValue("");
+ snippetManager.insertSnippet(this.editor, content);
+ assert.equal(this.editor.getValue(), "-1-1--2 3 1 3 2-3 1 3-4 2 3 1 3 2 4");
+
+ assert.equal(this.editor.getSelectedText(), "1\n1\n1\n1\n1");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "2 3 1 3 2\n2 3 1 3 2");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "3 1 3\n3 1 3\n3 1 3");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "4 2 3 1 3 2 4");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "");
+
+ this.editor.setValue("");
+ snippetManager.insertSnippet(this.editor, "-${1:a$2}-${2:b$1}");
+ assert.equal(this.editor.getValue(), "-ab-ba");
+
+ assert.equal(this.editor.getSelectedText(), "ab\na");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "b\nba");
+ this.editor.tabstopManager.tabNext();
+ assert.equal(this.editor.getSelectedText(), "");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/split.js b/src/fauxton/assets/js/libs/ace/split.js
new file mode 100644
index 000000000..878b0dc3c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/split.js
@@ -0,0 +1,373 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Editor = require("./editor").Editor;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+var EditSession = require("./edit_session").EditSession;
+
+/**
+ * @class Split
+ *
+ *
+ *
+ **/
+
+
+var Split = function(container, theme, splits) {
+ this.BELOW = 1;
+ this.BESIDE = 0;
+
+ this.$container = container;
+ this.$theme = theme;
+ this.$splits = 0;
+ this.$editorCSS = "";
+ this.$editors = [];
+ this.$orientation = this.BESIDE;
+
+ this.setSplits(splits || 1);
+ this.$cEditor = this.$editors[0];
+
+
+ this.on("focus", function(editor) {
+ this.$cEditor = editor;
+ }.bind(this));
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.$createEditor = function() {
+ var el = document.createElement("div");
+ el.className = this.$editorCSS;
+ el.style.cssText = "position: absolute; top:0px; bottom:0px";
+ this.$container.appendChild(el);
+ var editor = new Editor(new Renderer(el, this.$theme));
+
+ editor.on("focus", function() {
+ this._emit("focus", editor);
+ }.bind(this));
+
+ this.$editors.push(editor);
+ editor.setFontSize(this.$fontSize);
+ return editor;
+ };
+
+ this.setSplits = function(splits) {
+ var editor;
+ if (splits < 1) {
+ throw "The number of splits have to be > 0!";
+ }
+
+ if (splits == this.$splits) {
+ return;
+ } else if (splits > this.$splits) {
+ while (this.$splits < this.$editors.length && this.$splits < splits) {
+ editor = this.$editors[this.$splits];
+ this.$container.appendChild(editor.container);
+ editor.setFontSize(this.$fontSize);
+ this.$splits ++;
+ }
+ while (this.$splits < splits) {
+ this.$createEditor();
+ this.$splits ++;
+ }
+ } else {
+ while (this.$splits > splits) {
+ editor = this.$editors[this.$splits - 1];
+ this.$container.removeChild(editor.container);
+ this.$splits --;
+ }
+ }
+ this.resize();
+ };
+
+ /**
+ *
+ * Returns the number of splits.
+ * @returns {Number}
+ **/
+ this.getSplits = function() {
+ return this.$splits;
+ };
+
+ /**
+ * @param {Number} idx The index of the editor you want
+ *
+ * Returns the editor identified by the index `idx`.
+ *
+ **/
+ this.getEditor = function(idx) {
+ return this.$editors[idx];
+ };
+
+ /**
+ *
+ * Returns the current editor.
+ * @returns {Editor}
+ **/
+ this.getCurrentEditor = function() {
+ return this.$cEditor;
+ };
+
+ /**
+ * Focuses the current editor.
+ * @related Editor.focus
+ **/
+ this.focus = function() {
+ this.$cEditor.focus();
+ };
+
+ /**
+ * Blurs the current editor.
+ * @related Editor.blur
+ **/
+ this.blur = function() {
+ this.$cEditor.blur();
+ };
+
+ /**
+ *
+ * @param {String} theme The name of the theme to set
+ *
+ * Sets a theme for each of the available editors.
+ * @related Editor.setTheme
+ **/
+ this.setTheme = function(theme) {
+ this.$editors.forEach(function(editor) {
+ editor.setTheme(theme);
+ });
+ };
+
+ /**
+ *
+ * @param {String} keybinding
+ *
+ * Sets the keyboard handler for the editor.
+ * @related editor.setKeyboardHandler
+ **/
+ this.setKeyboardHandler = function(keybinding) {
+ this.$editors.forEach(function(editor) {
+ editor.setKeyboardHandler(keybinding);
+ });
+ };
+
+ /**
+ *
+ * @param {Function} callback A callback function to execute
+ * @param {String} scope The default scope for the callback
+ *
+ * Executes `callback` on all of the available editors.
+ *
+ **/
+ this.forEach = function(callback, scope) {
+ this.$editors.forEach(callback, scope);
+ };
+
+
+ this.$fontSize = "";
+ /**
+ * @param {Number} size The new font size
+ *
+ * Sets the font size, in pixels, for all the available editors.
+ *
+ **/
+ this.setFontSize = function(size) {
+ this.$fontSize = size;
+ this.forEach(function(editor) {
+ editor.setFontSize(size);
+ });
+ };
+
+ this.$cloneSession = function(session) {
+ var s = new EditSession(session.getDocument(), session.getMode());
+
+ var undoManager = session.getUndoManager();
+ if (undoManager) {
+ var undoManagerProxy = new UndoManagerProxy(undoManager, s);
+ s.setUndoManager(undoManagerProxy);
+ }
+
+ // Overwrite the default $informUndoManager function such that new delas
+ // aren't added to the undo manager from the new and the old session.
+ s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; });
+
+ // Copy over 'settings' from the session.
+ s.setTabSize(session.getTabSize());
+ s.setUseSoftTabs(session.getUseSoftTabs());
+ s.setOverwrite(session.getOverwrite());
+ s.setBreakpoints(session.getBreakpoints());
+ s.setUseWrapMode(session.getUseWrapMode());
+ s.setUseWorker(session.getUseWorker());
+ s.setWrapLimitRange(session.$wrapLimitRange.min,
+ session.$wrapLimitRange.max);
+ s.$foldData = session.$cloneFoldData();
+
+ return s;
+ };
+
+ /**
+ *
+ * @param {EditSession} session The new edit session
+ * @param {Number} idx The editor's index you're interested in
+ *
+ * Sets a new [[EditSession `EditSession`]] for the indicated editor.
+ * @related Editor.setSession
+ **/
+ this.setSession = function(session, idx) {
+ var editor;
+ if (idx == null) {
+ editor = this.$cEditor;
+ } else {
+ editor = this.$editors[idx];
+ }
+
+ // Check if the session is used already by any of the editors in the
+ // split. If it is, we have to clone the session as two editors using
+ // the same session can cause terrible side effects (e.g. UndoQueue goes
+ // wrong). This also gives the user of Split the possibility to treat
+ // each session on each split editor different.
+ var isUsed = this.$editors.some(function(editor) {
+ return editor.session === session;
+ });
+
+ if (isUsed) {
+ session = this.$cloneSession(session);
+ }
+ editor.setSession(session);
+
+ // Return the session set on the editor. This might be a cloned one.
+ return session;
+ };
+
+ /**
+ *
+ * Returns the orientation.
+ * @returns {Number}
+ **/
+ this.getOrientation = function() {
+ return this.$orientation;
+ };
+
+ /**
+ *
+ * Sets the orientation.
+ * @param {Number} orientation The new orientation value
+ *
+ *
+ **/
+ this.setOrientation = function(orientation) {
+ if (this.$orientation == orientation) {
+ return;
+ }
+ this.$orientation = orientation;
+ this.resize();
+ };
+
+ /**
+ * Resizes the editor.
+ **/
+ this.resize = function() {
+ var width = this.$container.clientWidth;
+ var height = this.$container.clientHeight;
+ var editor;
+
+ if (this.$orientation == this.BESIDE) {
+ var editorWidth = width / this.$splits;
+ for (var i = 0; i < this.$splits; i++) {
+ editor = this.$editors[i];
+ editor.container.style.width = editorWidth + "px";
+ editor.container.style.top = "0px";
+ editor.container.style.left = i * editorWidth + "px";
+ editor.container.style.height = height + "px";
+ editor.resize();
+ }
+ } else {
+ var editorHeight = height / this.$splits;
+ for (var i = 0; i < this.$splits; i++) {
+ editor = this.$editors[i];
+ editor.container.style.width = width + "px";
+ editor.container.style.top = i * editorHeight + "px";
+ editor.container.style.left = "0px";
+ editor.container.style.height = editorHeight + "px";
+ editor.resize();
+ }
+ }
+ };
+
+}).call(Split.prototype);
+
+
+function UndoManagerProxy(undoManager, session) {
+ this.$u = undoManager;
+ this.$doc = session;
+}
+
+(function() {
+ this.execute = function(options) {
+ this.$u.execute(options);
+ };
+
+ this.undo = function() {
+ var selectionRange = this.$u.undo(true);
+ if (selectionRange) {
+ this.$doc.selection.setSelectionRange(selectionRange);
+ }
+ };
+
+ this.redo = function() {
+ var selectionRange = this.$u.redo(true);
+ if (selectionRange) {
+ this.$doc.selection.setSelectionRange(selectionRange);
+ }
+ };
+
+ this.reset = function() {
+ this.$u.reset();
+ };
+
+ this.hasUndo = function() {
+ return this.$u.hasUndo();
+ };
+
+ this.hasRedo = function() {
+ return this.$u.hasRedo();
+ };
+}).call(UndoManagerProxy.prototype);
+
+exports.Split = Split;
+});
diff --git a/src/fauxton/assets/js/libs/ace/test/all.js b/src/fauxton/assets/js/libs/ace/test/all.js
new file mode 100644
index 000000000..e437d6f09
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/all.js
@@ -0,0 +1,35 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+"use strict";
+
+require("amd-loader");
+var test = require("asyncjs").test;
+test.walkTestCases(__dirname + "/..").exec();
diff --git a/src/fauxton/assets/js/libs/ace/test/all_browser.js b/src/fauxton/assets/js/libs/ace/test/all_browser.js
new file mode 100644
index 000000000..72e66de51
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/all_browser.js
@@ -0,0 +1,138 @@
+define(function(require, exports, module) {
+"use strict";
+
+require("ace/lib/fixoldbrowsers");
+var AsyncTest = require("asyncjs").test;
+var async = require("asyncjs");
+
+var passed = 0
+var failed = 0
+var log = document.getElementById("log")
+
+var testNames = [
+ "ace/anchor_test",
+ "ace/background_tokenizer_test",
+ "ace/commands/command_manager_test",
+ "ace/config_test",
+ "ace/document_test",
+ "ace/edit_session_test",
+ "ace/editor_change_document_test",
+ "ace/editor_highlight_selected_word_test",
+ "ace/editor_navigation_test",
+ "ace/editor_text_edit_test",
+ "ace/ext/static_highlight_test",
+ "ace/incremental_search_test",
+ "ace/keyboard/emacs_test",
+ "ace/keyboard/keybinding_test",
+ "ace/layer/text_test",
+ "ace/lib/event_emitter_test",
+ "ace/mode/coffee/parser_test",
+ "ace/mode/coldfusion_test",
+ "ace/mode/css_test",
+ "ace/mode/css_worker",
+ "ace/mode/html_test",
+ "ace/mode/javascript_test",
+ "ace/mode/javascript_worker_test",
+ "ace/mode/logiql_test",
+ "ace/mode/python_test",
+ "ace/mode/text_test",
+ "ace/mode/xml_test",
+ "ace/mode/folding/cstyle_test",
+ "ace/mode/folding/html_test",
+ "ace/mode/folding/pythonic_test",
+ "ace/mode/folding/xml_test",
+ "ace/mode/folding/coffee_test",
+ "ace/multi_select_test",
+ "ace/occur_test",
+ "ace/range_test",
+ "ace/range_list_test",
+ "ace/search_test",
+ "ace/selection_test",
+ "ace/snippets_test",
+ "ace/token_iterator_test",
+ "ace/tokenizer_test",
+ "ace/virtual_renderer_test"
+];
+
+var html = ["<a href='?'>all tests</a><br>"];
+for (var i in testNames) {
+ var href = testNames[i];
+ html.push("<a href='?", href, "'>", href.replace(/^ace\//, "") ,"</a><br>");
+}
+
+var nav = document.createElement("div");
+nav.innerHTML = html.join("");
+nav.style.cssText = "position:absolute;right:0;top:0";
+document.body.appendChild(nav);
+
+if (location.search)
+ testNames = location.search.substr(1).split(",")
+
+require(testNames, function() {
+ var tests = testNames.map(function(x) {
+ var module = require(x);
+ module.href = x;
+ return module;
+ });
+
+ async.list(tests)
+ .expand(function(test) {
+ return AsyncTest.testcase(test)
+ }, AsyncTest.TestGenerator)
+ .run()
+ .each(function(test, next) {
+ if (test.index == 1 && test.context.href) {
+ var href = test.context.href;
+ var node = document.createElement("div");
+ node.innerHTML = "<a href='?" + href + "'>" + href.replace(/^ace\//, "") + "</a>";
+ log.appendChild(node);
+ }
+ var node = document.createElement("div");
+ node.className = test.passed ? "passed" : "failed";
+
+ var name = test.name
+ if (test.suiteName)
+ name = test.suiteName + ": " + test.name
+
+ var msg = "[" + test.count + "/" + test.index + "] " + name + " " + (test.passed ? "OK" : "FAIL")
+ if (!test.passed) {
+ if (test.err.stack)
+ var err = test.err.stack
+ else
+ var err = test.err
+
+ console.error(msg);
+ console.error(err);
+ msg += "<pre class='error'>" + err + "</pre>";
+ } else {
+ console.log(msg);
+ }
+
+ node.innerHTML = msg;
+ log.appendChild(node);
+
+ next()
+ })
+ .each(function(test) {
+ if (test.passed)
+ passed += 1
+ else
+ failed += 1
+ })
+ .end(function() {
+ log.innerHTML += [
+ "<div class='summary'>",
+ "<br>",
+ "Summary: <br>",
+ "<br>",
+ "Total number of tests: " + (passed + failed) + "<br>",
+ (passed ? "Passed tests: " + passed + "<br>" : ""),
+ (failed ? "Failed tests: " + failed + "<br>" : "")
+ ].join("")
+ console.log("Total number of tests: " + (passed + failed));
+ console.log("Passed tests: " + passed);
+ console.log("Failed tests: " + failed);
+ })
+});
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/test/assertions.js b/src/fauxton/assets/js/libs/ace/test/assertions.js
new file mode 100644
index 000000000..3a521003b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/assertions.js
@@ -0,0 +1,56 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("assert");
+
+assert.position = function(cursor, row, column) {
+ assert.equal(cursor.row, row);
+ assert.equal(cursor.column, column);
+};
+
+assert.range = function(range, startRow, startColumn, endRow, endColumn) {
+ assert.position(range.start, startRow, startColumn);
+ assert.position(range.end, endRow, endColumn);
+};
+
+assert.notOk = function(value) {
+ assert.equal(value, false);
+};
+
+exports.jsonEquals = function(foundJson, expectedJson) {
+ assert.equal(JSON.stringify(foundJson), JSON.stringify(expectedJson));
+};
+
+module.exports = assert;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/test/asyncjs/assert.js b/src/fauxton/assets/js/libs/ace/test/asyncjs/assert.js
new file mode 100644
index 000000000..96e3f6e23
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/asyncjs/assert.js
@@ -0,0 +1,313 @@
+define(function(require, exports, module) {
+
+// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
+//
+// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
+//
+// Originally from narwhal.js (http://narwhaljs.org)
+// Copyright (c) 2009 Thomas Robinson <280north.com>
+//
+// 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:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// 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 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.
+
+// UTILITY
+var oop = require("ace/lib/oop");
+var pSlice = Array.prototype.slice;
+
+// 1. The assert module provides functions that throw
+// AssertionError's when particular conditions are not met. The
+// assert module must conform to the following interface.
+
+var assert = exports;
+
+// 2. The AssertionError is defined in assert.
+// new assert.AssertionError({ message: message,
+// actual: actual,
+// expected: expected })
+
+assert.AssertionError = function AssertionError(options) {
+ this.name = 'AssertionError';
+ this.message = options.message;
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+ var stackStartFunction = options.stackStartFunction || fail;
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, stackStartFunction);
+ }
+};
+oop.inherits(assert.AssertionError, Error);
+
+toJSON = function(obj) {
+ if (typeof JSON !== "undefined")
+ return JSON.stringify(obj);
+ else
+ return obj.toString();
+}
+
+assert.AssertionError.prototype.toString = function() {
+ if (this.message) {
+ return [this.name + ':', this.message].join(' ');
+ } else {
+ return [this.name + ':',
+ toJSON(this.expected),
+ this.operator,
+ toJSON(this.actual)].join(' ');
+ }
+};
+
+// assert.AssertionError instanceof Error
+
+assert.AssertionError.__proto__ = Error.prototype;
+
+// At present only the three keys mentioned above are used and
+// understood by the spec. Implementations or sub modules can pass
+// other keys to the AssertionError's constructor - they will be
+// ignored.
+
+// 3. All of the following functions must throw an AssertionError
+// when a corresponding condition is not met, with a message that
+// may be undefined if not provided. All assertion methods provide
+// both the actual and expected values to the assertion error for
+// display purposes.
+
+function fail(actual, expected, message, operator, stackStartFunction) {
+ throw new assert.AssertionError({
+ message: message,
+ actual: actual,
+ expected: expected,
+ operator: operator,
+ stackStartFunction: stackStartFunction
+ });
+}
+
+// EXTENSION! allows for well behaved errors defined elsewhere.
+assert.fail = fail;
+
+// 4. Pure assertion tests whether a value is truthy, as determined
+// by !!guard.
+// assert.ok(guard, message_opt);
+// This statement is equivalent to assert.equal(true, guard,
+// message_opt);. To test strictly for the value true, use
+// assert.strictEqual(true, guard, message_opt);.
+
+assert.ok = function ok(value, message) {
+ if (!!!value) fail(value, true, message, '==', assert.ok);
+};
+
+// 5. The equality assertion tests shallow, coercive equality with
+// ==.
+// assert.equal(actual, expected, message_opt);
+
+assert.equal = function equal(actual, expected, message) {
+ if (actual != expected) fail(actual, expected, message, '==', assert.equal);
+};
+
+// 6. The non-equality assertion tests for whether two objects are not equal
+// with != assert.notEqual(actual, expected, message_opt);
+
+assert.notEqual = function notEqual(actual, expected, message) {
+ if (actual == expected) {
+ fail(actual, expected, message, '!=', assert.notEqual);
+ }
+};
+
+// 7. The equivalence assertion tests a deep equality relation.
+// assert.deepEqual(actual, expected, message_opt);
+
+assert.deepEqual = function deepEqual(actual, expected, message) {
+ if (!_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'deepEqual', assert.deepEqual);
+ }
+};
+
+function _deepEqual(actual, expected) {
+ // 7.1. All identical values are equivalent, as determined by ===.
+ if (actual === expected) {
+ return true;
+
+ } else if (typeof Buffer !== "undefined" && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {
+ if (actual.length != expected.length) return false;
+
+ for (var i = 0; i < actual.length; i++) {
+ if (actual[i] !== expected[i]) return false;
+ }
+
+ return true;
+
+ // 7.2. If the expected value is a Date object, the actual value is
+ // equivalent if it is also a Date object that refers to the same time.
+ } else if (actual instanceof Date && expected instanceof Date) {
+ return actual.getTime() === expected.getTime();
+
+ // 7.3. Other pairs that do not both pass typeof value == 'object',
+ // equivalence is determined by ==.
+ } else if (typeof actual != 'object' && typeof expected != 'object') {
+ return actual == expected;
+
+ // 7.4. For all other Object pairs, including Array objects, equivalence is
+ // determined by having the same number of owned properties (as verified
+ // with Object.prototype.hasOwnProperty.call), the same set of keys
+ // (although not necessarily the same order), equivalent values for every
+ // corresponding key, and an identical 'prototype' property. Note: this
+ // accounts for both named and indexed properties on Arrays.
+ } else {
+ return objEquiv(actual, expected);
+ }
+}
+
+function isUndefinedOrNull(value) {
+ return value === null || value === undefined;
+}
+
+function isArguments(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+}
+
+function objEquiv(a, b) {
+ if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
+ return false;
+ // an identical 'prototype' property.
+ if (a.prototype !== b.prototype) return false;
+ //~~~I've managed to break Object.keys through screwy arguments passing.
+ // Converting to array solves the problem.
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return _deepEqual(a, b);
+ }
+ try {
+ var ka = Object.keys(a),
+ kb = Object.keys(b),
+ key, i;
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ // having the same number of owned properties (keys incorporates
+ // hasOwnProperty)
+ if (ka.length != kb.length)
+ return false;
+ //the same set of keys (although not necessarily the same order),
+ ka.sort();
+ kb.sort();
+ //~~~cheap key test
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] != kb[i])
+ return false;
+ }
+ //equivalent values for every corresponding key, and
+ //~~~possibly expensive deep test
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!_deepEqual(a[key], b[key])) return false;
+ }
+ return true;
+}
+
+// 8. The non-equivalence assertion tests for any deep inequality.
+// assert.notDeepEqual(actual, expected, message_opt);
+
+assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
+ if (_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
+ }
+};
+
+// 9. The strict equality assertion tests strict equality, as determined by ===.
+// assert.strictEqual(actual, expected, message_opt);
+
+assert.strictEqual = function strictEqual(actual, expected, message) {
+ if (actual !== expected) {
+ fail(actual, expected, message, '===', assert.strictEqual);
+ }
+};
+
+// 10. The strict non-equality assertion tests for strict inequality, as
+// determined by !==. assert.notStrictEqual(actual, expected, message_opt);
+
+assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
+ if (actual === expected) {
+ fail(actual, expected, message, '!==', assert.notStrictEqual);
+ }
+};
+
+function expectedException(actual, expected) {
+ if (!actual || !expected) {
+ return false;
+ }
+
+ if (expected instanceof RegExp) {
+ return expected.test(actual);
+ } else if (actual instanceof expected) {
+ return true;
+ } else if (expected.call({}, actual) === true) {
+ return true;
+ }
+
+ return false;
+}
+
+function _throws(shouldThrow, block, expected, message) {
+ var actual;
+
+ if (typeof expected === 'string') {
+ message = expected;
+ expected = null;
+ }
+
+ try {
+ block();
+ } catch (e) {
+ actual = e;
+ }
+
+ message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
+ (message ? ' ' + message : '.');
+
+ if (shouldThrow && !actual) {
+ fail('Missing expected exception' + message);
+ }
+
+ if (!shouldThrow && expectedException(actual, expected)) {
+ fail('Got unwanted exception' + message);
+ }
+
+ if ((shouldThrow && actual && expected &&
+ !expectedException(actual, expected)) || (!shouldThrow && actual)) {
+ throw actual;
+ }
+}
+
+// 11. Expected to throw an error:
+// assert.throws(block, Error_opt, message_opt);
+
+assert.throws = function(block, /*optional*/error, /*optional*/message) {
+ _throws.apply(this, [true].concat(pSlice.call(arguments)));
+};
+
+// EXTENSION! This is annoying to write outside this module.
+assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
+ _throws.apply(this, [false].concat(pSlice.call(arguments)));
+};
+
+assert.ifError = function(err) { if (err) {throw err;}};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/test/asyncjs/async.js b/src/fauxton/assets/js/libs/ace/test/asyncjs/async.js
new file mode 100644
index 000000000..e82651193
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/asyncjs/async.js
@@ -0,0 +1,529 @@
+/*!
+ * async.js
+ * Copyright(c) 2010 Fabian Jakobs <fabian.jakobs@web.de>
+ * MIT Licensed
+ */
+
+define(function(require, exports, module) {
+
+var STOP = exports.STOP = {}
+
+exports.Generator = function(source) {
+ if (typeof source == "function")
+ this.source = {
+ next: source
+ }
+ else
+ this.source = source
+}
+
+;(function() {
+ this.next = function(callback) {
+ this.source.next(callback)
+ }
+
+ this.map = function(mapper) {
+ if (!mapper)
+ return this
+
+ mapper = makeAsync(1, mapper)
+
+ var source = this.source
+ this.next = function(callback) {
+ source.next(function(err, value) {
+ if (err)
+ callback(err)
+ else {
+ mapper(value, function(err, value) {
+ if (err)
+ callback(err)
+ else
+ callback(null, value)
+ })
+ }
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.filter = function(filter) {
+ if (!filter)
+ return this
+
+ filter = makeAsync(1, filter)
+
+ var source = this.source
+ this.next = function(callback) {
+ source.next(function handler(err, value) {
+ if (err)
+ callback(err)
+ else {
+ filter(value, function(err, takeIt) {
+ if (err)
+ callback(err)
+ else if (takeIt)
+ callback(null, value)
+ else
+ source.next(handler)
+ })
+ }
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.slice = function(begin, end) {
+ var count = -1
+ if (!end || end < 0)
+ var end = Infinity
+
+ var source = this.source
+ this.next = function(callback) {
+ source.next(function handler(err, value) {
+ count++
+ if (err)
+ callback(err)
+ else if (count >= begin && count < end)
+ callback(null, value)
+ else if (count >= end)
+ callback(STOP)
+ else
+ source.next(handler)
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.reduce = function(reduce, initialValue) {
+ reduce = makeAsync(3, reduce)
+
+ var index = 0
+ var done = false
+ var previousValue = initialValue
+
+ var source = this.source
+ this.next = function(callback) {
+ if (done)
+ return callback(STOP)
+
+ if (initialValue === undefined) {
+ source.next(function(err, currentValue) {
+ if (err)
+ return callback(err, previousValue)
+
+ previousValue = currentValue
+ reduceAll()
+ })
+ }
+ else
+ reduceAll()
+
+ function reduceAll() {
+ source.next(function handler(err, currentValue) {
+ if (err) {
+ done = true
+ if (err == STOP)
+ return callback(null, previousValue)
+ else
+ return(err)
+ }
+ reduce(previousValue, currentValue, index++, function(err, value) {
+ previousValue = value
+ source.next(handler)
+ })
+ })
+ }
+ }
+ return new this.constructor(this)
+ }
+
+ this.forEach =
+ this.each = function(fn) {
+ fn = makeAsync(1, fn)
+
+ var source = this.source
+ this.next = function(callback) {
+ source.next(function handler(err, value) {
+ if (err)
+ callback(err)
+ else {
+ fn(value, function(err) {
+ callback(err, value)
+ })
+ }
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.some = function(condition) {
+ condition = makeAsync(1, condition)
+
+ var source = this.source
+ var done = false
+ this.next = function(callback) {
+ if (done)
+ return callback(STOP)
+
+ source.next(function handler(err, value) {
+ if (err)
+ return callback(err)
+
+ condition(value, function(err, result) {
+ if (err) {
+ done = true
+ if (err == STOP)
+ callback(null, false)
+ else
+ callback(err)
+ }
+ else if (result) {
+ done = true
+ callback(null, true)
+ }
+ else
+ source.next(handler)
+ })
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.every = function(condition) {
+ condition = makeAsync(1, condition)
+
+ var source = this.source
+ var done = false
+ this.next = function(callback) {
+ if (done)
+ return callback(STOP)
+
+ source.next(function handler(err, value) {
+ if (err)
+ return callback(err)
+
+ condition(value, function(err, result) {
+ if (err) {
+ done = true
+ if (err == STOP)
+ callback(null, true)
+ else
+ callback(err)
+ }
+ else if (!result) {
+ done = true
+ callback(null, false)
+ }
+ else
+ source.next(handler)
+ })
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.call = function(context) {
+ var source = this.source
+ return this.map(function(fn, next) {
+ fn = makeAsync(0, fn, context)
+ fn.call(context, function(err, value) {
+ next(err, value)
+ })
+ })
+ }
+
+ this.concat = function(generator) {
+ var generators = [this]
+ generators.push.apply(generators, arguments)
+ var index = 0
+ var source = generators[index++]
+
+ return new this.constructor(function(callback) {
+ source.next(function handler(err, value) {
+ if (err) {
+ if (err == STOP) {
+ source = generators[index++]
+ if (!source)
+ return callback(STOP)
+ else
+ return source.next(handler)
+ }
+ else
+ return callback(err)
+ }
+ else
+ return callback(null, value)
+ })
+ })
+ }
+
+ this.zip = function(generator) {
+ var generators = [this]
+ generators.push.apply(generators, arguments)
+
+ return new this.constructor(function(callback) {
+ exports.list(generators)
+ .map(function(gen, next) {
+ gen.next(next)
+ })
+ .toArray(callback)
+ })
+ }
+
+ this.expand = function(inserter, constructor) {
+ if (!inserter)
+ return this
+
+ var inserter = makeAsync(1, inserter)
+ var constructor = constructor || this.constructor
+ var source = this.source;
+ var spliced = null;
+
+ return new constructor(function next(callback) {
+ if (!spliced) {
+ source.next(function(err, value) {
+ if (err)
+ return callback(err)
+
+ inserter(value, function(err, toInsert) {
+ if (err)
+ return callback(err)
+
+ spliced = toInsert
+ next(callback)
+ })
+
+ })
+ }
+ else {
+ spliced.next(function(err, value) {
+ if (err == STOP) {
+ spliced = null
+ return next(callback)
+ }
+ else if (err)
+ return callback(err)
+
+ callback(err, value)
+ })
+ }
+ })
+ }
+
+ this.sort = function(compare) {
+ var self = this
+ var arrGen
+ this.next = function(callback) {
+ if (arrGen)
+ return arrGen.next(callback)
+
+ self.toArray(function(err, arr) {
+ if (err)
+ callback(err)
+ else {
+ arrGen = exports.list(arr.sort(compare))
+ arrGen.next(callback)
+ }
+ })
+ }
+ return new this.constructor(this)
+ }
+
+ this.join = function(separator) {
+ return this.$arrayOp(Array.prototype.join, separator !== undefined ? [separator] : null)
+ }
+
+ this.reverse = function() {
+ return this.$arrayOp(Array.prototype.reverse)
+ }
+
+ this.$arrayOp = function(arrayMethod, args) {
+ var self = this
+ var i = 0
+ this.next = function(callback) {
+ if (i++ > 0)
+ return callback(STOP)
+
+ self.toArray(function(err, arr) {
+ if (err)
+ callback(err, "")
+ else {
+ if (args)
+ callback(null, arrayMethod.apply(arr, args))
+ else
+ callback(null, arrayMethod.call(arr))
+ }
+ })
+ }
+ return new this.constructor(this)
+
+ }
+
+ this.end = function(breakOnError, callback) {
+ if (!callback) {
+ callback = arguments[0]
+ breakOnError = true
+ }
+
+ var source = this.source
+ var last
+ var lastError
+ source.next(function handler(err, value) {
+ if (err) {
+ if (err == STOP)
+ callback && callback(lastError, last)
+ else if (!breakOnError) {
+ lastError = err
+ source.next(handler)
+ }
+ else
+ callback && callback(err, value)
+ }
+ else {
+ last = value
+ source.next(handler)
+ }
+ })
+ }
+
+ this.toArray = function(breakOnError, callback) {
+ if (!callback) {
+ callback = arguments[0]
+ breakOnError = true
+ }
+
+ var values = []
+ var errors = []
+ var source = this.source
+
+ source.next(function handler(err, value) {
+ if (err) {
+ if (err == STOP) {
+ if (breakOnError)
+ return callback(null, values)
+ else {
+ errors.length = values.length
+ return callback(errors, values)
+ }
+ }
+ else {
+ if (breakOnError)
+ return callback(err)
+ else
+ errors[values.length] = err
+ }
+ }
+
+ values.push(value)
+ source.next(handler)
+ })
+ }
+
+}).call(exports.Generator.prototype)
+
+var makeAsync = exports.makeAsync = function(args, fn, context) {
+ if (fn.length > args)
+ return fn
+ else {
+ return function() {
+ var value
+ var next = arguments[args]
+ try {
+ value = fn.apply(context || this, arguments)
+ } catch(e) {
+ return next(e)
+ }
+ next(null, value)
+ }
+ }
+}
+
+exports.list = function(arr, construct) {
+ var construct = construct || exports.Generator
+ var i = 0
+ var len = arr.length
+
+ return new construct(function(callback) {
+ if (i < len)
+ callback(null, arr[i++])
+ else
+ callback(STOP)
+ })
+}
+
+exports.values = function(map, construct) {
+ var values = []
+ for (var key in map)
+ values.push(map[key])
+
+ return exports.list(values, construct)
+}
+
+exports.keys = function(map, construct) {
+ var keys = []
+ for (var key in map)
+ keys.push(key)
+
+ return exports.list(keys, construct)
+}
+
+/*
+ * range([start,] stop[, step]) -> generator of integers
+ *
+ * Return a generator containing an arithmetic progression of integers.
+ * range(i, j) returns [i, i+1, i+2, ..., j-1] start (!) defaults to 0.
+ * When step is given, it specifies the increment (or decrement).
+ */
+exports.range = function(start, stop, step, construct) {
+ var construct = construct || exports.Generator
+ start = start || 0
+ step = step || 1
+
+ if (stop === undefined || stop === null)
+ stop = step > 0 ? Infinity : -Infinity
+
+ var value = start
+
+ return new construct(function(callback) {
+ if (step > 0 && value >= stop || step < 0 && value <= stop)
+ callback(STOP)
+ else {
+ var current = value
+ value += step
+ callback(null, current)
+ }
+ })
+}
+
+exports.concat = function(first, varargs) {
+ if (arguments.length > 1)
+ return first.concat.apply(first, Array.prototype.slice.call(arguments, 1))
+ else
+ return first
+}
+
+exports.zip = function(first, varargs) {
+ if (arguments.length > 1)
+ return first.zip.apply(first, Array.prototype.slice.call(arguments, 1))
+ else
+ return first.map(function(item, next) {
+ next(null, [item])
+ })
+}
+
+
+exports.plugin = function(members, constructors) {
+ if (members) {
+ for (var key in members) {
+ exports.Generator.prototype[key] = members[key]
+ }
+ }
+
+ if (constructors) {
+ for (var key in constructors) {
+ exports[key] = constructors[key]
+ }
+ }
+}
+
+})
diff --git a/src/fauxton/assets/js/libs/ace/test/asyncjs/index.js b/src/fauxton/assets/js/libs/ace/test/asyncjs/index.js
new file mode 100644
index 000000000..ed63914b7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/asyncjs/index.js
@@ -0,0 +1,13 @@
+/*!
+ * async.js
+ * Copyright(c) 2010 Fabian Jakobs <fabian.jakobs@web.de>
+ * MIT Licensed
+ */
+
+define(function(require, exports, module) {
+
+module.exports = require("./async")
+module.exports.test = require("./test")
+require("./utils")
+
+})
diff --git a/src/fauxton/assets/js/libs/ace/test/asyncjs/test.js b/src/fauxton/assets/js/libs/ace/test/asyncjs/test.js
new file mode 100644
index 000000000..4374ef7c4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/asyncjs/test.js
@@ -0,0 +1,195 @@
+/*!
+ * async.js
+ * Copyright(c) 2010 Fabian Jakobs <fabian.jakobs@web.de>
+ * MIT Licensed
+ */
+
+define(function(require, exports, module) {
+
+var oop = require("ace/lib/oop")
+var async = require("asyncjs/async")
+require("asyncjs/utils")
+
+exports.TestGenerator = function(source) {
+ async.Generator.call(this, source)
+}
+
+oop.inherits(exports.TestGenerator, async.Generator)
+
+;(function() {
+
+ this.exec = function() {
+ this.run().report().summary(function(err, passed) {
+ console.log("DONE")
+ })
+ }
+
+ this.run = function() {
+ return this.setupTest()
+ .each(function(test, next) {
+ if (test.setUpSuite)
+ test.setUpSuite(next)
+ else
+ next()
+ })
+ .each(function(test, next) {
+ test.test(function(err, passed) {
+ test.err = err
+ test.passed = passed
+ next()
+ })
+ })
+ .each(function(test, next) {
+ if (test.tearDownSuite)
+ test.tearDownSuite(next)
+ else
+ next()
+ })
+ }
+
+ this.report = function() {
+ return this.each(function(test, next) {
+ var color = test.passed ? "\x1b[32m" : "\x1b[31m"
+ var name = test.name
+ if (test.suiteName)
+ name = test.suiteName + ": " + test.name
+ console.log(color + "[" + test.count + "/" + test.index + "] " + name + " " + (test.passed ? "OK" : "FAIL") + "\x1b[0m")
+ if (!test.passed)
+ if (test.err.stack)
+ console.log(test.err.stack)
+ else
+ console.log(test.err)
+
+ next()
+ })
+ }
+
+ this.summary = function(callback) {
+ var passed = 0
+ var failed = 0
+
+ this.each(function(test) {
+ if (test.passed)
+ passed += 1
+ else
+ failed += 1
+ }).end(function() {
+ console.log("")
+ console.log("Summary:")
+ console.log("")
+ console.log( "Total number of tests: " + (passed + failed))
+ passed && console.log("\x1b[32mPassed tests: " + passed + "\x1b[0m")
+ failed && console.log("\x1b[31mFailed tests: " + failed + "\x1b[0m")
+ console.log("")
+ callback(null, failed == 0)
+ })
+ }
+
+ this.setupTest = function() {
+ return this.each(function(test, next) {
+ var empty = function(next) { next() }
+ var context = test.context || this
+
+ if (test.setUp)
+ var setUp = async.makeAsync(0, test.setUp, context)
+ else
+ setUp = empty
+
+ tearDownCalled = false
+ if (test.tearDown)
+ var tearDownInner = async.makeAsync(0, test.tearDown, context)
+ else
+ tearDownInner = empty
+
+ function tearDown(next) {
+ tearDownCalled = true
+ tearDownInner.call(test.context, next)
+ }
+
+ var testFn = async.makeAsync(0, test.fn, context)
+
+ test.test = function(callback) {
+ var called
+ function errorListener(e) {
+ if (called)
+ return
+ called = true
+ //process.removeListener('uncaughtException', errorListener)
+ if (!tearDownCalled) {
+ async.list([tearDown])
+ .call()
+ .timeout(test.timeout)
+ .end(function() {
+ callback(e, false)
+ }) }
+ else
+ callback(e, false)
+ }
+ //process.addListener('uncaughtException', errorListener)
+
+ async.list([setUp, testFn, tearDown])
+ .delay(0)
+ .call(context)
+ .timeout(test.timeout)
+ .toArray(false, function(errors, values) {
+ if (called)
+ return
+ called = true
+ var err = errors[1]
+ //process.removeListener('uncaughtException', errorListener)
+ callback(err, !err)
+ })
+ }
+
+ next()
+ })
+ }
+
+}).call(exports.TestGenerator.prototype)
+
+exports.testcase = function(testcase, suiteName, timeout) {
+ var methods = []
+ for (var method in testcase)
+ methods.push(method)
+
+ var setUp = testcase.setUp || null
+ var tearDown = testcase.tearDown || null
+
+ var single
+ methods.forEach(function(name) {
+ if (name.charAt(0) == '>')
+ single = name
+ })
+ if (single)
+ methods = [single]
+
+ var testNames = methods.filter(function(method) {
+ return method.match(/^>?test/) && typeof(testcase[method]) == "function"
+ })
+ var count = testNames.length
+ var i=1
+ tests = testNames.map(function(name) {
+ return {
+ suiteName: suiteName || testcase.name || "",
+ name: name,
+ setUp: setUp,
+ tearDown: tearDown,
+ context: testcase,
+ timeout: timeout === undefined ? 3000 : timeout,
+ fn: testcase[name],
+ count: count,
+ index: i++
+ }
+ })
+
+ if (testcase.setUpSuite) {
+ tests[0].setUpSuite = async.makeAsync(0, testcase.setUpSuite, testcase)
+ }
+ if (testcase.tearDownSuite) {
+ tests[tests.length-1].tearDownSuite = async.makeAsync(0, testcase.tearDownSuite, testcase)
+ }
+
+ return async.list(tests, exports.TestGenerator)
+}
+
+})
diff --git a/src/fauxton/assets/js/libs/ace/test/asyncjs/utils.js b/src/fauxton/assets/js/libs/ace/test/asyncjs/utils.js
new file mode 100644
index 000000000..75fb3095d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/asyncjs/utils.js
@@ -0,0 +1,65 @@
+/*!
+ * async.js
+ * Copyright(c) 2010 Fabian Jakobs <fabian.jakobs@web.de>
+ * MIT Licensed
+ */
+
+define(function(require, exports, module) {
+
+var async = require("asyncjs/async")
+
+async.plugin({
+ delay: function(delay) {
+ return this.each(function(item, next) {
+ setTimeout(function() {
+ next();
+ }, delay)
+ })
+ },
+
+ timeout: function(timeout) {
+ timeout = timeout || 0
+ var source = this.source
+
+ this.next = function(callback) {
+ var called
+ var id = setTimeout(function() {
+ called = true
+ callback("Source did not respond after " + timeout + "ms!")
+ }, timeout)
+
+ source.next(function(err, value) {
+ if (called)
+ return
+
+ called = true
+ clearTimeout(id)
+
+ callback(err, value)
+ })
+ }
+ return new this.constructor(this)
+ },
+
+ get: function(key) {
+ return this.map(function(value, next) {
+ next(null, value[key])
+ })
+ },
+
+ inspect: function() {
+ return this.each(function(item, next) {
+ console.log(JSON.stringify(item))
+ next()
+ })
+ },
+
+ print: function() {
+ return this.each(function(item, next) {
+ console.log(item)
+ next()
+ })
+ }
+})
+
+})
diff --git a/src/fauxton/assets/js/libs/ace/test/benchmark.js b/src/fauxton/assets/js/libs/ace/test/benchmark.js
new file mode 100644
index 000000000..cd3953c8f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/benchmark.js
@@ -0,0 +1,78 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+
+module.exports = {
+ setUp : function() {
+ this.start = Date.now();
+ },
+
+ tearDown : function() {
+ console.log("took: ", Date.now() - this.start + "ms");
+ },
+
+ "test: document to screen position": function() {
+ var s = new EditSession(Array(6000).join('someText\n'));
+
+ for (var i=0; i<6000; i++)
+ s.documentToScreenPosition(i, 0);
+
+ for (var i=0; i<6000; i++)
+ s.documentToScreenPosition(i, 0);
+
+ console.log(s.$rowCache.length);
+ },
+
+ "test: screen to document position": function() {
+ var s = new EditSession(Array(6000).join('someText\n'));
+
+ for (var i=0; i<6000; i++)
+ s.screenToDocumentPosition(i, 0);
+
+ for (var i=0; i<6000; i++)
+ s.documentToScreenPosition(i, 0);
+
+ console.log(s.$rowCache.length);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec();
+}
diff --git a/src/fauxton/assets/js/libs/ace/test/mockdom.js b/src/fauxton/assets/js/libs/ace/test/mockdom.js
new file mode 100644
index 000000000..54991fc56
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/mockdom.js
@@ -0,0 +1,10 @@
+"use strict";
+
+var dom = require('jsdom/lib/jsdom/level2/html').dom.level2.html;
+var browser = require('jsdom/lib/jsdom/browser/index').windowAugmentation(dom);
+
+global.document = browser.document;
+global.window = browser.window;
+global.self = browser.self;
+global.navigator = browser.navigator;
+global.location = browser.location;
diff --git a/src/fauxton/assets/js/libs/ace/test/mockrenderer.js b/src/fauxton/assets/js/libs/ace/test/mockrenderer.js
new file mode 100644
index 000000000..73992111d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/mockrenderer.js
@@ -0,0 +1,201 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var MockRenderer = exports.MockRenderer = function(visibleRowCount) {
+ this.container = document.createElement("div");
+ this.scroller = document.createElement("div");
+ this.visibleRowCount = visibleRowCount || 20;
+
+ this.layerConfig = {
+ firstVisibleRow : 0,
+ lastVisibleRow : this.visibleRowCount
+ };
+
+ this.isMockRenderer = true;
+
+ this.$gutter = {};
+};
+
+
+MockRenderer.prototype.getFirstVisibleRow = function() {
+ return this.layerConfig.firstVisibleRow;
+};
+
+MockRenderer.prototype.getLastVisibleRow = function() {
+ return this.layerConfig.lastVisibleRow;
+};
+
+MockRenderer.prototype.getFirstFullyVisibleRow = function() {
+ return this.layerConfig.firstVisibleRow;
+};
+
+MockRenderer.prototype.getLastFullyVisibleRow = function() {
+ return this.layerConfig.lastVisibleRow;
+};
+
+MockRenderer.prototype.getContainerElement = function() {
+ return this.container;
+};
+
+MockRenderer.prototype.getMouseEventTarget = function() {
+ return this.container;
+};
+
+MockRenderer.prototype.getTextAreaContainer = function() {
+ return this.container;
+};
+
+MockRenderer.prototype.addGutterDecoration = function() {
+};
+
+MockRenderer.prototype.removeGutterDecoration = function() {
+};
+
+MockRenderer.prototype.moveTextAreaToCursor = function() {
+};
+
+MockRenderer.prototype.setSession = function(session) {
+ this.session = session;
+};
+
+MockRenderer.prototype.getSession = function(session) {
+ return this.session;
+};
+
+MockRenderer.prototype.setTokenizer = function() {
+};
+
+MockRenderer.prototype.on = function() {
+};
+
+MockRenderer.prototype.updateCursor = function() {
+};
+
+MockRenderer.prototype.animateScrolling = function(fromValue, callback) {
+ callback && callback();
+};
+
+MockRenderer.prototype.scrollToX = function(scrollTop) {};
+MockRenderer.prototype.scrollToY = function(scrollLeft) {};
+
+MockRenderer.prototype.scrollToLine = function(line, center) {
+ var lineHeight = 16;
+ var row = 0;
+ for (var l = 1; l < line; l++) {
+ row += this.session.getRowLength(l-1);
+ }
+
+ if (center) {
+ row -= this.visibleRowCount / 2;
+ }
+ this.scrollToRow(row);
+};
+
+MockRenderer.prototype.scrollSelectionIntoView = function() {
+};
+
+MockRenderer.prototype.scrollCursorIntoView = function() {
+ var cursor = this.session.getSelection().getCursor();
+ if (cursor.row < this.layerConfig.firstVisibleRow) {
+ this.scrollToRow(cursor.row);
+ }
+ else if (cursor.row > this.layerConfig.lastVisibleRow) {
+ this.scrollToRow(cursor.row);
+ }
+};
+
+MockRenderer.prototype.scrollToRow = function(row) {
+ var row = Math.min(this.session.getLength() - this.visibleRowCount, Math.max(0,
+ row));
+ this.layerConfig.firstVisibleRow = row;
+ this.layerConfig.lastVisibleRow = row + this.visibleRowCount;
+};
+
+MockRenderer.prototype.getScrollTopRow = function() {
+ return this.layerConfig.firstVisibleRow;
+};
+
+MockRenderer.prototype.draw = function() {
+};
+
+MockRenderer.prototype.onChangeTabSize = function(startRow, endRow) {
+};
+
+MockRenderer.prototype.updateLines = function(startRow, endRow) {
+};
+
+MockRenderer.prototype.updateBackMarkers = function() {
+};
+
+MockRenderer.prototype.updateFrontMarkers = function() {
+};
+
+MockRenderer.prototype.updateBreakpoints = function() {
+};
+
+MockRenderer.prototype.onResize = function() {
+};
+
+MockRenderer.prototype.updateFull = function() {
+};
+
+MockRenderer.prototype.updateText = function() {
+};
+
+MockRenderer.prototype.showCursor = function() {
+};
+
+MockRenderer.prototype.visualizeFocus = function() {
+};
+
+MockRenderer.prototype.setAnnotations = function() {
+};
+
+MockRenderer.prototype.setStyle = function() {
+};
+
+MockRenderer.prototype.unsetStyle = function() {
+};
+
+MockRenderer.prototype.textToScreenCoordinates = function() {
+ return {
+ pageX: 0,
+ pageY: 0
+ }
+};
+
+MockRenderer.prototype.adjustWrapLimit = function () {
+
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/test/tests.html b/src/fauxton/assets/js/libs/ace/test/tests.html
new file mode 100644
index 000000000..113ecc03d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/test/tests.html
@@ -0,0 +1,46 @@
+
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Ace Unit Tests</title>
+ <style type="text/css" media="screen">
+
+ #log .passed {
+ color: green;
+ }
+
+ #log .failed {
+ color: red;
+ }
+
+ #log pre.error {
+ color: black;
+ }
+ </style>
+</head>
+<body>
+
+<div id="log"></div>
+
+<script type="text/javascript">
+ var require = {
+ paths: {
+ ace: "../"
+ },
+ packages : [{
+ name: "asyncjs",
+ location: "./asyncjs",
+ main: "index"
+ }, {
+ name: "assert",
+ location: "./asyncjs",
+ main: "assert"
+ }]
+ };
+</script>
+<script src="../../../demo/kitchen-sink/require.js" data-main="all_browser" type="text/javascript" charset="utf-8"></script>
+
+
+</body>
+</html>
diff --git a/src/fauxton/assets/js/libs/ace/theme/ambiance.css b/src/fauxton/assets/js/libs/ace/theme/ambiance.css
new file mode 100644
index 000000000..c2ac69cf9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/ambiance.css
@@ -0,0 +1,217 @@
+.ace-ambiance .ace_gutter {
+ background-color: #3d3d3d;
+ background-image: -moz-linear-gradient(left, #3D3D3D, #333);
+ background-image: -ms-linear-gradient(left, #3D3D3D, #333);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));
+ background-image: -webkit-linear-gradient(left, #3D3D3D, #333);
+ background-image: -o-linear-gradient(left, #3D3D3D, #333);
+ background-image: linear-gradient(left, #3D3D3D, #333);
+ background-repeat: repeat-x;
+ border-right: 1px solid #4d4d4d;
+ text-shadow: 0px 1px 1px #4d4d4d;
+ color: #222;
+}
+
+.ace-ambiance .ace_gutter-layer {
+ background: repeat left top;
+}
+
+.ace-ambiance .ace_fold-widget {
+ text-align: center;
+}
+
+.ace-ambiance .ace_fold-widget:hover {
+ color: #777;
+}
+
+.ace-ambiance .ace_fold-widget.ace_start,
+.ace-ambiance .ace_fold-widget.ace_end,
+.ace-ambiance .ace_fold-widget.ace_closed{
+ background: none;
+ border: none;
+ box-shadow: none;
+}
+
+.ace-ambiance .ace_fold-widget.ace_start:after {
+ content: '▾'
+}
+
+.ace-ambiance .ace_fold-widget.ace_end:after {
+ content: '▴'
+}
+
+.ace-ambiance .ace_fold-widget.ace_closed:after {
+ content: '‣'
+}
+
+.ace-ambiance .ace_print-margin {
+ border-left: 1px dotted #2D2D2D;
+ right: 0;
+ background: #262626;
+}
+
+.ace-ambiance .ace_scroller {
+ -webkit-box-shadow: inset 0 0 10px black;
+ -moz-box-shadow: inset 0 0 10px black;
+ -o-box-shadow: inset 0 0 10px black;
+ box-shadow: inset 0 0 10px black;
+}
+
+.ace-ambiance {
+ color: #E6E1DC;
+ background-color: #202020;
+}
+
+.ace-ambiance .ace_cursor {
+ border-left: 1px solid #7991E8;
+}
+
+.ace-ambiance .ace_overwrite-cursors .ace_cursor {
+ border: 1px solid #FFE300;
+ background: #766B13;
+}
+
+.ace-ambiance.normal-mode .ace_cursor-layer {
+ z-index: 0;
+}
+
+.ace-ambiance .ace_marker-layer .ace_selection {
+ background: rgba(221, 240, 255, 0.20);
+}
+
+.ace-ambiance .ace_marker-layer .ace_selected-word {
+ border-radius: 4px;
+ border: 8px solid #3f475d;
+ box-shadow: 0 0 4px black;
+}
+
+.ace-ambiance .ace_marker-layer .ace_step {
+ background: rgb(198, 219, 174);
+}
+
+.ace-ambiance .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(255, 255, 255, 0.25);
+}
+
+.ace-ambiance .ace_marker-layer .ace_active-line {
+ background: rgba(255, 255, 255, 0.031);
+}
+
+.ace-ambiance .ace_invisible {
+ color: #333;
+}
+
+.ace-ambiance .ace_paren {
+ color: #24C2C7;
+}
+
+.ace-ambiance .ace_keyword {
+ color: #cda869;
+}
+
+.ace-ambiance .ace_keyword.ace_operator {
+ color: #fa8d6a;
+}
+
+.ace-ambiance .ace_punctuation.ace_operator {
+ color: #fa8d6a;
+}
+
+.ace-ambiance .ace_identifier {
+}
+
+.ace-ambiance .ace-statement {
+ color: #cda869;
+}
+
+.ace-ambiance .ace_constant {
+ color: #CF7EA9;
+}
+
+.ace-ambiance .ace_constant.ace_language {
+ color: #CF7EA9;
+}
+
+.ace-ambiance .ace_constant.ace_library {
+
+}
+
+.ace-ambiance .ace_constant.ace_numeric {
+ color: #78CF8A;
+}
+
+.ace-ambiance .ace_invalid {
+ text-decoration: underline;
+}
+
+.ace-ambiance .ace_invalid.ace_illegal {
+ color:#F8F8F8;
+ background-color: rgba(86, 45, 86, 0.75);
+}
+
+.ace-ambiance .ace_invalid,
+.ace-ambiance .ace_deprecated {
+ text-decoration: underline;
+ font-style: italic;
+ color: #D2A8A1;
+}
+
+.ace-ambiance .ace_support {
+ color: #9B859D;
+}
+
+.ace-ambiance .ace_support.ace_function {
+ color: #DAD085;
+}
+
+.ace-ambiance .ace_function.ace_buildin {
+ color: #9b859d;
+}
+
+.ace-ambiance .ace_string {
+ color: #8f9d6a;
+}
+
+.ace-ambiance .ace_string.ace_regexp {
+ color: #DAD085;
+}
+
+.ace-ambiance .ace_comment {
+ font-style: italic;
+ color: #555;
+}
+
+.ace-ambiance .ace_comment.ace_doc {
+}
+
+.ace-ambiance .ace_comment.ace_doc.ace_tag {
+ color: #666;
+ font-style: normal;
+}
+
+.ace-ambiance .ace_definition,
+.ace-ambiance .ace_type {
+ color: #aac6e3;
+}
+
+.ace-ambiance .ace_variable {
+ color: #9999cc;
+}
+
+.ace-ambiance .ace_variable.ace_language {
+ color: #9b859d;
+}
+
+.ace-ambiance .ace_xml-pe {
+ color: #494949;
+}
+
+.ace-ambiance .ace_gutter-layer,
+.ace-ambiance .ace_text-layer {
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC");
+}
+
+.ace-ambiance .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/ambiance.js b/src/fauxton/assets/js/libs/ace/theme/ambiance.js
new file mode 100644
index 000000000..475c2e87d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/ambiance.js
@@ -0,0 +1,33 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright 2011 Irakli Gozalishvili. All rights reserved.
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * 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.
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-ambiance";
+exports.cssText = require("../requirejs/text!./ambiance.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/chaos.css b/src/fauxton/assets/js/libs/ace/theme/chaos.css
new file mode 100644
index 000000000..f57e59b3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/chaos.css
@@ -0,0 +1,154 @@
+.ace-chaos .ace_gutter {
+ background: #141414;
+ color: #595959;
+ border-right: 1px solid #282828;
+}
+.ace-chaos .ace_gutter-cell.ace_warning {
+ background-image: none;
+ background: #FC0;
+ border-left: none;
+ padding-left: 0;
+ color: #000;
+}
+.ace-chaos .ace_gutter-cell.ace_error {
+ background-position: -6px center;
+ background-image: none;
+ background: #F10;
+ border-left: none;
+ padding-left: 0;
+ color: #000;
+}
+.ace-chaos .ace_print-margin {
+ border-left: 1px solid #555;
+ right: 0;
+ background: #1D1D1D;
+}
+.ace-chaos {
+ background-color: #161616;
+ color: #E6E1DC;
+}
+
+.ace-chaos .ace_cursor {
+ border-left: 2px solid #FFFFFF;
+}
+.ace-chaos .ace_cursor.ace_overwrite {
+ border-left: 0px;
+ border-bottom: 1px solid #FFFFFF;
+}
+.ace-chaos .ace_marker-layer .ace_selection {
+ background: #494836;
+}
+.ace-chaos .ace_marker-layer .ace_step {
+ background: rgb(198, 219, 174);
+}
+.ace-chaos .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #FCE94F;
+}
+.ace-chaos .ace_marker-layer .ace_active-line {
+ background: #333;
+}
+.ace-chaos .ace_gutter-active-line {
+ background-color: #222;
+}
+.ace-chaos .ace_invisible {
+ color: #404040;
+}
+.ace-chaos .ace_keyword {
+ color:#00698F;
+}
+.ace-chaos .ace_keyword.ace_operator {
+ color:#FF308F;
+}
+.ace-chaos .ace_constant {
+ color:#1EDAFB;
+}
+.ace-chaos .ace_constant.ace_language {
+ color:#FDC251;
+}
+.ace-chaos .ace_constant.ace_library {
+ color:#8DFF0A;
+}
+.ace-chaos .ace_constant.ace_numeric {
+ color:#58C554;
+}
+.ace-chaos .ace_invalid {
+ color:#FFFFFF;
+ background-color:#990000;
+}
+.ace-chaos .ace_invalid.ace_deprecated {
+ color:#FFFFFF;
+ background-color:#990000;
+}
+.ace-chaos .ace_support {
+ color: #999;
+}
+.ace-chaos .ace_support.ace_function {
+ color:#00AEEF;
+}
+.ace-chaos .ace_function {
+ color:#00AEEF;
+}
+.ace-chaos .ace_string {
+ color:#58C554;
+}
+.ace-chaos .ace_comment {
+ color:#555;
+ font-style:italic;
+ padding-bottom: 0px;
+}
+.ace-chaos .ace_variable {
+ color:#997744;
+}
+.ace-chaos .ace_meta.ace_tag {
+ color:#BE53E6;
+}
+.ace-chaos .ace_entity.ace_other.ace_attribute-name {
+ color:#FFFF89;
+}
+.ace-chaos .ace_markup.ace_underline {
+ text-decoration: underline;
+}
+.ace-chaos .ace_fold-widget {
+ text-align: center;
+}
+
+.ace-chaos .ace_fold-widget:hover {
+ color: #777;
+}
+
+.ace-chaos .ace_fold-widget.ace_start,
+.ace-chaos .ace_fold-widget.ace_end,
+.ace-chaos .ace_fold-widget.ace_closed{
+ background: none;
+ border: none;
+ box-shadow: none;
+}
+
+.ace-chaos .ace_fold-widget.ace_start:after {
+ content: '▾'
+}
+
+.ace-chaos .ace_fold-widget.ace_end:after {
+ content: '▴'
+}
+
+.ace-chaos .ace_fold-widget.ace_closed:after {
+ content: '‣'
+}
+
+.ace-chaos .ace_indent-guide {
+ border-right:1px dotted #333;
+ margin-right:-1px;
+}
+
+.ace-chaos .ace_fold {
+ background: #222;
+ border-radius: 3px;
+ color: #7AF;
+ border: none;
+}
+.ace-chaos .ace_fold:hover {
+ background: #CCC;
+ color: #000;
+}
diff --git a/src/fauxton/assets/js/libs/ace/theme/chaos.js b/src/fauxton/assets/js/libs/ace/theme/chaos.js
new file mode 100644
index 000000000..9ee83720c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/chaos.js
@@ -0,0 +1,33 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright 2011 Irakli Gozalishvili. All rights reserved.
+ * 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:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * 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.
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-chaos";
+exports.cssText = require("../requirejs/text!./chaos.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+
+}); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/chrome.css b/src/fauxton/assets/js/libs/ace/theme/chrome.css
new file mode 100644
index 000000000..5130817d6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/chrome.css
@@ -0,0 +1,153 @@
+.ace-chrome .ace_gutter {
+ background: #ebebeb;
+ color: #333;
+ overflow : hidden;
+}
+
+.ace-chrome .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-chrome {
+ background-color: #FFFFFF;
+}
+
+.ace-chrome .ace_cursor {
+ color: black;
+}
+
+.ace-chrome .ace_invisible {
+ color: rgb(191, 191, 191);
+}
+
+.ace-chrome .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-chrome .ace_constant.ace_language {
+ color: rgb(88, 92, 246);
+}
+
+.ace-chrome .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-chrome .ace_invalid {
+ background-color: rgb(153, 0, 0);
+ color: white;
+}
+
+.ace-chrome .ace_fold {
+}
+
+.ace-chrome .ace_support.ace_function {
+ color: rgb(60, 76, 114);
+}
+
+.ace-chrome .ace_support.ace_constant {
+ color: rgb(6, 150, 14);
+}
+
+.ace-chrome .ace_support.ace_type,
+.ace-chrome .ace_support.ace_class
+.ace-chrome .ace_support.ace_other {
+ color: rgb(109, 121, 222);
+}
+
+.ace-chrome .ace_variable.ace_parameter {
+ font-style:italic;
+ color:#FD971F;
+}
+.ace-chrome .ace_keyword.ace_operator {
+ color: rgb(104, 118, 135);
+}
+
+.ace-chrome .ace_comment {
+ color: #236e24;
+}
+
+.ace-chrome .ace_comment.ace_doc {
+ color: #236e24;
+}
+
+.ace-chrome .ace_comment.ace_doc.ace_tag {
+ color: #236e24;
+}
+
+.ace-chrome .ace_constant.ace_numeric {
+ color: rgb(0, 0, 205);
+}
+
+.ace-chrome .ace_variable {
+ color: rgb(49, 132, 149);
+}
+
+.ace-chrome .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-chrome .ace_entity.ace_name.ace_function {
+ color: #0000A2;
+}
+
+
+.ace-chrome .ace_heading {
+ color: rgb(12, 7, 255);
+}
+
+.ace-chrome .ace_list {
+ color:rgb(185, 6, 144);
+}
+
+.ace-chrome .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-chrome .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-chrome .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-chrome .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-chrome .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.07);
+}
+
+.ace-chrome .ace_gutter-active-line {
+ background-color : #dcdcdc;
+}
+
+.ace-chrome .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+}
+
+.ace-chrome .ace_storage,
+.ace-chrome .ace_keyword,
+.ace-chrome .ace_meta.ace_tag {
+ color: rgb(147, 15, 128);
+}
+
+.ace-chrome .ace_string.ace_regex {
+ color: rgb(255, 0, 0)
+}
+
+.ace-chrome .ace_string {
+ color: #1A1AA6;
+}
+
+.ace-chrome .ace_entity.ace_other.ace_attribute-name {
+ color: #994409;
+}
+
+.ace-chrome .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+}
diff --git a/src/fauxton/assets/js/libs/ace/theme/chrome.js b/src/fauxton/assets/js/libs/ace/theme/chrome.js
new file mode 100644
index 000000000..dafa99c26
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/chrome.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-chrome";
+exports.cssText = require("../requirejs/text!./chrome.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/clouds.css b/src/fauxton/assets/js/libs/ace/theme/clouds.css
new file mode 100644
index 000000000..e3884e02b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/clouds.css
@@ -0,0 +1,112 @@
+.ace-clouds .ace_gutter {
+ background: #ebebeb;
+ color: #333
+}
+
+.ace-clouds .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8
+}
+
+.ace-clouds {
+ background-color: #FFFFFF;
+ color: #000000
+}
+
+.ace-clouds .ace_cursor {
+ color: #000000
+}
+
+.ace-clouds .ace_marker-layer .ace_selection {
+ background: #BDD5FC
+}
+
+.ace-clouds.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #FFFFFF;
+ border-radius: 2px
+}
+
+.ace-clouds .ace_marker-layer .ace_step {
+ background: rgb(255, 255, 0)
+}
+
+.ace-clouds .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #BFBFBF
+}
+
+.ace-clouds .ace_marker-layer .ace_active-line {
+ background: #FFFBD1
+}
+
+.ace-clouds .ace_gutter-active-line {
+ background-color : #dcdcdc
+}
+
+.ace-clouds .ace_marker-layer .ace_selected-word {
+ border: 1px solid #BDD5FC
+}
+
+.ace-clouds .ace_invisible {
+ color: #BFBFBF
+}
+
+.ace-clouds .ace_keyword,
+.ace-clouds .ace_meta,
+.ace-clouds .ace_support.ace_constant.ace_property-value {
+ color: #AF956F
+}
+
+.ace-clouds .ace_keyword.ace_operator {
+ color: #484848
+}
+
+.ace-clouds .ace_keyword.ace_other.ace_unit {
+ color: #96DC5F
+}
+
+.ace-clouds .ace_constant.ace_language {
+ color: #39946A
+}
+
+.ace-clouds .ace_constant.ace_numeric {
+ color: #46A609
+}
+
+.ace-clouds .ace_constant.ace_character.ace_entity {
+ color: #BF78CC
+}
+
+.ace-clouds .ace_invalid {
+ background-color: #FF002A
+}
+
+.ace-clouds .ace_fold {
+ background-color: #AF956F;
+ border-color: #000000
+}
+
+.ace-clouds .ace_storage,
+.ace-clouds .ace_support.ace_class,
+.ace-clouds .ace_support.ace_function,
+.ace-clouds .ace_support.ace_other,
+.ace-clouds .ace_support.ace_type {
+ color: #C52727
+}
+
+.ace-clouds .ace_string {
+ color: #5D90CD
+}
+
+.ace-clouds .ace_comment {
+ color: #BCC8BA
+}
+
+.ace-clouds .ace_entity.ace_name.ace_tag,
+.ace-clouds .ace_entity.ace_other.ace_attribute-name {
+ color: #606060
+}
+
+.ace-clouds .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/clouds.js b/src/fauxton/assets/js/libs/ace/theme/clouds.js
new file mode 100644
index 000000000..aa36edcf2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/clouds.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-clouds";
+exports.cssText = require("../requirejs/text!./clouds.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.css b/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.css
new file mode 100644
index 000000000..87e224654
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.css
@@ -0,0 +1,113 @@
+.ace-clouds-midnight .ace_gutter {
+ background: #232323;
+ color: #929292
+}
+
+.ace-clouds-midnight .ace_print-margin {
+ width: 1px;
+ background: #232323
+}
+
+.ace-clouds-midnight{
+ background-color: #191919;
+ color: #929292
+}
+
+.ace-clouds-midnight .ace_cursor {
+ color: #7DA5DC
+}
+
+.ace-clouds-midnight .ace_marker-layer .ace_selection {
+ background: #000000
+}
+
+.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #191919;
+ border-radius: 2px
+}
+
+.ace-clouds-midnight .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-clouds-midnight .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #BFBFBF
+}
+
+.ace-clouds-midnight .ace_marker-layer .ace_active-line {
+ background: rgba(215, 215, 215, 0.031)
+}
+
+.ace-clouds-midnight .ace_gutter-active-line {
+ background-color: rgba(215, 215, 215, 0.031)
+}
+
+.ace-clouds-midnight .ace_marker-layer .ace_selected-word {
+ border: 1px solid #000000
+}
+
+.ace-clouds-midnight .ace_invisible {
+ color: #BFBFBF
+}
+
+.ace-clouds-midnight .ace_keyword,
+.ace-clouds-midnight .ace_meta,
+.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {
+ color: #927C5D
+}
+
+.ace-clouds-midnight .ace_keyword.ace_operator {
+ color: #4B4B4B
+}
+
+.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {
+ color: #366F1A
+}
+
+.ace-clouds-midnight .ace_constant.ace_language {
+ color: #39946A
+}
+
+.ace-clouds-midnight .ace_constant.ace_numeric {
+ color: #46A609
+}
+
+.ace-clouds-midnight .ace_constant.ace_character.ace_entity {
+ color: #A165AC
+}
+
+.ace-clouds-midnight .ace_invalid {
+ color: #FFFFFF;
+ background-color: #E92E2E
+}
+
+.ace-clouds-midnight .ace_fold {
+ background-color: #927C5D;
+ border-color: #929292
+}
+
+.ace-clouds-midnight .ace_storage,
+.ace-clouds-midnight .ace_support.ace_class,
+.ace-clouds-midnight .ace_support.ace_function,
+.ace-clouds-midnight .ace_support.ace_other,
+.ace-clouds-midnight .ace_support.ace_type {
+ color: #E92E2E
+}
+
+.ace-clouds-midnight .ace_string {
+ color: #5D90CD
+}
+
+.ace-clouds-midnight .ace_comment {
+ color: #3C403B
+}
+
+.ace-clouds-midnight .ace_entity.ace_name.ace_tag,
+.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {
+ color: #606060
+}
+
+.ace-clouds-midnight .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.js b/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.js
new file mode 100644
index 000000000..e704d57cc
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/clouds_midnight.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-clouds-midnight";
+exports.cssText = require("../requirejs/text!./clouds_midnight.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/cobalt.css b/src/fauxton/assets/js/libs/ace/theme/cobalt.css
new file mode 100644
index 000000000..7febd9ac2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/cobalt.css
@@ -0,0 +1,132 @@
+.ace-cobalt .ace_gutter {
+ background: #011e3a;
+ color: #fff
+}
+
+.ace-cobalt .ace_print-margin {
+ width: 1px;
+ background: #011e3a
+}
+
+.ace-cobalt {
+ background-color: #002240;
+ color: #FFFFFF
+}
+
+.ace-cobalt .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-cobalt .ace_marker-layer .ace_selection {
+ background: rgba(179, 101, 57, 0.75)
+}
+
+.ace-cobalt.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #002240;
+ border-radius: 2px
+}
+
+.ace-cobalt .ace_marker-layer .ace_step {
+ background: rgb(127, 111, 19)
+}
+
+.ace-cobalt .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(255, 255, 255, 0.15)
+}
+
+.ace-cobalt .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.35)
+}
+
+.ace-cobalt .ace_gutter-active-line {
+ background-color: rgba(0, 0, 0, 0.35)
+}
+
+.ace-cobalt .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(179, 101, 57, 0.75)
+}
+
+.ace-cobalt .ace_invisible {
+ color: rgba(255, 255, 255, 0.15)
+}
+
+.ace-cobalt .ace_keyword,
+.ace-cobalt .ace_meta {
+ color: #FF9D00
+}
+
+.ace-cobalt .ace_constant,
+.ace-cobalt .ace_constant.ace_character,
+.ace-cobalt .ace_constant.ace_character.ace_escape,
+.ace-cobalt .ace_constant.ace_other {
+ color: #FF628C
+}
+
+.ace-cobalt .ace_invalid {
+ color: #F8F8F8;
+ background-color: #800F00
+}
+
+.ace-cobalt .ace_support {
+ color: #80FFBB
+}
+
+.ace-cobalt .ace_support.ace_constant {
+ color: #EB939A
+}
+
+.ace-cobalt .ace_fold {
+ background-color: #FF9D00;
+ border-color: #FFFFFF
+}
+
+.ace-cobalt .ace_support.ace_function {
+ color: #FFB054
+}
+
+.ace-cobalt .ace_storage {
+ color: #FFEE80
+}
+
+.ace-cobalt .ace_entity {
+ color: #FFDD00
+}
+
+.ace-cobalt .ace_string {
+ color: #3AD900
+}
+
+.ace-cobalt .ace_string.ace_regexp {
+ color: #80FFC2
+}
+
+.ace-cobalt .ace_comment {
+ font-style: italic;
+ color: #0088FF
+}
+
+.ace-cobalt .ace_variable {
+ color: #CCCCCC
+}
+
+.ace-cobalt .ace_variable.ace_language {
+ color: #FF80E1
+}
+
+.ace-cobalt .ace_meta.ace_tag {
+ color: #9EFFFF
+}
+
+.ace-cobalt .ace_heading {
+ color: #C8E4FD;
+ background-color: #001221
+}
+
+.ace-cobalt .ace_list {
+ background-color: #130D26
+}
+
+.ace-cobalt .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/cobalt.js b/src/fauxton/assets/js/libs/ace/theme/cobalt.js
new file mode 100644
index 000000000..a466dd6cb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/cobalt.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-cobalt";
+exports.cssText = require("../requirejs/text!./cobalt.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/crimson_editor.css b/src/fauxton/assets/js/libs/ace/theme/crimson_editor.css
new file mode 100644
index 000000000..e84292b4e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/crimson_editor.css
@@ -0,0 +1,143 @@
+.ace-crimson-editor .ace_gutter {
+ background: #ebebeb;
+ color: #333;
+ overflow : hidden;
+}
+
+.ace-crimson-editor .ace_gutter-layer {
+ width: 100%;
+ text-align: right;
+}
+
+.ace-crimson-editor .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-crimson-editor {
+ background-color: #FFFFFF;
+ color: rgb(64, 64, 64);
+}
+
+.ace-crimson-editor .ace_cursor {
+ color: black;
+}
+
+.ace-crimson-editor .ace_invisible {
+ color: rgb(191, 191, 191);
+}
+
+.ace-crimson-editor .ace_identifier {
+ color: black;
+}
+
+.ace-crimson-editor .ace_keyword {
+ color: blue;
+}
+
+.ace-crimson-editor .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-crimson-editor .ace_constant.ace_language {
+ color: rgb(255, 156, 0);
+}
+
+.ace-crimson-editor .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-crimson-editor .ace_invalid {
+ text-decoration: line-through;
+ color: rgb(224, 0, 0);
+}
+
+.ace-crimson-editor .ace_fold {
+}
+
+.ace-crimson-editor .ace_support.ace_function {
+ color: rgb(192, 0, 0);
+}
+
+.ace-crimson-editor .ace_support.ace_constant {
+ color: rgb(6, 150, 14);
+}
+
+.ace-crimson-editor .ace_support.ace_type,
+.ace-crimson-editor .ace_support.ace_class {
+ color: rgb(109, 121, 222);
+}
+
+.ace-crimson-editor .ace_keyword.ace_operator {
+ color: rgb(49, 132, 149);
+}
+
+.ace-crimson-editor .ace_string {
+ color: rgb(128, 0, 128);
+}
+
+.ace-crimson-editor .ace_comment {
+ color: rgb(76, 136, 107);
+}
+
+.ace-crimson-editor .ace_comment.ace_doc {
+ color: rgb(0, 102, 255);
+}
+
+.ace-crimson-editor .ace_comment.ace_doc.ace_tag {
+ color: rgb(128, 159, 191);
+}
+
+.ace-crimson-editor .ace_constant.ace_numeric {
+ color: rgb(0, 0, 64);
+}
+
+.ace-crimson-editor .ace_variable {
+ color: rgb(0, 64, 128);
+}
+
+.ace-crimson-editor .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_active-line {
+ background: rgb(232, 242, 254);
+}
+
+.ace-crimson-editor .ace_gutter-active-line {
+ background-color : #dcdcdc;
+}
+
+.ace-crimson-editor .ace_meta.ace_tag {
+ color:rgb(28, 2, 255);
+}
+
+.ace-crimson-editor .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+}
+
+.ace-crimson-editor .ace_string.ace_regex {
+ color: rgb(192, 0, 192);
+}
+
+.ace-crimson-editor .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/crimson_editor.js b/src/fauxton/assets/js/libs/ace/theme/crimson_editor.js
new file mode 100644
index 000000000..a5971075e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/crimson_editor.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+exports.isDark = false;
+exports.cssText = require("../requirejs/text!./crimson_editor.css");
+
+exports.cssClass = "ace-crimson-editor";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/dawn.css b/src/fauxton/assets/js/libs/ace/theme/dawn.css
new file mode 100644
index 000000000..c1a89e321
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/dawn.css
@@ -0,0 +1,125 @@
+.ace-dawn .ace_gutter {
+ background: #ebebeb;
+ color: #333
+}
+
+.ace-dawn .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8
+}
+
+.ace-dawn {
+ background-color: #F9F9F9;
+ color: #080808
+}
+
+.ace-dawn .ace_cursor {
+ color: #000000
+}
+
+.ace-dawn .ace_marker-layer .ace_selection {
+ background: rgba(39, 95, 255, 0.30)
+}
+
+.ace-dawn.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #F9F9F9;
+ border-radius: 2px
+}
+
+.ace-dawn .ace_marker-layer .ace_step {
+ background: rgb(255, 255, 0)
+}
+
+.ace-dawn .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(75, 75, 126, 0.50)
+}
+
+.ace-dawn .ace_marker-layer .ace_active-line {
+ background: rgba(36, 99, 180, 0.12)
+}
+
+.ace-dawn .ace_gutter-active-line {
+ background-color : #dcdcdc
+}
+
+.ace-dawn .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(39, 95, 255, 0.30)
+}
+
+.ace-dawn .ace_invisible {
+ color: rgba(75, 75, 126, 0.50)
+}
+
+.ace-dawn .ace_keyword,
+.ace-dawn .ace_meta {
+ color: #794938
+}
+
+.ace-dawn .ace_constant,
+.ace-dawn .ace_constant.ace_character,
+.ace-dawn .ace_constant.ace_character.ace_escape,
+.ace-dawn .ace_constant.ace_other {
+ color: #811F24
+}
+
+.ace-dawn .ace_invalid.ace_illegal {
+ text-decoration: underline;
+ font-style: italic;
+ color: #F8F8F8;
+ background-color: #B52A1D
+}
+
+.ace-dawn .ace_invalid.ace_deprecated {
+ text-decoration: underline;
+ font-style: italic;
+ color: #B52A1D
+}
+
+.ace-dawn .ace_support {
+ color: #691C97
+}
+
+.ace-dawn .ace_support.ace_constant {
+ color: #B4371F
+}
+
+.ace-dawn .ace_fold {
+ background-color: #794938;
+ border-color: #080808
+}
+
+.ace-dawn .ace_list,
+.ace-dawn .ace_support.ace_function {
+ color: #693A17
+}
+
+.ace-dawn .ace_storage {
+ font-style: italic;
+ color: #A71D5D
+}
+
+.ace-dawn .ace_string {
+ color: #0B6125
+}
+
+.ace-dawn .ace_string.ace_regexp {
+ color: #CF5628
+}
+
+.ace-dawn .ace_comment {
+ font-style: italic;
+ color: #5A525F
+}
+
+.ace-dawn .ace_variable {
+ color: #234A97
+}
+
+.ace-dawn .ace_heading {
+ color: #19356D
+}
+
+.ace-dawn .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/dawn.js b/src/fauxton/assets/js/libs/ace/theme/dawn.js
new file mode 100644
index 000000000..2498aa3b6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/dawn.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-dawn";
+exports.cssText = require("../requirejs/text!./dawn.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/dreamweaver.css b/src/fauxton/assets/js/libs/ace/theme/dreamweaver.css
new file mode 100644
index 000000000..595927b27
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/dreamweaver.css
@@ -0,0 +1,171 @@
+.ace-dreamweaver .ace_gutter {
+ background: #e8e8e8;
+ color: #333;
+}
+
+.ace-dreamweaver .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-dreamweaver {
+ background-color: #FFFFFF;
+}
+
+.ace-dreamweaver .ace_fold {
+ background-color: #757AD8;
+}
+
+.ace-dreamweaver .ace_cursor {
+ color: black;
+}
+
+.ace-dreamweaver .ace_invisible {
+ color: rgb(191, 191, 191);
+}
+
+.ace-dreamweaver .ace_storage,
+.ace-dreamweaver .ace_keyword {
+ color: blue;
+}
+
+.ace-dreamweaver .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-dreamweaver .ace_constant.ace_language {
+ color: rgb(88, 92, 246);
+}
+
+.ace-dreamweaver .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-dreamweaver .ace_invalid {
+ background-color: rgb(153, 0, 0);
+ color: white;
+}
+
+.ace-dreamweaver .ace_support.ace_function {
+ color: rgb(60, 76, 114);
+}
+
+.ace-dreamweaver .ace_support.ace_constant {
+ color: rgb(6, 150, 14);
+}
+
+.ace-dreamweaver .ace_support.ace_type,
+.ace-dreamweaver .ace_support.ace_class {
+ color: #009;
+}
+
+.ace-dreamweaver .ace_support.ace_php_tag {
+ color: #f00;
+}
+
+.ace-dreamweaver .ace_keyword.ace_operator {
+ color: rgb(104, 118, 135);
+}
+
+.ace-dreamweaver .ace_string {
+ color: #00F;
+}
+
+.ace-dreamweaver .ace_comment {
+ color: rgb(76, 136, 107);
+}
+
+.ace-dreamweaver .ace_comment.ace_doc {
+ color: rgb(0, 102, 255);
+}
+
+.ace-dreamweaver .ace_comment.ace_doc.ace_tag {
+ color: rgb(128, 159, 191);
+}
+
+.ace-dreamweaver .ace_constant.ace_numeric {
+ color: rgb(0, 0, 205);
+}
+
+.ace-dreamweaver .ace_variable {
+ color: #06F
+}
+
+.ace-dreamweaver .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-dreamweaver .ace_entity.ace_name.ace_function {
+ color: #00F;
+}
+
+
+.ace-dreamweaver .ace_heading {
+ color: rgb(12, 7, 255);
+}
+
+.ace-dreamweaver .ace_list {
+ color:rgb(185, 6, 144);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.07);
+}
+
+.ace-dreamweaver .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+}
+
+.ace-dreamweaver .ace_meta.ace_tag {
+ color:#009;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {
+ color:#060;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_form {
+ color:#F90;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_image {
+ color:#909;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_script {
+ color:#900;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_style {
+ color:#909;
+}
+
+.ace-dreamweaver .ace_meta.ace_tag.ace_table {
+ color:#099;
+}
+
+.ace-dreamweaver .ace_string.ace_regex {
+ color: rgb(255, 0, 0)
+}
+
+.ace-dreamweaver .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/dreamweaver.js b/src/fauxton/assets/js/libs/ace/theme/dreamweaver.js
new file mode 100644
index 000000000..943dc6925
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/dreamweaver.js
@@ -0,0 +1,38 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+exports.isDark = false;
+exports.cssClass = "ace-dreamweaver";
+exports.cssText = require("../requirejs/text!./dreamweaver.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/eclipse.css b/src/fauxton/assets/js/libs/ace/theme/eclipse.css
new file mode 100644
index 000000000..6deec44b0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/eclipse.css
@@ -0,0 +1,108 @@
+.ace-eclipse .ace_gutter {
+ background: #ebebeb;
+ border-right: 1px solid rgb(159, 159, 159);
+ color: rgb(136, 136, 136);
+}
+
+.ace-eclipse .ace_print-margin {
+ width: 1px;
+ background: #ebebeb;
+}
+
+.ace-eclipse {
+ background-color: #FFFFFF;
+}
+
+.ace-eclipse .ace_fold {
+ background-color: rgb(60, 76, 114);
+}
+
+.ace-eclipse .ace_cursor {
+ color: black;
+}
+
+.ace-eclipse .ace_storage,
+.ace-eclipse .ace_keyword,
+.ace-eclipse .ace_variable {
+ color: rgb(127, 0, 85);
+}
+
+.ace-eclipse .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-eclipse .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-eclipse .ace_function {
+ color: rgb(60, 76, 114);
+}
+
+.ace-eclipse .ace_string {
+ color: rgb(42, 0, 255);
+}
+
+.ace-eclipse .ace_comment {
+ color: rgb(113, 150, 130);
+}
+
+.ace-eclipse .ace_comment.ace_doc {
+ color: rgb(63, 95, 191);
+}
+
+.ace-eclipse .ace_comment.ace_doc.ace_tag {
+ color: rgb(127, 159, 191);
+}
+
+.ace-eclipse .ace_constant.ace_numeric {
+ color: darkblue;
+}
+
+.ace-eclipse .ace_tag {
+ color: rgb(25, 118, 116);
+}
+
+.ace-eclipse .ace_type {
+ color: rgb(127, 0, 127);
+}
+
+.ace-eclipse .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-eclipse .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-eclipse .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-eclipse .ace_meta.ace_tag {
+ color:rgb(25, 118, 116);
+}
+
+.ace-eclipse .ace_invisible {
+ color: #ddd;
+}
+
+.ace-eclipse .ace_entity.ace_other.ace_attribute-name {
+ color:rgb(127, 0, 127);
+}
+.ace-eclipse .ace_marker-layer .ace_step {
+ background: rgb(255, 255, 0);
+}
+
+.ace-eclipse .ace_marker-layer .ace_active-line {
+ background: rgb(232, 242, 254);
+}
+
+.ace-eclipse .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgb(181, 213, 255);
+}
+
+.ace-eclipse .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/eclipse.js b/src/fauxton/assets/js/libs/ace/theme/eclipse.js
new file mode 100644
index 000000000..329b8b79d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/eclipse.js
@@ -0,0 +1,41 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+exports.isDark = false;
+exports.cssText = require("../requirejs/text!./eclipse.css");
+
+exports.cssClass = "ace-eclipse";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/github.css b/src/fauxton/assets/js/libs/ace/theme/github.css
new file mode 100644
index 000000000..f496f6ee4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/github.css
@@ -0,0 +1,119 @@
+/* CSS style content from github's default pygments highlighter template.
+ Cursor and selection styles from textmate.css. */
+.ace-github .ace_gutter {
+ background: #e8e8e8;
+ color: #AAA;
+}
+
+.ace-github {
+ background: #fff;
+ color: #000;
+}
+
+.ace-github .ace_keyword {
+ font-weight: bold;
+}
+
+.ace-github .ace_string {
+ color: #D14;
+}
+
+.ace-github .ace_variable.ace_class {
+ color: teal;
+}
+
+.ace-github .ace_constant.ace_numeric {
+ color: #099;
+}
+
+.ace-github .ace_constant.ace_buildin {
+ color: #0086B3;
+}
+
+.ace-github .ace_support.ace_function {
+ color: #0086B3;
+}
+
+.ace-github .ace_comment {
+ color: #998;
+ font-style: italic;
+}
+
+.ace-github .ace_variable.ace_language {
+ color: #0086B3;
+}
+
+.ace-github .ace_paren {
+ font-weight: bold;
+}
+
+.ace-github .ace_boolean {
+ font-weight: bold;
+}
+
+.ace-github .ace_string.ace_regexp {
+ color: #009926;
+ font-weight: normal;
+}
+
+.ace-github .ace_variable.ace_instance {
+ color: teal;
+}
+
+.ace-github .ace_constant.ace_language {
+ font-weight: bold;
+}
+
+.ace-github .ace_cursor {
+ color: black;
+}
+
+.ace-github .ace_marker-layer .ace_active-line {
+ background: rgb(255, 255, 204);
+}
+
+.ace-github .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-github.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px white;
+ border-radius: 2px;
+}
+/* bold keywords cause cursor issues for some fonts */
+/* this disables bold style for editor and keeps for static highlighter */
+.ace-github.ace_nobold .ace_line > span {
+ font-weight: normal !important;
+}
+
+.ace-github .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-github .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-github .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-github .ace_gutter-active-line {
+ background-color : rgba(0, 0, 0, 0.07);
+}
+
+.ace-github .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+
+}
+
+.ace-github .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-github .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/github.js b/src/fauxton/assets/js/libs/ace/theme/github.js
new file mode 100644
index 000000000..de013c8c2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/github.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-github";
+exports.cssText = require("../requirejs/text!./github.css");
+
+ var dom = require("../lib/dom");
+ dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/idle_fingers.css b/src/fauxton/assets/js/libs/ace/theme/idle_fingers.css
new file mode 100644
index 000000000..6a4d02d54
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/idle_fingers.css
@@ -0,0 +1,113 @@
+.ace-idle-fingers .ace_gutter {
+ background: #3b3b3b;
+ color: #fff
+}
+
+.ace-idle-fingers .ace_print-margin {
+ width: 1px;
+ background: #3b3b3b
+}
+
+.ace-idle-fingers {
+ background-color: #323232;
+ color: #FFFFFF
+}
+
+.ace-idle-fingers .ace_cursor {
+ color: #91FF00
+}
+
+.ace-idle-fingers .ace_marker-layer .ace_selection {
+ background: rgba(90, 100, 126, 0.88)
+}
+
+.ace-idle-fingers.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #323232;
+ border-radius: 2px
+}
+
+.ace-idle-fingers .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-idle-fingers .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #404040
+}
+
+.ace-idle-fingers .ace_marker-layer .ace_active-line {
+ background: #353637
+}
+
+.ace-idle-fingers .ace_gutter-active-line {
+ background-color: #353637
+}
+
+.ace-idle-fingers .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(90, 100, 126, 0.88)
+}
+
+.ace-idle-fingers .ace_invisible {
+ color: #404040
+}
+
+.ace-idle-fingers .ace_keyword,
+.ace-idle-fingers .ace_meta {
+ color: #CC7833
+}
+
+.ace-idle-fingers .ace_constant,
+.ace-idle-fingers .ace_constant.ace_character,
+.ace-idle-fingers .ace_constant.ace_character.ace_escape,
+.ace-idle-fingers .ace_constant.ace_other,
+.ace-idle-fingers .ace_support.ace_constant {
+ color: #6C99BB
+}
+
+.ace-idle-fingers .ace_invalid {
+ color: #FFFFFF;
+ background-color: #FF0000
+}
+
+.ace-idle-fingers .ace_fold {
+ background-color: #CC7833;
+ border-color: #FFFFFF
+}
+
+.ace-idle-fingers .ace_support.ace_function {
+ color: #B83426
+}
+
+.ace-idle-fingers .ace_variable.ace_parameter {
+ font-style: italic
+}
+
+.ace-idle-fingers .ace_string {
+ color: #A5C261
+}
+
+.ace-idle-fingers .ace_string.ace_regexp {
+ color: #CCCC33
+}
+
+.ace-idle-fingers .ace_comment {
+ font-style: italic;
+ color: #BC9458
+}
+
+.ace-idle-fingers .ace_meta.ace_tag {
+ color: #FFE5BB
+}
+
+.ace-idle-fingers .ace_entity.ace_name {
+ color: #FFC66D
+}
+
+.ace-idle-fingers .ace_collab.ace_user1 {
+ color: #323232;
+ background-color: #FFF980
+}
+
+.ace-idle-fingers .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/idle_fingers.js b/src/fauxton/assets/js/libs/ace/theme/idle_fingers.js
new file mode 100644
index 000000000..096a23146
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/idle_fingers.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-idle-fingers";
+exports.cssText = require("../requirejs/text!./idle_fingers.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/kr_theme.css b/src/fauxton/assets/js/libs/ace/theme/kr_theme.css
new file mode 100644
index 000000000..ea030d30d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/kr_theme.css
@@ -0,0 +1,123 @@
+.ace-kr-theme .ace_gutter {
+ background: #1c1917;
+ color: #FCFFE0
+}
+
+.ace-kr-theme .ace_print-margin {
+ width: 1px;
+ background: #1c1917
+}
+
+.ace-kr-theme {
+ background-color: #0B0A09;
+ color: #FCFFE0
+}
+
+.ace-kr-theme .ace_cursor {
+ color: #FF9900
+}
+
+.ace-kr-theme .ace_marker-layer .ace_selection {
+ background: rgba(170, 0, 255, 0.45)
+}
+
+.ace-kr-theme.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #0B0A09;
+ border-radius: 2px
+}
+
+.ace-kr-theme .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-kr-theme .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(255, 177, 111, 0.32)
+}
+
+.ace-kr-theme .ace_marker-layer .ace_active-line {
+ background: #38403D
+}
+
+.ace-kr-theme .ace_gutter-active-line {
+ background-color : #38403D
+}
+
+.ace-kr-theme .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(170, 0, 255, 0.45)
+}
+
+.ace-kr-theme .ace_invisible {
+ color: rgba(255, 177, 111, 0.32)
+}
+
+.ace-kr-theme .ace_keyword,
+.ace-kr-theme .ace_meta {
+ color: #949C8B
+}
+
+.ace-kr-theme .ace_constant,
+.ace-kr-theme .ace_constant.ace_character,
+.ace-kr-theme .ace_constant.ace_character.ace_escape,
+.ace-kr-theme .ace_constant.ace_other {
+ color: rgba(210, 117, 24, 0.76)
+}
+
+.ace-kr-theme .ace_invalid {
+ color: #F8F8F8;
+ background-color: #A41300
+}
+
+.ace-kr-theme .ace_support {
+ color: #9FC28A
+}
+
+.ace-kr-theme .ace_support.ace_constant {
+ color: #C27E66
+}
+
+.ace-kr-theme .ace_fold {
+ background-color: #949C8B;
+ border-color: #FCFFE0
+}
+
+.ace-kr-theme .ace_support.ace_function {
+ color: #85873A
+}
+
+.ace-kr-theme .ace_storage {
+ color: #FFEE80
+}
+
+.ace-kr-theme .ace_string {
+ color: rgba(164, 161, 181, 0.8)
+}
+
+.ace-kr-theme .ace_string.ace_regexp {
+ color: rgba(125, 255, 192, 0.65)
+}
+
+.ace-kr-theme .ace_comment {
+ font-style: italic;
+ color: #706D5B
+}
+
+.ace-kr-theme .ace_variable {
+ color: #D1A796
+}
+
+.ace-kr-theme .ace_variable.ace_language {
+ color: #FF80E1
+}
+
+.ace-kr-theme .ace_meta.ace_tag {
+ color: #BABD9C
+}
+
+.ace-kr-theme .ace_list {
+ background-color: #0F0040
+}
+
+.ace-kr-theme .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/kr_theme.js b/src/fauxton/assets/js/libs/ace/theme/kr_theme.js
new file mode 100644
index 000000000..fb6a5abe2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/kr_theme.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-kr-theme";
+exports.cssText = require("../requirejs/text!./kr_theme.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/merbivore.css b/src/fauxton/assets/js/libs/ace/theme/merbivore.css
new file mode 100644
index 000000000..d0803d82a
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/merbivore.css
@@ -0,0 +1,110 @@
+.ace-merbivore .ace_gutter {
+ background: #202020;
+ color: #E6E1DC
+}
+
+.ace-merbivore .ace_print-margin {
+ width: 1px;
+ background: #555651
+}
+
+.ace-merbivore {
+ background-color: #161616;
+ color: #E6E1DC
+}
+
+.ace-merbivore .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-merbivore .ace_marker-layer .ace_selection {
+ background: #454545
+}
+
+.ace-merbivore.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #161616;
+ border-radius: 2px
+}
+
+.ace-merbivore .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-merbivore .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #404040
+}
+
+.ace-merbivore .ace_marker-layer .ace_active-line {
+ background: #333435
+}
+
+.ace-merbivore .ace_gutter-active-line {
+ background-color: #333435
+}
+
+.ace-merbivore .ace_marker-layer .ace_selected-word {
+ border: 1px solid #454545
+}
+
+.ace-merbivore .ace_invisible {
+ color: #404040
+}
+
+.ace-merbivore .ace_entity.ace_name.ace_tag,
+.ace-merbivore .ace_keyword,
+.ace-merbivore .ace_meta,
+.ace-merbivore .ace_meta.ace_tag,
+.ace-merbivore .ace_storage,
+.ace-merbivore .ace_support.ace_function {
+ color: #FC6F09
+}
+
+.ace-merbivore .ace_constant,
+.ace-merbivore .ace_constant.ace_character,
+.ace-merbivore .ace_constant.ace_character.ace_escape,
+.ace-merbivore .ace_constant.ace_other,
+.ace-merbivore .ace_support.ace_type {
+ color: #1EDAFB
+}
+
+.ace-merbivore .ace_constant.ace_character.ace_escape {
+ color: #519F50
+}
+
+.ace-merbivore .ace_constant.ace_language {
+ color: #FDC251
+}
+
+.ace-merbivore .ace_constant.ace_library,
+.ace-merbivore .ace_string,
+.ace-merbivore .ace_support.ace_constant {
+ color: #8DFF0A
+}
+
+.ace-merbivore .ace_constant.ace_numeric {
+ color: #58C554
+}
+
+.ace-merbivore .ace_invalid {
+ color: #FFFFFF;
+ background-color: #990000
+}
+
+.ace-merbivore .ace_fold {
+ background-color: #FC6F09;
+ border-color: #E6E1DC
+}
+
+.ace-merbivore .ace_comment {
+ font-style: italic;
+ color: #AD2EA4
+}
+
+.ace-merbivore .ace_entity.ace_other.ace_attribute-name {
+ color: #FFFF89
+}
+
+.ace-merbivore .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/merbivore.js b/src/fauxton/assets/js/libs/ace/theme/merbivore.js
new file mode 100644
index 000000000..9b29db1c0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/merbivore.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-merbivore";
+exports.cssText = require("../requirejs/text!./merbivore.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.css b/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.css
new file mode 100644
index 000000000..7792440d3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.css
@@ -0,0 +1,111 @@
+.ace-merbivore-soft .ace_gutter {
+ background: #262424;
+ color: #E6E1DC
+}
+
+.ace-merbivore-soft .ace_print-margin {
+ width: 1px;
+ background: #262424
+}
+
+.ace-merbivore-soft {
+ background-color: #1C1C1C;
+ color: #E6E1DC
+}
+
+.ace-merbivore-soft .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-merbivore-soft .ace_marker-layer .ace_selection {
+ background: #494949
+}
+
+.ace-merbivore-soft.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #1C1C1C;
+ border-radius: 2px
+}
+
+.ace-merbivore-soft .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-merbivore-soft .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #404040
+}
+
+.ace-merbivore-soft .ace_marker-layer .ace_active-line {
+ background: #333435
+}
+
+.ace-merbivore-soft .ace_gutter-active-line {
+ background-color: #333435
+}
+
+.ace-merbivore-soft .ace_marker-layer .ace_selected-word {
+ border: 1px solid #494949
+}
+
+.ace-merbivore-soft .ace_invisible {
+ color: #404040
+}
+
+.ace-merbivore-soft .ace_entity.ace_name.ace_tag,
+.ace-merbivore-soft .ace_keyword,
+.ace-merbivore-soft .ace_meta,
+.ace-merbivore-soft .ace_meta.ace_tag,
+.ace-merbivore-soft .ace_storage {
+ color: #FC803A
+}
+
+.ace-merbivore-soft .ace_constant,
+.ace-merbivore-soft .ace_constant.ace_character,
+.ace-merbivore-soft .ace_constant.ace_character.ace_escape,
+.ace-merbivore-soft .ace_constant.ace_other,
+.ace-merbivore-soft .ace_support.ace_type {
+ color: #68C1D8
+}
+
+.ace-merbivore-soft .ace_constant.ace_character.ace_escape {
+ color: #B3E5B4
+}
+
+.ace-merbivore-soft .ace_constant.ace_language {
+ color: #E1C582
+}
+
+.ace-merbivore-soft .ace_constant.ace_library,
+.ace-merbivore-soft .ace_string,
+.ace-merbivore-soft .ace_support.ace_constant {
+ color: #8EC65F
+}
+
+.ace-merbivore-soft .ace_constant.ace_numeric {
+ color: #7FC578
+}
+
+.ace-merbivore-soft .ace_invalid,
+.ace-merbivore-soft .ace_invalid.ace_deprecated {
+ color: #FFFFFF;
+ background-color: #FE3838
+}
+
+.ace-merbivore-soft .ace_fold {
+ background-color: #FC803A;
+ border-color: #E6E1DC
+}
+
+.ace-merbivore-soft .ace_comment,
+.ace-merbivore-soft .ace_meta {
+ font-style: italic;
+ color: #AC4BB8
+}
+
+.ace-merbivore-soft .ace_entity.ace_other.ace_attribute-name {
+ color: #EAF1A3
+}
+
+.ace-merbivore-soft .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.js b/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.js
new file mode 100644
index 000000000..c0ffd9109
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/merbivore_soft.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-merbivore-soft";
+exports.cssText = require("../requirejs/text!./merbivore_soft.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/mono_industrial.css b/src/fauxton/assets/js/libs/ace/theme/mono_industrial.css
new file mode 100644
index 000000000..90531fa2e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/mono_industrial.css
@@ -0,0 +1,126 @@
+.ace-mono-industrial .ace_gutter {
+ background: #1d2521;
+ color: #C5C9C9
+}
+
+.ace-mono-industrial .ace_print-margin {
+ width: 1px;
+ background: #555651
+}
+
+.ace-mono-industrial {
+ background-color: #222C28;
+ color: #FFFFFF
+}
+
+.ace-mono-industrial .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-mono-industrial .ace_marker-layer .ace_selection {
+ background: rgba(145, 153, 148, 0.40)
+}
+
+.ace-mono-industrial.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #222C28;
+ border-radius: 2px
+}
+
+.ace-mono-industrial .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-mono-industrial .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(102, 108, 104, 0.50)
+}
+
+.ace-mono-industrial .ace_marker-layer .ace_active-line {
+ background: rgba(12, 13, 12, 0.25)
+}
+
+.ace-mono-industrial .ace_gutter-active-line {
+ background-color: rgba(12, 13, 12, 0.25)
+}
+
+.ace-mono-industrial .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(145, 153, 148, 0.40)
+}
+
+.ace-mono-industrial .ace_invisible {
+ color: rgba(102, 108, 104, 0.50)
+}
+
+.ace-mono-industrial .ace_string {
+ background-color: #151C19;
+ color: #FFFFFF
+}
+
+.ace-mono-industrial .ace_keyword,
+.ace-mono-industrial .ace_meta {
+ color: #A39E64
+}
+
+.ace-mono-industrial .ace_constant,
+.ace-mono-industrial .ace_constant.ace_character,
+.ace-mono-industrial .ace_constant.ace_character.ace_escape,
+.ace-mono-industrial .ace_constant.ace_numeric,
+.ace-mono-industrial .ace_constant.ace_other {
+ color: #E98800
+}
+
+.ace-mono-industrial .ace_entity.ace_name.ace_function,
+.ace-mono-industrial .ace_keyword.ace_operator,
+.ace-mono-industrial .ace_variable {
+ color: #A8B3AB
+}
+
+.ace-mono-industrial .ace_invalid {
+ color: #FFFFFF;
+ background-color: rgba(153, 0, 0, 0.68)
+}
+
+.ace-mono-industrial .ace_support.ace_constant {
+ color: #C87500
+}
+
+.ace-mono-industrial .ace_fold {
+ background-color: #A8B3AB;
+ border-color: #FFFFFF
+}
+
+.ace-mono-industrial .ace_support.ace_function {
+ color: #588E60
+}
+
+.ace-mono-industrial .ace_entity.ace_name,
+.ace-mono-industrial .ace_support.ace_class,
+.ace-mono-industrial .ace_support.ace_type {
+ color: #5778B6
+}
+
+.ace-mono-industrial .ace_storage {
+ color: #C23B00
+}
+
+.ace-mono-industrial .ace_variable.ace_language,
+.ace-mono-industrial .ace_variable.ace_parameter {
+ color: #648BD2
+}
+
+.ace-mono-industrial .ace_comment {
+ color: #666C68;
+ background-color: #151C19
+}
+
+.ace-mono-industrial .ace_entity.ace_other.ace_attribute-name {
+ color: #909993
+}
+
+.ace-mono-industrial .ace_entity.ace_name.ace_tag {
+ color: #A65EFF
+}
+
+.ace-mono-industrial .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/mono_industrial.js b/src/fauxton/assets/js/libs/ace/theme/mono_industrial.js
new file mode 100644
index 000000000..cf0d0e485
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/mono_industrial.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-mono-industrial";
+exports.cssText = require("../requirejs/text!./mono_industrial.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/monokai.css b/src/fauxton/assets/js/libs/ace/theme/monokai.css
new file mode 100644
index 000000000..77d18fe25
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/monokai.css
@@ -0,0 +1,122 @@
+.ace-monokai .ace_gutter {
+ background: #2F3129;
+ color: #8F908A
+}
+
+.ace-monokai .ace_print-margin {
+ width: 1px;
+ background: #555651
+}
+
+.ace-monokai {
+ background-color: #272822;
+ color: #F8F8F2
+}
+
+.ace-monokai .ace_cursor {
+ color: #F8F8F0
+}
+
+.ace-monokai .ace_marker-layer .ace_selection {
+ background: #49483E
+}
+
+.ace-monokai.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #272822;
+ border-radius: 2px
+}
+
+.ace-monokai .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-monokai .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #49483E
+}
+
+.ace-monokai .ace_marker-layer .ace_active-line {
+ background: #202020
+}
+
+.ace-monokai .ace_gutter-active-line {
+ background-color: #272727
+}
+
+.ace-monokai .ace_marker-layer .ace_selected-word {
+ border: 1px solid #49483E
+}
+
+.ace-monokai .ace_invisible {
+ color: #52524d
+}
+
+.ace-monokai .ace_entity.ace_name.ace_tag,
+.ace-monokai .ace_keyword,
+.ace-monokai .ace_meta.ace_tag,
+.ace-monokai .ace_storage {
+ color: #F92672
+}
+
+.ace-monokai .ace_punctuation,
+.ace-monokai .ace_punctuation.ace_tag {
+ color: #fff
+}
+
+.ace-monokai .ace_constant.ace_character,
+.ace-monokai .ace_constant.ace_language,
+.ace-monokai .ace_constant.ace_numeric,
+.ace-monokai .ace_constant.ace_other {
+ color: #AE81FF
+}
+
+.ace-monokai .ace_invalid {
+ color: #F8F8F0;
+ background-color: #F92672
+}
+
+.ace-monokai .ace_invalid.ace_deprecated {
+ color: #F8F8F0;
+ background-color: #AE81FF
+}
+
+.ace-monokai .ace_support.ace_constant,
+.ace-monokai .ace_support.ace_function {
+ color: #66D9EF
+}
+
+.ace-monokai .ace_fold {
+ background-color: #A6E22E;
+ border-color: #F8F8F2
+}
+
+.ace-monokai .ace_storage.ace_type,
+.ace-monokai .ace_support.ace_class,
+.ace-monokai .ace_support.ace_type {
+ font-style: italic;
+ color: #66D9EF
+}
+
+.ace-monokai .ace_entity.ace_name.ace_function,
+.ace-monokai .ace_entity.ace_other,
+.ace-monokai .ace_entity.ace_other.ace_attribute-name,
+.ace-monokai .ace_variable {
+ color: #A6E22E
+}
+
+.ace-monokai .ace_variable.ace_parameter {
+ font-style: italic;
+ color: #FD971F
+}
+
+.ace-monokai .ace_string {
+ color: #E6DB74
+}
+
+.ace-monokai .ace_comment {
+ color: #75715E
+}
+
+.ace-monokai .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/monokai.js b/src/fauxton/assets/js/libs/ace/theme/monokai.js
new file mode 100644
index 000000000..87d077860
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/monokai.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-monokai";
+exports.cssText = require("../requirejs/text!./monokai.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.css b/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.css
new file mode 100644
index 000000000..9e876d4ab
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.css
@@ -0,0 +1,129 @@
+.ace-pastel-on-dark .ace_gutter {
+ background: #353030;
+ color: #8F938F
+}
+
+.ace-pastel-on-dark .ace_print-margin {
+ width: 1px;
+ background: #353030
+}
+
+.ace-pastel-on-dark {
+ background-color: #2C2828;
+ color: #8F938F
+}
+
+.ace-pastel-on-dark .ace_cursor {
+ color: #A7A7A7
+}
+
+.ace-pastel-on-dark .ace_marker-layer .ace_selection {
+ background: rgba(221, 240, 255, 0.20)
+}
+
+.ace-pastel-on-dark.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #2C2828;
+ border-radius: 2px
+}
+
+.ace-pastel-on-dark .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-pastel-on-dark .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(255, 255, 255, 0.25)
+}
+
+.ace-pastel-on-dark .ace_marker-layer .ace_active-line {
+ background: rgba(255, 255, 255, 0.031)
+}
+
+.ace-pastel-on-dark .ace_gutter-active-line {
+ background-color: rgba(255, 255, 255, 0.031)
+}
+
+.ace-pastel-on-dark .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(221, 240, 255, 0.20)
+}
+
+.ace-pastel-on-dark .ace_invisible {
+ color: rgba(255, 255, 255, 0.25)
+}
+
+.ace-pastel-on-dark .ace_keyword,
+.ace-pastel-on-dark .ace_meta {
+ color: #757aD8
+}
+
+.ace-pastel-on-dark .ace_constant,
+.ace-pastel-on-dark .ace_constant.ace_character,
+.ace-pastel-on-dark .ace_constant.ace_character.ace_escape,
+.ace-pastel-on-dark .ace_constant.ace_other {
+ color: #4FB7C5
+}
+
+.ace-pastel-on-dark .ace_keyword.ace_operator {
+ color: #797878
+}
+
+.ace-pastel-on-dark .ace_constant.ace_character {
+ color: #AFA472
+}
+
+.ace-pastel-on-dark .ace_constant.ace_language {
+ color: #DE8E30
+}
+
+.ace-pastel-on-dark .ace_constant.ace_numeric {
+ color: #CCCCCC
+}
+
+.ace-pastel-on-dark .ace_invalid,
+.ace-pastel-on-dark .ace_invalid.ace_illegal {
+ color: #F8F8F8;
+ background-color: rgba(86, 45, 86, 0.75)
+}
+
+.ace-pastel-on-dark .ace_invalid.ace_deprecated {
+ text-decoration: underline;
+ font-style: italic;
+ color: #D2A8A1
+}
+
+.ace-pastel-on-dark .ace_fold {
+ background-color: #757aD8;
+ border-color: #8F938F
+}
+
+.ace-pastel-on-dark .ace_support.ace_function {
+ color: #AEB2F8
+}
+
+.ace-pastel-on-dark .ace_string {
+ color: #66A968
+}
+
+.ace-pastel-on-dark .ace_string.ace_regexp {
+ color: #E9C062
+}
+
+.ace-pastel-on-dark .ace_comment {
+ color: #A6C6FF
+}
+
+.ace-pastel-on-dark .ace_variable {
+ color: #BEBF55
+}
+
+.ace-pastel-on-dark .ace_variable.ace_language {
+ color: #C1C144
+}
+
+.ace-pastel-on-dark .ace_xml-pe {
+ color: #494949
+}
+
+.ace-pastel-on-dark .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.js b/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.js
new file mode 100644
index 000000000..6eea03a41
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/pastel_on_dark.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-pastel-on-dark";
+exports.cssText = require("../requirejs/text!./pastel_on_dark.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/solarized_dark.css b/src/fauxton/assets/js/libs/ace/theme/solarized_dark.css
new file mode 100644
index 000000000..1b55f29f0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/solarized_dark.css
@@ -0,0 +1,104 @@
+.ace-solarized-dark .ace_gutter {
+ background: #01313f;
+ color: #d0edf7
+}
+
+.ace-solarized-dark .ace_print-margin {
+ width: 1px;
+ background: #33555E
+}
+
+.ace-solarized-dark {
+ background-color: #002B36;
+ color: #93A1A1
+}
+
+.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,
+.ace-solarized-dark .ace_storage {
+ color: #93A1A1
+}
+
+.ace-solarized-dark .ace_cursor {
+ color: #D30102
+}
+
+.ace-solarized-dark .ace_marker-layer .ace_active-line,
+.ace-solarized-dark .ace_marker-layer .ace_selection {
+ background: rgba(255, 255, 255, 0.1)
+}
+
+.ace-solarized-dark.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #002B36;
+ border-radius: 2px
+}
+
+.ace-solarized-dark .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-solarized-dark .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(147, 161, 161, 0.50)
+}
+
+.ace-solarized-dark .ace_gutter-active-line {
+ background-color: #0d3440
+}
+
+.ace-solarized-dark .ace_marker-layer .ace_selected-word {
+ border: 1px solid #073642
+}
+
+.ace-solarized-dark .ace_invisible {
+ color: rgba(147, 161, 161, 0.50)
+}
+
+.ace-solarized-dark .ace_keyword,
+.ace-solarized-dark .ace_meta,
+.ace-solarized-dark .ace_support.ace_class,
+.ace-solarized-dark .ace_support.ace_type {
+ color: #859900
+}
+
+.ace-solarized-dark .ace_constant.ace_character,
+.ace-solarized-dark .ace_constant.ace_other {
+ color: #CB4B16
+}
+
+.ace-solarized-dark .ace_constant.ace_language {
+ color: #B58900
+}
+
+.ace-solarized-dark .ace_constant.ace_numeric {
+ color: #D33682
+}
+
+.ace-solarized-dark .ace_fold {
+ background-color: #268BD2;
+ border-color: #93A1A1
+}
+
+.ace-solarized-dark .ace_entity.ace_name.ace_function,
+.ace-solarized-dark .ace_entity.ace_name.ace_tag,
+.ace-solarized-dark .ace_support.ace_function,
+.ace-solarized-dark .ace_variable,
+.ace-solarized-dark .ace_variable.ace_language {
+ color: #268BD2
+}
+
+.ace-solarized-dark .ace_string {
+ color: #2AA198
+}
+
+.ace-solarized-dark .ace_string.ace_regexp {
+ color: #D30102
+}
+
+.ace-solarized-dark .ace_comment {
+ font-style: italic;
+ color: #657B83
+}
+
+.ace-solarized-dark .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/solarized_dark.js b/src/fauxton/assets/js/libs/ace/theme/solarized_dark.js
new file mode 100644
index 000000000..71812c28f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/solarized_dark.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-solarized-dark";
+exports.cssText = require("../requirejs/text!./solarized_dark.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/solarized_light.css b/src/fauxton/assets/js/libs/ace/theme/solarized_light.css
new file mode 100644
index 000000000..c72a8d21c
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/solarized_light.css
@@ -0,0 +1,106 @@
+.ace-solarized-light .ace_gutter {
+ background: #fbf1d3;
+ color: #333
+}
+
+.ace-solarized-light .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8
+}
+
+.ace-solarized-light {
+ background-color: #FDF6E3;
+ color: #586E75
+}
+
+.ace-solarized-light .ace_cursor {
+ color: #000000
+}
+
+.ace-solarized-light .ace_marker-layer .ace_selection {
+ background: rgba(7, 54, 67, 0.09)
+}
+
+.ace-solarized-light.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #FDF6E3;
+ border-radius: 2px
+}
+
+.ace-solarized-light .ace_marker-layer .ace_step {
+ background: rgb(255, 255, 0)
+}
+
+.ace-solarized-light .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(147, 161, 161, 0.50)
+}
+
+.ace-solarized-light .ace_marker-layer .ace_active-line {
+ background: #EEE8D5
+}
+
+.ace-solarized-light .ace_gutter-active-line {
+ background-color : #EDE5C1
+}
+
+.ace-solarized-light .ace_marker-layer .ace_selected-word {
+ border: 1px solid #073642
+}
+
+.ace-solarized-light .ace_invisible {
+ color: rgba(147, 161, 161, 0.50)
+}
+
+.ace-solarized-light .ace_keyword,
+.ace-solarized-light .ace_meta,
+.ace-solarized-light .ace_support.ace_class,
+.ace-solarized-light .ace_support.ace_type {
+ color: #859900
+}
+
+.ace-solarized-light .ace_constant.ace_character,
+.ace-solarized-light .ace_constant.ace_other {
+ color: #CB4B16
+}
+
+.ace-solarized-light .ace_constant.ace_language {
+ color: #B58900
+}
+
+.ace-solarized-light .ace_constant.ace_numeric {
+ color: #D33682
+}
+
+.ace-solarized-light .ace_fold {
+ background-color: #268BD2;
+ border-color: #586E75
+}
+
+.ace-solarized-light .ace_entity.ace_name.ace_function,
+.ace-solarized-light .ace_entity.ace_name.ace_tag,
+.ace-solarized-light .ace_support.ace_function,
+.ace-solarized-light .ace_variable,
+.ace-solarized-light .ace_variable.ace_language {
+ color: #268BD2
+}
+
+.ace-solarized-light .ace_storage {
+ color: #073642
+}
+
+.ace-solarized-light .ace_string {
+ color: #2AA198
+}
+
+.ace-solarized-light .ace_string.ace_regexp {
+ color: #D30102
+}
+
+.ace-solarized-light .ace_comment,
+.ace-solarized-light .ace_entity.ace_other.ace_attribute-name {
+ color: #93A1A1
+}
+
+.ace-solarized-light .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/solarized_light.js b/src/fauxton/assets/js/libs/ace/theme/solarized_light.js
new file mode 100644
index 000000000..35ec219e7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/solarized_light.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-solarized-light";
+exports.cssText = require("../requirejs/text!./solarized_light.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/terminal.css b/src/fauxton/assets/js/libs/ace/theme/terminal.css
new file mode 100644
index 000000000..3636a03d4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/terminal.css
@@ -0,0 +1,132 @@
+.ace-terminal-theme .ace_gutter {
+ background: #1a0005;
+ color: steelblue
+}
+
+.ace-terminal-theme .ace_print-margin {
+ width: 1px;
+ background: #1a1a1a
+}
+
+.ace-terminal-theme {
+ background-color: black;
+ color: #DEDEDE
+}
+
+.ace-terminal-theme .ace_cursor {
+ color: #9F9F9F
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_selection {
+ background: #424242
+}
+
+.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px black;
+ border-radius: 2px
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_step {
+ background: rgb(0, 0, 0)
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_bracket {
+ background: #090;
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_bracket-start {
+ background: #090;
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #900
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_active-line {
+ background: #2A2A2A
+}
+
+.ace-terminal-theme .ace_gutter-active-line {
+ background-color: #2A112A
+}
+
+.ace-terminal-theme .ace_marker-layer .ace_selected-word {
+ border: 1px solid #424242
+}
+
+.ace-terminal-theme .ace_invisible {
+ color: #343434
+}
+
+.ace-terminal-theme .ace_keyword,
+.ace-terminal-theme .ace_meta,
+.ace-terminal-theme .ace_storage,
+.ace-terminal-theme .ace_storage.ace_type,
+.ace-terminal-theme .ace_support.ace_type {
+ color: tomato
+}
+
+.ace-terminal-theme .ace_keyword.ace_operator {
+ color: deeppink
+}
+
+.ace-terminal-theme .ace_constant.ace_character,
+.ace-terminal-theme .ace_constant.ace_language,
+.ace-terminal-theme .ace_constant.ace_numeric,
+.ace-terminal-theme .ace_keyword.ace_other.ace_unit,
+.ace-terminal-theme .ace_support.ace_constant,
+.ace-terminal-theme .ace_variable.ace_parameter {
+ color: #E78C45
+}
+
+.ace-terminal-theme .ace_constant.ace_other {
+ color: gold
+}
+
+.ace-terminal-theme .ace_invalid {
+ color: yellow;
+ background-color: red
+}
+
+.ace-terminal-theme .ace_invalid.ace_deprecated {
+ color: #CED2CF;
+ background-color: #B798BF
+}
+
+.ace-terminal-theme .ace_fold {
+ background-color: #7AA6DA;
+ border-color: #DEDEDE
+}
+
+.ace-terminal-theme .ace_entity.ace_name.ace_function,
+.ace-terminal-theme .ace_support.ace_function,
+.ace-terminal-theme .ace_variable {
+ color: #7AA6DA
+}
+
+.ace-terminal-theme .ace_support.ace_class,
+.ace-terminal-theme .ace_support.ace_type {
+ color: #E7C547
+}
+
+.ace-terminal-theme .ace_heading,
+.ace-terminal-theme .ace_string {
+ color: #B9CA4A
+}
+
+.ace-terminal-theme .ace_entity.ace_name.ace_tag,
+.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,
+.ace-terminal-theme .ace_meta.ace_tag,
+.ace-terminal-theme .ace_string.ace_regexp,
+.ace-terminal-theme .ace_variable {
+ color: #D54E53
+}
+
+.ace-terminal-theme .ace_comment {
+ color: orangered
+}
+
+.ace-terminal-theme .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;
+}
diff --git a/src/fauxton/assets/js/libs/ace/theme/terminal.js b/src/fauxton/assets/js/libs/ace/theme/terminal.js
new file mode 100644
index 000000000..d7ff36ae3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/terminal.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-terminal-theme";
+exports.cssText = require("../requirejs/text!./terminal.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/textmate.css b/src/fauxton/assets/js/libs/ace/theme/textmate.css
new file mode 100644
index 000000000..13c4e8482
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/textmate.css
@@ -0,0 +1,154 @@
+.ace-tm .ace_gutter {
+ background: #f0f0f0;
+ color: #333;
+}
+
+.ace-tm .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-tm .ace_fold {
+ background-color: #6B72E6;
+}
+
+.ace-tm {
+ background-color: #FFFFFF;
+}
+
+.ace-tm .ace_cursor {
+ color: black;
+}
+
+.ace-tm .ace_invisible {
+ color: rgb(191, 191, 191);
+}
+
+.ace-tm .ace_storage,
+.ace-tm .ace_keyword {
+ color: blue;
+}
+
+.ace-tm .ace_constant {
+ color: rgb(197, 6, 11);
+}
+
+.ace-tm .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-tm .ace_constant.ace_language {
+ color: rgb(88, 92, 246);
+}
+
+.ace-tm .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-tm .ace_invalid {
+ background-color: rgba(255, 0, 0, 0.1);
+ color: red;
+}
+
+.ace-tm .ace_support.ace_function {
+ color: rgb(60, 76, 114);
+}
+
+.ace-tm .ace_support.ace_constant {
+ color: rgb(6, 150, 14);
+}
+
+.ace-tm .ace_support.ace_type,
+.ace-tm .ace_support.ace_class {
+ color: rgb(109, 121, 222);
+}
+
+.ace-tm .ace_keyword.ace_operator {
+ color: rgb(104, 118, 135);
+}
+
+.ace-tm .ace_string {
+ color: rgb(3, 106, 7);
+}
+
+.ace-tm .ace_comment {
+ color: rgb(76, 136, 107);
+}
+
+.ace-tm .ace_comment.ace_doc {
+ color: rgb(0, 102, 255);
+}
+
+.ace-tm .ace_comment.ace_doc.ace_tag {
+ color: rgb(128, 159, 191);
+}
+
+.ace-tm .ace_constant.ace_numeric {
+ color: rgb(0, 0, 205);
+}
+
+.ace-tm .ace_variable {
+ color: rgb(49, 132, 149);
+}
+
+.ace-tm .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-tm .ace_entity.ace_name.ace_function {
+ color: #0000A2;
+}
+
+
+.ace-tm .ace_heading {
+ color: rgb(12, 7, 255);
+}
+
+.ace-tm .ace_list {
+ color:rgb(185, 6, 144);
+}
+
+.ace-tm .ace_meta.ace_tag {
+ color:rgb(0, 22, 142);
+}
+
+.ace-tm .ace_string.ace_regex {
+ color: rgb(255, 0, 0)
+}
+
+.ace-tm .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+.ace-tm.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px white;
+ border-radius: 2px;
+}
+.ace-tm .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-tm .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-tm .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-tm .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.07);
+}
+
+.ace-tm .ace_gutter-active-line {
+ background-color : #dcdcdc;
+}
+
+.ace-tm .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+}
+
+.ace-tm .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+}
diff --git a/src/fauxton/assets/js/libs/ace/theme/textmate.js b/src/fauxton/assets/js/libs/ace/theme/textmate.js
new file mode 100644
index 000000000..75e19745d
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/textmate.js
@@ -0,0 +1,40 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+exports.isDark = false;
+exports.cssClass = "ace-tm";
+exports.cssText = require("../requirejs/text!./textmate.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow.css b/src/fauxton/assets/js/libs/ace/theme/tomorrow.css
new file mode 100644
index 000000000..3e59b8b53
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow.css
@@ -0,0 +1,124 @@
+.ace-tomorrow .ace_gutter {
+ background: #f6f6f6;
+ color: #4D4D4C
+}
+
+.ace-tomorrow .ace_print-margin {
+ width: 1px;
+ background: #f6f6f6
+}
+
+.ace-tomorrow {
+ background-color: #FFFFFF;
+ color: #4D4D4C
+}
+
+.ace-tomorrow .ace_cursor {
+ color: #AEAFAD
+}
+
+.ace-tomorrow .ace_marker-layer .ace_selection {
+ background: #D6D6D6
+}
+
+.ace-tomorrow.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #FFFFFF;
+ border-radius: 2px
+}
+
+.ace-tomorrow .ace_marker-layer .ace_step {
+ background: rgb(255, 255, 0)
+}
+
+.ace-tomorrow .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #D1D1D1
+}
+
+.ace-tomorrow .ace_marker-layer .ace_active-line {
+ background: #EFEFEF
+}
+
+.ace-tomorrow .ace_gutter-active-line {
+ background-color : #dcdcdc
+}
+
+.ace-tomorrow .ace_marker-layer .ace_selected-word {
+ border: 1px solid #D6D6D6
+}
+
+.ace-tomorrow .ace_invisible {
+ color: #D1D1D1
+}
+
+.ace-tomorrow .ace_keyword,
+.ace-tomorrow .ace_meta,
+.ace-tomorrow .ace_storage,
+.ace-tomorrow .ace_storage.ace_type,
+.ace-tomorrow .ace_support.ace_type {
+ color: #8959A8
+}
+
+.ace-tomorrow .ace_keyword.ace_operator {
+ color: #3E999F
+}
+
+.ace-tomorrow .ace_constant.ace_character,
+.ace-tomorrow .ace_constant.ace_language,
+.ace-tomorrow .ace_constant.ace_numeric,
+.ace-tomorrow .ace_keyword.ace_other.ace_unit,
+.ace-tomorrow .ace_support.ace_constant,
+.ace-tomorrow .ace_variable.ace_parameter {
+ color: #F5871F
+}
+
+.ace-tomorrow .ace_constant.ace_other {
+ color: #666969
+}
+
+.ace-tomorrow .ace_invalid {
+ color: #FFFFFF;
+ background-color: #C82829
+}
+
+.ace-tomorrow .ace_invalid.ace_deprecated {
+ color: #FFFFFF;
+ background-color: #8959A8
+}
+
+.ace-tomorrow .ace_fold {
+ background-color: #4271AE;
+ border-color: #4D4D4C
+}
+
+.ace-tomorrow .ace_entity.ace_name.ace_function,
+.ace-tomorrow .ace_support.ace_function,
+.ace-tomorrow .ace_variable {
+ color: #4271AE
+}
+
+.ace-tomorrow .ace_support.ace_class,
+.ace-tomorrow .ace_support.ace_type {
+ color: #C99E00
+}
+
+.ace-tomorrow .ace_heading,
+.ace-tomorrow .ace_string {
+ color: #718C00
+}
+
+.ace-tomorrow .ace_entity.ace_name.ace_tag,
+.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,
+.ace-tomorrow .ace_meta.ace_tag,
+.ace-tomorrow .ace_string.ace_regexp,
+.ace-tomorrow .ace_variable {
+ color: #C82829
+}
+
+.ace-tomorrow .ace_comment {
+ color: #8E908C
+}
+
+.ace-tomorrow .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow.js b/src/fauxton/assets/js/libs/ace/theme/tomorrow.js
new file mode 100644
index 000000000..1f02d7d92
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-tomorrow";
+exports.cssText = require("../requirejs/text!./tomorrow.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.css b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.css
new file mode 100644
index 000000000..a8a9111e4
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.css
@@ -0,0 +1,124 @@
+.ace-tomorrow-night .ace_gutter {
+ background: #25282c;
+ color: #C5C8C6
+}
+
+.ace-tomorrow-night .ace_print-margin {
+ width: 1px;
+ background: #25282c
+}
+
+.ace-tomorrow-night {
+ background-color: #1D1F21;
+ color: #C5C8C6
+}
+
+.ace-tomorrow-night .ace_cursor {
+ color: #AEAFAD
+}
+
+.ace-tomorrow-night .ace_marker-layer .ace_selection {
+ background: #373B41
+}
+
+.ace-tomorrow-night.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #1D1F21;
+ border-radius: 2px
+}
+
+.ace-tomorrow-night .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-tomorrow-night .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #4B4E55
+}
+
+.ace-tomorrow-night .ace_marker-layer .ace_active-line {
+ background: #282A2E
+}
+
+.ace-tomorrow-night .ace_gutter-active-line {
+ background-color: #282A2E
+}
+
+.ace-tomorrow-night .ace_marker-layer .ace_selected-word {
+ border: 1px solid #373B41
+}
+
+.ace-tomorrow-night .ace_invisible {
+ color: #4B4E55
+}
+
+.ace-tomorrow-night .ace_keyword,
+.ace-tomorrow-night .ace_meta,
+.ace-tomorrow-night .ace_storage,
+.ace-tomorrow-night .ace_storage.ace_type,
+.ace-tomorrow-night .ace_support.ace_type {
+ color: #B294BB
+}
+
+.ace-tomorrow-night .ace_keyword.ace_operator {
+ color: #8ABEB7
+}
+
+.ace-tomorrow-night .ace_constant.ace_character,
+.ace-tomorrow-night .ace_constant.ace_language,
+.ace-tomorrow-night .ace_constant.ace_numeric,
+.ace-tomorrow-night .ace_keyword.ace_other.ace_unit,
+.ace-tomorrow-night .ace_support.ace_constant,
+.ace-tomorrow-night .ace_variable.ace_parameter {
+ color: #DE935F
+}
+
+.ace-tomorrow-night .ace_constant.ace_other {
+ color: #CED1CF
+}
+
+.ace-tomorrow-night .ace_invalid {
+ color: #CED2CF;
+ background-color: #DF5F5F
+}
+
+.ace-tomorrow-night .ace_invalid.ace_deprecated {
+ color: #CED2CF;
+ background-color: #B798BF
+}
+
+.ace-tomorrow-night .ace_fold {
+ background-color: #81A2BE;
+ border-color: #C5C8C6
+}
+
+.ace-tomorrow-night .ace_entity.ace_name.ace_function,
+.ace-tomorrow-night .ace_support.ace_function,
+.ace-tomorrow-night .ace_variable {
+ color: #81A2BE
+}
+
+.ace-tomorrow-night .ace_support.ace_class,
+.ace-tomorrow-night .ace_support.ace_type {
+ color: #F0C674
+}
+
+.ace-tomorrow-night .ace_heading,
+.ace-tomorrow-night .ace_string {
+ color: #B5BD68
+}
+
+.ace-tomorrow-night .ace_entity.ace_name.ace_tag,
+.ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name,
+.ace-tomorrow-night .ace_meta.ace_tag,
+.ace-tomorrow-night .ace_string.ace_regexp,
+.ace-tomorrow-night .ace_variable {
+ color: #CC6666
+}
+
+.ace-tomorrow-night .ace_comment {
+ color: #969896
+}
+
+.ace-tomorrow-night .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.js b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.js
new file mode 100644
index 000000000..e7137ffc6
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night";
+exports.cssText = require("../requirejs/text!./tomorrow_night.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.css b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.css
new file mode 100644
index 000000000..dbdd4e7d0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.css
@@ -0,0 +1,124 @@
+.ace-tomorrow-night-blue .ace_gutter {
+ background: #00204b;
+ color: #7388b5
+}
+
+.ace-tomorrow-night-blue .ace_print-margin {
+ width: 1px;
+ background: #00204b
+}
+
+.ace-tomorrow-night-blue {
+ background-color: #002451;
+ color: #FFFFFF
+}
+
+.ace-tomorrow-night-blue .ace_constant.ace_other {
+ color: #FFFFFF
+}
+
+.ace-tomorrow-night-blue .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-tomorrow-night-blue .ace_marker-layer .ace_selection {
+ background: #003F8E
+}
+
+.ace-tomorrow-night-blue.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #002451;
+ border-radius: 2px
+}
+
+.ace-tomorrow-night-blue .ace_marker-layer .ace_step {
+ background: rgb(127, 111, 19)
+}
+
+.ace-tomorrow-night-blue .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #404F7D
+}
+
+.ace-tomorrow-night-blue .ace_marker-layer .ace_active-line {
+ background: #00346E
+}
+
+.ace-tomorrow-night-blue .ace_gutter-active-line {
+ background-color: #022040
+}
+
+.ace-tomorrow-night-blue .ace_marker-layer .ace_selected-word {
+ border: 1px solid #003F8E
+}
+
+.ace-tomorrow-night-blue .ace_invisible {
+ color: #404F7D
+}
+
+.ace-tomorrow-night-blue .ace_keyword,
+.ace-tomorrow-night-blue .ace_meta,
+.ace-tomorrow-night-blue .ace_storage,
+.ace-tomorrow-night-blue .ace_storage.ace_type,
+.ace-tomorrow-night-blue .ace_support.ace_type {
+ color: #EBBBFF
+}
+
+.ace-tomorrow-night-blue .ace_keyword.ace_operator {
+ color: #99FFFF
+}
+
+.ace-tomorrow-night-blue .ace_constant.ace_character,
+.ace-tomorrow-night-blue .ace_constant.ace_language,
+.ace-tomorrow-night-blue .ace_constant.ace_numeric,
+.ace-tomorrow-night-blue .ace_keyword.ace_other.ace_unit,
+.ace-tomorrow-night-blue .ace_support.ace_constant,
+.ace-tomorrow-night-blue .ace_variable.ace_parameter {
+ color: #FFC58F
+}
+
+.ace-tomorrow-night-blue .ace_invalid {
+ color: #FFFFFF;
+ background-color: #F99DA5
+}
+
+.ace-tomorrow-night-blue .ace_invalid.ace_deprecated {
+ color: #FFFFFF;
+ background-color: #EBBBFF
+}
+
+.ace-tomorrow-night-blue .ace_fold {
+ background-color: #BBDAFF;
+ border-color: #FFFFFF
+}
+
+.ace-tomorrow-night-blue .ace_entity.ace_name.ace_function,
+.ace-tomorrow-night-blue .ace_support.ace_function,
+.ace-tomorrow-night-blue .ace_variable {
+ color: #BBDAFF
+}
+
+.ace-tomorrow-night-blue .ace_support.ace_class,
+.ace-tomorrow-night-blue .ace_support.ace_type {
+ color: #FFEEAD
+}
+
+.ace-tomorrow-night-blue .ace_heading,
+.ace-tomorrow-night-blue .ace_string {
+ color: #D1F1A9
+}
+
+.ace-tomorrow-night-blue .ace_entity.ace_name.ace_tag,
+.ace-tomorrow-night-blue .ace_entity.ace_other.ace_attribute-name,
+.ace-tomorrow-night-blue .ace_meta.ace_tag,
+.ace-tomorrow-night-blue .ace_string.ace_regexp,
+.ace-tomorrow-night-blue .ace_variable {
+ color: #FF9DA4
+}
+
+.ace-tomorrow-night-blue .ace_comment {
+ color: #7285B7
+}
+
+.ace-tomorrow-night-blue .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.js b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.js
new file mode 100644
index 000000000..dcdf4adc8
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_blue.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-blue";
+exports.cssText = require("../requirejs/text!./tomorrow_night_blue.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.css b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.css
new file mode 100644
index 000000000..f092a44f2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.css
@@ -0,0 +1,128 @@
+.ace-tomorrow-night-bright .ace_gutter {
+ background: #1a1a1a;
+ color: #DEDEDE
+}
+
+.ace-tomorrow-night-bright .ace_print-margin {
+ width: 1px;
+ background: #1a1a1a
+}
+
+.ace-tomorrow-night-bright {
+ background-color: #000000;
+ color: #DEDEDE
+}
+
+.ace-tomorrow-night-bright .ace_cursor {
+ color: #9F9F9F
+}
+
+.ace-tomorrow-night-bright .ace_marker-layer .ace_selection {
+ background: #424242
+}
+
+.ace-tomorrow-night-bright.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #000000;
+ border-radius: 2px
+}
+
+.ace-tomorrow-night-bright .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-tomorrow-night-bright .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #343434
+}
+
+.ace-tomorrow-night-bright .ace_marker-layer .ace_active-line {
+ background: #2A2A2A
+}
+
+.ace-tomorrow-night-bright .ace_gutter-active-line {
+ background-color: #2A2A2A
+}
+
+.ace-tomorrow-night-bright .ace_stack {
+ background-color: rgb(66, 90, 44);
+}
+
+.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {
+ border: 1px solid #424242
+}
+
+.ace-tomorrow-night-bright .ace_invisible {
+ color: #343434
+}
+
+.ace-tomorrow-night-bright .ace_keyword,
+.ace-tomorrow-night-bright .ace_meta,
+.ace-tomorrow-night-bright .ace_storage,
+.ace-tomorrow-night-bright .ace_storage.ace_type,
+.ace-tomorrow-night-bright .ace_support.ace_type {
+ color: #C397D8
+}
+
+.ace-tomorrow-night-bright .ace_keyword.ace_operator {
+ color: #70C0B1
+}
+
+.ace-tomorrow-night-bright .ace_constant.ace_character,
+.ace-tomorrow-night-bright .ace_constant.ace_language,
+.ace-tomorrow-night-bright .ace_constant.ace_numeric,
+.ace-tomorrow-night-bright .ace_keyword.ace_other.ace_unit,
+.ace-tomorrow-night-bright .ace_support.ace_constant,
+.ace-tomorrow-night-bright .ace_variable.ace_parameter {
+ color: #E78C45
+}
+
+.ace-tomorrow-night-bright .ace_constant.ace_other {
+ color: #EEEEEE
+}
+
+.ace-tomorrow-night-bright .ace_invalid {
+ color: #CED2CF;
+ background-color: #DF5F5F
+}
+
+.ace-tomorrow-night-bright .ace_invalid.ace_deprecated {
+ color: #CED2CF;
+ background-color: #B798BF
+}
+
+.ace-tomorrow-night-bright .ace_fold {
+ background-color: #7AA6DA;
+ border-color: #DEDEDE
+}
+
+.ace-tomorrow-night-bright .ace_entity.ace_name.ace_function,
+.ace-tomorrow-night-bright .ace_support.ace_function,
+.ace-tomorrow-night-bright .ace_variable {
+ color: #7AA6DA
+}
+
+.ace-tomorrow-night-bright .ace_support.ace_class,
+.ace-tomorrow-night-bright .ace_support.ace_type {
+ color: #E7C547
+}
+
+.ace-tomorrow-night-bright .ace_heading,
+.ace-tomorrow-night-bright .ace_string {
+ color: #B9CA4A
+}
+
+.ace-tomorrow-night-bright .ace_entity.ace_name.ace_tag,
+.ace-tomorrow-night-bright .ace_entity.ace_other.ace_attribute-name,
+.ace-tomorrow-night-bright .ace_meta.ace_tag,
+.ace-tomorrow-night-bright .ace_string.ace_regexp,
+.ace-tomorrow-night-bright .ace_variable {
+ color: #D54E53
+}
+
+.ace-tomorrow-night-bright .ace_comment {
+ color: #969896
+}
+
+.ace-tomorrow-night-bright .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.js b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.js
new file mode 100644
index 000000000..4b285668b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_bright.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-bright";
+exports.cssText = require("../requirejs/text!./tomorrow_night_bright.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.css b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.css
new file mode 100644
index 000000000..200044a5f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.css
@@ -0,0 +1,127 @@
+.ace-tomorrow-night-eighties .ace_gutter {
+ background: #272727;
+ color: #CCC
+}
+
+.ace-tomorrow-night-eighties .ace_print-margin {
+ width: 1px;
+ background: #272727
+}
+
+.ace-tomorrow-night-eighties {
+ background-color: #2D2D2D;
+ color: #CCCCCC
+}
+
+.ace-tomorrow-night-eighties .ace_constant.ace_other {
+ color: #CCCCCC
+}
+
+.ace-tomorrow-night-eighties .ace_cursor {
+ color: #CCCCCC
+}
+
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_selection {
+ background: #515151
+}
+
+.ace-tomorrow-night-eighties.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #2D2D2D;
+ border-radius: 2px
+}
+
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #6A6A6A
+}
+
+.ace-tomorrow-night-bright .ace_stack {
+ background: rgb(66, 90, 44)
+}
+
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_active-line {
+ background: #393939
+}
+
+.ace-tomorrow-night-eighties .ace_gutter-active-line {
+ background-color: #393939
+}
+
+.ace-tomorrow-night-eighties .ace_marker-layer .ace_selected-word {
+ border: 1px solid #515151
+}
+
+.ace-tomorrow-night-eighties .ace_invisible {
+ color: #6A6A6A
+}
+
+.ace-tomorrow-night-eighties .ace_keyword,
+.ace-tomorrow-night-eighties .ace_meta,
+.ace-tomorrow-night-eighties .ace_storage,
+.ace-tomorrow-night-eighties .ace_storage.ace_type,
+.ace-tomorrow-night-eighties .ace_support.ace_type {
+ color: #CC99CC
+}
+
+.ace-tomorrow-night-eighties .ace_keyword.ace_operator {
+ color: #66CCCC
+}
+
+.ace-tomorrow-night-eighties .ace_constant.ace_character,
+.ace-tomorrow-night-eighties .ace_constant.ace_language,
+.ace-tomorrow-night-eighties .ace_constant.ace_numeric,
+.ace-tomorrow-night-eighties .ace_keyword.ace_other.ace_unit,
+.ace-tomorrow-night-eighties .ace_support.ace_constant,
+.ace-tomorrow-night-eighties .ace_variable.ace_parameter {
+ color: #F99157
+}
+
+.ace-tomorrow-night-eighties .ace_invalid {
+ color: #CDCDCD;
+ background-color: #F2777A
+}
+
+.ace-tomorrow-night-eighties .ace_invalid.ace_deprecated {
+ color: #CDCDCD;
+ background-color: #CC99CC
+}
+
+.ace-tomorrow-night-eighties .ace_fold {
+ background-color: #6699CC;
+ border-color: #CCCCCC
+}
+
+.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_function,
+.ace-tomorrow-night-eighties .ace_support.ace_function,
+.ace-tomorrow-night-eighties .ace_variable {
+ color: #6699CC
+}
+
+.ace-tomorrow-night-eighties .ace_support.ace_class,
+.ace-tomorrow-night-eighties .ace_support.ace_type {
+ color: #FFCC66
+}
+
+.ace-tomorrow-night-eighties .ace_heading,
+.ace-tomorrow-night-eighties .ace_string {
+ color: #99CC99
+}
+
+.ace-tomorrow-night-eighties .ace_comment {
+ color: #999999
+}
+
+.ace-tomorrow-night-eighties .ace_entity.ace_name.ace_tag,
+.ace-tomorrow-night-eighties .ace_entity.ace_other.ace_attribute-name,
+.ace-tomorrow-night-eighties .ace_meta.ace_tag,
+.ace-tomorrow-night-eighties .ace_variable {
+ color: #F2777A
+}
+
+.ace-tomorrow-night-eighties .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.js b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.js
new file mode 100644
index 000000000..9ac7be672
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/tomorrow_night_eighties.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-tomorrow-night-eighties";
+exports.cssText = require("../requirejs/text!./tomorrow_night_eighties.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/twilight.css b/src/fauxton/assets/js/libs/ace/theme/twilight.css
new file mode 100644
index 000000000..fd427a23b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/twilight.css
@@ -0,0 +1,126 @@
+.ace-twilight .ace_gutter {
+ background: #232323;
+ color: #E2E2E2
+}
+
+.ace-twilight .ace_print-margin {
+ width: 1px;
+ background: #232323
+}
+
+.ace-twilight {
+ background-color: #141414;
+ color: #F8F8F8
+}
+
+.ace-twilight .ace_cursor {
+ color: #A7A7A7
+}
+
+.ace-twilight .ace_marker-layer .ace_selection {
+ background: rgba(221, 240, 255, 0.20)
+}
+
+.ace-twilight.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #141414;
+ border-radius: 2px
+}
+
+.ace-twilight .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-twilight .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgba(255, 255, 255, 0.25)
+}
+
+.ace-twilight .ace_marker-layer .ace_active-line {
+ background: rgba(255, 255, 255, 0.031)
+}
+
+.ace-twilight .ace_gutter-active-line {
+ background-color: rgba(255, 255, 255, 0.031)
+}
+
+.ace-twilight .ace_marker-layer .ace_selected-word {
+ border: 1px solid rgba(221, 240, 255, 0.20)
+}
+
+.ace-twilight .ace_invisible {
+ color: rgba(255, 255, 255, 0.25)
+}
+
+.ace-twilight .ace_keyword,
+.ace-twilight .ace_meta {
+ color: #CDA869
+}
+
+.ace-twilight .ace_constant,
+.ace-twilight .ace_constant.ace_character,
+.ace-twilight .ace_constant.ace_character.ace_escape,
+.ace-twilight .ace_constant.ace_other,
+.ace-twilight .ace_heading,
+.ace-twilight .ace_support.ace_constant {
+ color: #CF6A4C
+}
+
+.ace-twilight .ace_invalid.ace_illegal {
+ color: #F8F8F8;
+ background-color: rgba(86, 45, 86, 0.75)
+}
+
+.ace-twilight .ace_invalid.ace_deprecated {
+ text-decoration: underline;
+ font-style: italic;
+ color: #D2A8A1
+}
+
+.ace-twilight .ace_support {
+ color: #9B859D
+}
+
+.ace-twilight .ace_fold {
+ background-color: #AC885B;
+ border-color: #F8F8F8
+}
+
+.ace-twilight .ace_support.ace_function {
+ color: #DAD085
+}
+
+.ace-twilight .ace_list,
+.ace-twilight .ace_storage {
+ color: #F9EE98
+}
+
+.ace-twilight .ace_entity.ace_name.ace_function,
+.ace-twilight .ace_meta.ace_tag,
+.ace-twilight .ace_variable {
+ color: #AC885B
+}
+
+.ace-twilight .ace_string {
+ color: #8F9D6A
+}
+
+.ace-twilight .ace_string.ace_regexp {
+ color: #E9C062
+}
+
+.ace-twilight .ace_comment {
+ font-style: italic;
+ color: #5F5A60
+}
+
+.ace-twilight .ace_variable {
+ color: #7587A6
+}
+
+.ace-twilight .ace_xml-pe {
+ color: #494949
+}
+
+.ace-twilight .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/twilight.js b/src/fauxton/assets/js/libs/ace/theme/twilight.js
new file mode 100644
index 000000000..904f7ef68
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/twilight.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-twilight";
+exports.cssText = require("../requirejs/text!./twilight.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.css b/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.css
new file mode 100644
index 000000000..dd1edb21e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.css
@@ -0,0 +1,110 @@
+.ace-vibrant-ink .ace_gutter {
+ background: #1a1a1a;
+ color: #BEBEBE
+}
+
+.ace-vibrant-ink .ace_print-margin {
+ width: 1px;
+ background: #1a1a1a
+}
+
+.ace-vibrant-ink {
+ background-color: #0F0F0F;
+ color: #FFFFFF
+}
+
+.ace-vibrant-ink .ace_cursor {
+ color: #FFFFFF
+}
+
+.ace-vibrant-ink .ace_marker-layer .ace_selection {
+ background: #6699CC
+}
+
+.ace-vibrant-ink.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #0F0F0F;
+ border-radius: 2px
+}
+
+.ace-vibrant-ink .ace_marker-layer .ace_step {
+ background: rgb(102, 82, 0)
+}
+
+.ace-vibrant-ink .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #404040
+}
+
+.ace-vibrant-ink .ace_marker-layer .ace_active-line {
+ background: #333333
+}
+
+.ace-vibrant-ink .ace_gutter-active-line {
+ background-color: #333333
+}
+
+.ace-vibrant-ink .ace_marker-layer .ace_selected-word {
+ border: 1px solid #6699CC
+}
+
+.ace-vibrant-ink .ace_invisible {
+ color: #404040
+}
+
+.ace-vibrant-ink .ace_keyword,
+.ace-vibrant-ink .ace_meta {
+ color: #FF6600
+}
+
+.ace-vibrant-ink .ace_constant,
+.ace-vibrant-ink .ace_constant.ace_character,
+.ace-vibrant-ink .ace_constant.ace_character.ace_escape,
+.ace-vibrant-ink .ace_constant.ace_other {
+ color: #339999
+}
+
+.ace-vibrant-ink .ace_constant.ace_numeric {
+ color: #99CC99
+}
+
+.ace-vibrant-ink .ace_invalid,
+.ace-vibrant-ink .ace_invalid.ace_deprecated {
+ color: #CCFF33;
+ background-color: #000000
+}
+
+.ace-vibrant-ink .ace_fold {
+ background-color: #FFCC00;
+ border-color: #FFFFFF
+}
+
+.ace-vibrant-ink .ace_entity.ace_name.ace_function,
+.ace-vibrant-ink .ace_support.ace_function,
+.ace-vibrant-ink .ace_variable {
+ color: #FFCC00
+}
+
+.ace-vibrant-ink .ace_variable.ace_parameter {
+ font-style: italic
+}
+
+.ace-vibrant-ink .ace_string {
+ color: #66FF00
+}
+
+.ace-vibrant-ink .ace_string.ace_regexp {
+ color: #44B4CC
+}
+
+.ace-vibrant-ink .ace_comment {
+ color: #9933CC
+}
+
+.ace-vibrant-ink .ace_entity.ace_other.ace_attribute-name {
+ font-style: italic;
+ color: #99CC99
+}
+
+.ace-vibrant-ink .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y;
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.js b/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.js
new file mode 100644
index 000000000..7156e5de7
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/vibrant_ink.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-vibrant-ink";
+exports.cssText = require("../requirejs/text!./vibrant_ink.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/theme/xcode.css b/src/fauxton/assets/js/libs/ace/theme/xcode.css
new file mode 100644
index 000000000..56eb9a89b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/xcode.css
@@ -0,0 +1,103 @@
+/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: EE3AD170-2B7F-4DE1-B724-C75F13FE0085) */
+
+.ace-xcode .ace_gutter {
+ background: #e8e8e8;
+ color: #333
+}
+
+.ace-xcode .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8
+}
+
+.ace-xcode {
+ background-color: #FFFFFF;
+ color: #000000
+}
+
+.ace-xcode .ace_cursor {
+ color: #000000
+}
+
+.ace-xcode .ace_marker-layer .ace_selection {
+ background: #B5D5FF
+}
+
+.ace-xcode.ace_multiselect .ace_selection.ace_start {
+ box-shadow: 0 0 3px 0px #FFFFFF;
+ border-radius: 2px
+}
+
+.ace-xcode .ace_marker-layer .ace_step {
+ background: rgb(198, 219, 174)
+}
+
+.ace-xcode .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #BFBFBF
+}
+
+.ace-xcode .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.071)
+}
+
+.ace-xcode .ace_gutter-active-line {
+ background-color: rgba(0, 0, 0, 0.071)
+}
+
+.ace-xcode .ace_marker-layer .ace_selected-word {
+ border: 1px solid #B5D5FF
+}
+
+.ace-xcode .ace_constant.ace_language,
+.ace-xcode .ace_keyword,
+.ace-xcode .ace_meta,
+.ace-xcode .ace_variable.ace_language {
+ color: #C800A4
+}
+
+.ace-xcode .ace_invisible {
+ color: #BFBFBF
+}
+
+.ace-xcode .ace_constant.ace_character,
+.ace-xcode .ace_constant.ace_other {
+ color: #275A5E
+}
+
+.ace-xcode .ace_constant.ace_numeric {
+ color: #3A00DC
+}
+
+.ace-xcode .ace_entity.ace_other.ace_attribute-name,
+.ace-xcode .ace_support.ace_constant,
+.ace-xcode .ace_support.ace_function {
+ color: #450084
+}
+
+.ace-xcode .ace_fold {
+ background-color: #C800A4;
+ border-color: #000000
+}
+
+.ace-xcode .ace_entity.ace_name.ace_tag,
+.ace-xcode .ace_support.ace_class,
+.ace-xcode .ace_support.ace_type {
+ color: #790EAD
+}
+
+.ace-xcode .ace_storage {
+ color: #C900A4
+}
+
+.ace-xcode .ace_string {
+ color: #DF0002
+}
+
+.ace-xcode .ace_comment {
+ color: #008E00
+}
+
+.ace-xcode .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==) right repeat-y
+} \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/theme/xcode.js b/src/fauxton/assets/js/libs/ace/theme/xcode.js
new file mode 100644
index 000000000..e17d708d2
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/theme/xcode.js
@@ -0,0 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-xcode";
+exports.cssText = require("../requirejs/text!./xcode.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/src/fauxton/assets/js/libs/ace/token_iterator.js b/src/fauxton/assets/js/libs/ace/token_iterator.js
new file mode 100644
index 000000000..74376fb3f
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/token_iterator.js
@@ -0,0 +1,150 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+/**
+ *
+ *
+ * This class provides an essay way to treat the document as a stream of tokens, and provides methods to iterate over these tokens.
+ * @class TokenIterator
+ **/
+
+/**
+ * Creates a new token iterator object. The inital token index is set to the provided row and column coordinates.
+ * @param {EditSession} session The session to associate with
+ * @param {Number} initialRow The row to start the tokenizing at
+ * @param {Number} initialColumn The column to start the tokenizing at
+ *
+ * @constructor
+ **/
+var TokenIterator = function(session, initialRow, initialColumn) {
+ this.$session = session;
+ this.$row = initialRow;
+ this.$rowTokens = session.getTokens(initialRow);
+
+ var token = session.getTokenAt(initialRow, initialColumn);
+ this.$tokenIndex = token ? token.index : -1;
+};
+
+(function() {
+
+ /**
+ *
+ * Tokenizes all the items from the current point to the row prior in the document.
+ * @returns {[String]} If the current point is not at the top of the file, this function returns `null`. Otherwise, it returns an array of the tokenized strings.
+ **/
+ this.stepBackward = function() {
+ this.$tokenIndex -= 1;
+
+ while (this.$tokenIndex < 0) {
+ this.$row -= 1;
+ if (this.$row < 0) {
+ this.$row = 0;
+ return null;
+ }
+
+ this.$rowTokens = this.$session.getTokens(this.$row);
+ this.$tokenIndex = this.$rowTokens.length - 1;
+ }
+
+ return this.$rowTokens[this.$tokenIndex];
+ };
+
+ /**
+ *
+ * Tokenizes all the items from the current point until the next row in the document. If the current point is at the end of the file, this function returns `null`. Otherwise, it returns the tokenized string.
+ * @returns {String}
+ **/
+ this.stepForward = function() {
+ this.$tokenIndex += 1;
+ var rowCount;
+ while (this.$tokenIndex >= this.$rowTokens.length) {
+ this.$row += 1;
+ if (!rowCount)
+ rowCount = this.$session.getLength();
+ if (this.$row >= rowCount) {
+ this.$row = rowCount - 1;
+ return null;
+ }
+
+ this.$rowTokens = this.$session.getTokens(this.$row);
+ this.$tokenIndex = 0;
+ }
+
+ return this.$rowTokens[this.$tokenIndex];
+ };
+
+ /**
+ *
+ * Returns the current tokenized string.
+ * @returns {String}
+ **/
+ this.getCurrentToken = function () {
+ return this.$rowTokens[this.$tokenIndex];
+ };
+
+ /**
+ *
+ * Returns the current row.
+ * @returns {Number}
+ **/
+ this.getCurrentTokenRow = function () {
+ return this.$row;
+ };
+
+ /**
+ *
+ * Returns the current column.
+ * @returns {Number}
+ **/
+ this.getCurrentTokenColumn = function() {
+ var rowTokens = this.$rowTokens;
+ var tokenIndex = this.$tokenIndex;
+
+ // If a column was cached by EditSession.getTokenAt, then use it
+ var column = rowTokens[tokenIndex].start;
+ if (column !== undefined)
+ return column;
+
+ column = 0;
+ while (tokenIndex > 0) {
+ tokenIndex -= 1;
+ column += rowTokens[tokenIndex].value.length;
+ }
+
+ return column;
+ };
+
+}).call(TokenIterator.prototype);
+
+exports.TokenIterator = TokenIterator;
+});
diff --git a/src/fauxton/assets/js/libs/ace/token_iterator_test.js b/src/fauxton/assets/js/libs/ace/token_iterator_test.js
new file mode 100644
index 000000000..c7202e846
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/token_iterator_test.js
@@ -0,0 +1,212 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ if (typeof process !== "undefined") {
+ require("amd-loader");
+ }
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var JavaScriptMode = require("./mode/javascript").Mode;
+var TokenIterator = require("./token_iterator").TokenIterator;
+var assert = require("./test/assertions");
+
+module.exports = {
+ "test: token iterator initialization in JavaScript document" : function() {
+ var lines = [
+ "function foo(items) {",
+ " for (var i=0; i<items.length; i++) {",
+ " alert(items[i] + \"juhu\");",
+ " } // Real Tab.",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ var iterator = new TokenIterator(session, 0, 0);
+ assert.equal(iterator.getCurrentToken().value, "function");
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ iterator.stepForward();
+ assert.equal(iterator.getCurrentToken().value, " ");
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 8);
+
+ var iterator = new TokenIterator(session, 0, 4);
+ assert.equal(iterator.getCurrentToken().value, "function");
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ iterator.stepForward();
+ assert.equal(iterator.getCurrentToken().value, " ");
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 8);
+
+ var iterator = new TokenIterator(session, 2, 18);
+ assert.equal(iterator.getCurrentToken().value, "items");
+ assert.equal(iterator.getCurrentTokenRow(), 2);
+ assert.equal(iterator.getCurrentTokenColumn(), 14);
+
+ iterator.stepForward();
+ assert.equal(iterator.getCurrentToken().value, "[");
+ assert.equal(iterator.getCurrentTokenRow(), 2);
+ assert.equal(iterator.getCurrentTokenColumn(), 19);
+
+ var iterator = new TokenIterator(session, 4, 0);
+ assert.equal(iterator.getCurrentToken().value, "}");
+ assert.equal(iterator.getCurrentTokenRow(), 4);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ iterator.stepBackward();
+ assert.equal(iterator.getCurrentToken().value, "// Real Tab.");
+ assert.equal(iterator.getCurrentTokenRow(), 3);
+ assert.equal(iterator.getCurrentTokenColumn(), 6);
+
+ var iterator = new TokenIterator(session, 5, 0);
+ assert.equal(iterator.getCurrentToken(), null);
+ },
+
+ "test: token iterator initialization in text document" : function() {
+ var lines = [
+ "Lorem ipsum dolor sit amet, consectetur adipisicing elit,",
+ "sed do eiusmod tempor incididunt ut labore et dolore magna",
+ "aliqua. Ut enim ad minim veniam, quis nostrud exercitation",
+ "ullamco laboris nisi ut aliquip ex ea commodo consequat."
+ ];
+ var session = new EditSession(lines.join("\n"));
+
+ var iterator = new TokenIterator(session, 0, 0);
+ assert.equal(iterator.getCurrentToken().value, lines[0]);
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ var iterator = new TokenIterator(session, 0, 4);
+ assert.equal(iterator.getCurrentToken().value, lines[0]);
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ var iterator = new TokenIterator(session, 2, 18);
+ assert.equal(iterator.getCurrentToken().value, lines[2]);
+ assert.equal(iterator.getCurrentTokenRow(), 2);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ var iterator = new TokenIterator(session, 3, lines[3].length-1);
+ assert.equal(iterator.getCurrentToken().value, lines[3]);
+ assert.equal(iterator.getCurrentTokenRow(), 3);
+ assert.equal(iterator.getCurrentTokenColumn(), 0);
+
+ var iterator = new TokenIterator(session, 4, 0);
+ assert.equal(iterator.getCurrentToken(), null);
+ },
+
+ "test: token iterator step forward in JavaScript document" : function() {
+ var lines = [
+ "function foo(items) {",
+ " for (var i=0; i<items.length; i++) {",
+ " alert(items[i] + \"juhu\");",
+ " } // Real Tab.",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ var tokens = [];
+ var len = session.getLength();
+ for (var i = 0; i < len; i++)
+ tokens = tokens.concat(session.getTokens(i));
+
+ var iterator = new TokenIterator(session, 0, 0);
+ for (var i = 1; i < tokens.length; i++)
+ assert.equal(iterator.stepForward(), tokens[i]);
+ assert.equal(iterator.stepForward(), null);
+ assert.equal(iterator.getCurrentToken(), null);
+ },
+
+ "test: token iterator step backward in JavaScript document" : function() {
+ var lines = [
+ "function foo(items) {",
+ " for (var i=0; i<items.length; i++) {",
+ " alert(items[i] + \"juhu\");",
+ " } // Real Tab.",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ var tokens = [];
+ var len = session.getLength();
+ for (var i = 0; i < len; i++)
+ tokens = tokens.concat(session.getTokens(i));
+
+ var iterator = new TokenIterator(session, 4, 0);
+ for (var i = tokens.length-2; i >= 0; i--)
+ assert.equal(iterator.stepBackward(), tokens[i]);
+ assert.equal(iterator.stepBackward(), null);
+ assert.equal(iterator.getCurrentToken(), null);
+ },
+
+ "test: token iterator reports correct row and column" : function() {
+ var lines = [
+ "function foo(items) {",
+ " for (var i=0; i<items.length; i++) {",
+ " alert(items[i] + \"juhu\");",
+ " } // Real Tab.",
+ "}"
+ ];
+ var session = new EditSession(lines.join("\n"), new JavaScriptMode());
+
+ var iterator = new TokenIterator(session, 0, 0);
+
+ iterator.stepForward();
+ iterator.stepForward();
+
+ assert.equal(iterator.getCurrentToken().value, "foo");
+ assert.equal(iterator.getCurrentTokenRow(), 0);
+ assert.equal(iterator.getCurrentTokenColumn(), 9);
+
+ iterator.stepForward();
+ iterator.stepForward();
+ iterator.stepForward();
+ iterator.stepForward();
+ iterator.stepForward();
+ iterator.stepForward();
+ iterator.stepForward();
+
+ assert.equal(iterator.getCurrentToken().value, "for");
+ assert.equal(iterator.getCurrentTokenRow(), 1);
+ assert.equal(iterator.getCurrentTokenColumn(), 4);
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/tokenizer.js b/src/fauxton/assets/js/libs/ace/tokenizer.js
new file mode 100644
index 000000000..6d63b075e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/tokenizer.js
@@ -0,0 +1,333 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+// tokenizing lines longer than this makes editor very slow
+var MAX_TOKEN_COUNT = 1000;
+/**
+ * This class takes a set of highlighting rules, and creates a tokenizer out of them. For more information, see [the wiki on extending highlighters](https://github.com/ajaxorg/ace/wiki/Creating-or-Extending-an-Edit-Mode#wiki-extendingTheHighlighter).
+ * @class Tokenizer
+ **/
+
+/**
+ * Constructs a new tokenizer based on the given rules and flags.
+ * @param {Object} rules The highlighting rules
+ *
+ * @constructor
+ **/
+var Tokenizer = function(rules) {
+ this.states = rules;
+
+ this.regExps = {};
+ this.matchMappings = {};
+ for (var key in this.states) {
+ var state = this.states[key];
+ var ruleRegExps = [];
+ var matchTotal = 0;
+ var mapping = this.matchMappings[key] = {defaultToken: "text"};
+ var flag = "g";
+
+ var splitterRurles = [];
+ for (var i = 0; i < state.length; i++) {
+ var rule = state[i];
+ if (rule.defaultToken)
+ mapping.defaultToken = rule.defaultToken;
+ if (rule.caseInsensitive)
+ flag = "gi";
+ if (rule.regex == null)
+ continue;
+
+ if (rule.regex instanceof RegExp)
+ rule.regex = rule.regex.toString().slice(1, -1);
+
+ // Count number of matching groups. 2 extra groups from the full match
+ // And the catch-all on the end (used to force a match);
+ var adjustedregex = rule.regex;
+ var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2;
+ if (Array.isArray(rule.token)) {
+ if (rule.token.length == 1 || matchcount == 1) {
+ rule.token = rule.token[0];
+ } else if (matchcount - 1 != rule.token.length) {
+ throw new Error("number of classes and regexp groups in '" +
+ rule.token + "'\n'" + rule.regex + "' doesn't match\n"
+ + (matchcount - 1) + "!=" + rule.token.length);
+ } else {
+ rule.tokenArray = rule.token;
+ rule.token = null;
+ rule.onMatch = this.$arrayTokens;
+ }
+ } else if (typeof rule.token == "function" && !rule.onMatch) {
+ if (matchcount > 1)
+ rule.onMatch = this.$applyToken;
+ else
+ rule.onMatch = rule.token;
+ }
+
+ if (matchcount > 1) {
+ if (/\\\d/.test(rule.regex)) {
+ // Replace any backreferences and offset appropriately.
+ adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function (match, digit) {
+ return "\\" + (parseInt(digit, 10) + matchTotal + 1);
+ });
+ } else {
+ matchcount = 1;
+ adjustedregex = this.removeCapturingGroups(rule.regex);
+ }
+ if (!rule.splitRegex && typeof rule.token != "string")
+ splitterRurles.push(rule); // flag will be known only at the very end
+ }
+
+ mapping[matchTotal] = i;
+ matchTotal += matchcount;
+
+ ruleRegExps.push(adjustedregex);
+
+ // makes property access faster
+ if (!rule.onMatch)
+ rule.onMatch = null;
+ rule.__proto__ = null;
+ }
+
+ splitterRurles.forEach(function(rule) {
+ rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);
+ }, this);
+
+ this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag);
+ }
+};
+
+(function() {
+ this.$setMaxTokenCount = function(m) {
+ MAX_TOKEN_COUNT = m | 0;
+ };
+
+ this.$applyToken = function(str) {
+ var values = this.splitRegex.exec(str).slice(1);
+ var types = this.token.apply(this, values);
+
+ // required for compatibility with old modes
+ if (typeof types === "string")
+ return [{type: types, value: str}];
+
+ var tokens = [];
+ for (var i = 0, l = types.length; i < l; i++) {
+ if (values[i])
+ tokens[tokens.length] = {
+ type: types[i],
+ value: values[i]
+ };
+ }
+ return tokens;
+ },
+
+ this.$arrayTokens = function(str) {
+ if (!str)
+ return [];
+ var values = this.splitRegex.exec(str);
+ if (!values)
+ return "text";
+ var tokens = [];
+ var types = this.tokenArray;
+ for (var i = 0, l = types.length; i < l; i++) {
+ if (values[i + 1])
+ tokens[tokens.length] = {
+ type: types[i],
+ value: values[i + 1]
+ };
+ }
+ return tokens;
+ };
+
+ this.removeCapturingGroups = function(src) {
+ var r = src.replace(
+ /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
+ function(x, y) {return y ? "(?:" : x;}
+ );
+ return r;
+ };
+
+ this.createSplitterRegexp = function(src, flag) {
+ if (src.indexOf("(?=") != -1) {
+ var stack = 0;
+ var inChClass = false;
+ var lastCapture = {};
+ src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function(
+ m, esc, parenOpen, parenClose, square, index
+ ) {
+ if (inChClass) {
+ inChClass = square != "]";
+ } else if (square) {
+ inChClass = true;
+ } else if (parenClose) {
+ if (stack == lastCapture.stack) {
+ lastCapture.end = index+1;
+ lastCapture.stack = -1;
+ }
+ stack--;
+ } else if (parenOpen) {
+ stack++;
+ if (parenOpen.length != 1) {
+ lastCapture.stack = stack
+ lastCapture.start = index;
+ }
+ }
+ return m;
+ });
+
+ if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end)))
+ src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);
+ }
+ return new RegExp(src, (flag||"").replace("g", ""));
+ };
+
+ /**
+ * Returns an object containing two properties: `tokens`, which contains all the tokens; and `state`, the current state.
+ * @returns {Object}
+ **/
+ this.getLineTokens = function(line, startState) {
+ if (startState && typeof startState != "string") {
+ var stack = startState.slice(0);
+ startState = stack[0];
+ } else
+ var stack = [];
+
+ var currentState = startState || "start";
+ var state = this.states[currentState];
+ var mapping = this.matchMappings[currentState];
+ var re = this.regExps[currentState];
+ re.lastIndex = 0;
+
+ var match, tokens = [];
+ var lastIndex = 0;
+
+ var token = {type: null, value: ""};
+
+ while (match = re.exec(line)) {
+ var type = mapping.defaultToken;
+ var rule = null;
+ var value = match[0];
+ var index = re.lastIndex;
+
+ if (index - value.length > lastIndex) {
+ var skipped = line.substring(lastIndex, index - value.length);
+ if (token.type == type) {
+ token.value += skipped;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: skipped};
+ }
+ }
+
+ for (var i = 0; i < match.length-2; i++) {
+ if (match[i + 1] === undefined)
+ continue;
+
+ rule = state[mapping[i]];
+
+ if (rule.onMatch)
+ type = rule.onMatch(value, currentState, stack);
+ else
+ type = rule.token;
+
+ if (rule.next) {
+ if (typeof rule.next == "string")
+ currentState = rule.next;
+ else
+ currentState = rule.next(currentState, stack);
+
+ state = this.states[currentState];
+ if (!state) {
+ window.console && console.error && console.error(currentState, "doesn't exist");
+ currentState = "start";
+ state = this.states[currentState];
+ }
+ mapping = this.matchMappings[currentState];
+ lastIndex = index;
+ re = this.regExps[currentState];
+ re.lastIndex = index;
+ }
+ break;
+ }
+
+ if (value) {
+ if (typeof type == "string") {
+ if ((!rule || rule.merge !== false) && token.type === type) {
+ token.value += value;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: value};
+ }
+ } else if (type) {
+ if (token.type)
+ tokens.push(token);
+ token = {type: null, value: ""};
+ for (var i = 0; i < type.length; i++)
+ tokens.push(type[i]);
+ }
+ }
+
+ if (lastIndex == line.length)
+ break;
+
+ lastIndex = index;
+
+ if (tokens.length > MAX_TOKEN_COUNT) {
+ // chrome doens't show contents of text nodes with very long text
+ while (lastIndex < line.length) {
+ if (token.type)
+ tokens.push(token);
+ token = {
+ value: line.substring(lastIndex, lastIndex += 2000),
+ type: "overflow"
+ }
+ }
+ currentState = "start";
+ stack = [];
+ break;
+ }
+ }
+
+ if (token.type)
+ tokens.push(token);
+
+ return {
+ tokens : tokens,
+ state : stack.length ? stack : currentState
+ };
+ };
+
+}).call(Tokenizer.prototype);
+
+exports.Tokenizer = Tokenizer;
+});
diff --git a/src/fauxton/assets/js/libs/ace/tokenizer_dev.js b/src/fauxton/assets/js/libs/ace/tokenizer_dev.js
new file mode 100644
index 000000000..61821f608
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/tokenizer_dev.js
@@ -0,0 +1,183 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+var BaseTokenizer = require("./tokenizer").Tokenizer;
+
+// tokenizing lines longer than this makes editor very slow
+var MAX_TOKEN_COUNT = 100000;
+/*
+ * version of Tokenizer with additional logging
+ * and infinite loop checks
+ * can be used for developing/testing new modes
+ **/
+
+var Tokenizer = function(rules) {
+ BaseTokenizer.call(this, rules);
+
+ /**
+ * Returns an object containing two properties: `tokens`, which contains all the tokens; and `state`, the current state.
+ * @returns {Object}
+ **/
+ this.getLineTokens = function(line, startState) {
+ if (startState && typeof startState != "string") {
+ var stack = startState.slice(0);
+ startState = stack[0];
+ } else
+ var stack = [];
+
+ var currentState = startState || "start";
+ var state = this.states[currentState];
+ var mapping = this.matchMappings[currentState];
+ var re = this.regExps[currentState];
+ re.lastIndex = 0;
+
+ var match, tokens = [];
+
+ var lastIndex = 0;
+
+ var stateTransitions = [];
+ function onStateChange() {
+ stateTransitions.push(startState+"@"+lastIndex);
+ }
+ function initState() {
+ onStateChange();
+ stateTransitions = [];
+ onStateChange();
+ }
+
+ var token = {
+ type: null,
+ value: "",
+ state: currentState
+ };
+ initState();
+
+ var maxRecur = 100000;
+
+ while (match = re.exec(line)) {
+ var type = mapping.defaultToken;
+ var rule = null;
+ var value = match[0];
+ var index = re.lastIndex;
+
+ if (index - value.length > lastIndex) {
+ var skipped = line.substring(lastIndex, index - value.length);
+ if (token.type == type) {
+ token.value += skipped;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: skipped};
+ }
+ }
+
+ for (var i = 0; i < match.length-2; i++) {
+ if (match[i + 1] === undefined)
+ continue;
+
+ if (!maxRecur--) {
+ throw "infinite" + state[mapping[i]] + currentState
+ }
+
+ rule = state[mapping[i]];
+
+ if (rule.onMatch)
+ type = rule.onMatch(value, currentState, stack);
+ else
+ type = rule.token;
+
+ if (rule.next) {
+ if (typeof rule.next == "string")
+ currentState = rule.next;
+ else
+ currentState = rule.next(currentState, stack);
+
+ state = this.states[currentState];
+ if (!state) {
+ window.console && console.error && console.error(currentState, "doesn't exist");
+ currentState = "start";
+ state = this.states[currentState];
+ }
+ mapping = this.matchMappings[currentState];
+ lastIndex = index;
+ re = this.regExps[currentState];
+ re.lastIndex = index;
+
+ onStateChange();
+ }
+ break;
+ }
+
+ if (value) {
+ if (typeof type == "string") {
+ if ((!rule || rule.merge !== false) && token.type === type) {
+ token.value += value;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: value};
+ }
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: null, value: ""};
+ for (var i = 0; i < type.length; i++)
+ tokens.push(type[i]);
+ }
+ }
+
+ if (lastIndex == line.length)
+ break;
+
+ lastIndex = index;
+
+ if (tokens.length > MAX_TOKEN_COUNT) {
+ token.value += line.substr(lastIndex);
+ currentState = "start"
+ break;
+ }
+ }
+
+ if (token.type)
+ tokens.push(token);
+
+ return {
+ tokens : tokens,
+ state : stack.length ? stack : currentState
+ };
+ };
+
+};
+
+Tokenizer.prototype = BaseTokenizer.prototype;
+
+exports.Tokenizer = Tokenizer;
+});
diff --git a/src/fauxton/assets/js/libs/ace/tokenizer_test.js b/src/fauxton/assets/js/libs/ace/tokenizer_test.js
new file mode 100644
index 000000000..281f58b3e
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/tokenizer_test.js
@@ -0,0 +1,69 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+ if (typeof process !== "undefined") {
+ require("amd-loader");
+ }
+
+define(function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("./tokenizer").Tokenizer;
+var assert = require("./test/assertions");
+
+module.exports = {
+ "test: createSplitterRegexp" : function() {
+ var t = new Tokenizer({});
+ var re = t.createSplitterRegexp("(a)(b)(?=[x)(])");
+ assert.equal(re.source, "(a)(b)");
+ var re = t.createSplitterRegexp("xc(?=([x)(]))");
+ assert.equal(re.source, "xc");
+ var re = t.createSplitterRegexp("(xc(?=([x)(])))");
+ assert.equal(re.source, "(xc)");
+ var re = t.createSplitterRegexp("(?=r)[(?=)](?=([x)(]))");
+ assert.equal(re.source, "(?=r)[(?=)]");
+ var re = t.createSplitterRegexp("(?=r)[(?=)](\\?=t)");
+ assert.equal(re.source, "(?=r)[(?=)](\\?=t)");
+ var re = t.createSplitterRegexp("[(?=)](\\?=t)");
+ assert.equal(re.source, "[(?=)](\\?=t)");
+ },
+
+ "test: removeCapturingGroups" : function() {
+ var t = new Tokenizer({});
+ var re = t.removeCapturingGroups("(ax(by))[()]");
+ assert.equal(re, "(?:ax(?:by))[()]");
+ }
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/undomanager.js b/src/fauxton/assets/js/libs/ace/undomanager.js
new file mode 100644
index 000000000..12aaa01d3
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/undomanager.js
@@ -0,0 +1,167 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+/**
+ *
+ *
+ * This object maintains the undo stack for an [[EditSession `EditSession`]].
+ * @class UndoManager
+ **/
+
+/**
+ *
+ *
+ * Resets the current undo state and creates a new `UndoManager`.
+ *
+ * @constructor
+ **/
+var UndoManager = function() {
+ this.reset();
+};
+
+(function() {
+
+ /**
+ * Provides a means for implementing your own undo manager. `options` has one property, `args`, an [[Array `Array`]], with two elements:
+ *
+ * - `args[0]` is an array of deltas
+ * - `args[1]` is the document to associate with
+ *
+ * @param {Object} options Contains additional properties
+ *
+ **/
+ this.execute = function(options) {
+ var deltas = options.args[0];
+ this.$doc = options.args[1];
+ if (options.merge && this.hasUndo()){
+ deltas = this.$undoStack.pop().concat(deltas);
+ }
+ this.$undoStack.push(deltas);
+ this.$redoStack = [];
+
+ if (this.dirtyCounter < 0) {
+ // The user has made a change after undoing past the last clean state.
+ // We can never get back to a clean state now until markClean() is called.
+ this.dirtyCounter = NaN;
+ }
+ this.dirtyCounter++;
+ };
+
+ /**
+ * [Perform an undo operation on the document, reverting the last change.]{: #UndoManager.undo}
+ * @param {Boolean} dontSelect {:dontSelect}
+ *
+ *
+ * @returns {Range} The range of the undo.
+ **/
+ this.undo = function(dontSelect) {
+ var deltas = this.$undoStack.pop();
+ var undoSelectionRange = null;
+ if (deltas) {
+ undoSelectionRange =
+ this.$doc.undoChanges(deltas, dontSelect);
+ this.$redoStack.push(deltas);
+ this.dirtyCounter--;
+ }
+
+ return undoSelectionRange;
+ };
+
+ /**
+ * [Perform a redo operation on the document, reimplementing the last change.]{: #UndoManager.redo}
+ * @param {Boolean} dontSelect {:dontSelect}
+ *
+ *
+ **/
+ this.redo = function(dontSelect) {
+ var deltas = this.$redoStack.pop();
+ var redoSelectionRange = null;
+ if (deltas) {
+ redoSelectionRange =
+ this.$doc.redoChanges(deltas, dontSelect);
+ this.$undoStack.push(deltas);
+ this.dirtyCounter++;
+ }
+
+ return redoSelectionRange;
+ };
+
+ /**
+ *
+ * Destroys the stack of undo and redo redo operations.
+ **/
+ this.reset = function() {
+ this.$undoStack = [];
+ this.$redoStack = [];
+ this.dirtyCounter = 0;
+ };
+
+ /**
+ *
+ * Returns `true` if there are undo operations left to perform.
+ * @returns {Boolean}
+ **/
+ this.hasUndo = function() {
+ return this.$undoStack.length > 0;
+ };
+
+ /**
+ *
+ * Returns `true` if there are redo operations left to perform.
+ * @returns {Boolean}
+ **/
+ this.hasRedo = function() {
+ return this.$redoStack.length > 0;
+ };
+
+ /**
+ *
+ * Marks the current status clean
+ **/
+ this.markClean = function() {
+ this.dirtyCounter = 0;
+ };
+
+ /**
+ *
+ * Returns if the current status is clean
+ * @returns {Boolean}
+ **/
+ this.isClean = function() {
+ return this.dirtyCounter === 0;
+ };
+
+}).call(UndoManager.prototype);
+
+exports.UndoManager = UndoManager;
+});
diff --git a/src/fauxton/assets/js/libs/ace/unicode.js b/src/fauxton/assets/js/libs/ace/unicode.js
new file mode 100644
index 000000000..5c2917446
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/unicode.js
@@ -0,0 +1,107 @@
+define(function(require, exports, module) {
+"use strict";
+
+/*
+XRegExp Unicode plugin pack: Categories 1.0
+(c) 2010 Steven Levithan
+MIT License
+<http://xregexp.com>
+Uses the Unicode 5.2 character database
+
+This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties):
+
+L - Letter (the top-level Letter category is included in the Unicode plugin base script)
+ Ll - Lowercase letter
+ Lu - Uppercase letter
+ Lt - Titlecase letter
+ Lm - Modifier letter
+ Lo - Letter without case
+M - Mark
+ Mn - Non-spacing mark
+ Mc - Spacing combining mark
+ Me - Enclosing mark
+N - Number
+ Nd - Decimal digit
+ Nl - Letter number
+ No - Other number
+P - Punctuation
+ Pd - Dash punctuation
+ Ps - Open punctuation
+ Pe - Close punctuation
+ Pi - Initial punctuation
+ Pf - Final punctuation
+ Pc - Connector punctuation
+ Po - Other punctuation
+S - Symbol
+ Sm - Math symbol
+ Sc - Currency symbol
+ Sk - Modifier symbol
+ So - Other symbol
+Z - Separator
+ Zs - Space separator
+ Zl - Line separator
+ Zp - Paragraph separator
+C - Other
+ Cc - Control
+ Cf - Format
+ Co - Private use
+ Cs - Surrogate
+ Cn - Unassigned
+
+Example usage:
+
+ \p{N}
+ \p{Cn}
+*/
+
+
+// will be populated by addUnicodePackage
+exports.packages = {};
+
+addUnicodePackage({
+ L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+ Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",
+ Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",
+ Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",
+ Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",
+ Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",
+ M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",
+ Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",
+ Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",
+ Me: "0488048906DE20DD-20E020E2-20E4A670-A672",
+ N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+ Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",
+ Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",
+ No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",
+ P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",
+ Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",
+ Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",
+ Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",
+ Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",
+ Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21",
+ Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F",
+ Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",
+ S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",
+ Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",
+ Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",
+ Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",
+ So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",
+ Z: "002000A01680180E2000-200A20282029202F205F3000",
+ Zs: "002000A01680180E2000-200A202F205F3000",
+ Zl: "2028",
+ Zp: "2029",
+ C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",
+ Cc: "0000-001F007F-009F",
+ Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",
+ Co: "E000-F8FF",
+ Cs: "D800-DFFF",
+ Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"
+});
+
+function addUnicodePackage (pack) {
+ var codePoint = /\w{4}/g;
+ for (var name in pack)
+ exports.packages[name] = pack[name].replace(codePoint, "\\u$&");
+};
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/virtual_renderer.js b/src/fauxton/assets/js/libs/ace/virtual_renderer.js
new file mode 100644
index 000000000..b2d64a5cb
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/virtual_renderer.js
@@ -0,0 +1,1678 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var useragent = require("./lib/useragent");
+var config = require("./config");
+var GutterLayer = require("./layer/gutter").Gutter;
+var MarkerLayer = require("./layer/marker").Marker;
+var TextLayer = require("./layer/text").Text;
+var CursorLayer = require("./layer/cursor").Cursor;
+var ScrollBarH = require("./scrollbar").ScrollBarH;
+var ScrollBarV = require("./scrollbar").ScrollBarV;
+var RenderLoop = require("./renderloop").RenderLoop;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var editorCss = require("./requirejs/text!./css/editor.css");
+
+dom.importCssString(editorCss, "ace_editor");
+
+/**
+ * The class that is responsible for drawing everything you see on the screen!
+ * @class VirtualRenderer
+ **/
+
+/**
+ * Constructs a new `VirtualRenderer` within the `container` specified, applying the given `theme`.
+ * @param {DOMElement} container The root element of the editor
+ * @param {String} theme The starting theme
+ *
+ * @constructor
+ **/
+
+var VirtualRenderer = function(container, theme) {
+ var _self = this;
+
+ this.container = container || dom.createElement("div");
+
+ // TODO: this breaks rendering in Cloud9 with multiple ace instances
+ // // Imports CSS once per DOM document ('ace_editor' serves as an identifier).
+ // dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
+
+ // in IE <= 9 the native cursor always shines through
+ this.$keepTextAreaAtCursor = true;
+
+ dom.addCssClass(this.container, "ace_editor");
+
+ this.setTheme(theme);
+
+ this.$gutter = dom.createElement("div");
+ this.$gutter.className = "ace_gutter";
+ this.container.appendChild(this.$gutter);
+
+ this.scroller = dom.createElement("div");
+ this.scroller.className = "ace_scroller";
+ this.container.appendChild(this.scroller);
+
+ this.content = dom.createElement("div");
+ this.content.className = "ace_content";
+ this.scroller.appendChild(this.content);
+
+ this.$gutterLayer = new GutterLayer(this.$gutter);
+ this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this));
+
+ this.$markerBack = new MarkerLayer(this.content);
+
+ var textLayer = this.$textLayer = new TextLayer(this.content);
+ this.canvas = textLayer.element;
+
+ this.$markerFront = new MarkerLayer(this.content);
+
+ this.$cursorLayer = new CursorLayer(this.content);
+
+ // Indicates whether the horizontal scrollbar is visible
+ this.$horizScroll = false;
+ this.$vScroll = false;
+
+ this.scrollBar =
+ this.scrollBarV = new ScrollBarV(this.container, this);
+ this.scrollBarH = new ScrollBarH(this.container, this);
+ this.scrollBarV.addEventListener("scroll", function(e) {
+ if (!_self.$scrollAnimation)
+ _self.session.setScrollTop(e.data - _self.scrollMargin.top);
+ });
+ this.scrollBarH.addEventListener("scroll", function(e) {
+ if (!_self.$scrollAnimation)
+ _self.session.setScrollLeft(e.data - _self.scrollMargin.left);
+ });
+
+ this.scrollTop = 0;
+ this.scrollLeft = 0;
+
+ this.cursorPos = {
+ row : 0,
+ column : 0
+ };
+
+ this.$textLayer.addEventListener("changeCharacterSize", function() {
+ _self.updateCharacterSize();
+ _self.onResize(true);
+ _self._signal("changeCharacterSize");
+ });
+
+ this.$size = {
+ width: 0,
+ height: 0,
+ scrollerHeight: 0,
+ scrollerWidth: 0
+ };
+
+ this.layerConfig = {
+ width : 1,
+ padding : 0,
+ firstRow : 0,
+ firstRowScreen: 0,
+ lastRow : 0,
+ lineHeight : 0,
+ characterWidth : 0,
+ minHeight : 1,
+ maxHeight : 1,
+ offset : 0,
+ height : 1
+ };
+
+ this.scrollMargin = {
+ left: 0,
+ right: 0,
+ top: 0,
+ bottom: 0,
+ v: 0,
+ h: 0
+ };
+
+ this.$loop = new RenderLoop(
+ this.$renderChanges.bind(this),
+ this.container.ownerDocument.defaultView
+ );
+ this.$loop.schedule(this.CHANGE_FULL);
+
+ this.updateCharacterSize();
+ this.setPadding(4);
+ config.resetOptions(this);
+ config._emit("renderer", this);
+};
+
+(function() {
+
+ this.CHANGE_CURSOR = 1;
+ this.CHANGE_MARKER = 2;
+ this.CHANGE_GUTTER = 4;
+ this.CHANGE_SCROLL = 8;
+ this.CHANGE_LINES = 16;
+ this.CHANGE_TEXT = 32;
+ this.CHANGE_SIZE = 64;
+ this.CHANGE_MARKER_BACK = 128;
+ this.CHANGE_MARKER_FRONT = 256;
+ this.CHANGE_FULL = 512;
+ this.CHANGE_H_SCROLL = 1024;
+
+ // this.$logChanges = function(changes) {
+ // var a = ""
+ // if (changes & this.CHANGE_CURSOR) a += " cursor";
+ // if (changes & this.CHANGE_MARKER) a += " marker";
+ // if (changes & this.CHANGE_GUTTER) a += " gutter";
+ // if (changes & this.CHANGE_SCROLL) a += " scroll";
+ // if (changes & this.CHANGE_LINES) a += " lines";
+ // if (changes & this.CHANGE_TEXT) a += " text";
+ // if (changes & this.CHANGE_SIZE) a += " size";
+ // if (changes & this.CHANGE_MARKER_BACK) a += " marker_back";
+ // if (changes & this.CHANGE_MARKER_FRONT) a += " marker_front";
+ // if (changes & this.CHANGE_FULL) a += " full";
+ // if (changes & this.CHANGE_H_SCROLL) a += " h_scroll";
+ // console.log(a.trim())
+ // };
+
+ oop.implement(this, EventEmitter);
+
+ this.updateCharacterSize = function() {
+ if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {
+ this.$allowBoldFonts = this.$textLayer.allowBoldFonts;
+ this.setStyle("ace_nobold", !this.$allowBoldFonts);
+ }
+
+ this.layerConfig.characterWidth =
+ this.characterWidth = this.$textLayer.getCharacterWidth();
+ this.layerConfig.lineHeight =
+ this.lineHeight = this.$textLayer.getLineHeight();
+ this.$updatePrintMargin();
+ };
+
+ /**
+ *
+ * Associates the renderer with an [[EditSession `EditSession`]].
+ **/
+ this.setSession = function(session) {
+ this.session = session;
+
+ this.scroller.className = "ace_scroller";
+
+ this.$cursorLayer.setSession(session);
+ this.$markerBack.setSession(session);
+ this.$markerFront.setSession(session);
+ this.$gutterLayer.setSession(session);
+ this.$textLayer.setSession(session);
+ this.$loop.schedule(this.CHANGE_FULL);
+
+ };
+
+ /**
+ * Triggers a partial update of the text, from the range given by the two parameters.
+ * @param {Number} firstRow The first row to update
+ * @param {Number} lastRow The last row to update
+ *
+ *
+ **/
+ this.updateLines = function(firstRow, lastRow) {
+ if (lastRow === undefined)
+ lastRow = Infinity;
+
+ if (!this.$changedLines) {
+ this.$changedLines = {
+ firstRow: firstRow,
+ lastRow: lastRow
+ };
+ }
+ else {
+ if (this.$changedLines.firstRow > firstRow)
+ this.$changedLines.firstRow = firstRow;
+
+ if (this.$changedLines.lastRow < lastRow)
+ this.$changedLines.lastRow = lastRow;
+ }
+
+ if (this.$changedLines.firstRow > this.layerConfig.lastRow ||
+ this.$changedLines.lastRow < this.layerConfig.firstRow)
+ return;
+ this.$loop.schedule(this.CHANGE_LINES);
+ };
+
+ this.onChangeTabSize = function() {
+ this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
+ this.$textLayer.onChangeTabSize();
+ };
+
+ /**
+ * Triggers a full update of the text, for all the rows.
+ **/
+ this.updateText = function() {
+ this.$loop.schedule(this.CHANGE_TEXT);
+ };
+
+ /**
+ * Triggers a full update of all the layers, for all the rows.
+ * @param {Boolean} force If `true`, forces the changes through
+ *
+ *
+ **/
+ this.updateFull = function(force) {
+ if (force)
+ this.$renderChanges(this.CHANGE_FULL, true);
+ else
+ this.$loop.schedule(this.CHANGE_FULL);
+ };
+
+ /**
+ *
+ * Updates the font size.
+ **/
+ this.updateFontSize = function() {
+ this.$textLayer.checkForSizeChanges();
+ };
+
+ this.$changes = 0;
+ /**
+ * [Triggers a resize of the editor.]{: #VirtualRenderer.onResize}
+ * @param {Boolean} force If `true`, recomputes the size, even if the height and width haven't changed
+ * @param {Number} gutterWidth The width of the gutter in pixels
+ * @param {Number} width The width of the editor in pixels
+ * @param {Number} height The hiehgt of the editor, in pixels
+ *
+ *
+ **/
+ this.onResize = function(force, gutterWidth, width, height) {
+ // if (force)
+ // console.log("force resize requested", width, height)
+ if (this.resizing > 2)
+ return;
+ else if (this.resizing > 0)
+ this.resizing++;
+ else
+ this.resizing = force ? 1 : 0;
+ // `|| el.scrollHeight` is required for outosizing editors on ie
+ // where elements with clientHeight = 0 alsoe have clientWidth = 0
+ var el = this.container;
+ if (!height)
+ height = el.clientHeight || el.scrollHeight;
+ if (!width)
+ width = el.clientWidth || el.scrollWidth;
+
+ var changes = this.$updateCachedSize(force, gutterWidth, width, height);
+
+ // console.log("resizing to", width, height, JSON.stringify(this.$size))
+
+ // setTimeout(function() {
+ // console.log("actual size ", this.container.clientWidth, this.container.clientHeight)
+
+ // }.bind(this), 500)
+
+ if (!this.$size.scrollerHeight || (!width && !height))
+ return this.resizing = 0;
+
+ if (force)
+ this.$gutterLayer.$padding = null;
+
+ if (force)
+ this.$renderChanges(changes, true);
+ else
+ this.$loop.schedule(changes | this.$changes);
+
+ if (this.resizing)
+ this.resizing = 0;
+ };
+
+ this.$updateCachedSize = function(force, gutterWidth, width, height) {
+ var changes = 0;
+ var size = this.$size;
+ var oldSize = {
+ width: size.width,
+ height: size.height,
+ scrollerHeight: size.scrollerHeight,
+ scrollerWidth: size.scrollerWidth
+ };
+ if (height && (force || size.height != height)) {
+ size.height = height;
+ changes = this.CHANGE_SIZE;
+
+ size.scrollerHeight = size.height;
+ if (this.$horizScroll)
+ size.scrollerHeight -= this.scrollBarH.getHeight();
+
+ // this.scrollBarV.setHeight(size.scrollerHeight);
+ this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px";
+
+ if (this.session) {
+ this.session.setScrollTop(this.getScrollTop());
+ changes = changes | this.CHANGE_SCROLL;
+ }
+ }
+
+ if (width && (force || size.width != width)) {
+ changes = this.CHANGE_SIZE;
+ size.width = width;
+
+ if (gutterWidth == null)
+ gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+
+ this.gutterWidth = gutterWidth;
+
+ this.scrollBarH.element.style.left =
+ this.scroller.style.left = gutterWidth + "px";
+ size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth());
+
+ this.scrollBarH.element.style.right =
+ this.scroller.style.right = this.scrollBarV.getWidth() + "px";
+ this.scroller.style.bottom = this.scrollBarH.getHeight() + "px";
+
+ // this.scrollBarH.element.style.setWidth(size.scrollerWidth);
+
+ if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
+ changes = changes | this.CHANGE_FULL;
+ }
+
+ if (changes)
+ this._signal("resize", oldSize);
+
+ return changes;
+ };
+
+ this.onGutterResize = function() {
+ var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+ if (gutterWidth != this.gutterWidth)
+ this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
+
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit())
+ this.$loop.schedule(this.CHANGE_FULL);
+ else {
+ this.$computeLayerConfig();
+ this.$loop.schedule(this.CHANGE_MARKER);
+ }
+ };
+
+ /**
+ * Adjusts the wrap limit, which is the number of characters that can fit within the width of the edit area on screen.
+ **/
+ this.adjustWrapLimit = function() {
+ var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
+ var limit = Math.floor(availableWidth / this.characterWidth);
+ return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);
+ };
+
+ /**
+ * Identifies whether you want to have an animated scroll or not.
+ * @param {Boolean} shouldAnimate Set to `true` to show animated scrolls
+ *
+ **/
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.setOption("animatedScroll", shouldAnimate);
+ };
+
+ /**
+ * Returns whether an animated scroll happens or not.
+ * @returns {Boolean}
+ **/
+ this.getAnimatedScroll = function() {
+ return this.$animatedScroll;
+ };
+
+ /**
+ * Identifies whether you want to show invisible characters or not.
+ * @param {Boolean} showInvisibles Set to `true` to show invisibles
+ *
+ **/
+ this.setShowInvisibles = function(showInvisibles) {
+ this.setOption("showInvisibles", showInvisibles);
+ };
+
+ /**
+ * Returns whether invisible characters are being shown or not.
+ * @returns {Boolean}
+ **/
+ this.getShowInvisibles = function() {
+ return this.getOption("showInvisibles");
+ };
+ this.getDisplayIndentGuides = function() {
+ return this.getOption("displayIndentGuides");
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ this.setOption("displayIndentGuides", display);
+ };
+
+ /**
+ * Identifies whether you want to show the print margin or not.
+ * @param {Boolean} showPrintMargin Set to `true` to show the print margin
+ *
+ **/
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.setOption("showPrintMargin", showPrintMargin);
+ };
+
+ /**
+ * Returns whether the print margin is being shown or not.
+ * @returns {Boolean}
+ **/
+ this.getShowPrintMargin = function() {
+ return this.getOption("showPrintMargin");
+ };
+ /**
+ * Identifies whether you want to show the print margin column or not.
+ * @param {Boolean} showPrintMargin Set to `true` to show the print margin column
+ *
+ **/
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.setOption("printMarginColumn", showPrintMargin);
+ };
+
+ /**
+ * Returns whether the print margin column is being shown or not.
+ * @returns {Boolean}
+ **/
+ this.getPrintMarginColumn = function() {
+ return this.getOption("printMarginColumn");
+ };
+
+ /**
+ * Returns `true` if the gutter is being shown.
+ * @returns {Boolean}
+ **/
+ this.getShowGutter = function(){
+ return this.getOption("showGutter");
+ };
+
+ /**
+ * Identifies whether you want to show the gutter or not.
+ * @param {Boolean} show Set to `true` to show the gutter
+ *
+ **/
+ this.setShowGutter = function(show){
+ return this.setOption("showGutter", show);
+ };
+
+ this.getFadeFoldWidgets = function(){
+ return this.getOption("fadeFoldWidgets")
+ };
+
+ this.setFadeFoldWidgets = function(show) {
+ this.setOption("fadeFoldWidgets", show);
+ };
+
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ this.setOption("highlightGutterLine", shouldHighlight);
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.getOption("highlightGutterLine");
+ };
+
+ this.$updateGutterLineHighlight = function() {
+ var pos = this.$cursorLayer.$pixelPos;
+ var height = this.layerConfig.lineHeight;
+ if (this.session.getUseWrapMode()) {
+ var cursor = this.session.selection.getCursor();
+ cursor.column = 0;
+ pos = this.$cursorLayer.getPixelPosition(cursor, true);
+ height *= this.session.getRowLength(cursor.row);
+ }
+ this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px";
+ this.$gutterLineHighlight.style.height = height + "px";
+ };
+
+ this.$updatePrintMargin = function() {
+ if (!this.$showPrintMargin && !this.$printMarginEl)
+ return;
+
+ if (!this.$printMarginEl) {
+ var containerEl = dom.createElement("div");
+ containerEl.className = "ace_layer ace_print-margin-layer";
+ this.$printMarginEl = dom.createElement("div");
+ this.$printMarginEl.className = "ace_print-margin";
+ containerEl.appendChild(this.$printMarginEl);
+ this.content.insertBefore(containerEl, this.content.firstChild);
+ }
+
+ var style = this.$printMarginEl.style;
+ style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px";
+ style.visibility = this.$showPrintMargin ? "visible" : "hidden";
+
+ if (this.session && this.session.$wrap == -1)
+ this.adjustWrapLimit();
+ };
+
+ /**
+ *
+ * Returns the root element containing this renderer.
+ * @returns {DOMElement}
+ **/
+ this.getContainerElement = function() {
+ return this.container;
+ };
+
+ /**
+ *
+ * Returns the element that the mouse events are attached to
+ * @returns {DOMElement}
+ **/
+ this.getMouseEventTarget = function() {
+ return this.content;
+ };
+
+ /**
+ *
+ * Returns the element to which the hidden text area is added.
+ * @returns {DOMElement}
+ **/
+ this.getTextAreaContainer = function() {
+ return this.container;
+ };
+
+ // move text input over the cursor
+ // this is required for iOS and IME
+ this.$moveTextAreaToCursor = function() {
+ if (!this.$keepTextAreaAtCursor)
+ return;
+ var config = this.layerConfig;
+ var posTop = this.$cursorLayer.$pixelPos.top;
+ var posLeft = this.$cursorLayer.$pixelPos.left;
+ posTop -= config.offset;
+
+ var h = this.lineHeight;
+ if (posTop < 0 || posTop > config.height - h)
+ return;
+
+ var w = this.characterWidth;
+ if (this.$composition) {
+ var val = this.textarea.value.replace(/^\x01+/, "");
+ w *= (this.session.$getStringScreenWidth(val)[0]+2);
+ h += 2;
+ posTop -= 1;
+ }
+ posLeft -= this.scrollLeft;
+ if (posLeft > this.$size.scrollerWidth - w)
+ posLeft = this.$size.scrollerWidth - w;
+
+ posLeft -= this.scrollBar.width;
+
+ this.textarea.style.height = h + "px";
+ this.textarea.style.width = w + "px";
+ this.textarea.style.right = Math.max(0, this.$size.scrollerWidth - posLeft - w) + "px";
+ this.textarea.style.bottom = Math.max(0, this.$size.height - posTop - h) + "px";
+ };
+
+ /**
+ *
+ * [Returns the index of the first visible row.]{: #VirtualRenderer.getFirstVisibleRow}
+ * @returns {Number}
+ **/
+ this.getFirstVisibleRow = function() {
+ return this.layerConfig.firstRow;
+ };
+
+ /**
+ *
+ * Returns the index of the first fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+ * @returns {Number}
+ **/
+ this.getFirstFullyVisibleRow = function() {
+ return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);
+ };
+
+ /**
+ *
+ * Returns the index of the last fully visible row. "Fully" here means that the characters in the row are not truncated; that the top and the bottom of the row are on the screen.
+ * @returns {Number}
+ **/
+ this.getLastFullyVisibleRow = function() {
+ var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight);
+ return this.layerConfig.firstRow - 1 + flint;
+ };
+
+ /**
+ *
+ * [Returns the index of the last visible row.]{: #VirtualRenderer.getLastVisibleRow}
+ * @returns {Number}
+ **/
+ this.getLastVisibleRow = function() {
+ return this.layerConfig.lastRow;
+ };
+
+ this.$padding = null;
+
+ /**
+ * Sets the padding for all the layers.
+ * @param {Number} padding A new padding value (in pixels)
+ *
+ *
+ *
+ **/
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.$textLayer.setPadding(padding);
+ this.$cursorLayer.setPadding(padding);
+ this.$markerFront.setPadding(padding);
+ this.$markerBack.setPadding(padding);
+ this.$loop.schedule(this.CHANGE_FULL);
+ this.$updatePrintMargin();
+ };
+
+ this.setScrollMargin = function(top, bottom, left, right) {
+ var sm = this.scrollMargin;
+ sm.top = top|0;
+ sm.bottom = bottom|0;
+ sm.right = right|0;
+ sm.left = left|0;
+ sm.v = sm.top + sm.bottom;
+ sm.h = sm.left + sm.right;
+ this.updateFull();
+ };
+
+ /**
+ * Returns whether the horizontal scrollbar is set to be always visible.
+ * @returns {Boolean}
+ **/
+ this.getHScrollBarAlwaysVisible = function() {
+ return this.$hScrollBarAlwaysVisible;
+ };
+
+ /**
+ * Identifies whether you want to show the horizontal scrollbar or not.
+ * @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
+ **/
+ this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
+ this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
+ };
+ /**
+ * Returns whether the horizontal scrollbar is set to be always visible.
+ * @returns {Boolean}
+ **/
+ this.getVScrollBarAlwaysVisible = function() {
+ return this.$hScrollBarAlwaysVisible;
+ };
+
+ /**
+ * Identifies whether you want to show the horizontal scrollbar or not.
+ * @param {Boolean} alwaysVisible Set to `true` to make the horizontal scroll bar visible
+ **/
+ this.setVScrollBarAlwaysVisible = function(alwaysVisible) {
+ this.setOption("vScrollBarAlwaysVisible", alwaysVisible);
+ };
+
+ this.$updateScrollBarV = function() {
+ this.scrollBarV.setInnerHeight(this.layerConfig.maxHeight + this.scrollMargin.v);
+ this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);
+ };
+ this.$updateScrollBarH = function() {
+ this.scrollBarH.setInnerWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
+ this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);
+ };
+
+ this.$renderChanges = function(changes, force) {
+ if (this.$changes) {
+ changes |= this.$changes;
+ this.$changes = 0;
+ }
+ if ((!this.session || !this.container.offsetWidth) || (!changes && !force)) {
+ this.$changes |= changes;
+ return;
+ }
+ if (!this.$size.width) {
+ this.$changes |= changes;
+ return this.onResize(true);
+ }
+ if (!this.lineHeight) {
+ this.$textLayer.checkForSizeChanges();
+ }
+ // this.$logChanges(changes);
+
+ this._signal("beforeRender");
+ // text, scrolling and resize changes can cause the view port size to change
+ if (changes & this.CHANGE_FULL ||
+ changes & this.CHANGE_SIZE ||
+ changes & this.CHANGE_TEXT ||
+ changes & this.CHANGE_LINES ||
+ changes & this.CHANGE_SCROLL ||
+ changes & this.CHANGE_H_SCROLL
+ )
+ changes |= this.$computeLayerConfig();
+
+ // horizontal scrolling
+ if (changes & this.CHANGE_H_SCROLL) {
+ this.$updateScrollBarH();
+ this.content.style.marginLeft = -this.scrollLeft + "px";
+ this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
+ }
+
+ // full
+ if (changes & this.CHANGE_FULL) {
+ // update scrollbar first to not lose scroll position when gutter calls resize
+ this.$updateScrollBarV();
+ this.$updateScrollBarH();
+ this.$textLayer.update(this.layerConfig);
+ if (this.$showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ this.$markerBack.update(this.layerConfig);
+ this.$markerFront.update(this.layerConfig);
+ this.$cursorLayer.update(this.layerConfig);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ this._signal("afterRender");
+ return;
+ }
+
+ // scrolling
+ if (changes & this.CHANGE_SCROLL) {
+ this.$updateScrollBarV();
+ if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
+ this.$textLayer.update(this.layerConfig);
+ else
+ this.$textLayer.scrollLines(this.layerConfig);
+
+ if (this.$showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ this.$markerBack.update(this.layerConfig);
+ this.$markerFront.update(this.layerConfig);
+ this.$cursorLayer.update(this.layerConfig);
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ this.$moveTextAreaToCursor();
+ this._signal("afterRender");
+ return;
+ }
+
+ if (changes & this.CHANGE_TEXT) {
+ this.$textLayer.update(this.layerConfig);
+ if (this.$showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+ else if (changes & this.CHANGE_LINES) {
+ if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+ else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
+ if (this.$showGutter)
+ this.$gutterLayer.update(this.layerConfig);
+ }
+
+ if (changes & this.CHANGE_CURSOR) {
+ this.$cursorLayer.update(this.layerConfig);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
+ this.$markerFront.update(this.layerConfig);
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
+ this.$markerBack.update(this.layerConfig);
+ }
+
+ if (changes & this.CHANGE_SIZE || changes & this.CHANGE_LINES) {
+ this.$updateScrollBarV();
+ this.$updateScrollBarH();
+ }
+
+ this._signal("afterRender");
+ };
+
+
+ this.$autosize = function(height, width) {
+ var height = this.session.getScreenLength() * this.lineHeight;
+ var maxHeight = this.$maxLines * this.lineHeight;
+ var desiredHeight = Math.max(
+ (this.$minLines||1) * this.lineHeight,
+ Math.min(maxHeight, height)
+ );
+ var vScroll = height > maxHeight;
+
+ if (desiredHeight != this.desiredHeight ||
+ this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {
+ if (vScroll != this.$vScroll) {
+ this.$vScroll = vScroll;
+ this.scrollBarV.setVisible(vScroll);
+ }
+
+ var w = this.container.clientWidth;
+ this.container.style.height = desiredHeight + "px";
+ this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);
+ // this.$loop.changes = 0;
+ this.desiredHeight = desiredHeight;
+ }
+ };
+
+ this.$computeLayerConfig = function() {
+ if (this.$maxLines && this.lineHeight > 1)
+ this.$autosize();
+
+ var session = this.session;
+
+ var hideScrollbars = this.$size.height <= 2 * this.lineHeight;
+ var screenLines = this.session.getScreenLength()
+ var maxHeight = screenLines * this.lineHeight;
+
+ var offset = this.scrollTop % this.lineHeight;
+ var minHeight = this.$size.scrollerHeight + this.lineHeight;
+
+ var longestLine = this.$getLongestLine();
+
+ var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||
+ this.$size.scrollerWidth - longestLine - 2 * this.$padding < 0);
+
+ var hScrollChanged = this.$horizScroll !== horizScroll;
+ if (hScrollChanged) {
+ this.$horizScroll = horizScroll;
+ this.scrollBarH.setVisible(horizScroll);
+ }
+
+ if (!this.$maxLines && this.$scrollPastEnd) {
+ if (this.scrollTop > maxHeight - this.$size.scrollerHeight)
+ maxHeight += Math.min(
+ (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd,
+ this.scrollTop - maxHeight + this.$size.scrollerHeight
+ );
+ }
+
+ var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
+ this.$size.scrollerHeight - maxHeight < 0);
+ var vScrollChanged = this.$vScroll !== vScroll;
+ if (vScrollChanged) {
+ this.$vScroll = vScroll;
+ this.scrollBarV.setVisible(vScroll);
+ }
+
+ this.session.setScrollTop(Math.max(-this.scrollMargin.top,
+ Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight + this.scrollMargin.v)));
+
+ this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft,
+ longestLine + 2 * this.$padding - this.$size.scrollerWidth + this.scrollMargin.h)));
+
+ var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;
+ var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));
+ var lastRow = firstRow + lineCount;
+
+ // Map lines on the screen to lines in the document.
+ var firstRowScreen, firstRowHeight;
+ var lineHeight = this.lineHeight;
+ firstRow = session.screenToDocumentRow(firstRow, 0);
+
+ // Check if firstRow is inside of a foldLine. If true, then use the first
+ // row of the foldLine.
+ var foldLine = session.getFoldLine(firstRow);
+ if (foldLine) {
+ firstRow = foldLine.start.row;
+ }
+
+ firstRowScreen = session.documentToScreenRow(firstRow, 0);
+ firstRowHeight = session.getRowLength(firstRow) * lineHeight;
+
+ lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);
+ minHeight = this.$size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
+ firstRowHeight;
+
+ offset = this.scrollTop - firstRowScreen * lineHeight;
+
+ var changes = 0;
+ // Horizontal scrollbar visibility may have changed, which changes
+ // the client height of the scroller
+ if (hScrollChanged || vScrollChanged) {
+ changes = this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height);
+ this._signal("scrollbarVisibilityChanged");
+ if (vScrollChanged)
+ longestLine = this.$getLongestLine();
+ }
+
+ this.layerConfig = {
+ width : longestLine,
+ padding : this.$padding,
+ firstRow : firstRow,
+ firstRowScreen: firstRowScreen,
+ lastRow : lastRow,
+ lineHeight : lineHeight,
+ characterWidth : this.characterWidth,
+ minHeight : minHeight,
+ maxHeight : maxHeight,
+ offset : offset,
+ height : this.$size.scrollerHeight
+ };
+
+ // For debugging.
+ // console.log(JSON.stringify(this.layerConfig));
+
+ this.$gutterLayer.element.style.marginTop = (-offset) + "px";
+ this.content.style.marginTop = (-offset) + "px";
+ this.content.style.width = longestLine + 2 * this.$padding + "px";
+ this.content.style.height = minHeight + "px";
+
+ return changes;
+ };
+
+ this.$updateLines = function() {
+ var firstRow = this.$changedLines.firstRow;
+ var lastRow = this.$changedLines.lastRow;
+ this.$changedLines = null;
+
+ var layerConfig = this.layerConfig;
+
+ if (firstRow > layerConfig.lastRow + 1) { return; }
+ if (lastRow < layerConfig.firstRow) { return; }
+
+ // if the last row is unknown -> redraw everything
+ if (lastRow === Infinity) {
+ if (this.$showGutter)
+ this.$gutterLayer.update(layerConfig);
+ this.$textLayer.update(layerConfig);
+ return;
+ }
+
+ // else update only the changed rows
+ this.$textLayer.updateLines(layerConfig, firstRow, lastRow);
+ return true;
+ };
+
+ this.$getLongestLine = function() {
+ var charCount = this.session.getScreenWidth();
+ if (this.showInvisibles && !this.session.$useWrapMode)
+ charCount += 1;
+
+ return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));
+ };
+
+ /**
+ *
+ * Schedules an update to all the front markers in the document.
+ **/
+ this.updateFrontMarkers = function() {
+ this.$markerFront.setMarkers(this.session.getMarkers(true));
+ this.$loop.schedule(this.CHANGE_MARKER_FRONT);
+ };
+
+ /**
+ *
+ * Schedules an update to all the back markers in the document.
+ **/
+ this.updateBackMarkers = function() {
+ this.$markerBack.setMarkers(this.session.getMarkers());
+ this.$loop.schedule(this.CHANGE_MARKER_BACK);
+ };
+
+ /**
+ *
+ * Deprecated; (moved to [[EditSession]])
+ * @deprecated
+ **/
+ this.addGutterDecoration = function(row, className){
+ this.$gutterLayer.addGutterDecoration(row, className);
+ };
+
+ /**
+ * Deprecated; (moved to [[EditSession]])
+ * @deprecated
+ **/
+ this.removeGutterDecoration = function(row, className){
+ this.$gutterLayer.removeGutterDecoration(row, className);
+ };
+
+ /**
+ *
+ * Redraw breakpoints.
+ **/
+ this.updateBreakpoints = function(rows) {
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ };
+
+ /**
+ *
+ * Sets annotations for the gutter.
+ * @param {Array} annotations An array containing annotations
+ *
+ *
+ **/
+ this.setAnnotations = function(annotations) {
+ this.$gutterLayer.setAnnotations(annotations);
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ };
+
+ /**
+ *
+ * Updates the cursor icon.
+ **/
+ this.updateCursor = function() {
+ this.$loop.schedule(this.CHANGE_CURSOR);
+ };
+
+ /**
+ *
+ * Hides the cursor icon.
+ **/
+ this.hideCursor = function() {
+ this.$cursorLayer.hideCursor();
+ };
+
+ /**
+ *
+ * Shows the cursor icon.
+ **/
+ this.showCursor = function() {
+ this.$cursorLayer.showCursor();
+ };
+
+ this.scrollSelectionIntoView = function(anchor, lead, offset) {
+ // first scroll anchor into view then scroll lead into view
+ this.scrollCursorIntoView(anchor, offset);
+ this.scrollCursorIntoView(lead, offset);
+ };
+
+ /**
+ *
+ * Scrolls the cursor into the first visibile area of the editor
+ **/
+ this.scrollCursorIntoView = function(cursor, offset) {
+ // the editor is not visible
+ if (this.$size.scrollerHeight === 0)
+ return;
+
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
+
+ var left = pos.left;
+ var top = pos.top;
+
+ var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
+
+ if (scrollTop > top) {
+ if (offset)
+ top -= offset * this.$size.scrollerHeight;
+ if (top == 0)
+ top = - this.scrollMargin.top;
+ else if (top == 0)
+ top = + this.scrollMargin.bottom;
+ this.session.setScrollTop(top);
+ } else if (scrollTop + this.$size.scrollerHeight < top + this.lineHeight) {
+ if (offset)
+ top += offset * this.$size.scrollerHeight;
+ this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);
+ }
+
+ var scrollLeft = this.scrollLeft;
+
+ if (scrollLeft > left) {
+ if (left < this.$padding + 2 * this.layerConfig.characterWidth)
+ left = -this.scrollMargin.left;
+ this.session.setScrollLeft(left);
+ } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
+ this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
+ } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {
+ this.session.setScrollLeft(0);
+ }
+ };
+
+ /**
+ * {:EditSession.getScrollTop}
+ * @related EditSession.getScrollTop
+ * @returns {Number}
+ **/
+ this.getScrollTop = function() {
+ return this.session.getScrollTop();
+ };
+
+ /**
+ * {:EditSession.getScrollLeft}
+ * @related EditSession.getScrollLeft
+ * @returns {Number}
+ **/
+ this.getScrollLeft = function() {
+ return this.session.getScrollLeft();
+ };
+
+ /**
+ *
+ * Returns the first visible row, regardless of whether it's fully visible or not.
+ * @returns {Number}
+ **/
+ this.getScrollTopRow = function() {
+ return this.scrollTop / this.lineHeight;
+ };
+
+ /**
+ *
+ * Returns the last visible row, regardless of whether it's fully visible or not.
+ * @returns {Number}
+ **/
+ this.getScrollBottomRow = function() {
+ return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);
+ };
+
+ /**
+ * Gracefully scrolls from the top of the editor to the row indicated.
+ * @param {Number} row A row id
+ *
+ *
+ * @related EditSession.setScrollTop
+ **/
+ this.scrollToRow = function(row) {
+ this.session.setScrollTop(row * this.lineHeight);
+ };
+
+ this.alignCursor = function(cursor, alignment) {
+ if (typeof cursor == "number")
+ cursor = {row: cursor, column: 0};
+
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
+ var h = this.$size.scrollerHeight - this.lineHeight;
+ var offset = pos.top - h * (alignment || 0);
+
+ this.session.setScrollTop(offset);
+ return offset;
+ };
+
+ this.STEPS = 8;
+ this.$calcSteps = function(fromValue, toValue){
+ var i = 0;
+ var l = this.STEPS;
+ var steps = [];
+
+ var func = function(t, x_min, dx) {
+ return dx * (Math.pow(t - 1, 3) + 1) + x_min;
+ };
+
+ for (i = 0; i < l; ++i)
+ steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));
+
+ return steps;
+ };
+
+ /**
+ * Gracefully scrolls the editor to the row indicated.
+ * @param {Number} line A line number
+ * @param {Boolean} center If `true`, centers the editor the to indicated line
+ * @param {Boolean} animate If `true` animates scrolling
+ * @param {Function} callback Function to be called after the animation has finished
+ *
+ *
+ **/
+ this.scrollToLine = function(line, center, animate, callback) {
+ var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});
+ var offset = pos.top;
+ if (center)
+ offset -= this.$size.scrollerHeight / 2;
+
+ var initialScroll = this.scrollTop;
+ this.session.setScrollTop(offset);
+ if (animate !== false)
+ this.animateScrolling(initialScroll, callback);
+ };
+
+ this.animateScrolling = function(fromValue, callback) {
+ var toValue = this.scrollTop;
+ if (!this.$animatedScroll)
+ return;
+ var _self = this;
+
+ if (fromValue == toValue)
+ return;
+
+ if (this.$scrollAnimation) {
+ var oldSteps = this.$scrollAnimation.steps;
+ if (oldSteps.length) {
+ fromValue = oldSteps[0];
+ if (fromValue == toValue)
+ return;
+ }
+ }
+
+ var steps = _self.$calcSteps(fromValue, toValue);
+ this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};
+
+ clearInterval(this.$timer);
+
+ _self.session.setScrollTop(steps.shift());
+ this.$timer = setInterval(function() {
+ if (steps.length) {
+ _self.session.setScrollTop(steps.shift());
+ // trick session to think it's already scrolled to not loose toValue
+ _self.session.$scrollTop = toValue;
+ } else if (toValue != null) {
+ _self.session.$scrollTop = -1;
+ _self.session.setScrollTop(toValue);
+ toValue = null;
+ } else {
+ // do this on separate step to not get spurious scroll event from scrollbar
+ _self.$timer = clearInterval(_self.$timer);
+ _self.$scrollAnimation = null;
+ callback && callback();
+ }
+ }, 10);
+ };
+
+ /**
+ * Scrolls the editor to the y pixel indicated.
+ * @param {Number} scrollTop The position to scroll to
+ *
+ *
+ * @returns {Number}
+ **/
+ this.scrollToY = function(scrollTop) {
+ // after calling scrollBar.setScrollTop
+ // scrollbar sends us event with same scrollTop. ignore it
+ if (this.scrollTop !== scrollTop) {
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ this.scrollTop = scrollTop;
+ }
+ };
+
+ /**
+ * Scrolls the editor across the x-axis to the pixel indicated.
+ * @param {Number} scrollLeft The position to scroll to
+ *
+ *
+ * @returns {Number}
+ **/
+ this.scrollToX = function(scrollLeft) {
+ if (this.scrollLeft !== scrollLeft)
+ this.scrollLeft = scrollLeft;
+ this.$loop.schedule(this.CHANGE_H_SCROLL);
+ };
+
+ /**
+ * Scrolls the editor across both x- and y-axes.
+ * @param {Number} x The x value to scroll to
+ * @param {Number} y The y value to scroll to
+ **/
+ this.scrollTo = function(x, y) {
+ this.session.setScrollTop(y);
+ this.session.setScrollLeft(y);
+ };
+
+ /**
+ * Scrolls the editor across both x- and y-axes.
+ * @param {Number} deltaX The x value to scroll by
+ * @param {Number} deltaY The y value to scroll by
+ **/
+ this.scrollBy = function(deltaX, deltaY) {
+ deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);
+ deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);
+ };
+
+ /**
+ * Returns `true` if you can still scroll by either parameter; in other words, you haven't reached the end of the file or line.
+ * @param {Number} deltaX The x value to scroll by
+ * @param {Number} deltaY The y value to scroll by
+ *
+ *
+ * @returns {Boolean}
+ **/
+ this.isScrollableBy = function(deltaX, deltaY) {
+ if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)
+ return true;
+ if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
+ - this.layerConfig.maxHeight - (this.$size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
+ < -1 + this.scrollMargin.bottom)
+ return true;
+ if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
+ return true;
+ if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
+ - this.layerConfig.width < -1 + this.scrollMargin.right)
+ return true;
+ };
+
+ this.pixelToScreenCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth;
+ var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);
+ var col = Math.round(offset);
+
+ return {row: row, column: col, side: offset - col > 0 ? 1 : -1};
+ };
+
+ this.screenToTextCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var col = Math.round(
+ (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth
+ );
+ var row = Math.floor(
+ (y + this.scrollTop - canvasPos.top) / this.lineHeight
+ );
+
+ return this.session.screenToDocumentPosition(row, Math.max(col, 0));
+ };
+
+ /**
+ * Returns an object containing the `pageX` and `pageY` coordinates of the document position.
+ * @param {Number} row The document row position
+ * @param {Number} column The document column position
+ *
+ *
+ *
+ * @returns {Object}
+ **/
+ this.textToScreenCoordinates = function(row, column) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+ var pos = this.session.documentToScreenPosition(row, column);
+
+ var x = this.$padding + Math.round(pos.column * this.characterWidth);
+ var y = pos.row * this.lineHeight;
+
+ return {
+ pageX: canvasPos.left + x - this.scrollLeft,
+ pageY: canvasPos.top + y - this.scrollTop
+ };
+ };
+
+ /**
+ *
+ * Focuses the current container.
+ **/
+ this.visualizeFocus = function() {
+ dom.addCssClass(this.container, "ace_focus");
+ };
+
+ /**
+ *
+ * Blurs the current container.
+ **/
+ this.visualizeBlur = function() {
+ dom.removeCssClass(this.container, "ace_focus");
+ };
+
+ /**
+ * @param {Number} position
+ *
+ * @private
+ **/
+ this.showComposition = function(position) {
+ if (!this.$composition)
+ this.$composition = {
+ keepTextAreaAtCursor: this.$keepTextAreaAtCursor,
+ cssText: this.textarea.style.cssText
+ };
+
+ this.$keepTextAreaAtCursor = true;
+ dom.addCssClass(this.textarea, "ace_composition");
+ this.textarea.style.cssText = "";
+ this.$moveTextAreaToCursor();
+ };
+
+ /**
+ * @param {String} text A string of text to use
+ *
+ * Sets the inner text of the current composition to `text`.
+ **/
+ this.setCompositionText = function(text) {
+ this.$moveTextAreaToCursor();
+ };
+
+ /**
+ *
+ * Hides the current composition.
+ **/
+ this.hideComposition = function() {
+ if (!this.$composition)
+ return;
+
+ dom.removeCssClass(this.textarea, "ace_composition");
+ this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;
+ this.textarea.style.cssText = this.$composition.cssText;
+ this.$composition = null;
+ };
+
+ /**
+ * [Sets a new theme for the editor. `theme` should exist, and be a directory path, like `ace/theme/textmate`.]{: #VirtualRenderer.setTheme}
+ * @param {String} theme The path to a theme
+ * @param {Function} cb optional callback
+ *
+ **/
+ this.setTheme = function(theme, cb) {
+ var _self = this;
+ this.$themeValue = theme;
+ _self._dispatchEvent('themeChange',{theme:theme});
+
+ if (!theme || typeof theme == "string") {
+ var moduleName = theme || "ace/theme/textmate";
+ config.loadModule(["theme", moduleName], afterLoad);
+ } else {
+ afterLoad(theme);
+ }
+
+ function afterLoad(module) {
+ if (_self.$themeValue != theme)
+ return cb && cb();
+ if (!module.cssClass)
+ return;
+ dom.importCssString(
+ module.cssText,
+ module.cssClass,
+ _self.container.ownerDocument
+ );
+
+ if (_self.theme)
+ dom.removeCssClass(_self.container, _self.theme.cssClass);
+
+ // this is kept only for backwards compatibility
+ _self.$theme = module.cssClass;
+
+ _self.theme = module;
+ dom.addCssClass(_self.container, module.cssClass);
+ dom.setCssClass(_self.container, "ace_dark", module.isDark);
+
+ var padding = "padding" in module ? module.padding : 4;
+ if (_self.$padding && padding != _self.$padding)
+ _self.setPadding(padding);
+
+ // force re-measure of the gutter width
+ if (_self.$size) {
+ _self.$size.width = 0;
+ _self.onResize();
+ }
+
+ _self._dispatchEvent('themeLoaded', {theme:module});
+ cb && cb();
+ }
+ };
+
+ /**
+ * [Returns the path of the current theme.]{: #VirtualRenderer.getTheme}
+ * @returns {String}
+ **/
+ this.getTheme = function() {
+ return this.$themeValue;
+ };
+
+ // Methods allows to add / remove CSS classnames to the editor element.
+ // This feature can be used by plug-ins to provide a visual indication of
+ // a certain mode that editor is in.
+
+ /**
+ * [Adds a new class, `style`, to the editor.]{: #VirtualRenderer.setStyle}
+ * @param {String} style A class name
+ *
+ **/
+ this.setStyle = function(style, include) {
+ dom.setCssClass(this.container, style, include != false);
+ };
+
+ /**
+ * [Removes the class `style` from the editor.]{: #VirtualRenderer.unsetStyle}
+ * @param {String} style A class name
+ *
+ **/
+ this.unsetStyle = function(style) {
+ dom.removeCssClass(this.container, style);
+ };
+
+ /**
+ * @param {String} cursorStyle A css cursor style
+ *
+ **/
+ this.setMouseCursor = function(cursorStyle) {
+ this.content.style.cursor = cursorStyle;
+ };
+
+ /**
+ * Destroys the text and cursor layers for this renderer.
+ **/
+ this.destroy = function() {
+ this.$textLayer.destroy();
+ this.$cursorLayer.destroy();
+ };
+
+}).call(VirtualRenderer.prototype);
+
+
+config.defineOptions(VirtualRenderer.prototype, "renderer", {
+ animatedScroll: {initialValue: false},
+ showInvisibles: {
+ set: function(value) {
+ if (this.$textLayer.setShowInvisibles(value))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ },
+ initialValue: false
+ },
+ showPrintMargin: {
+ set: function() { this.$updatePrintMargin(); },
+ initialValue: true
+ },
+ printMarginColumn: {
+ set: function() { this.$updatePrintMargin(); },
+ initialValue: 80
+ },
+ printMargin: {
+ set: function(val) {
+ if (typeof val == "number")
+ this.$printMarginColumn = val;
+ this.$showPrintMargin = !!val;
+ this.$updatePrintMargin();
+ },
+ get: function() {
+ return this.$showPrintMargin && this.$printMarginColumn;
+ }
+ },
+ showGutter: {
+ set: function(show){
+ this.$gutter.style.display = show ? "block" : "none";
+ this.onGutterResize();
+ },
+ initialValue: true
+ },
+ fadeFoldWidgets: {
+ set: function(show) {
+ dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show);
+ },
+ initialValue: false
+ },
+ showFoldWidgets: {
+ set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},
+ initialValue: true
+ },
+ displayIndentGuides: {
+ set: function(show) {
+ if (this.$textLayer.setDisplayIndentGuides(show))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ },
+ initialValue: true
+ },
+ highlightGutterLine: {
+ set: function(shouldHighlight) {
+ if (!this.$gutterLineHighlight) {
+ this.$gutterLineHighlight = dom.createElement("div");
+ this.$gutterLineHighlight.className = "ace_gutter-active-line";
+ this.$gutter.appendChild(this.$gutterLineHighlight);
+ return;
+ }
+
+ this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none";
+ // if cursorlayer have never been updated there's nothing on screen to update
+ if (this.$cursorLayer.$pixelPos)
+ this.$updateGutterLineHighlight();
+ },
+ initialValue: false,
+ value: true
+ },
+ hScrollBarAlwaysVisible: {
+ set: function(val) {
+ if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: false
+ },
+ vScrollBarAlwaysVisible: {
+ set: function(val) {
+ if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: false
+ },
+ fontSize: {
+ set: function(size) {
+ if (typeof size == "number")
+ size = size + "px";
+ this.container.style.fontSize = size;
+ this.updateFontSize();
+ },
+ initialValue: 12
+ },
+ fontFamily: {
+ set: function(name) {
+ this.container.style.fontFamily = name;
+ this.updateFontSize();
+ }
+ },
+ maxLines: {
+ set: function(val) {
+ this.updateFull();
+ }
+ },
+ minLines: {
+ set: function(val) {
+ this.updateFull();
+ }
+ },
+ scrollPastEnd: {
+ set: function(val) {
+ val = +val || 0;
+ if (this.$scrollPastEnd == val)
+ return;
+ this.$scrollPastEnd = val;
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: 0,
+ handlesSet: true
+ },
+ fixedWidthGutter: {
+ set: function(val) {
+ this.$gutterLayer.$fixedWidth = !!val;
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ }
+ }
+});
+
+exports.VirtualRenderer = VirtualRenderer;
+});
diff --git a/src/fauxton/assets/js/libs/ace/virtual_renderer_test.js b/src/fauxton/assets/js/libs/ace/virtual_renderer_test.js
new file mode 100644
index 000000000..e8a8fcbd0
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/virtual_renderer_test.js
@@ -0,0 +1,86 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+if (typeof process !== "undefined") {
+ require("amd-loader");
+ require("./test/mockdom");
+}
+
+define(function(require, exports, module) {
+"use strict";
+
+var EditSession = require("./edit_session").EditSession;
+var VirtualRenderer = require("./virtual_renderer").VirtualRenderer;
+var assert = require("./test/assertions");
+
+module.exports = {
+ "test: screen2text the column should be rounded to the next character edge" : function() {
+ var el = document.createElement("div");
+
+ if (!el.getBoundingClientRect) {
+ console.log("Skipping test: This test only runs in the browser");
+ return;
+ }
+
+ el.style.left = "20px";
+ el.style.top = "30px";
+ el.style.width = "300px";
+ el.style.height = "100px";
+ document.body.appendChild(el);
+
+ var renderer = new VirtualRenderer(el);
+ renderer.setPadding(0);
+ renderer.setSession(new EditSession("1234"));
+
+ var r = renderer.scroller.getBoundingClientRect();
+ function testPixelToText(x, y, row, column) {
+ assert.position(renderer.screenToTextCoordinates(x+r.left, y+r.top), row, column);
+ }
+
+ renderer.characterWidth = 10;
+ renderer.lineHeight = 15;
+
+ testPixelToText(4, 0, 0, 0);
+ testPixelToText(5, 0, 0, 1);
+ testPixelToText(9, 0, 0, 1);
+ testPixelToText(10, 0, 0, 1);
+ testPixelToText(14, 0, 0, 1);
+ testPixelToText(15, 0, 0, 2);
+ document.body.removeChild(el);
+ }
+
+ // change tab size after setDocument (for text layer)
+};
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+}
diff --git a/src/fauxton/assets/js/libs/ace/worker/mirror.js b/src/fauxton/assets/js/libs/ace/worker/mirror.js
new file mode 100644
index 000000000..c521f8fd9
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/worker/mirror.js
@@ -0,0 +1,43 @@
+define(function(require, exports, module) {
+"use strict";
+
+var Document = require("../document").Document;
+var lang = require("../lib/lang");
+
+var Mirror = exports.Mirror = function(sender) {
+ this.sender = sender;
+ var doc = this.doc = new Document("");
+
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ doc.applyDeltas(e.data);
+ deferredUpdate.schedule(_self.$timeout);
+ });
+};
+
+(function() {
+
+ this.$timeout = 500;
+
+ this.setTimeout = function(timeout) {
+ this.$timeout = timeout;
+ };
+
+ this.setValue = function(value) {
+ this.doc.setValue(value);
+ this.deferredUpdate.schedule(this.$timeout);
+ };
+
+ this.getValue = function(callbackId) {
+ this.sender.callback(this.doc.getValue(), callbackId);
+ };
+
+ this.onUpdate = function() {
+ // abstract method
+ };
+
+}).call(Mirror.prototype);
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/worker/worker.js b/src/fauxton/assets/js/libs/ace/worker/worker.js
new file mode 100644
index 000000000..2f250afcf
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/worker/worker.js
@@ -0,0 +1,178 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document) {
+ return;
+}
+
+window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+};
+window.console.error =
+window.console.warn =
+window.console.log =
+window.console.trace = window.console;
+
+window.window = window;
+window.ace = window;
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while(moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function(parentId, id) {
+ if (!id) {
+ id = parentId
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ var chunks = id.split("/");
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+ chunks[0] = window.require.tlns[chunks[0]] || chunks[0];
+ var path = chunks.join("/") + ".js";
+
+ window.require.id = id;
+ importScripts(path);
+ return window.require(parentId, id);
+};
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = []
+ id = window.require.id;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject 'require', 'exports' and
+ // 'module' as dependencies, to provide CommonJS compatibility.
+ deps = ['require', 'exports', 'module']
+
+ if (id.indexOf("text!") === 0)
+ return;
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch(dep) {
+ // Because 'require', 'exports' and 'module' aren't actual
+ // dependencies, we must handle them seperately.
+ case 'require': return req
+ case 'exports': return module.exports
+ case 'module': return module
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep)
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {}
+
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ require.tlns = topLevelNamespaces;
+}
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("ace/lib/oop");
+
+ var Sender = function() {};
+
+ (function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.callback = function(data, callbackId) {
+ postMessage({
+ type: "call",
+ id: callbackId,
+ data: data
+ });
+ };
+
+ this.emit = function(name, data) {
+ postMessage({
+ type: "event",
+ name: name,
+ data: data
+ });
+ };
+
+ }).call(Sender.prototype);
+
+ return new Sender();
+}
+
+window.main = null;
+window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = new clazz(sender);
+ }
+ else if (msg.event && sender) {
+ sender._emit(msg.event, msg.data);
+ }
+};
+})(this); \ No newline at end of file
diff --git a/src/fauxton/assets/js/libs/ace/worker/worker_client.js b/src/fauxton/assets/js/libs/ace/worker/worker_client.js
new file mode 100644
index 000000000..3411d509b
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/worker/worker_client.js
@@ -0,0 +1,226 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+define(function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+var config = require("../config");
+
+var WorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.onMessage = this.onMessage.bind(this);
+ this.onError = this.onError.bind(this);
+
+ // nameToUrl is renamed to toUrl in requirejs 2
+ if (require.nameToUrl && !require.toUrl)
+ require.toUrl = require.nameToUrl;
+
+ var workerUrl;
+ if (config.get("packaged") || !require.toUrl) {
+ workerUrl = config.moduleUrl(mod, "worker");
+ } else {
+ var normalizePath = this.$normalizePath;
+ workerUrl = normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
+
+ var tlns = {};
+ topLevelNamespaces.forEach(function(ns) {
+ tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
+ });
+ }
+
+ this.$worker = new Worker(workerUrl);
+ this.$worker.postMessage({
+ init : true,
+ tlns: tlns,
+ module: mod,
+ classname: classname
+ });
+
+ this.callbackId = 1;
+ this.callbacks = {};
+
+ this.$worker.onerror = this.onError;
+ this.$worker.onmessage = this.onMessage;
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.onError = function(e) {
+ window.console && console.log && console.log(e);
+ throw e;
+ };
+
+ this.onMessage = function(e) {
+ var msg = e.data;
+ switch(msg.type) {
+ case "log":
+ window.console && console.log && console.log.apply(console, msg.data);
+ break;
+
+ case "event":
+ this._emit(msg.name, {data: msg.data});
+ break;
+
+ case "call":
+ var callback = this.callbacks[msg.id];
+ if (callback) {
+ callback(msg.data);
+ delete this.callbacks[msg.id];
+ }
+ break;
+ }
+ };
+
+ this.$normalizePath = function(path) {
+ if (!location.host) // needed for file:// protocol
+ return path;
+ path = path.replace(/^[a-z]+:\/\/[^\/]+/, ""); // Remove domain name and rebuild it
+ path = location.protocol + "//" + location.host
+ // paths starting with a slash are relative to the root (host)
+ + (path.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, ""))
+ + "/" + path.replace(/^[\/]+/, "");
+ return path;
+ };
+
+ this.terminate = function() {
+ this._emit("terminate", {});
+ this.deltaQueue = null;
+ this.$worker.terminate();
+ this.$worker = null;
+ this.$doc.removeEventListener("change", this.changeListener);
+ this.$doc = null;
+ };
+
+ this.send = function(cmd, args) {
+ this.$worker.postMessage({command: cmd, args: args});
+ };
+
+ this.call = function(cmd, args, callback) {
+ if (callback) {
+ var id = this.callbackId++;
+ this.callbacks[id] = callback;
+ args.push(id);
+ }
+ this.send(cmd, args);
+ };
+
+ this.emit = function(event, data) {
+ try {
+ // firefox refuses to clone objects which have function properties
+ // TODO: cleanup event
+ this.$worker.postMessage({event: event, data: {data: data.data}});
+ }
+ catch(ex) {}
+ };
+
+ this.attachToDocument = function(doc) {
+ if(this.$doc)
+ this.terminate();
+
+ this.$doc = doc;
+ this.call("setValue", [doc.getValue()]);
+ doc.on("change", this.changeListener);
+ };
+
+ this.changeListener = function(e) {
+ if (!this.deltaQueue) {
+ this.deltaQueue = [e.data];
+ setTimeout(this.$sendDeltaQueue, 1);
+ } else
+ this.deltaQueue.push(e.data);
+ };
+
+ this.$sendDeltaQueue = function() {
+ var q = this.deltaQueue;
+ if (!q) return;
+ this.deltaQueue = null;
+ if (q.length > 20 && q.length > this.$doc.getLength() >> 1) {
+ this.call("setValue", [this.$doc.getValue()]);
+ } else
+ this.emit("change", {data: q});
+ }
+
+}).call(WorkerClient.prototype);
+
+
+var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.callbackId = 1;
+ this.callbacks = {};
+ this.messageBuffer = [];
+
+ var main = null;
+ var sender = Object.create(EventEmitter);
+ var _self = this;
+
+ this.$worker = {};
+ this.$worker.terminate = function() {};
+ this.$worker.postMessage = function(e) {
+ _self.messageBuffer.push(e);
+ main && setTimeout(processNext);
+ };
+
+ var processNext = function() {
+ var msg = _self.messageBuffer.shift();
+ if (msg.command)
+ main[msg.command].apply(main, msg.args);
+ else if (msg.event)
+ sender._emit(msg.event, msg.data);
+ };
+
+ sender.postMessage = function(msg) {
+ _self.onMessage({data: msg});
+ };
+ sender.callback = function(data, callbackId) {
+ this.postMessage({type: "call", id: callbackId, data: data});
+ };
+ sender.emit = function(name, data) {
+ this.postMessage({type: "event", name: name, data: data});
+ };
+
+ config.loadModule(["worker", mod], function(Main) {
+ main = new Main[classname](sender);
+ while (_self.messageBuffer.length)
+ processNext();
+ });
+};
+
+UIWorkerClient.prototype = WorkerClient.prototype;
+
+exports.UIWorkerClient = UIWorkerClient;
+exports.WorkerClient = WorkerClient;
+
+});
diff --git a/src/fauxton/assets/js/libs/ace/worker/worker_test.js b/src/fauxton/assets/js/libs/ace/worker/worker_test.js
new file mode 100644
index 000000000..c0a5b0a77
--- /dev/null
+++ b/src/fauxton/assets/js/libs/ace/worker/worker_test.js
@@ -0,0 +1,125 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Distributed under the BSD license:
+ *
+ * Copyright (c) 2010, Ajax.org B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Ajax.org B.V. nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// The loading of ace/worker/worker is complicated, because when we need to load
+// it via RequireJS, it needs a shim to make it into a AMD-module.
+// When using the AMD-loader it's just works, so we just it load the file now
+
+require("amd-loader");
+
+define(function(require, exports, module) {
+"use strict";
+
+var assert = require("../test/assertions");
+var worker = require("./worker")
+
+module.exports = {
+ setUp : function() {
+ // And define a few mock dependency modules
+ worker.define("depA", [], function(require, exports, module) {
+ module.exports = 'dependency A';
+ })
+ worker.define("depB", [], function(require, exports, module) {
+ module.exports = 'dependency B';
+ })
+ },
+
+ "test: define() with no dependencies, and CommonJS-compatability require()-calls" : function() {
+ // We want to be able to call define without an id or deps, but
+ // since we aren't loading an external file, we must explicitly give
+ // it some kind of id, in this case 'test1'.
+ worker.require.id = 'test1';
+ // Now define out module
+ worker.define(function(require, exports, module) {
+ var depA = require("depA");
+ var depB = require("depB");
+ assert.equal("dependency A", depA);
+ assert.equal("dependency B", depB);
+ module.exports = 'test 1';
+ })
+ // And then try and require it
+ var res = worker.require("test1")
+ assert.equal("test 1", res)
+ },
+ "test: define() with dependencies" : function() {
+ // We want to be able to call define without an id, but since we aren't
+ // loading an external file, we must explicitly give it some kind of
+ // id, in this case 'test2'.
+ worker.require.id = 'test2';
+ // Now define our module
+ worker.define(['depA', 'depB'], function(depA, depB) {
+ assert.equal("dependency A", depA);
+ assert.equal("dependency B", depB);
+ return 'test 2';
+ })
+ // And then try and require it
+ var res = worker.require("test2");
+ assert.equal("test 2", res);
+ },
+ "test: define() used require, exports and module as a dependency": function() {
+ // We want to be able to call define without an id, but since we aren't
+ // loading an external file, we must explicitly give it some kind of
+ // id, in this case 'test3'.
+ worker.require.id = 'test3';
+ // Now define our module
+ worker.define(['require', 'exports', 'module', 'depA', 'depB'], function(require, exports, module) {
+ var depA = require("depA");
+ var depB = require("depB");
+ assert.equal("dependency A", depA);
+ assert.equal("dependency B", depB);
+ module.exports = 'test 3';
+ })
+ // And then try and require it
+ var res = worker.require("test3");
+ assert.equal("test 3", res);
+ },
+ "test: define() with a mix of require and actual dependecies": function() {
+ // We want to be able to call define without an id, but since we aren't
+ // loading an external file, we must explicitly give it some kind of
+ // id, in this case 'test4'.
+ worker.require.id = 'test4';
+ // Now define our module
+ worker.define(['depA', 'require'], function(depA, require) {
+ var depB = require("depB");
+ assert.equal("dependency A", depA);
+ assert.equal("dependency B", depB);
+ return 'test 4';
+ })
+ // And then try and require it
+ var res = worker.require("test4");
+ assert.equal("test 4", res);
+ }
+}
+
+});
+
+if (typeof module !== "undefined" && module === require.main) {
+ require("asyncjs").test.testcase(module.exports).exec()
+} \ No newline at end of file
diff --git a/src/fauxton/assets/less/fauxton.less b/src/fauxton/assets/less/fauxton.less
index 30d872db1..dd2bad701 100644
--- a/src/fauxton/assets/less/fauxton.less
+++ b/src/fauxton/assets/less/fauxton.less
@@ -985,3 +985,17 @@ div.spinner {
}
}
+#map-function, #reduce-function{
+ width: 100%;
+ height: 300px;
+ font-size: 16px;
+}
+
+#editor-container {
+ //background: white;
+ width: 1316px;
+ height: 688px;
+ font-size: 16px;
+}
+
+